Class: Peddler::APIs::AmazonWarehousingAndDistribution20240509

Inherits:
Peddler::API
  • Object
show all
Defined in:
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/error.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/address.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/error_list.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/carrier_code.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/prep_details.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/sku_quantity.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inbound_order.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_order.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/package_volume.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/package_weight.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/order_attribute.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/shipment_labels.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/sku_eligibility.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inbound_packages.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inbound_shipment.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/measurement_data.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_listing.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/prep_instruction.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/product_quantity.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/shipment_listing.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/tracking_details.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inventory_details.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inventory_listing.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inventory_summary.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_shipment.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/product_attribute.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/expiration_details.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inventory_quantity.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/package_dimensions.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/destination_details.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inbound_eligibility.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inbound_preferences.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_order.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/distribution_package.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/distribution_product.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/transportation_details.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inbound_order_reference.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inbound_shipment_summary.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_execution_error.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_order_reference.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/sku_ineligibility_reason.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_shipment_summary.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_preferences.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/shipment_label_page_types.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/order_ineligibility_reason.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/inbound_order_creation_data.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_order_listing.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/outbound_order_creation_data.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/distribution_package_contents.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/distribution_package_quantity.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_order_reference.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/distribution_ineligible_reason.rb,
lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09/replenishment_order_creation_data.rb,
sig/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rbs

Overview

The Selling Partner API for Amazon Warehousing and Distribution

The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.

Defined Under Namespace

Classes: Address, CarrierCode, DestinationDetails, DistributionIneligibleReason, DistributionPackage, DistributionPackageContents, DistributionPackageQuantity, DistributionProduct, Error, ErrorList, ExpirationDetails, InboundEligibility, InboundOrder, InboundOrderCreationData, InboundOrderReference, InboundPackages, InboundPreferences, InboundShipment, InboundShipmentSummary, InventoryDetails, InventoryListing, InventoryQuantity, InventorySummary, MeasurementData, OrderAttribute, OrderIneligibilityReason, OutboundExecutionError, OutboundListing, OutboundOrder, OutboundOrderCreationData, OutboundOrderReference, OutboundShipment, OutboundShipmentSummary, PackageDimensions, PackageVolume, PackageWeight, PrepDetails, PrepInstruction, ProductAttribute, ProductQuantity, ReplenishmentOrder, ReplenishmentOrderCreationData, ReplenishmentOrderListing, ReplenishmentOrderReference, ReplenishmentPreferences, SKUEligibility, SKUIneligibilityReason, SKUQuantity, ShipmentLabelPageTypes, ShipmentLabels, ShipmentListing, TrackingDetails, TransportationDetails

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

#cancel_inbound(order_id, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Cancels an AWD Inbound order and its associated shipment.

Parameters:

  • order_id (String)

    The ID of the inbound order you want to cancel.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

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

Returns:



58
59
60
61
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 58

def cancel_inbound(order_id, rate_limit: 1.0)
  path = "/awd/2024-05-09/inboundOrders/#{percent_encode(order_id)}/cancellation"
  post(path, rate_limit:)
end

#check_inbound_eligibility(body, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Determines if the packages you specify are eligible for an AWD inbound order and contains error details for ineligible packages.

Parameters:

  • body (Hash)

    Represents the packages you want to inbound.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

  • (Hash[untyped, untyped])
  • rate_limit: (Float) (defaults to: 1.0)

Returns:



143
144
145
146
147
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 143

def check_inbound_eligibility(body, rate_limit: 1.0)
  path = "/awd/2024-05-09/inboundEligibility"
  parser = -> { InboundEligibility }
  post(path, body:, rate_limit:, parser:)
end

#confirm_inbound(order_id, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Confirms an AWD inbound order in DRAFT status.

Parameters:

  • order_id (String)

    The ID of the inbound order that you want to confirm.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

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

Returns:



69
70
71
72
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 69

def confirm_inbound(order_id, rate_limit: 1.0)
  path = "/awd/2024-05-09/inboundOrders/#{percent_encode(order_id)}/confirmation"
  post(path, rate_limit:)
end

#confirm_outbound(order_id, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Confirms an AWD outbound order for a set of shipments that contain items that must be outbound to a destination node. You can confirm the order only if it's in anELIGIBLE state.

Parameters:

  • order_id (String)

    ID for the outbound order you want to confirm.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

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

