Class: Tremendous::Order::OrderResource
- Inherits:
-
Object
- Object
- Tremendous::Order::OrderResource
show all
- Includes:
- Request
- Defined in:
- lib/tremendous/order.rb
Instance Attribute Summary
Attributes included from Request
#access_token, #uri
Instance Method Summary
collapse
Methods included from Request
#_execute, #delete, #get, #handle_response, #initialize, #post, #put, #url
Instance Method Details
#create!(data = {}) ⇒ Object
17
18
19
20
21
22
23
|
# File 'lib/tremendous/order.rb', line 17
def create!(data={})
post(
'orders',
body: data.to_json,
headers: { 'Content-Type' => 'application/json' }
)[:order]
end
|
#list(filters = {}) ⇒ Object
25
26
27
28
29
30
|
# File 'lib/tremendous/order.rb', line 25
def list(filters={})
get(
'orders',
query: filters,
)[:orders]
end
|
#show(id) ⇒ Object
32
33
34
|
# File 'lib/tremendous/order.rb', line 32
def show(id)
get("orders/#{id}")[:order]
end
|