mws-finances-sdk-promises
v1.0.1
Published
Amazon Marketplace Web Services client with support for all api calls (including Finances API), using ES6 Promises.
Downloads
8
Maintainers
Readme
mws-finances-sdk-promises
Originally forked from [mws-sdk-promises)(https://github.com/vedmalex/mws-sdk)
Modification: MWS Finance API support added
Example
Initialize
var MWS = require('mws-sdk-promises'),
client = new MWS.Client(
'accessKeyId',
'secretAccessKey',
'merchantId',
{
// Optional Auth Token when using delegated Developer access.
authToken: 'amzn.mws...',
// request options (https://github.com/request/request#requestoptions-callback)
requestOpts: {
proxy: 'http://PROXY_HOST:PROXY_PORT',
encoding: null
}
}
),
MarketplaceId = "ATVPDKIKX0DER";
now you can use it
ListFinancialEvents(client, {
PostedAfter : '2018-08-01'
})
.catch(function(error) {
console.error("error: " + error);
})
.then(function(RESULT){
callback(null, RESULT);
return;
});
function ListFinancialEvents(client, args) {
var req = MWS.Finances.requests.ListFinancialEvents();
req.set(args);
return client.invoke(req);
}