Module: AvaTax::Client::Addresses

Included in:
AvaTax::Client
Defined in:
lib/avatax/client/addresses.rb

Instance Method Summary collapse

Instance Method Details

#resolve_address(options = {}) ⇒ Object

Retrieve geolocation information for a specified US or Canadian address

Resolve a US or Canadian address against Avalara's address validation system. Note that this API is valid for US and Canadian addresses only.

If the address can be resolved, this API provides the latitude and longitude of the resolved location. The value resolutionQuality can be used to identify how closely this address can be located. If the address cannot be clearly located, use the messages structure to learn more about problems with this address. This is the same API as the POST /api/v2/addresses/resolve endpoint. Both verbs are supported to provide for flexible implementation.

In order to get any evaluation for an address, please provide at least one of the following fields/pairs:

  1. postal code
  2. line1 + city + region
  3. line1 + postal code

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
  • This API depends on the following active services:Required (all): AutoAddress. Swagger Name: AvaTaxClient

Parameters:

  • line1 (String)

    Line 1

  • line2 (String)

    Line 2

  • line3 (String)

    Line 3

  • city (String)

    City

  • region (String)

    State / Province / Region

  • postalCode (String)

    Postal Code / Zip Code

  • country (String)

    Two character ISO 3166 Country Code (see /api/v2/definitions/countries for a full list)

  • textCase (String)

    selectable text case for address validation (See TextCase::* for a list of allowable values)

Returns:

  • (Object)


36
37
# File 'lib/avatax/client/addresses.rb', line 36

def resolve_address(options={})        path = "/api/v2/addresses/resolve"
get(path, options, AvaTax::VERSION)      end

#resolve_address_post(model) ⇒ Object

Retrieve geolocation information for a specified US or Canadian address

Resolve a US or Canadian address against Avalara's address validation system. Note that this API is valid for US and Canadian addresses only.

If the address can be resolved, this API provides the latitude and longitude of the resolved location. The value resolutionQuality can be used to identify how closely this address can be located. If the address cannot be clearly located, use the messages structure to learn more about problems with this address. This is the same API as the GET /api/v2/addresses/resolve endpoint. Both verbs are supported to provide for flexible implementation.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
  • This API depends on the following active services:Required (all): AutoAddress. Swagger Name: AvaTaxClient

Parameters:

  • model (Object)

    The address to resolve

Returns:

  • (Object)


57
58
# File 'lib/avatax/client/addresses.rb', line 57

def resolve_address_post(model)        path = "/api/v2/addresses/resolve"
post(path, model, {}, AvaTax::VERSION)      end