Module: Tictail::Api::Order

Included in:
Client
Defined in:
lib/tictail/api/order.rb

Instance Method Summary collapse

Instance Method Details

#get_orders(params) ⇒ Object

Raises:



4
5
6
7
8
9
# File 'lib/tictail/api/order.rb', line 4

def get_orders params
  raise InvalidParams.new('No store id spacified') unless params[:store_id]
  order_id = params[:order_id] ? "/#{params[:order_id]}" : ''
  response = get("/v1/stores/#{params[:store_id]}/orders" + order_id, params.except(:store_id))
  response.body
end