Module: Taxjar::API

Includes:
Utils
Included in:
Client
Defined in:
lib/taxjar/api/api.rb,
lib/taxjar/api/order.rb,
lib/taxjar/api/utils.rb,
lib/taxjar/api/refund.rb,
lib/taxjar/api/request.rb,
lib/taxjar/api/customer.rb

Defined Under Namespace

Modules: Customer, Order, Refund, Utils Classes: Request

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

#categories(options = {}) ⇒ Object



7
8
9
# File 'lib/taxjar/api/api.rb', line 7

def categories(options = {})
  perform_get_with_objects("/v2/categories", 'categories', options, Taxjar::Category)
end

#nexus_regions(options = {}) ⇒ Object



19
20
21
# File 'lib/taxjar/api/api.rb', line 19

def nexus_regions(options = {})
  perform_get_with_objects("/v2/nexus/regions", 'regions', options, Taxjar::NexusRegion)
end

#rates_for_location(postal_code, options = {}) ⇒ Object



11
12
13
# File 'lib/taxjar/api/api.rb', line 11

def rates_for_location(postal_code, options = {})
  perform_get_with_object("/v2/rates/#{postal_code}", 'rate', options, Taxjar::Rate)
end

#summary_rates(options = {}) ⇒ Object



31
32
33
# File 'lib/taxjar/api/api.rb', line 31

def summary_rates(options = {})
  perform_get_with_objects("/v2/summary_rates", 'summary_rates', options, Taxjar::SummaryRate)
end

#tax_for_order(options = {}) ⇒ Object



15
16
17
# File 'lib/taxjar/api/api.rb', line 15

def tax_for_order(options = {})
  perform_post_with_object("/v2/taxes", 'tax', options, Taxjar::Tax)
end

#validate(options = {}) ⇒ Object



27
28
29
# File 'lib/taxjar/api/api.rb', line 27

def validate(options = {})
  perform_get_with_object("/v2/validation", 'validation', options, Taxjar::Validation)
end

#validate_address(options = {}) ⇒ Object



23
24
25
# File 'lib/taxjar/api/api.rb', line 23

def validate_address(options = {})
  perform_post_with_objects("/v2/addresses/validate", 'addresses', options, Taxjar::Address)
end