Returns:



295
296
297
298
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 295

def confirm_outbound(order_id, rate_limit: 1.0)
  path = "/awd/2024-05-09/outboundOrders/#{percent_encode(order_id)}/confirmation"
  post(path, rate_limit:)
end

#confirm_replenishment_order(order_id) ⇒ Peddler::Response

Confirms an AWD replenishment order in ELIGIBLE state with a set of shipments containing items that are needed to be replenished to an FBA node. Order can only be confirmed in ELIGIBLE state.

Parameters:

  • order_id (String)

    ID of the replenishment order to be confirmed.

  • (String)

Returns:



363
364
365
366
367
368
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 363

def confirm_replenishment_order(order_id)
  cannot_sandbox!

  path = "/awd/2024-05-09/replenishmentOrders/#{percent_encode(order_id)}/confirmation"
  post(path)
end

#create_inbound(body, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Creates a draft AWD inbound order with a list of packages for inbound shipment. The operation creates one shipment per order.

Parameters:

  • body (Hash)

    Payload for creating an inbound order.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

  • (Hash[untyped, untyped])
  • rate_limit: (Float) (defaults to: 1.0)

Returns:



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

def create_inbound(body, rate_limit: 1.0)
  path = "/awd/2024-05-09/inboundOrders"
  parser = -> { InboundOrderReference }
  post(path, body:, rate_limit:, parser:)
end

#create_outbound(body, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Creates a draft AWD outbound order with the specified products. The API returns the order ID for the newly created order and starts an async validation check on the outbound products. After the validation check, the order status transitions from VALIDATING to ELIGIBLE/INELIGIBLE.

Parameters:

  • body (Hash)

    Payload for creating an outbound order.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

  • (Hash[untyped, untyped])
  • rate_limit: (Float) (defaults to: 1.0)

Returns:



252
253
254
255
256
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 252

def create_outbound(body, rate_limit: 1.0)
  path = "/awd/2024-05-09/outboundOrders"
  parser = -> { OutboundOrderReference }
  post(path, body:, rate_limit:, parser:)
end

#create_replenishment_order(body) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Creates an AWD replenishment order with given products to replenish. The API will return the order ID of the newly created order and also start an async validation check on the products to e. The order status will transition to ELIGIBLE/INELIGIBLE status from VALIDATING post validation check

Parameters:

  • body (Hash)

    Payload for creating a replenishment order.

  • (Hash[untyped, untyped])

Returns:



339
340
341
342
343
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 339

def create_replenishment_order(body)
  path = "/awd/2024-05-09/replenishmentOrders"
  parser = -> { ReplenishmentOrderReference }
  post(path, body:, parser:)
end

#get_inbound(order_id, rate_limit: 2.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieves an AWD inbound order.

Parameters:

  • order_id (String)

    The ID of the inbound order that you want to retrieve.

  • rate_limit (Float) (defaults to: 2.0)

    Requests per second

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

Returns:



33
34
35
36
37
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 33

def get_inbound(order_id, rate_limit: 2.0)
  path = "/awd/2024-05-09/inboundOrders/#{percent_encode(order_id)}"
  parser = -> { InboundOrder }
  get(path, rate_limit:, parser:)
end

#get_inbound_shipment(shipment_id, sku_quantities: nil, rate_limit: 2.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieves an AWD inbound shipment.

Parameters:

  • shipment_id (String)

    ID for the shipment. A shipment contains the cases being inbounded.

  • sku_quantities (String) (defaults to: nil)

    If equal to SHOW, the response includes the shipment SKU quantity details. Defaults to HIDE, in which case the response does not contain SKU quantities

  • rate_limit (Float) (defaults to: 2.0)

    Requests per second

  • (String)
  • sku_quantities: (String, nil) (defaults to: nil)
  • rate_limit: (Float) (defaults to: 2.0)

Returns:



82
83
84
85
86
87
88
89
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 82

def get_inbound_shipment(shipment_id, sku_quantities: nil, rate_limit: 2.0)
  path = "/awd/2024-05-09/inboundShipments/#{percent_encode(shipment_id)}"
  params = {
    "skuQuantities" => sku_quantities,
  }.compact
  parser = -> { InboundShipment }
  get(path, params:, rate_limit:, parser:)
end

