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_post_with_objects, #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
16
17
18
|
# File 'lib/taxjar/api/order.rb', line 16
def create_order(options = {})
perform_post_with_object("/v2/transactions/orders", 'order', options, Taxjar::Order)
end
|
#delete_order(id, options = {}) ⇒ Object
25
26
27
|
# File 'lib/taxjar/api/order.rb', line 25
def delete_order(id, options={})
perform_delete_with_object("/v2/transactions/orders/#{id}", 'order', options, Taxjar::Order)
end
|
#list_orders(options = {}) ⇒ Object
8
9
10
|
# File 'lib/taxjar/api/order.rb', line 8
def list_orders(options = {})
perform_get_with_array("/v2/transactions/orders", 'orders', options)
end
|
#show_order(id, options = {}) ⇒ Object
12
13
14
|
# File 'lib/taxjar/api/order.rb', line 12
def show_order(id, options = {})
perform_get_with_object("/v2/transactions/orders/#{id}", 'order', options, Taxjar::Order)
end
|
#update_order(options = {}) ⇒ Object
20
21
22
23
|
# File 'lib/taxjar/api/order.rb', line 20
def update_order(options = {})
id = options.fetch(:transaction_id)
perform_put_with_object("/v2/transactions/orders/#{id}", 'order', options, Taxjar::Order)
end
|