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 9
9
10
10
use Magento \Framework \Api \ExtensibleDataObjectConverter ;
11
11
use Magento \Quote \Api \Data \AddressInterface ;
12
+ use Magento \Framework \GraphQl \Query \Uid ;
12
13
use Magento \Quote \Model \Quote \Address as QuoteAddress ;
13
14
14
15
/**
@@ -24,9 +25,17 @@ class ExtractQuoteAddressData
24
25
/**
25
26
* @param ExtensibleDataObjectConverter $dataObjectConverter
26
27
*/
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
+ )
28
36
{
29
37
$ this ->dataObjectConverter = $ dataObjectConverter ;
38
+ $ this ->uidEncoder = $ uidEncoder ;
30
39
}
31
40
32
41
/**
@@ -52,6 +61,7 @@ public function execute(QuoteAddress $address): array
52
61
'label ' => $ address ->getRegion (),
53
62
'region_id ' => $ address ->getRegionId ()
54
63
],
64
+ 'uid ' =>$ this ->uidEncoder ->encode ((string ) $ address ->getAddressId ()) ,
55
65
'street ' => $ address ->getStreet (),
56
66
'items_weight ' => $ address ->getWeight (),
57
67
'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
221
221
}
222
222
223
223
interface CartAddressInterface @typeResolver (class : " \\ Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ CartAddressTypeResolver" ) {
224
+ uid : String ! @doc (description : " The unique id of the customer address." )
224
225
firstname : String ! @doc (description : " The first name of the customer or guest." )
225
226
lastname : String ! @doc (description : " The last name of the customer or guest." )
226
227
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
160
160
{
161
161
cart(cart_id: " $ maskedQuoteId") {
162
162
shipping_addresses {
163
+ uid
163
164
firstname
164
165
lastname
165
166
company
166
167
street
167
168
city
168
- region
169
+ region
169
170
{
170
171
code
171
172
label
172
173
}
173
174
postcode
174
- country
175
+ country
175
176
{
176
177
code
177
178
label
You can’t perform that action at this time.
0 commit comments