Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Products.GetMyFeesEstimate #72

Open
colinskow opened this issue Apr 16, 2017 · 1 comment
Open

Support Products.GetMyFeesEstimate #72

colinskow opened this issue Apr 16, 2017 · 1 comment

Comments

@colinskow
Copy link

colinskow commented Apr 16, 2017

I would like to be able to use this library to estimate fees for a given list of ASIN numbers.
http://docs.developer.amazonservices.com/en_US/products/Products_GetMyFeesEstimate.html

This should be simple, except that the request parameters are a list of objects, and I'm not sure if that is supported.

@dobesv
Copy link

dobesv commented Apr 24, 2017

I monkeypatched it in there like this:

require('../node_modules/mws-api/lib/sections/products.js').requests.GetMyFeesEstimate = {
  params: {
    MarketplaceId: {name:'FeesEstimateRequestList.FeesEstimateRequest.1.MarketplaceId', required:true},
    IdType: {name:'FeesEstimateRequestList.FeesEstimateRequest.1.IdType', required:true},
    IdValue: {name:'FeesEstimateRequestList.FeesEstimateRequest.1.IdValue', required:true},
    IsAmazonFulfilled: {name:'FeesEstimateRequestList.FeesEstimateRequest.1.IsAmazonFulfilled', required:true},
    Identifier: {name:'FeesEstimateRequestList.FeesEstimateRequest.1.Identifier', required:true},
    CurrencyCode: {name:'FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.ListingPrice.CurrencyCode', required:true},
    PriceToEstimateFees: {name:'FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.ListingPrice.Amount', required:true},
  },
  data: 'FeesEstimateResultList.FeesEstimateResult.FeesEstimate'
};

HOWEVER, the response doesn't start with <?xml so it gets parsed as CSV, which is a problem that I have temporarily solved by editing the XML check in client.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants