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, #marketplace, #merchant_id
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
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
70 71 72 73 74 75 |
# File 'lib/mws/merchant_fulfillment/client.rb', line 70 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 |
# File 'lib/mws/merchant_fulfillment/client.rb', line 41 def create_shipment(shipment_request_details, shipping_service_id, opts = {}) operation('CreateShipment') .add(opts) .add('ShipmentRequestDetails' => shipment_request_details, 'ShippingServiceId' => shipping_service_id) .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
81 82 83 84 |
# File 'lib/mws/merchant_fulfillment/client.rb', line 81 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
57 58 59 60 61 62 |
# File 'lib/mws/merchant_fulfillment/client.rb', line 57 def get_shipment(shipment_id) operation('GetShipment') .add('ShipmentId' => shipment_id) run end |