Updated for modern times#6
Open
PopeFelix wants to merge 28 commits into
Open
Conversation
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.
Signed-off-by: Blayne Puklich <blayne@excelcycle.com>
…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.
response from GetLowestOfferListingsForSKU.
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.
This reverts commit 3cd1cc5.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.