UNPKG

mws-zodane-advanced

Version:

fixed throtal resend

125 lines (103 loc) 2.99 kB
/** * mws-advanced module for interacting with Amazon Merchant Web Services * @module mws-advanced */ // https://sellercentral.amazon.com/forums/thread.jspa?threadID=369774&tstart=75 // http://s3.amazonaws.com/devo.docs.developer.amazonservices.com/en_US/sellers/Sellers_ListMarketplaceParticipations.html const { getMws, init, callEndpoint } = require('./callEndpoint'); const { getMarketplaces } = require('./get-marketplaces'); const { listOrderItems, listOrderItemsNextToken} = require('./list-order-items'); const { listOrders, listOrderNextToken, getOrders} = require('./list-orders'); const { listFinancialEvents } = require('./list-financial-events'); const { listInventorySupply } = require('./list-inventory-supply'); const { getMatchingProductForId } = require('./get-matching-product'); const { getLowestPricedOffersForASIN } = require('./get-lowest-priced-offers'); const { getReport, getReportList, getReportListAll, getReportListByNextToken, getReportRequestList, requestAndDownloadReport, requestReport, } = require('./reports'); /* function MM (opts){ this.mws = init(opts); } MM.prototype = { callEndpoint, getMarketplaces, listOrderItems, listOrders, listFinancialEvents, listInventorySupply, getMatchingProductForId, getLowestPricedOffersForASIN, getReport, getReportList, getReportListAll, getReportListByNextToken, getReportRequestList, requestAndDownloadReport, requestReport, } MM.prototype.destory = function () { this.mws = null; } module.exports = MM;*/ /* module.exports = { getMws, init, callEndpoint, getMarketplaces, listOrderItems, listOrders, listFinancialEvents, listInventorySupply, getMatchingProductForId, getLowestPricedOffersForASIN, getReport, getReportList, getReportListAll, getReportListByNextToken, getReportRequestList, requestAndDownloadReport, requestReport, };*/ class ZodMws { constructor (opts) { this.mws = init(opts); } getMWS () { return this.mws; } callEndpoint () { return callEndpoint.call(this, {}, {}, this.mws); } getMarketplaces () { return getMarketplaces.call(this, this.mws); } listOrderItems (amazonOrderId) { return listOrderItems.call(this, amazonOrderId, this.mws); } listOrderItemsNextToken (token) { return listOrderItemsNextToken.call(this, token, this.mws); } listOrders (options) { return listOrders.call(this, options, this.mws); } listOrderNextToken (options) { return listOrderNextToken.call(this, options, this.mws); } getOrders (orderIds) { return getOrders.call(this, orderIds, this.mws); } getMatchingProductForId (opts) { return getMatchingProductForId.call(this, opts, this.mws); } destroy () { this.mws = null; } }; module.exports = ZodMws;