ScaleLeap / amazon-mws-api-sdk

A fully typed TypeScript and Node.js Amazon MWS API Unofficial SDK
https://npm.im/@scaleleap/amazon-mws-api-sdk
MIT License
20 stars 12 forks source link

Problem with AdjustmentType #447

Closed AlexanderGaivorontsev closed 3 years ago

AlexanderGaivorontsev commented 3 years ago

Hi! I use your lib for working with Amazon. But I met this problem: Problem with the value of property "ListFinancialEventsByNextTokenResponse": Problem with the value of property "ListFinancialEventsByNextTokenResult": Problem with the value of property "FinancialEvents": Problem with the value of property "AdjustmentEventList": One of the following problems occured: (0) Problem with the value at index 3: Problem with the value of property "AdjustmentType": One of the following problems occured: (0) Expected an enum member, but received a string with value "Other", (1) Expected an undefined, but received a string with value "Other", (1) Expected an undefined, but received an object with value {"AdjustmentEvent":[{"AdjustmentType":"PostageBilling_DeliveryConfirmation","AdjustmentAmount":{"CurrencyAmount":0,"CurrencyCode":"USD"},"PostedDate":"2021-09-28T23:46:48.032Z"},{"AdjustmentType":"PostageBilling_Postage","AdjustmentAmount":{"CurrencyAmount":-5.27,"CurrencyCode":"USD"},"PostedDate":"2021-09-28T23:46:48.032Z"},{"AdjustmentType":"PostageBilling_TransactionFee","AdjustmentAmount":{"CurrencyAmount":0,"CurrencyCode":"USD"},"PostedDate":"2021-09-28T23:46:48.032Z"},{"AdjustmentType":"Other","AdjustmentAmount":{"CurrencyAmount":0,"CurrencyCode":"USD"},"PostedDate":"2021-09-28T23:46:48.032Z"}]}

I found AdjustmentTypeEnum into the codec.d file: image

Amazon sends me data types like this: image and this: image I like your lib and I want to use it and I want to help you. Thanks!

moltar commented 3 years ago

Привет Алекс! Вы могли бы создать PR с решением?

Ну или хотя бы скиньте анонимизированный ответ целиком.

AlexanderGaivorontsev commented 3 years ago

Привет! Я нашел еще больше отсутствующих типов. Добавлю PR с решением

AlexanderGaivorontsev commented 3 years ago

PR: https://github.com/ScaleLeap/amazon-mws-api-sdk/pull/448

github-actions[bot] commented 3 years ago

:tada: This issue has been resolved in version 2.0.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

moltar commented 3 years ago

Thanks for the PR! 🎉