#get_inbound_shipment_labels(shipment_id, page_type: nil, format_type: nil, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieves the box labels for a shipment ID that you specify. This is an asynchronous operation. If the label status is GENERATED, then the label URL is available.

Parameters:

  • shipment_id (String)

    ID for the shipment.

  • page_type (String) (defaults to: nil)

    Page type for the generated labels. The default is PLAIN_PAPER.

  • format_type (String) (defaults to: nil)

    The format type of the output file that contains your labels. The default format type is PDF.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

  • (String)
  • page_type: (String, nil) (defaults to: nil)
  • format_type: (String, nil) (defaults to: nil)
  • rate_limit: (Float) (defaults to: 1.0)

Returns:



101
102
103
104
105
106
107
108
109
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 101

def get_inbound_shipment_labels(shipment_id, page_type: nil, format_type: nil, rate_limit: 1.0)
  path = "/awd/2024-05-09/inboundShipments/#{percent_encode(shipment_id)}/labels"
  params = {
    "pageType" => page_type,
    "formatType" => format_type,
  }.compact
  parser = -> { ShipmentLabels }
  get(path, params:, rate_limit:, parser:)
end

#get_label_page_types(shipment_id, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieves the available label page types for a shipment ID that you specify. This is an asynchronous operation. If the label status is GENERATED, then the pageTypes are available.

Parameters:

  • shipment_id (String)

    ID for the shipment.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

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

Returns:



118
119
120
121
122
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 118

def get_label_page_types(shipment_id, rate_limit: 1.0)
  path = "/awd/2024-05-09/inboundShipments/#{percent_encode(shipment_id)}/labelPageTypes"
  parser = -> { ShipmentLabelPageTypes }
  get(path, rate_limit:, parser:)
end

#get_outbound(order_id, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieves an AWD outbound order with a set of shipments that contain items that are outbound into a destination channel. If the order is not eligible, the validation errors field is included in the order response. The API returns the order ID for the newly created order and starts an async validation check on the outbound products. After the validation check, the order status transitions from VALIDATING to ELIGIBLE/INELIGIBLE.

Parameters:

  • order_id (String)

    ID for the outbound order to be retrieved.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

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

Returns:



267
268
269
270
271
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 267

def get_outbound(order_id, rate_limit: 1.0)
  path = "/awd/2024-05-09/outboundOrders/#{percent_encode(order_id)}"
  parser = -> { OutboundOrder }
  get(path, rate_limit:, parser:)
end

#get_replenishment_order(order_id) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieves an AWD Replenishment order with a set of shipments containing items that is/was planned to be replenished into an FBA node.

Parameters:

  • order_id (String)

    ID of the replenishment order to be retrieved.

  • (String)

Returns:



351
352
353
354
355
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 351

def get_replenishment_order(order_id)
  path = "/awd/2024-05-09/replenishmentOrders/#{percent_encode(order_id)}"
  parser = -> { ReplenishmentOrder }
  get(path, parser:)
end

#list_inbound_shipments(sort_by: nil, sort_order: nil, shipment_status: nil, updated_after: nil, updated_before: nil, max_results: 25, next_token: nil, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieves a summary of all the inbound AWD shipments associated with a merchant, with the ability to apply optional filters.

Parameters:

  • sort_by (String) (defaults to: nil)

    Field to sort results by. By default, the response will be sorted by UPDATED_AT.

  • sort_order (String) (defaults to: nil)

    Sort the response in ASCENDING or DESCENDING order. By default, the response will be sorted in DESCENDING order.

  • shipment_status (String) (defaults to: nil)

    Filter by inbound shipment status.

  • updated_after (String) (defaults to: nil)

    List the inbound shipments that were updated after a certain time (inclusive). The date must be in ISO 8601 format.

  • updated_before (String) (defaults to: nil)

    List the inbound shipments that were updated before a certain time (inclusive). The date must be in ISO 8601 format.

  • max_results (Integer) (defaults to: 25)

    Maximum number of results to return.

  • next_token (String) (defaults to: nil)

    A token that is used to retrieve the next page of results. The response includes nextToken when the number of results exceeds the specified maxResults value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until nextToken is null. Note that this operation can return empty pages.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

  • sort_by: (String, nil) (defaults to: nil)
  • sort_order: (String, nil) (defaults to: nil)
  • shipment_status: (String, nil) (defaults to: nil)
  • updated_after: (String, nil) (defaults to: nil)
  • updated_before: (String, nil) (defaults to: nil)
  • max_results: (Integer, nil) (defaults to: 25)
  • next_token: (String, nil) (defaults to: nil)
  • rate_limit: (Float) (defaults to: 1.0)

