class Avatax::Api::TaxRates

Constants

BY_ADDRESS_METHOD
BY_POSTAL_CODE_METHOD
VALID_METHODS

Public Instance Methods

get(method, args = {}) click to toggle source
# File lib/avatax/api/tax_rates.rb, line 9
def get(method, args = {})
  unless VALID_METHODS.include?(method.to_sym)
    raise ArgumentError, 'method must be one of :bt_address or :by_postal_code'
  end

  handle_response(send("get_#{method}", args))
end

Private Instance Methods

get_by_address(args) click to toggle source
# File lib/avatax/api/tax_rates.rb, line 19
def get_by_address(args)
  connection.get '/api/v2/taxrates/byaddress', args
end
get_by_postal_code(args) click to toggle source
# File lib/avatax/api/tax_rates.rb, line 23
def get_by_postal_code(args)
  connection.get '/api/v2/taxrates/bypostalcode', args
end