Skip to content
Open
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
11 changes: 10 additions & 1 deletion lib/consignment.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,16 @@ var createConsignmentProduct = function(args, connectionInfo, retryCounter) {
};
log.debug(options.method + ' ' + options.url);

return utils.sendRequest(options, args, connectionInfo, createConsignmentProduct, retryCounter);
return utils.sendRequest(options, args, connectionInfo, createConsignmentProduct, retryCounter)
.then(function(response){
if(!response.id){
var error = new Error("Error adding consignment product");
response.statusCode = 500;
error.response = response;
return Promise.reject(error);
}
return Promise.resolve(response);
});
};

var createStockOrder = function(args, connectionInfo, retryCounter) {
Expand Down
11 changes: 9 additions & 2 deletions vend.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,13 @@ var argsForInput = {
required: false,
key: 'page_size',
value: undefined
}
},
deleted: {
required: false,
key: 'deleted',
value: undefined,
description: 'Indicates whether deleted items should be included in the response.'
},
};
},
create: function () {
Expand Down Expand Up @@ -672,7 +678,8 @@ var fetchProductTypes = function (args, connectionInfo, retryCounter) {
// Server side no longer limits you to pages of size 200 and it can handle north of 10000 easy
qs: {
after: args.after.value,
page_size: args.pageSize.value // eslint-disable-line camelcase
page_size: args.pageSize.value, // eslint-disable-line camelcase
deleted: args.deleted.value
}
};

Expand Down