Class: Peddler::APIs::VendorTransactionStatusV1

Inherits:
Peddler::API
  • Object
show all
Defined in:
lib/peddler/apis/vendor_transaction_status_v1.rb,
lib/peddler/apis/vendor_transaction_status_v1/error.rb,
lib/peddler/apis/vendor_transaction_status_v1/error_list.rb,
lib/peddler/apis/vendor_transaction_status_v1/transaction.rb,
lib/peddler/apis/vendor_transaction_status_v1/transaction_status.rb,
lib/peddler/apis/vendor_transaction_status_v1/get_transaction_response.rb,
sig/peddler/apis/vendor_transaction_status_v1.rbs

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.

Defined Under Namespace

Classes: Error, ErrorList, GetTransactionResponse, Transaction, TransactionStatus

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #endpoint, #retries

Instance Method Summary collapse

Methods inherited from Peddler::API

#cannot_sandbox!, #delete, #endpoint_uri, #get, #http, #initialize, #must_sandbox!, #patch, #percent_encode, #post, #put, #request, #sandbox, #sandbox?, #stringify_array, #timestamp, #user_agent

Constructor Details

This class inherits a constructor from Peddler::API

Instance Method Details

#get_transaction(transaction_id, rate_limit: 10.0) ⇒ Peddler::Response

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

  • (String)
  • rate_limit: (Float) (defaults to: 10.0)

Returns:



20
21
22
23
24
25
26
# File 'lib/peddler/apis/vendor_transaction_status_v1.rb', line 20

def get_transaction(transaction_id, rate_limit: 10.0)
  cannot_sandbox!

  path = "/vendor/transactions/v1/transactions/#{percent_encode(transaction_id)}"
  parser = -> { GetTransactionResponse }
  get(path, rate_limit:, parser:)
end