Sha256: ea71802ed64dc536d9b25b655786b867aed10378c490f219f958a931e904647b

Contents?: true

Size: 409 Bytes

Versions: 5

Compression:

Stored size: 409 Bytes

Contents

class ShippingEasy::Resources::Order < ShippingEasy::Resources::Base

  command :create, http_method: :post do |args|
    "/stores/#{args.delete(:store_api_key)}/orders"
  end

  command :find do |args|
    "/orders/#{args.delete(:id)}"
  end

  command :find_all do |args|
    if args.has_key?(:store_api_key)
      "/stores/#{args.delete(:store_api_key)}/orders"
    else
      "/orders"
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
shipping_easy-0.5.1 lib/shipping_easy/resources/order.rb
shipping_easy-0.5.0 lib/shipping_easy/resources/order.rb
shipping_easy-0.3.2 lib/shipping_easy/resources/order.rb
shipping_easy-0.3.1 lib/shipping_easy/resources/order.rb
shipping_easy-0.3.0 lib/shipping_easy/resources/order.rb