Returns:



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 169

def list_inbound_shipments(sort_by: nil, sort_order: nil, shipment_status: nil, updated_after: nil,
  updated_before: nil, max_results: 25, next_token: nil, rate_limit: 1.0)
  path = "/awd/2024-05-09/inboundShipments"
  params = {
    "sortBy" => sort_by,
    "sortOrder" => sort_order,
    "shipmentStatus" => shipment_status,
    "updatedAfter" => updated_after,
    "updatedBefore" => updated_before,
    "maxResults" => max_results,
    "nextToken" => next_token,
  }.compact
  parser = -> { ShipmentListing }
  get(path, params:, rate_limit:, parser:)
end

#list_inventory(sku: nil, sort_order: nil, details: nil, next_token: nil, max_results: 25, rate_limit: 2.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Lists AWD inventory associated with a merchant with the ability to apply optional filters.

Parameters:

  • sku (String) (defaults to: nil)

    Filter by seller or merchant SKU for the item.

  • sort_order (String) (defaults to: nil)

    Sort the response in ASCENDING or DESCENDING order.

  • details (String) (defaults to: nil)

    Set to SHOW to return summaries with additional inventory details. Defaults to HIDE, which returns only inventory summary totals.

  • next_token (String) (defaults to: nil)

    A token that is used to retrieve the next page of results. The response includes nextToken when the number of results exceeds the specified maxResults value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until nextToken is null. Note that this operation can return empty pages.

  • max_results (Integer) (defaults to: 25)

    Maximum number of results to return.

  • rate_limit (Float) (defaults to: 2.0)

    Requests per second

  • sku: (String, nil) (defaults to: nil)
  • sort_order: (String, nil) (defaults to: nil)
  • details: (String, nil) (defaults to: nil)
  • next_token: (String, nil) (defaults to: nil)
  • max_results: (Integer, nil) (defaults to: 25)
  • rate_limit: (Float) (defaults to: 2.0)

Returns:



200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 200

def list_inventory(sku: nil, sort_order: nil, details: nil, next_token: nil, max_results: 25, rate_limit: 2.0)
  path = "/awd/2024-05-09/inventory"
  params = {
    "sku" => sku,
    "sortOrder" => sort_order,
    "details" => details,
    "nextToken" => next_token,
    "maxResults" => max_results,
  }.compact
  parser = -> { InventoryListing }
  get(path, params:, rate_limit:, parser:)
end

#list_outbounds(updated_after: nil, updated_before: nil, sort_order: nil, max_results: 25, next_token: nil, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieves all outbound AWD orders (with optional filters) that pertain to a merchant. By default, orders are sorted by the updatedAt attribute in descending order.

Parameters:

  • updated_after (String) (defaults to: nil)

    Get the outbound orders updated after a certain time (inclusive). The date must be in ISO 8601 format.

  • updated_before (String) (defaults to: nil)

    Get the outbound orders updated before a certain time (inclusive). The date must be in ISO 8601 format.

  • sort_order (String) (defaults to: nil)

    Sort the response in ASCENDING or DESCENDING order.

  • max_results (Integer) (defaults to: 25)

    Maximum number of results to return.

  • next_token (String) (defaults to: nil)

    A token that is used to retrieve the next page of results. The response includes nextToken when the number of results exceeds the specified maxResults value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until nextToken is null. Note that this operation can return empty pages.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

  • updated_after: (String, nil) (defaults to: nil)
  • updated_before: (String, nil) (defaults to: nil)
  • sort_order: (String, nil) (defaults to: nil)
  • max_results: (Integer, nil) (defaults to: 25)
  • next_token: (String, nil) (defaults to: nil)
  • rate_limit: (Float) (defaults to: 1.0)

Returns:



230
231
232
233
234
235
236
237
238
239
240
241
242
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 230

def list_outbounds(updated_after: nil, updated_before: nil, sort_order: nil, max_results: 25, next_token: nil,
  rate_limit: 1.0)
  path = "/awd/2024-05-09/outboundOrders"
  params = {
    "updatedAfter" => updated_after,
    "updatedBefore" => updated_before,
    "sortOrder" => sort_order,
    "maxResults" => max_results,
    "nextToken" => next_token,
  }.compact
  parser = -> { OutboundListing }
  get(path, params:, rate_limit:, parser:)
