File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
app/code/Magento/QuoteGraphQl
dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 99
1010use Magento \Framework \Api \ExtensibleDataObjectConverter ;
1111use Magento \Quote \Api \Data \AddressInterface ;
12+ use Magento \Framework \GraphQl \Query \Uid ;
1213use Magento \Quote \Model \Quote \Address as QuoteAddress ;
1314
1415/**
@@ -24,9 +25,17 @@ class ExtractQuoteAddressData
2425 /**
2526 * @param ExtensibleDataObjectConverter $dataObjectConverter
2627 */
27- public function __construct (ExtensibleDataObjectConverter $ dataObjectConverter )
28+
29+ /** @var Uid */
30+ private $ uidEncoder ;
31+
32+ public function __construct (
33+ ExtensibleDataObjectConverter $ dataObjectConverter ,
34+ Uid $ uidEncoder
35+ )
2836 {
2937 $ this ->dataObjectConverter = $ dataObjectConverter ;
38+ $ this ->uidEncoder = $ uidEncoder ;
3039 }
3140
3241 /**
@@ -52,6 +61,7 @@ public function execute(QuoteAddress $address): array
5261 'label ' => $ address ->getRegion (),
5362 'region_id ' => $ address ->getRegionId ()
5463 ],
64+ 'uid ' =>$ this ->uidEncoder ->encode ((string ) $ address ->getAddressId ()) ,
5565 'street ' => $ address ->getStreet (),
5666 'items_weight ' => $ address ->getWeight (),
5767 'customer_notes ' => $ address ->getCustomerNotes ()
Original file line number Diff line number Diff line change @@ -221,6 +221,7 @@ type Cart @doc(description: "Contains the contents and other details about a gue
221221}
222222
223223interface CartAddressInterface @typeResolver (class : " \\ Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ CartAddressTypeResolver" ) {
224+ uid : String ! @doc (description : " The unique id of the customer address." )
224225 firstname : String ! @doc (description : " The first name of the customer or guest." )
225226 lastname : String ! @doc (description : " The last name of the customer or guest." )
226227 company : String @doc (description : " The company specified for the billing or shipping address." )
Original file line number Diff line number Diff line change @@ -160,18 +160,19 @@ private function getQuery(string $maskedQuoteId): string
160160{
161161 cart(cart_id: " $ maskedQuoteId") {
162162 shipping_addresses {
163+ uid
163164 firstname
164165 lastname
165166 company
166167 street
167168 city
168- region
169+ region
169170 {
170171 code
171172 label
172173 }
173174 postcode
174- country
175+ country
175176 {
176177 code
177178 label
You can’t perform that action at this time.
0 commit comments