Class: MWS::Orders
- Inherits:
-
Peddler::Client
- Object
- Peddler::Client
- MWS::Orders
- Defined in:
- lib/mws/orders.rb
Overview
With the MWS Orders API, you can list orders created or updated during a time frame you specify or retrieve information about specific orders.
Constant Summary
Constants inherited from Peddler::Client
Peddler::Client::BadMarketplaceId, Peddler::Client::HOSTS
Instance Attribute Summary
Attributes inherited from Peddler::Client
#body, #marketplace_id, #merchant_id
Instance Method Summary collapse
-
#get_order(*amazon_order_ids) ⇒ Peddler::XMLParser
Gets one or more orders.
-
#get_service_status ⇒ Peddler::XMLParser
Gets the service status of the API.
-
#list_order_items(amazon_order_id) ⇒ Peddler::XMLParser
Lists order items for an order.
-
#list_order_items_by_next_token(next_token) ⇒ Peddler::XMLParser
Lists the next page of order items for an order.
-
#list_orders(opts = {}) ⇒ Peddler::XMLParser
Lists orders.
-
#list_orders_by_next_token(next_token) ⇒ Peddler::XMLParser
Lists the next page of orders.
Methods inherited from Peddler::Client
#aws_endpoint, #headers, inherited, #operation, path, #run
Instance Method Details
#get_order(*amazon_order_ids) ⇒ Peddler::XMLParser
Gets one or more orders
57 58 59 60 61 62 63 |
# File 'lib/mws/orders.rb', line 57 def get_order(*amazon_order_ids) operation('GetOrder') .add('AmazonOrderId' => amazon_order_ids) .structure!('AmazonOrderId', 'Id') run end |
#get_service_status ⇒ Peddler::XMLParser
Gets the service status of the API
93 94 95 96 |
# File 'lib/mws/orders.rb', line 93 def get_service_status operation('GetServiceStatus') run end |
#list_order_items(amazon_order_id) ⇒ Peddler::XMLParser
Lists order items for an order
70 71 72 73 74 75 |
# File 'lib/mws/orders.rb', line 70 def list_order_items(amazon_order_id) operation('ListOrderItems') .add('AmazonOrderId' => amazon_order_id) run end |
#list_order_items_by_next_token(next_token) ⇒ Peddler::XMLParser
Lists the next page of order items for an order
82 83 84 85 86 87 |
# File 'lib/mws/orders.rb', line 82 def list_order_items_by_next_token(next_token) operation('ListOrderItemsByNextToken') .add('NextToken' => next_token) run end |
#list_orders(opts = {}) ⇒ Peddler::XMLParser
Lists orders
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/mws/orders.rb', line 26 def list_orders(opts = {}) opts[:marketplace_id] ||= marketplace_id opts['TFMShipmentStatus'] = opts.delete(:tfm_shipment_status) if opts.has_key?(:tfm_shipment_status) operation('ListOrders') .add(opts) .structure!('OrderStatus', 'Status') .structure!('MarketplaceId', 'Id') .structure!('PaymentMethod') .structure!('TFMShipmentStatus', 'Status') run end |
#list_orders_by_next_token(next_token) ⇒ Peddler::XMLParser
Lists the next page of orders
45 46 47 48 49 50 |
# File 'lib/mws/orders.rb', line 45 def list_orders_by_next_token(next_token) operation('ListOrdersByNextToken') .add('NextToken' => next_token) run end |