end

#list_replenishment_orders(updated_after: nil, updated_before: nil, sort_order: nil, max_results: 25, next_token: nil) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieves all the AWD replenishment orders pertaining to a merchant with optional filters. API by default will sort orders by updatedAt attribute in descending order.

Parameters:

  • updated_after (String) (defaults to: nil)

    Get the replenishment orders updated after certain time (Inclusive) Date should be in ISO 8601 format as defined by date-time in - https://www.rfc-editor.org/rfc/rfc3339.

  • updated_before (String) (defaults to: nil)

    Get the replenishment orders updated before certain time (Inclusive) Date should be in ISO 8601 format as defined by date-time in - https://www.rfc-editor.org/rfc/rfc3339.

  • sort_order (String) (defaults to: nil)

    Sort the response in ASCENDING or DESCENDING order. The default sort order is DESCENDING.

  • max_results (Integer) (defaults to: 25)

    Maximum results to be returned in a single response.

  • next_token (String) (defaults to: nil)

    A token that is used to retrieve the next page of results. The response includes nextToken when the number of results exceeds the specified maxResults value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until nextToken is null. Note that this operation can return empty pages.

  • updated_after: (String, nil) (defaults to: nil)
  • updated_before: (String, nil) (defaults to: nil)
  • sort_order: (String, nil) (defaults to: nil)
  • max_results: (Integer, nil) (defaults to: 25)
  • next_token: (String, nil) (defaults to: nil)

Returns:



317
318
319
320
321
322
323
324
325
326
327
328
329
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 317

def list_replenishment_orders(updated_after: nil, updated_before: nil, sort_order: nil, max_results: 25,
  next_token: nil)
  path = "/awd/2024-05-09/replenishmentOrders"
  params = {
    "updatedAfter" => updated_after,
    "updatedBefore" => updated_before,
    "sortOrder" => sort_order,
    "maxResults" => max_results,
    "nextToken" => next_token,
  }.compact
  parser = -> { ReplenishmentOrderListing }
  get(path, params:, parser:)
end

#update_inbound(order_id, body, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Updates an AWD inbound order that is in DRAFT status and not yet confirmed. Use this operation to update the packagesToInbound, originAddress and preferences attributes.

Parameters:

  • order_id (String)

    The ID of the inbound order that you want to update.

  • body (Hash)

    Represents an AWD inbound order.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

  • (String)
  • (Hash[untyped, untyped])
  • rate_limit: (Float) (defaults to: 1.0)

Returns:



47
48
49
50
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 47

def update_inbound(order_id, body, rate_limit: 1.0)
  path = "/awd/2024-05-09/inboundOrders/#{percent_encode(order_id)}"
  put(path, body:, rate_limit:)
end

#update_inbound_shipment_transport_details(shipment_id, body, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Updates transport details for an AWD shipment.

Parameters:

  • shipment_id (String)

    The shipment ID.

  • body (Hash)

    Transportation details for the shipment.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

  • (String)
  • (Hash[untyped, untyped])
  • rate_limit: (Float) (defaults to: 1.0)

Returns:



131
132
133
134
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 131

def update_inbound_shipment_transport_details(shipment_id, body, rate_limit: 1.0)
  path = "/awd/2024-05-09/inboundShipments/#{percent_encode(shipment_id)}/transport"
  put(path, body:, rate_limit:)
end

#update_outbound(order_id, body, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Updates an AWD outbound order that is in DRAFT, ELIGIBLE, or INELIGIBLE status. This API allows updates on productsToOutbound and orderPreferences attributes only. Any updates will restart the outbound order validation.

Parameters:

  • order_id (String)

    ID for the outbound order to be updated.

  • body (Hash)

    Represents an AWD outbound order.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

  • (String)
  • (Hash[untyped, untyped])
  • rate_limit: (Float) (defaults to: 1.0)

Returns:



282
283
284
285
286
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 282

def update_outbound(order_id, body, rate_limit: 1.0)
  path = "/awd/2024-05-09/outboundOrders/#{percent_encode(order_id)}"
  parser = -> { OutboundOrderReference }
  put(path, body:, rate_limit:, parser:)
end