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
2323 */
2424 public function getOrderShippingAddress (
2525 OrderInterface $ order
26- ) {
26+ ): ? array {
2727 $ shippingAddress = null ;
2828 if ($ order ->getShippingAddress ()) {
2929 $ shippingAddress = $ this ->orderAddressDataFormatter ($ order ->getShippingAddress ());
@@ -39,7 +39,7 @@ public function getOrderShippingAddress(
3939 */
4040 public function getOrderBillingAddress (
4141 OrderInterface $ order
42- ) {
42+ ): ? array {
4343 $ billingAddress = null ;
4444 if ($ order ->getBillingAddress ()) {
4545 $ 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
2525 $ orderPayment = $ orderModel ->getPayment ();
2626 return [
2727 [
28- 'name ' => $ orderPayment ->getAdditionalInformation ()['method_title ' ] ?? 'method_title ' ,
29- 'type ' => $ orderPayment ->getMethod () ?? null ,
28+ 'name ' => $ orderPayment ->getAdditionalInformation ()['method_title ' ] ?? ' ' ,
29+ 'type ' => $ orderPayment ->getMethod (),
3030 'additional_data ' => []
3131 ]
3232 ];
Original file line number Diff line number Diff line change @@ -63,11 +63,51 @@ public function testGetCustomerOrdersSimpleProductQuery()
6363 number
6464 status
6565 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+ }
71111 items{
72112 quantity_ordered
73113 product_sku
@@ -1300,12 +1340,52 @@ private function getCustomerOrderQuery($orderNumber): array
13001340 number
13011341 order_date
13021342 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}}
13091389 total {
13101390 base_grand_total{value currency}
13111391 grand_total{value currency}
You can’t perform that action at this time.
0 commit comments