lineofflight / peddler

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

Add OrderReferenceObject model to help with Off Amazon Payment API #22

Closed mcnelson closed 10 years ago

mcnelson commented 10 years ago

What

Adds a new class to model Amazon's ORO. Primarily, this model's responsibility is to fetch an ORO by ID and expose a few convenience methods for retrieving response data.

Testing

  1. Login via any "Login with Amazon" widgets to the point where the address book appears.
  2. That just created an ORO, retrieve its ID by looking at orderReference.getAmazonOrderReferenceId() in onOrderReferenceCreate in Amazon's JS.
  3. Instantiate and play with the ORO. oro = Peddler::OrderReferenceObject.new('<that ORO ID>'). Pass in an MWS::OffAmazonPayments instance with the MWS tokens all configured unless you have them set in environment variables.
mcnelson commented 10 years ago

Oops, wrong repo, sorry