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

Updated for modern times #6

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open

Conversation

PopeFelix
Copy link

This will send POST requests now, instead of GET, because it seems that's what Amazon prefers. Also, requests are signed with HMAC-SHA-256 instead of HMAC-SHA-1. This merges bpuklich's throttling code, adds ListOrders and ListOrderItems API methods, and adds a GetServiceStatus method for each Service (as defined by Amazon, e.g. Orders, Fulfillment) that supports the GetServiceStatus API call.

amaltsev and others added 28 commits November 5, 2012 18:45
The sha1 signature did not work for me. Replaced with SHA256.

Also making sure the endpoint ends with '/' -- without it the base
string for the signature does not match the original Amazon assumes and
signature verification fails.

Replaced GET with POST. Not sure why GET does not work, but it does not
for me.

Added exception catching to the example for Exception::Class newbies
like myself.
It's an incompatible change, but without it it simply does not work.
Report ids are 64bit integers, they may overflow perl's integers.
There is no math on report IDs, so it's better to treat them as
strings.
…I version to 2011-10-01. tack on URI path if called for when defining api method (used for Products). defined GetLowestOfferListingsForSKU method. changed POST back to GET for non-HTTP-BODY calls.
Modern (as of August 2013) MWS uses POST for everything, and prefers
signature calculated via HMAC SHA-256.  Also added ListOrders method and
Get<service>ServiceStatus methods for all methods supporting a
'GetServiceStatus' action.
Added 'ListOrderItems' API method, added required parameter 'content_type' to 'SubmitFeed' API method
ListOrders wasn't working due to incorrect URL syntax.  Added
throttling for ListOrders and ListOrderItems
ListOrders will now handle the case of a single order by returning the
order hash in scalar context, or an array containing the order in list
context.
In the case of a single order, ListOrders will now return the hash for
that order.  If there are multiple orders, ListOrders will still return
an array.
ListOrderItems will now return a scalar in the case of one item in an
order, and an array in the case of multiple items.  This fixes an error
where the code would incorrectly try and treat a hashref as an arrayref
when an order had only one item.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants