Class: Peddler::APIs::AmazonWarehousingAndDistribution20240509
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::AmazonWarehousingAndDistribution20240509
- Defined in:
- lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb
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.
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #endpoint, #retries
Instance Method Summary collapse
-
#cancel_inbound(order_id, rate_limit: 1.0) ⇒ Peddler::Response
Cancels an AWD Inbound order and its associated shipment.
-
#check_inbound_eligibility(body, rate_limit: 1.0) ⇒ Peddler::Response
Determines if the packages you specify are eligible for an AWD inbound order and contains error details for ineligible packages.
-
#confirm_inbound(order_id, rate_limit: 1.0) ⇒ Peddler::Response
Confirms an AWD inbound order in ‘DRAFT` status.
-
#create_inbound(body, rate_limit: 1.0) ⇒ Peddler::Response
Creates a draft AWD inbound order with a list of packages for inbound shipment.
-
#get_inbound(order_id, rate_limit: 2.0) ⇒ Peddler::Response
Retrieves an AWD inbound order.
-
#get_inbound_shipment(shipment_id, sku_quantities: nil, rate_limit: 2.0) ⇒ Peddler::Response
Retrieves an AWD inbound shipment.
-
#get_inbound_shipment_labels(shipment_id, page_type: nil, format_type: nil, rate_limit: 1.0) ⇒ Peddler::Response
Retrieves the box labels for a shipment ID that you specify.
-
#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
Retrieves a summary of all the inbound AWD shipments associated with a merchant, with the ability to apply optional filters.
-
#list_inventory(sku: nil, sort_order: nil, details: nil, next_token: nil, max_results: 25, rate_limit: 2.0) ⇒ Peddler::Response
Lists AWD inventory associated with a merchant with the ability to apply optional filters.
-
#update_inbound(order_id, body, rate_limit: 1.0) ⇒ Peddler::Response
Updates an AWD inbound order that is in ‘DRAFT` status and not yet confirmed.
-
#update_inbound_shipment_transport_details(shipment_id, body, rate_limit: 1.0) ⇒ Peddler::Response
Updates transport details for an AWD shipment.
Methods inherited from Peddler::API
#endpoint_uri, #http, #initialize, #meter, #retriable, #sandbox, #sandbox?, #typed, #typed?, #use, #via
Constructor Details
This class inherits a constructor from Peddler::API
Instance Method Details
#cancel_inbound(order_id, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Cancels an AWD Inbound order and its associated shipment.
66 67 68 69 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 66 def cancel_inbound(order_id, rate_limit: 1.0) path = "/awd/2024-05-09/inboundOrders/#{percent_encode(order_id)}/cancellation" meter(rate_limit).post(path) end |
#check_inbound_eligibility(body, rate_limit: 1.0) ⇒ Peddler::Response
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.
138 139 140 141 142 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 138 def check_inbound_eligibility(body, rate_limit: 1.0) path = "/awd/2024-05-09/inboundEligibility" parser = Peddler::Types::AmazonWarehousingAndDistribution20240509::InboundEligibility if typed? meter(rate_limit).post(path, body:, parser:) end |
#confirm_inbound(order_id, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Confirms an AWD inbound order in ‘DRAFT` status.
77 78 79 80 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 77 def confirm_inbound(order_id, rate_limit: 1.0) path = "/awd/2024-05-09/inboundOrders/#{percent_encode(order_id)}/confirmation" meter(rate_limit).post(path) end |
#create_inbound(body, rate_limit: 1.0) ⇒ Peddler::Response
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.
29 30 31 32 33 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 29 def create_inbound(body, rate_limit: 1.0) path = "/awd/2024-05-09/inboundOrders" parser = Peddler::Types::AmazonWarehousingAndDistribution20240509::InboundOrderReference if typed? meter(rate_limit).post(path, body:, parser:) end |
#get_inbound(order_id, rate_limit: 2.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieves an AWD inbound order.
41 42 43 44 45 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 41 def get_inbound(order_id, rate_limit: 2.0) path = "/awd/2024-05-09/inboundOrders/#{percent_encode(order_id)}" parser = Peddler::Types::AmazonWarehousingAndDistribution20240509::InboundOrder if typed? meter(rate_limit).get(path, parser:) end |
#get_inbound_shipment(shipment_id, sku_quantities: nil, rate_limit: 2.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieves an AWD inbound shipment.
90 91 92 93 94 95 96 97 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 90 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 = Peddler::Types::AmazonWarehousingAndDistribution20240509::InboundShipment if typed? meter(rate_limit).get(path, params:, parser:) end |
#get_inbound_shipment_labels(shipment_id, page_type: nil, format_type: nil, rate_limit: 1.0) ⇒ Peddler::Response
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.
109 110 111 112 113 114 115 116 117 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 109 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 = Peddler::Types::AmazonWarehousingAndDistribution20240509::ShipmentLabels if typed? meter(rate_limit).get(path, params:, 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
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.
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 164 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 = Peddler::Types::AmazonWarehousingAndDistribution20240509::ShipmentListing if typed? meter(rate_limit).get(path, params:, parser:) end |
#list_inventory(sku: nil, sort_order: nil, details: nil, next_token: nil, max_results: 25, rate_limit: 2.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Lists AWD inventory associated with a merchant with the ability to apply optional filters.
195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 195 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 = Peddler::Types::AmazonWarehousingAndDistribution20240509::InventoryListing if typed? meter(rate_limit).get(path, params:, parser:) end |
#update_inbound(order_id, body, rate_limit: 1.0) ⇒ Peddler::Response
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.
55 56 57 58 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 55 def update_inbound(order_id, body, rate_limit: 1.0) path = "/awd/2024-05-09/inboundOrders/#{percent_encode(order_id)}" meter(rate_limit).put(path, body:) end |
#update_inbound_shipment_transport_details(shipment_id, body, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Updates transport details for an AWD shipment.
126 127 128 129 |
# File 'lib/peddler/apis/amazon_warehousing_and_distribution_2024_05_09.rb', line 126 def update_inbound_shipment_transport_details(shipment_id, body, rate_limit: 1.0) path = "/awd/2024-05-09/inboundShipments/#{percent_encode(shipment_id)}/transport" meter(rate_limit).put(path, body:) end |