Class: Peddler::APIs::VendorDirectFulfillmentSandboxTestData20211028
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::VendorDirectFulfillmentSandboxTestData20211028
- Defined in:
- lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb,
lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28/error.rb,
lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28/scenario.rb,
lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28/error_list.rb,
lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28/pagination.rb,
lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28/test_order.rb,
lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28/transaction.rb,
lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28/test_case_data.rb,
lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28/transaction_status.rb,
lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28/party_identification.rb,
lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28/transaction_reference.rb,
lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28/order_scenario_request.rb,
lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28/generate_order_scenario_request.rb
Overview
Selling Partner API for Vendor Direct Fulfillment Sandbox Test Data
The Selling Partner API for Vendor Direct Fulfillment Sandbox Test Data provides programmatic access to vendor direct fulfillment sandbox test data.
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
- Scenario =
A scenario test case response returned when the request is successful.
Structure.new do # @return [Array<TestOrder>] A list of orders that can be used by the caller to test each life cycle or # scenario. attribute(:orders, [TestOrder]) # @return [String] An identifier that identifies the type of scenario that user can use for testing. attribute(:scenario_id, String, from: "scenarioId") 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
- Pagination =
A generated string used to pass information to your next request. If NextToken is returned, pass the value of NextToken to the next request. If NextToken is not returned, there are no more order items to return.
Structure.new do # @return [String] A generated token to be passed in the next request to retrieve the next set of results. attribute?(:next_token, String, from: "nextToken") end
- TestOrder =
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(:order_id, String, from: "orderId") end
- Transaction =
The transaction details including the status. If the transaction was successful, also includes the requested test order data.
Structure.new do # @return [String] The current processing status of the transaction. attribute(:status, String) # @return [String] The unique identifier returned in the response to the generateOrderScenarios request. attribute(:transaction_id, String, from: "transactionId") # @return [TestCaseData] Test case data for the transaction. Only available when the transaction status is # SUCCESS. attribute?(:test_case_data, TestCaseData, from: "testCaseData") end
- TestCaseData =
The set of test case data returned in response to the test data request.
Structure.new do # @return [Array<Scenario>] Set of use cases that describes the possible test scenarios. attribute?(:scenarios, [Scenario]) end
- TransactionStatus =
The payload for the getOrderScenarios operation.
Structure.new do # @return [Transaction] attribute?(:transaction_status, Transaction, from: "transactionStatus") end
- PartyIdentification =
The identification object for the party information. For example, warehouse code or vendor code. Please refer to specific party for more details.
Structure.new do # @return [String] Assigned identification for the party. For example, warehouse code or vendor code. Please # refer to specific party for more details. attribute(:party_id, String, from: "partyId") end
- TransactionReference =
A GUID assigned by Amazon to identify this transaction.
Structure.new do # @return [String] A GUID (Globally Unique Identifier) assigned by Amazon to uniquely identify the transaction. attribute?(:transaction_id, String, from: "transactionId") end
- OrderScenarioRequest =
The party identifiers required to generate the test data.
Structure.new do # @return [PartyIdentification] The identifier of the selling party or vendor. attribute(:selling_party, PartyIdentification, from: "sellingParty") # @return [PartyIdentification] The warehouse code of the vendor. attribute(:ship_from_party, PartyIdentification, from: "shipFromParty") end
- GenerateOrderScenarioRequest =
The request body for the generateOrderScenarios operation.
Structure.new do # @return [Array<OrderScenarioRequest>] The list of test orders requested as indicated by party identifiers. attribute?(:orders, [OrderScenarioRequest]) end
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #endpoint, #retries
Instance Method Summary collapse
-
#generate_order_scenarios(body) ⇒ Peddler::Response
Submits a request to generate test order data for Vendor Direct Fulfillment API entities.
-
#get_order_scenarios(transaction_id) ⇒ 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
#generate_order_scenarios(body) ⇒ Peddler::Response
This operation can make a dynamic sandbox call.
Submits a request to generate test order data for Vendor Direct Fulfillment API entities.
19 20 21 22 23 24 25 |
# File 'lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb', line 19 def generate_order_scenarios(body) must_sandbox! path = "/vendor/directFulfillment/sandbox/2021-10-28/orders" parser = -> { TransactionReference } post(path, body:, parser:) end |
#get_order_scenarios(transaction_id) ⇒ Peddler::Response
This operation can make a dynamic sandbox call.
Returns the status of the transaction indicated by the specified transactionId. If the transaction was successful, also returns the requested test order data.
operation.
34 35 36 37 38 39 40 |
# File 'lib/peddler/apis/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb', line 34 def get_order_scenarios(transaction_id) must_sandbox! path = "/vendor/directFulfillment/sandbox/2021-10-28/transactions/#{percent_encode(transaction_id)}" parser = -> { TransactionStatus } get(path, parser:) end |