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
69 70 71 72 73 74 75 76 |
# File 'lib/mws/merchant_fulfillment/client.rb', line 69 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
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/mws/merchant_fulfillment/client.rb', line 38 def create_shipment(shipment_request_details, shipping_service_id, opts = {}) operation('CreateShipment') .add( 'ShipmentRequestDetails' => shipment_request_details, 'ShippingServiceId' => shipping_service_id ) .add(opts) 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
22 23 24 25 26 27 |
# File 'lib/mws/merchant_fulfillment/client.rb', line 22 def get_eligible_shipping_services(shipment_request_details) operation('GetEligibleShippingServices') .add('ShipmentRequestDetails' => shipment_request_details) run end |
#get_service_status ⇒ Peddler::XMLParser
Gets the operational status of the API
82 83 84 85 |
# File 'lib/mws/merchant_fulfillment/client.rb', line 82 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
54 55 56 57 58 59 60 61 |
# File 'lib/mws/merchant_fulfillment/client.rb', line 54 def get_shipment(shipment_id) operation('GetShipment') .add( 'ShipmentId' => shipment_id ) run end |