Class: MWS::Orders::Client
- Inherits:
-
Peddler::Client
- Object
- Peddler::Client
- MWS::Orders::Client
- Defined in:
- lib/mws/orders/client.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.
Instance Attribute Summary
Attributes inherited from Peddler::Client
#auth_token, #body, #marketplace_id, #merchant_id, #path
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, #defaults, #headers, inherited, #initialize, #marketplace, #on_error, #operation, parser, parser=, path, #run
Constructor Details
This class inherits a constructor from Peddler::Client
Instance Method Details
#get_order(*amazon_order_ids) ⇒ Peddler::XMLParser
Gets one or more orders
60 61 62 63 64 65 66 |
# File 'lib/mws/orders/client.rb', line 60 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
96 97 98 99 |
# File 'lib/mws/orders/client.rb', line 96 def get_service_status operation('GetServiceStatus') run end |
#list_order_items(amazon_order_id) ⇒ Peddler::XMLParser
Lists order items for an order
73 74 75 76 77 78 |
# File 'lib/mws/orders/client.rb', line 73 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
85 86 87 88 89 90 |
# File 'lib/mws/orders/client.rb', line 85 def list_order_items_by_next_token(next_token) operation('ListOrderItemsByNextToken') .add('NextToken' => next_token) run end |
#list_orders(opts = {}) ⇒ Peddler::XMLParser
Lists orders
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/mws/orders/client.rb', line 27 def list_orders(opts = {}) opts[:marketplace_id] ||= marketplace_id if opts.key?(:tfm_shipment_status) opts['TFMShipmentStatus'] = opts.delete(:tfm_shipment_status) end 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
48 49 50 51 52 53 |
# File 'lib/mws/orders/client.rb', line 48 def list_orders_by_next_token(next_token) operation('ListOrdersByNextToken') .add('NextToken' => next_token) run end |