class Bluepark::Client::Orders

Public Class Methods

new(client) click to toggle source
# File lib/bluepark/client/orders.rb, line 4
def initialize(client)
  @client = client
end

Public Instance Methods

count(params = {}) click to toggle source
# File lib/bluepark/client/orders.rb, line 16
def count(params = {})
  @client.rest_get_with_token('orders/count', params)['count']
end
create_order(order_params) click to toggle source
# File lib/bluepark/client/orders.rb, line 20
def create_order(order_params)
  @client.rest_post_with_token('orders', order_params)
end
delete_all_orders() click to toggle source
# File lib/bluepark/client/orders.rb, line 32
def delete_all_orders
  @client.rest_delete_with_token('orders/all')
end
delete_order_by_id(order_id) click to toggle source
# File lib/bluepark/client/orders.rb, line 28
def delete_order_by_id(order_id)
  @client.rest_delete_with_token("orders/#{order_id}")
end
get_order(order_id) click to toggle source
# File lib/bluepark/client/orders.rb, line 12
def get_order(order_id)
  @client.rest_get_with_token("orders/#{order_id}")
end
get_orders(params = {}) click to toggle source
# File lib/bluepark/client/orders.rb, line 8
def get_orders(params = {})
  @client.rest_get_with_token('orders/', params)
end
update_single_order(order_id, order_params) click to toggle source
# File lib/bluepark/client/orders.rb, line 24
def update_single_order(order_id, order_params)
  @client.rest_put_with_token("orders/#{order_id}", order_params)
end