Class: Peddler::APIs::VendorDirectFulfillmentTransactions20211228
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::VendorDirectFulfillmentTransactions20211228
- Defined in:
- lib/peddler/apis/vendor_direct_fulfillment_transactions_2021_12_28.rb,
lib/peddler/apis/vendor_direct_fulfillment_transactions_2021_12_28/error.rb,
lib/peddler/apis/vendor_direct_fulfillment_transactions_2021_12_28/error_list.rb,
lib/peddler/apis/vendor_direct_fulfillment_transactions_2021_12_28/transaction.rb,
lib/peddler/apis/vendor_direct_fulfillment_transactions_2021_12_28/transaction_status.rb
Overview
Selling Partner API for Direct Fulfillment Transaction Status
The Selling Partner API for Direct Fulfillment Transaction Status provides programmatic access to a direct fulfillment vendor's transaction status.
Constant Summary collapse
- Error =
Error response returned when the request is unsuccessful.
Structure.new do # @return [String] An error code that identifies the type of error that occurred. attribute(:code, String) # @return [String] A message that describes the error condition. attribute(:message, String) # @return [String] Additional details that can help the caller understand or fix the issue. attribute?(:details, String) end
- ErrorList =
A list of error responses returned when a request is unsuccessful.
Structure.new do # @return [Array<Error>] An array of individual error objects containing error details. attribute(:errors, [Error]) end
- Transaction =
The transaction status details.
Structure.new do # @return [String] Current processing status of the transaction. attribute(:status, String) # @return [String] The unique identifier sent in the 'transactionId' field in response to the post request of a # specific transaction. attribute(:transaction_id, String, from: "transactionId") # @return [ErrorList] Error code and message for the failed transaction. Only available when transaction status # is 'Failure'. attribute?(:errors, ErrorList) end
- TransactionStatus =
The payload for the getTransactionStatus operation.
Structure.new do # @return [Transaction] attribute?(:transaction_status, Transaction, from: "transactionStatus") end
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #endpoint, #retries
Instance Method Summary collapse
-
#get_transaction_status(transaction_id, rate_limit: 10.0) ⇒ Peddler::Response
Returns the status of the transaction indicated by the specified transactionId.
Methods inherited from Peddler::API
#endpoint_uri, #http, #initialize, #meter, #retriable, #sandbox, #sandbox?, #use, #via
Constructor Details
This class inherits a constructor from Peddler::API
Instance Method Details
#get_transaction_status(transaction_id, rate_limit: 10.0) ⇒ Peddler::Response
This operation can make a dynamic sandbox call.
Returns the status of the transaction indicated by the specified transactionId.
transaction.
21 22 23 24 25 |
# File 'lib/peddler/apis/vendor_direct_fulfillment_transactions_2021_12_28.rb', line 21 def get_transaction_status(transaction_id, rate_limit: 10.0) path = "/vendor/directFulfillment/transactions/2021-12-28/transactions/#{percent_encode(transaction_id)}" parser = -> { TransactionStatus } meter(rate_limit).get(path, parser:) end |