File tree Expand file tree Collapse file tree 3 files changed +95
-15
lines changed
app/code/Magento/SalesGraphQl/Model/Order
dev/tests/api-functional/testsuite/Magento/GraphQl/Sales Expand file tree Collapse file tree 3 files changed +95
-15
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class OrderAddress
23
23
*/
24
24
public function getOrderShippingAddress (
25
25
OrderInterface $ order
26
- ) {
26
+ ): ? array {
27
27
$ shippingAddress = null ;
28
28
if ($ order ->getShippingAddress ()) {
29
29
$ shippingAddress = $ this ->orderAddressDataFormatter ($ order ->getShippingAddress ());
@@ -39,7 +39,7 @@ public function getOrderShippingAddress(
39
39
*/
40
40
public function getOrderBillingAddress (
41
41
OrderInterface $ order
42
- ) {
42
+ ): ? array {
43
43
$ billingAddress = null ;
44
44
if ($ order ->getBillingAddress ()) {
45
45
$ billingAddress = $ this ->orderAddressDataFormatter ($ order ->getBillingAddress ());
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ public function getOrderPaymentMethod(OrderInterface $orderModel): array
25
25
$ orderPayment = $ orderModel ->getPayment ();
26
26
return [
27
27
[
28
- 'name ' => $ orderPayment ->getAdditionalInformation ()['method_title ' ] ?? 'method_title ' ,
29
- 'type ' => $ orderPayment ->getMethod () ?? null ,
28
+ 'name ' => $ orderPayment ->getAdditionalInformation ()['method_title ' ] ?? ' ' ,
29
+ 'type ' => $ orderPayment ->getMethod (),
30
30
'additional_data ' => []
31
31
]
32
32
];
Original file line number Diff line number Diff line change @@ -63,11 +63,51 @@ public function testGetCustomerOrdersSimpleProductQuery()
63
63
number
64
64
status
65
65
order_date
66
- payment_methods{name type additional_data{ name value}}
67
- shipping_address{firstname lastname city company country_code fax middlename postcode prefix street region
68
- region_id suffix telephone vat_id}
69
- billing_address{firstname lastname city company country_code fax middlename postcode prefix street region
70
- region_id suffix telephone vat_id}
66
+ payment_methods
67
+ {
68
+ name
69
+ type
70
+ additional_data
71
+ {
72
+ name
73
+ value
74
+ }
75
+ }
76
+ shipping_address {
77
+ firstname
78
+ lastname
79
+ city
80
+ company
81
+ country_code
82
+ fax
83
+ middlename
84
+ postcode
85
+ prefix
86
+ street
87
+ region
88
+ region_id
89
+ suffix
90
+ telephone
91
+ vat_id
92
+ }
93
+ billing_address
94
+ {
95
+ firstname
96
+ lastname
97
+ city
98
+ company
99
+ country_code
100
+ fax
101
+ middlename
102
+ postcode
103
+ prefix
104
+ region
105
+ region_id
106
+ street
107
+ suffix
108
+ telephone
109
+ vat_id
110
+ }
71
111
items{
72
112
quantity_ordered
73
113
product_sku
@@ -1300,12 +1340,52 @@ private function getCustomerOrderQuery($orderNumber): array
1300
1340
number
1301
1341
order_date
1302
1342
status
1303
- payment_methods{name type additional_data{ name value}}
1304
- shipping_address{firstname lastname city company country_code fax middlename postcode prefix street region
1305
- region_id suffix telephone vat_id}
1306
- billing_address{firstname lastname city company country_code fax middlename postcode prefix street region
1307
- region_id suffix telephone vat_id}
1308
- items{product_name product_sku quantity_ordered discounts {amount{value currency} label}}
1343
+ payment_methods
1344
+ {
1345
+ name
1346
+ type
1347
+ additional_data
1348
+ {
1349
+ name
1350
+ value
1351
+ }
1352
+ }
1353
+ shipping_address {
1354
+ firstname
1355
+ lastname
1356
+ city
1357
+ company
1358
+ country_code
1359
+ fax
1360
+ middlename
1361
+ postcode
1362
+ prefix
1363
+ street
1364
+ region
1365
+ region_id
1366
+ suffix
1367
+ telephone
1368
+ vat_id
1369
+ }
1370
+ billing_address
1371
+ {
1372
+ firstname
1373
+ lastname
1374
+ city
1375
+ company
1376
+ country_code
1377
+ fax
1378
+ middlename
1379
+ postcode
1380
+ prefix
1381
+ region
1382
+ region_id
1383
+ street
1384
+ suffix
1385
+ telephone
1386
+ vat_id
1387
+ }
1388
+ items{product_name product_sku quantity_ordered discounts {amount{value currency} label}}
1309
1389
total {
1310
1390
base_grand_total{value currency}
1311
1391
grand_total{value currency}
You can’t perform that action at this time.
0 commit comments