Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
fix(orders): BuyerName as string
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman991 authored and moltar committed May 4, 2021
1 parent 8643899 commit aafb154
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ export const parseResponse = <T>(
tagValueProcessor: (value) => decode(value),
// force to be parsed as string
stopNodes: [
'BuyerName',
// ? ShippingAddress fields
'Name',
'AddressLine1',
'AddressLine2',
Expand Down
2 changes: 1 addition & 1 deletion test/unit/__fixtures__/orders_list_orders.xml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
</PaymentMethodDetails>
<MarketplaceId>A1VC38T7YXB528</MarketplaceId>
<BuyerEmail>5vlhEXAMPLEh9h5@marketplace.amazon.co.jp</BuyerEmail>
<BuyerName>Jane Smith</BuyerName>
<BuyerName>321321321</BuyerName>
<ShipmentServiceLevelCategory>Standard </ShipmentServiceLevelCategory>
<OrderType>SourcingOnDemandOrder</OrderType>
<IsBusinessOrder>false</IsBusinessOrder>
Expand Down
2 changes: 1 addition & 1 deletion test/unit/__snapshots__/orders.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ Array [
Object {
"AmazonOrderId": "058-1233752-8214740",
"BuyerEmail": "5vlhEXAMPLEh9h5@marketplace.amazon.co.jp",
"BuyerName": "Jane Smith",
"BuyerName": "321321321",
"FulfillmentChannel": "MFN",
"IsBusinessOrder": false,
"IsEstimatedShipDateSet": true,
Expand Down

0 comments on commit aafb154

Please sign in to comment.