Sha256: 262c38508a8841ab3e5d4dde593935de81b3d90df2ae682894da4f78d0b588b5

Contents?: true

Size: 604 Bytes

Versions: 18

Compression:

Stored size: 604 Bytes

Contents

module ShopifyAPI
  class Order < Base
    include Events
    include Metafields

    def close;  load_attributes_from_response(post(:close, {}, only_id)); end
    def open;   load_attributes_from_response(post(:open, {}, only_id)); end

    def cancel(options = {})
      load_attributes_from_response(post(:cancel, options, only_id))
    end

    def transactions
      Transaction.find(:all, :params => { :order_id => id })
    end

    def capture(amount = "")
      Transaction.create(:amount => amount, :kind => "capture", :order_id => id)
    end

    class ClientDetails < Base
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
shopify_api-4.0.3 lib/shopify_api/resources/order.rb
shopify_api-4.0.2 lib/shopify_api/resources/order.rb
shopify_api-4.0.1 lib/shopify_api/resources/order.rb
shopify_api-4.0.0 lib/shopify_api/resources/order.rb
shopify_api-3.2.7 lib/shopify_api/resources/order.rb
shopify_api-3.2.6 lib/shopify_api/resources/order.rb
shopify_api-3.2.5 lib/shopify_api/resources/order.rb
shopify_api-3.2.4 lib/shopify_api/resources/order.rb
shopify_api-3.2.3 lib/shopify_api/resources/order.rb
shopify_api-3.2.2 lib/shopify_api/resources/order.rb
shopify_api-3.2.1 lib/shopify_api/resources/order.rb
shopify_api-3.2.0 lib/shopify_api/resources/order.rb
shopify_api-3.1.8 lib/shopify_api/resources/order.rb
shopify_api-3.1.7 lib/shopify_api/resources/order.rb
shopify_api-3.1.6 lib/shopify_api/resources/order.rb
shopify_api-3.1.5 lib/shopify_api/resources/order.rb
shopify_api-3.1.3 lib/shopify_api/resources/order.rb
shopify_api-3.1.2 lib/shopify_api/resources/order.rb