Class: MWS::MerchantFulfillment::Client
- Inherits:
-
Peddler::Client
- Object
- Peddler::Client
- MWS::MerchantFulfillment::Client
- Defined in:
- lib/mws/merchant_fulfillment/client.rb
Overview
The Merchant Fulfillment API provides programmatic access to Amazon’s Shipping Services for sellers, including competitive rates from Amazon-partnered carriers. Sellers can find out what shipping service offers are available by submitting information about a proposed shipment, such as package size and weight, shipment origin, and delivery date requirements. Sellers can choose from the shipping service offers returned by Amazon, and then purchase shipping labels for fulfilling their orders.
Instance Attribute Summary
Attributes inherited from Peddler::Client
#auth_token, #body, #merchant_id, #path, #primary_marketplace_id, #version
Instance Method Summary collapse
-
#cancel_shipment(shipment_id) ⇒ Peddler::XMLParser
Cancels an existing shipment and requests a refund for the ShipmentId value that you specify.
-
#create_shipment(shipment_request_details, shipping_service_id, opts = {}) ⇒ Peddler::XMLParser
Purchases shipping and returns PNG or PDF document data for a shipping label.
-
#get_eligible_shipping_services(shipment_request_details) ⇒ Peddler::XMLParser
Returns a list of shipping service offers that satisfy the shipment request details that you specify.
-
#get_service_status ⇒ Peddler::XMLParser
Gets the operational status of the API.
-
#get_shipment(shipment_id) ⇒ Peddler::XMLParser
Returns an existing shipment for the ShipmentId value that you specify.
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
#cancel_shipment(shipment_id) ⇒ Peddler::XMLParser
Cancels an existing shipment and requests a refund for the ShipmentId value that you specify
74 75 76 77 78 79 80 81 |
# File 'lib/mws/merchant_fulfillment/client.rb', line 74 def cancel_shipment(shipment_id) operation('CancelShipment') .add( 'ShipmentId' => shipment_id ) run end |
#create_shipment(shipment_request_details, shipping_service_id, opts = {}) ⇒ Peddler::XMLParser
Purchases shipping and returns PNG or PDF document data for a shipping label
41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/mws/merchant_fulfillment/client.rb', line 41 def create_shipment(shipment_request_details, shipping_service_id, opts = {}) operation('CreateShipment') .add( 'ShipmentRequestDetails' => shipment_request_details, 'ShippingServiceId' => shipping_service_id ) .add(opts) .structure!('ItemList', 'Item') run end |
#get_eligible_shipping_services(shipment_request_details) ⇒ Peddler::XMLParser
Returns a list of shipping service offers that satisfy the shipment request details that you specify
24 25 26 27 28 29 30 |
# File 'lib/mws/merchant_fulfillment/client.rb', line 24 def get_eligible_shipping_services(shipment_request_details) operation('GetEligibleShippingServices') .add('ShipmentRequestDetails' => shipment_request_details) .structure!('ItemList', 'Item') run end |
#get_service_status ⇒ Peddler::XMLParser
Gets the operational status of the API
87 88 89 90 |
# File 'lib/mws/merchant_fulfillment/client.rb', line 87 def get_service_status operation('GetServiceStatus') run end |
#get_shipment(shipment_id) ⇒ Peddler::XMLParser
Returns an existing shipment for the ShipmentId value that you specify
59 60 61 62 63 64 65 66 |
# File 'lib/mws/merchant_fulfillment/client.rb', line 59 def get_shipment(shipment_id) operation('GetShipment') .add( 'ShipmentId' => shipment_id ) run end |