Sha256: db3ea24e4393e7d7374bf954a723ac615eb9f7dc1c4238b138af2073b3fad794

Contents?: true

Size: 983 Bytes

Versions: 4

Compression:

Stored size: 983 Bytes

Contents

# frozen_string_literal: true

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

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

        response
      end

      def assign_tag(params = {})
        response = Shipstation.request(:post, 'orders/addtag', params)

        response
      end

      def remove_tag(params = {})
        response = Shipstation.request(:post, 'orders/removetag', params)

        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

4 entries across 4 versions & 1 rubygems

Version Path
shipstation-0.16.7 lib/shipstation/order.rb
shipstation-0.16.6 lib/shipstation/order.rb
shipstation-0.16.5 lib/shipstation/order.rb
shipstation-0.15.5 lib/shipstation/order.rb