lineofflight / peddler

Amazon Selling Partner API (SP-API) in Ruby
MIT License
307 stars 130 forks source link

Unable to specify the order status #62

Closed c0mrade closed 8 years ago

c0mrade commented 8 years ago

Hello, I've looked at the code and the tests, and I couldn't find an answer to this. How to list order by their status, whatever I do seems like it causes Bad Request, here are some examples I tried:

response = @client.list_orders(order_status: ['Unshipped', 'PartiallyShipped'])
response = @client.list_orders(order_status: 'Shipped')

I get the same error:

Excon::Errors::BadRequest: Expected(200) <=> Actual(400 Bad Request)

Am I doing something wrong? Also can I inspect the request itself to see which request is being generated?

hakanensari commented 8 years ago

Hello Emir,

I'm guessing it's because you must specify a time frame with either created_after or last_updated_after.

To troubleshoot, you can rescue the exception and then inspect the request object it provides.

c0mrade commented 8 years ago

@hakanensari this looks great! and it works too!