Class: MWS::FulfillmentInboundShipment::Client
- Inherits:
-
Peddler::Client
- Object
- Peddler::Client
- MWS::FulfillmentInboundShipment::Client
- Defined in:
- lib/mws/fulfillment_inbound_shipment/client.rb
Overview
With the Fulfillment Inbound Shipment API, you can create and update inbound shipments of inventory in the Amazon Fulfillment Network. You can also request lists of inbound shipments or inbound shipment items based on criteria that you specify.
Instance Attribute Summary
Attributes inherited from Peddler::Client
#auth_token, #body, #merchant_id, #path, #primary_marketplace_id, #version
Instance Method Summary collapse
-
#confirm_transport_request(shipment_id) ⇒ Peddler::XMLParser
Confirms that you accept the Amazon-partnered shipping estimate and you request that the Amazon-partnered carrier ship your inbound shipment.
-
#create_inbound_shipment(shipment_id, inbound_shipment_header, opts = {}) ⇒ Peddler::XMLParser
Creates an inbound shipment.
-
#create_inbound_shipment_plan(ship_from_address, inbound_shipment_plan_request_items, opts = {}) ⇒ Peddler::XMLParser
Returns the information required to create an inbound shipment.
-
#estimate_transport_request(shipment_id) ⇒ Peddler::XMLParser
Requests an estimate of the shipping cost for an inbound shipment.
-
#get_bill_of_lading(shipment_id) ⇒ Peddler::XMLParser
Returns PDF document data for printing a bill of lading for an inbound shipment.
-
#get_package_labels(shipment_id, page_type, opts = {}) ⇒ Peddler::XMLParser
Returns PDF document data for printing package labels for an inbound shipment.
-
#get_service_status ⇒ Peddler::XMLParser
Gets the operational status of the API.
-
#get_transport_content(shipment_id) ⇒ Peddler::XMLParser
Returns current transportation information about an inbound shipment.
-
#list_inbound_shipment_items(opts = {}) ⇒ Peddler::XMLParser
Returns a list of items in a specified inbound shipment, or a list of items that were updated within a specified time frame.
-
#list_inbound_shipment_items_by_next_token(next_token) ⇒ Peddler::XMLParser
Returns the next page of inbound shipment items.
-
#list_inbound_shipments(opts = {}) ⇒ Peddler::XMLParser
Returns a list of inbound shipments based on criteria that you specify.
-
#list_inbound_shipments_by_next_token(next_token) ⇒ Peddler::XMLParser
Returns the next page of inbound shipments.
-
#put_transport_content(shipment_id, is_partnered, shipment_type, transport_details) ⇒ Peddler::XMLParser
Sends transportation information to Amazon about an inbound shipment.
-
#update_inbound_shipment(shipment_id, inbound_shipment_header, opts = {}) ⇒ Peddler::XMLParser
Updates an existing inbound shipment.
-
#void_transport_request(shipment_id) ⇒ Peddler::XMLParser
Voids a previously-confirmed request to ship your inbound shipment using an Amazon-partnered carrier.
Methods inherited from Peddler::Client
#aws_endpoint, #defaults, #error_handler, #headers, #initialize, #marketplace, #marketplace_id, #marketplace_id=, on_error, #on_error, #operation, path, #run, version
Constructor Details
This class inherits a constructor from Peddler::Client
Instance Method Details
#confirm_transport_request(shipment_id) ⇒ Peddler::XMLParser
Confirms that you accept the Amazon-partnered shipping estimate and you request that the Amazon-partnered carrier ship your inbound shipment
106 107 108 109 |
# File 'lib/mws/fulfillment_inbound_shipment/client.rb', line 106 def confirm_transport_request(shipment_id) operation('ConfirmTransportRequest').add('ShipmentId' => shipment_id) run end |
#create_inbound_shipment(shipment_id, inbound_shipment_header, opts = {}) ⇒ Peddler::XMLParser
Creates an inbound shipment
40 41 42 43 |
# File 'lib/mws/fulfillment_inbound_shipment/client.rb', line 40 def create_inbound_shipment(shipment_id, inbound_shipment_header, opts = {}) build_inbound_shipment_operation('CreateInboundShipment', shipment_id, inbound_shipment_header, opts) run end |
#create_inbound_shipment_plan(ship_from_address, inbound_shipment_plan_request_items, opts = {}) ⇒ Peddler::XMLParser
Returns the information required to create an inbound shipment
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/mws/fulfillment_inbound_shipment/client.rb', line 21 def create_inbound_shipment_plan(ship_from_address, inbound_shipment_plan_request_items, opts = {}) operation('CreateInboundShipmentPlan') .add(opts.update( 'ShipFromAddress' => ship_from_address, 'InboundShipmentPlanRequestItems' => inbound_shipment_plan_request_items )) .structure!('InboundShipmentPlanRequestItems', 'member') run end |
#estimate_transport_request(shipment_id) ⇒ Peddler::XMLParser
Requests an estimate of the shipping cost for an inbound shipment
85 86 87 88 |
# File 'lib/mws/fulfillment_inbound_shipment/client.rb', line 85 def estimate_transport_request(shipment_id) operation('EstimateTransportRequest').add('ShipmentId' => shipment_id) run end |
#get_bill_of_lading(shipment_id) ⇒ Peddler::XMLParser
Returns PDF document data for printing a bill of lading for an inbound shipment
147 148 149 150 |
# File 'lib/mws/fulfillment_inbound_shipment/client.rb', line 147 def get_bill_of_lading(shipment_id) operation('GetBillOfLading').add('ShipmentId' => shipment_id) run end |
#get_package_labels(shipment_id, page_type, opts = {}) ⇒ Peddler::XMLParser
Returns PDF document data for printing package labels for an inbound shipment
131 132 133 134 135 136 137 138 139 |
# File 'lib/mws/fulfillment_inbound_shipment/client.rb', line 131 def get_package_labels(shipment_id, page_type, opts = {}) operation('GetPackageLabels') .add(opts.update( 'ShipmentId' => shipment_id, 'PageType' => page_type )) run end |
#get_service_status ⇒ Peddler::XMLParser
Gets the operational status of the API
212 213 214 215 |
# File 'lib/mws/fulfillment_inbound_shipment/client.rb', line 212 def get_service_status operation('GetServiceStatus') run end |
#get_transport_content(shipment_id) ⇒ Peddler::XMLParser
Returns current transportation information about an inbound shipment
95 96 97 98 |
# File 'lib/mws/fulfillment_inbound_shipment/client.rb', line 95 def get_transport_content(shipment_id) operation('GetTransportContent').add('ShipmentId' => shipment_id) run end |
#list_inbound_shipment_items(opts = {}) ⇒ Peddler::XMLParser
Returns a list of items in a specified inbound shipment, or a list of items that were updated within a specified time frame
191 192 193 194 |
# File 'lib/mws/fulfillment_inbound_shipment/client.rb', line 191 def list_inbound_shipment_items(opts = {}) operation('ListInboundShipmentItems').add(opts) run end |
#list_inbound_shipment_items_by_next_token(next_token) ⇒ Peddler::XMLParser
Returns the next page of inbound shipment items
201 202 203 204 205 206 |
# File 'lib/mws/fulfillment_inbound_shipment/client.rb', line 201 def list_inbound_shipment_items_by_next_token(next_token) operation('ListInboundShipmentItemsByNextToken') .add('NextToken' => next_token) run end |
#list_inbound_shipments(opts = {}) ⇒ Peddler::XMLParser
Returns a list of inbound shipments based on criteria that you specify
161 162 163 164 165 166 167 168 |
# File 'lib/mws/fulfillment_inbound_shipment/client.rb', line 161 def list_inbound_shipments(opts = {}) operation('ListInboundShipments') .add(opts) .structure!('ShipmentStatusList', 'member') .structure!('ShipmentIdList', 'member') run end |
#list_inbound_shipments_by_next_token(next_token) ⇒ Peddler::XMLParser
Returns the next page of inbound shipments
175 176 177 178 179 180 |
# File 'lib/mws/fulfillment_inbound_shipment/client.rb', line 175 def list_inbound_shipments_by_next_token(next_token) operation('ListInboundShipmentsByNextToken') .add('NextToken' => next_token) run end |
#put_transport_content(shipment_id, is_partnered, shipment_type, transport_details) ⇒ Peddler::XMLParser
Sends transportation information to Amazon about an inbound shipment
66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/mws/fulfillment_inbound_shipment/client.rb', line 66 def put_transport_content(shipment_id, is_partnered, shipment_type, transport_details) operation('PutTransportContent') .add( 'ShipmentId' => shipment_id, 'IsPartnered' => is_partnered, 'ShipmentType' => shipment_type, 'TransportDetails' => transport_details ) .structure!('PackageList', 'member') .structure!('PalletList', 'member') run end |
#update_inbound_shipment(shipment_id, inbound_shipment_header, opts = {}) ⇒ Peddler::XMLParser
Updates an existing inbound shipment
53 54 55 56 |
# File 'lib/mws/fulfillment_inbound_shipment/client.rb', line 53 def update_inbound_shipment(shipment_id, inbound_shipment_header, opts = {}) build_inbound_shipment_operation('UpdateInboundShipment', shipment_id, inbound_shipment_header, opts) run end |
#void_transport_request(shipment_id) ⇒ Peddler::XMLParser
Voids a previously-confirmed request to ship your inbound shipment using an Amazon-partnered carrier
117 118 119 120 |
# File 'lib/mws/fulfillment_inbound_shipment/client.rb', line 117 def void_transport_request(shipment_id) operation('VoidTransportRequest').add('ShipmentId' => shipment_id) run end |