Sha256: dad24a2b7d11ed064c945bb089ec20755621d8acb86b6766b6909fd2e6661ed3

Contents?: true

Size: 929 Bytes

Versions: 3

Compression:

Stored size: 929 Bytes

Contents

module Shipstation
    class Order < ApiResource
        extend Shipstation::APIOperations::List
        extend Shipstation::APIOperations::Create
        extend Shipstation::APIOperations::Retrieve

        class << self
            def create_label params={}
                response = Shipstation.request(:post, "orders/createlabelfororder", params)
                
                return response
            end

            def assign_tag params={}
                response = Shipstation.request(:post, "orders/addtag", params)
                
                return response
            end
          
            # params: { [:username], [:password], input: [ {:order_number, ... }, { :order_number, ... } ] }
            # todo: complete in future phase
            # def create_update_orders params 
            #     Shipstation.request(:post, "orders/createorders", params)
            # end
        end
    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shipstation-0.12.4 lib/shipstation/order.rb
shipstation-0.12.3 lib/shipstation/order.rb
shipstation-0.12.1 lib/shipstation/order.rb