Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified feeds.js
100644 → 100755
Empty file.
Empty file modified index.js
100644 → 100755
Empty file.
Empty file modified lib/api.js
100644 → 100755
Empty file.
Empty file modified lib/client.js
100644 → 100755
Empty file.
Empty file modified lib/complexList.js
100644 → 100755
Empty file.
Empty file modified lib/enum.js
100644 → 100755
Empty file.
Empty file modified lib/feeds/fulfillment.js
100644 → 100755
Empty file.
Empty file modified lib/feeds/index.js
100644 → 100755
Empty file.
Empty file modified lib/feeds/orders.js
100644 → 100755
Empty file.
Empty file modified lib/feeds/products.js
100644 → 100755
Empty file.
12 changes: 12 additions & 0 deletions lib/request.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function getValueForParam(param, val) {
return String(!!val);

case Type.COMPLEX:
return val;
// return param.construct(members); // TODO: fix

default:
Expand Down Expand Up @@ -156,6 +157,13 @@ class AmazonMwsRequest {
_.forEach(values, (value, i) => {
this.values[`${param.name}.${i + 1}`] = value;
});
} else if (param.type == Type.COMPLEX) {
let members = value;
for (var i = 0; i < members.length; i++) {
for (var j in members[i]) {
this.values['Items.members.' + (i + 1) + '.' + j] = members[i][j];
}
}
}
else {
this.values[param.name] = getValue(value);
Expand Down Expand Up @@ -188,6 +196,10 @@ class AmazonMwsRequest {
return false;
}

if(param.type == Type.COMPLEX) {
return false;
}

const value = isList ? this.values[`${param.name}.1`] : this.values[param.name];

// intentional `==`
Expand Down
Empty file modified lib/sections/feeds.js
100644 → 100755
Empty file.
Empty file modified lib/sections/finances.js
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions lib/sections/fulfillment.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,14 @@ const requests = {

CreateFulfillmentOrder: {
params: {
MarketplaceId: {},
SellerFulfillmentOrderId: { required },
ShippingSpeedCategory: { required, type: 'fba.ShippingSpeedCategory' },
DisplayableOrderId: { required },
DisplayableOrderDateTime: { type: Type.TIMESTAMP },
DisplayableOrderComment: {},
FulfillmentPolicy: { type: 'fba.FulfillmentPolicy' },
FulfillmentAction: {},
FulfillmentMethod: {},
NotificationEmails: { name: 'NotificationEmailList.member', list },
DestName: { name: 'DestinationAddress.Name' },
Expand Down
Empty file modified lib/sections/orders.js
100644 → 100755
Empty file.
Empty file modified lib/sections/products.js
100644 → 100755
Empty file.
Empty file modified lib/sections/reports.js
100644 → 100755
Empty file.
Empty file modified lib/sections/sellers.js
100644 → 100755
Empty file.
Empty file modified lib/types.js
100644 → 100755
Empty file.
Empty file modified lib/xml.js
100644 → 100755
Empty file.
Empty file modified package.json
100644 → 100755
Empty file.
Empty file modified test/xml.js
100644 → 100755
Empty file.