Module: Taxjar::API::Order
- Includes:
- Utils
- Included in:
- Client
- Defined in:
- lib/taxjar/api/order.rb
Instance Method Summary
collapse
Methods included from Utils
#perform_delete_with_object, #perform_get_with_array, #perform_get_with_object, #perform_get_with_objects, #perform_post_with_object, #perform_put_with_object, #perform_request, #perform_request_with_array, #perform_request_with_object, #perform_request_with_objects
Instance Method Details
#create_order(options = {}) ⇒ Object
15
16
17
|
# File 'lib/taxjar/api/order.rb', line 15
def create_order(options = {})
perform_post_with_object("/v2/transactions/orders", 'order', options, Taxjar::Order)
end
|
#delete_order(id, options = {}) ⇒ Object
24
25
26
|
# File 'lib/taxjar/api/order.rb', line 24
def delete_order(id, options={})
perform_delete_with_object("/v2/transactions/orders/#{id}", 'order', options, Taxjar::Order)
end
|
#list_orders(options = {}) ⇒ Object
7
8
9
|
# File 'lib/taxjar/api/order.rb', line 7
def list_orders(options = {})
perform_get_with_array("/v2/transactions/orders", 'orders', options)
end
|
#show_order(id, options = {}) ⇒ Object
11
12
13
|
# File 'lib/taxjar/api/order.rb', line 11
def show_order(id, options = {})
perform_get_with_object("/v2/transactions/orders/#{id}", 'order', options, Taxjar::Order)
end
|
#update_order(options = {}) ⇒ Object
19
20
21
22
|
# File 'lib/taxjar/api/order.rb', line 19
def update_order(options = {})
id = options.fetch(:transaction_id)
perform_put_with_object("/v2/transactions/orders/#{id}", 'order', options, Taxjar::Order)
end
|