Class: Peddler::API::VendorTransactionStatusV1

Inherits:
Peddler::API
  • Object
show all
Defined in:
lib/peddler/api/vendor_transaction_status_v1.rb

Overview

Selling Partner API for Retail Procurement Transaction Status

The Selling Partner API for Retail Procurement Transaction Status provides programmatic access to status information on specific asynchronous POST transactions for vendors.

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #endpoint

Instance Method Summary collapse

Methods inherited from Peddler::API

#cannot_sandbox!, #endpoint_uri, #http, #initialize, #meter, #must_sandbox!, #retriable, #sandbox, #sandbox?, #use, #via

Constructor Details

This class inherits a constructor from Peddler::API

Instance Method Details

#get_transaction(transaction_id, rate_limit: 10.0) ⇒ Hash

Returns the status of the transaction that you specify.

Parameters:

  • transaction_id (String)

    The GUID provided by Amazon in the 'transactionId' field in response to the post request of a specific transaction.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:

  • (Hash)

    The API response



25
26
27
28
29
30
31
# File 'lib/peddler/api/vendor_transaction_status_v1.rb', line 25

def get_transaction(transaction_id, rate_limit: 10.0)
  cannot_sandbox!

  path = "/vendor/transactions/v1/transactions/#{transaction_id}"

  meter(rate_limit).get(path)
end