Class: Peddler::API::VendorDirectFulfillmentSandboxTestData20211028

Inherits:
Peddler::API
  • Object
show all
Defined in:
lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.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.

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

#generate_order_scenarios(body, rate_limit: nil) ⇒ Hash

Note:

This operation can make a dynamic sandbox call.

Submits a request to generate test order data for Vendor Direct Fulfillment API entities.

Parameters:

  • body (Hash)

    The request payload that contain parameters to generate test order data scenarios.

  • rate_limit (Float) (defaults to: nil)

    Requests per second

Returns:

  • (Hash)

    The API response



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

def generate_order_scenarios(body, rate_limit: nil)
  path = "/vendor/directFulfillment/sandbox/2021-10-28/orders"

  post(path, body:)
end

#get_order_scenarios(transaction_id, rate_limit: nil) ⇒ Hash

Note:

This operation can make a dynamic sandbox call.

Retrieves the transaction status identified by the specified transactionId, and returns the requested test order data if the transaction is successful.

Parameters:

  • transaction_id (String)

    The transaction identifier returned in the response for the generateOrderScenarios operation.

  • rate_limit (Float) (defaults to: nil)

    Requests per second

Returns:

  • (Hash)

    The API response



39
40
41
42
43
# File 'lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb', line 39

def get_order_scenarios(transaction_id, rate_limit: nil)
  path = "/vendor/directFulfillment/sandbox/2021-10-28/transactions/#{transaction_id}"

  get(path)
end