Sha256: 7c268ed10c4705d55b9446859ddb59afa697518ad0b5978358d35640be90a8e8

Contents?: true

Size: 856 Bytes

Versions: 4

Compression:

Stored size: 856 Bytes

Contents

require 'peddler/request'
require 'mws/orders/parsers/orders'

module MWS
  module Orders
    module Requests
      class Orders < ::Peddler::Request
        def get(*amazon_order_ids)
          parameters(:get_order)
            .update(amazon_order_id: amazon_order_ids)
            .format_structured_lists!
            .camelize_keys!

          execute
        end

        def list(options)
          options[:marketplace_id] ||= client.marketplace_id

          parameters(:list_orders)
            .update(options)
            .timestamp!
            .format_structured_lists!
            .camelize_keys!

          execute
        end

        def list_by_next_token
          parameters(:list_orders_by_next_token)
            .update(next_token: next_token)
            .camelize_keys!

          execute
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
peddler-0.6.3 lib/mws/orders/requests/orders.rb
peddler-0.6.2 lib/mws/orders/requests/orders.rb
peddler-0.6.1 lib/mws/orders/requests/orders.rb
peddler-0.6.0 lib/mws/orders/requests/orders.rb