ericblade / mws-advanced

Javascript (node) Amazon Merchant Web Services (MWS) code with mws-simple as it's underpinnings
Apache License 2.0
41 stars 11 forks source link

Feature Request: mws.getOrder #90

Closed pwrnrd closed 6 years ago

pwrnrd commented 6 years ago

GetOrder enables you to find an order by an Amazon order id.

https://docs.developer.amazonservices.com/en_ES/orders-2013-09-01/Orders_GetOrder.html

There is a possiblity to find a specific order using ListOrders. However, ListOrders only allows you to query MWS by the SellerOrderId which might not necessary equal the AmazonOrderId (at least not to my knowledge).

ericblade commented 6 years ago

yep, when i was leanings towards building a package for accounting and inventory management, i had been moving through the Orders category, but didn't get to wrapping GetOrder before I moved what I was working on into product research.

pwrnrd commented 6 years ago

@ericblade I totally understand! I'm not judging. It's great that you open sourced the code, I'm just trying to help out by reporting stuff I come across :).

pwrnrd commented 6 years ago

@ericblade can you assign this issue to me? I implemented this function in my own solution already. It was actually quite easy because you already did 99.99% of the work. The only thing that needed to be done was to create a function file and export/import the function.

My get-order.js:

const { parseEndpoint } = require('./parseEndpoint');

const getOrder = parseEndpoint(out => out.Orders.Order)('GetOrder');

module.exports = { getOrder };

I did not yet write any documentation nor did I write any tests. I'll do that when I get back from my holidays :).

ericblade commented 6 years ago

great! i look forward to the pull req :) i've become regularly employed again, too, so between that and not working with orders right now, it could be a long time before i got to this.

pwrnrd commented 6 years ago

Congratulations with your new position! Too bad you won't be spending so much time on the package.

ericblade commented 6 years ago

Thanks! On the bright side, I'll probably have more consistent time to work on my mws using application, just not as much of it. :-)

ericblade commented 6 years ago

hey @pwrnrd we can close this now?