Module: AvaTax::Client::Nexus
- Included in:
- AvaTax::Client
- Defined in:
- lib/avatax/client/nexus.rb
Instance Method Summary collapse
-
#create_nexus(companyId, model) ⇒ NexusModel[]
Create a new nexus.
-
#create_nexus_parameters(companyId, nexusId, model) ⇒ NexusParameterDetailModel[]
Add parameters to a nexus.
-
#declare_nexus_by_address(companyId, model) ⇒ NexusByAddressModel[]
Creates nexus for a list of addresses.
-
#delete_nexus(companyId, id, options = {}) ⇒ ErrorDetail[]
Delete a single nexus.
-
#delete_nexus_parameter(companyId, nexusId, id) ⇒ ErrorDetail[]
Delete a single nexus parameter.
-
#delete_nexus_parameters(companyId, nexusId) ⇒ ErrorDetail[]
Delete all parameters for an nexus.
-
#get_nexus(companyId, id, options = {}) ⇒ Object
Retrieve a single nexus.
-
#get_nexus_by_form_code(companyId, formCode, options = {}) ⇒ Object
List company nexus related to a tax form.
-
#get_nexus_parameter(companyId, nexusId, id) ⇒ Object
Retrieve a single nexus parameter.
-
#list_nexus_by_company(companyId, options = {}) ⇒ FetchResult
Retrieve nexus for this company.
-
#list_nexus_by_company_and_tax_type_group(companyId, taxTypeGroup, options = {}) ⇒ FetchResult
Retrieve nexus for this company By TaxTypeGroup.
-
#list_nexus_parameters(companyId, nexusId, options = {}) ⇒ FetchResult
Retrieve parameters for a nexus.
-
#query_nexus(options = {}) ⇒ FetchResult
Retrieve all nexus.
-
#update_nexus(companyId, id, model) ⇒ Object
Update a single nexus.
-
#update_nexus_parameter(companyId, nexusId, id, model) ⇒ Object
Update an nexus parameter.
Instance Method Details
#create_nexus(companyId, model) ⇒ NexusModel[]
Create a new nexus
Creates one or more new nexus declarations attached to this company.
The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your accountant or lawyer prior to declaring nexus.
To create a nexus declaration for your company, you must first call the Definitions API ListNexus
to obtain a
list of Avalara-defined nexus. Once you have determined which nexus you wish to declare, you should customize
only the user-selectable fields in this object.
The user selectable fields for the nexus object are companyId
, effectiveDate
, endDate
, localNexusTypeId
,
taxId
, nexusTypeId
, hasPermanentEstablishment
, and isSellerImporterOfRecord
.
When calling CreateNexus
or UpdateNexus
, all values in your nexus object except for the user-selectable fields
must match an Avalara-defined system nexus object. You can retrieve a list of Avalara-defined system nexus objects
by calling ListNexus
. If any data does not match, AvaTax may not recognize your nexus declaration.
Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance of calculating tax for a location.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
35 36 |
# File 'lib/avatax/client/nexus.rb', line 35 def create_nexus(companyId, model) path = "/api/v2/companies/#{companyId}/nexus" post(path, model, {}, AvaTax::VERSION) end |
#create_nexus_parameters(companyId, nexusId, model) ⇒ NexusParameterDetailModel[]
Add parameters to a nexus.
Add parameters to the nexus. Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to an nexus will be used by default in tax calculation but will not show on the transaction line referencing the nexus.
A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name.
To see available parameters for this item, call /api/v2/definitions/parameters?$filter=attributeType eq Nexus
Some parameters are only available for use if you have subscribed to specific AvaTax services. To see which parameters you are able to use, add the query parameter "$showSubscribed=true" to the parameter definition call above.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
59 60 |
# File 'lib/avatax/client/nexus.rb', line 59 def create_nexus_parameters(companyId, nexusId, model) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters" post(path, model, {}, AvaTax::VERSION) end |
#declare_nexus_by_address(companyId, model) ⇒ NexusByAddressModel[]
Creates nexus for a list of addresses.
This call is intended to simplify adding all applicable nexus to a company, for an address or addresses. Calling this API declares nexus for this company, for the list of addresses provided, for the date range provided. You may also use this API to extend effective date on an already-declared nexus.
The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your accountant or lawyer prior to declaring nexus.
Note that not all fields within a nexus can be updated; Avalara publishes a list of all defined nexus at the '/api/v2/definitions/nexus' endpoint.
You may only define nexus matching the official list of declared nexus.
Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance of calculating tax for a location.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
87 88 |
# File 'lib/avatax/client/nexus.rb', line 87 def declare_nexus_by_address(companyId, model) path = "/api/v2/companies/#{companyId}/nexus/byaddress" post(path, model, {}, AvaTax::VERSION) end |
#delete_nexus(companyId, id, options = {}) ⇒ ErrorDetail[]
Delete a single nexus
Marks the existing nexus object at this URL as deleted.
The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your accountant or lawyer prior to declaring nexus.
Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance of calculating tax for a location.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
109 110 |
# File 'lib/avatax/client/nexus.rb', line 109 def delete_nexus(companyId, id, ={}) path = "/api/v2/companies/#{companyId}/nexus/#{id}" delete(path, , AvaTax::VERSION) end |
#delete_nexus_parameter(companyId, nexusId, id) ⇒ ErrorDetail[]
Delete a single nexus parameter
Delete a single nexus parameter. Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to an nexus will be used by default in tax calculation but will not show on the transaction line referencing the nexus.
A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
129 130 |
# File 'lib/avatax/client/nexus.rb', line 129 def delete_nexus_parameter(companyId, nexusId, id) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}" delete(path, {}, AvaTax::VERSION) end |
#delete_nexus_parameters(companyId, nexusId) ⇒ ErrorDetail[]
Delete all parameters for an nexus
Delete all the parameters for a given nexus. Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to an nexus will be used by default in tax calculation but will not show on the transaction line referencing the nexus.
A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
148 149 |
# File 'lib/avatax/client/nexus.rb', line 148 def delete_nexus_parameters(companyId, nexusId) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters" delete(path, {}, AvaTax::VERSION) end |
#get_nexus(companyId, id, options = {}) ⇒ Object
Retrieve a single nexus
Get the nexus object identified by this URL.
The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your accountant or lawyer prior to declaring nexus. You may specify one or more of the following values in the '$include' parameter to fetch additional nested data, using commas to separate multiple values:
- Parameters
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
170 171 |
# File 'lib/avatax/client/nexus.rb', line 170 def get_nexus(companyId, id, ={}) path = "/api/v2/companies/#{companyId}/nexus/#{id}" get(path, , AvaTax::VERSION) end |
#get_nexus_by_form_code(companyId, formCode, options = {}) ⇒ Object
List company nexus related to a tax form
Retrieves a list of nexus related to a tax form.
The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your accountant or lawyer prior to declaring nexus.
This API is intended to provide useful information when examining a tax form. If you are about to begin filing a tax form, you may want to know whether you have declared nexus in all the jurisdictions related to that tax form in order to better understand how the form will be filled out. You may specify one or more of the following values in the '$include' parameter to fetch additional nested data, using commas to separate multiple values:
- Parameters
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
196 197 |
# File 'lib/avatax/client/nexus.rb', line 196 def get_nexus_by_form_code(companyId, formCode, ={}) path = "/api/v2/companies/#{companyId}/nexus/byform/#{formCode}" get(path, , AvaTax::VERSION) end |
#get_nexus_parameter(companyId, nexusId, id) ⇒ Object
Retrieve a single nexus parameter
Retrieve a single nexus parameter. Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller.In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to an nexus will be used by default in tax calculation but will not show on the transaction line referencing the nexus.
A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
216 217 |
# File 'lib/avatax/client/nexus.rb', line 216 def get_nexus_parameter(companyId, nexusId, id) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}" get(path, {}, AvaTax::VERSION) end |
#list_nexus_by_company(companyId, options = {}) ⇒ FetchResult
Retrieve nexus for this company
List all nexus objects defined for this company.
The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your accountant or lawyer prior to declaring nexus.
Search for specific objects using the criteria in the $filter
parameter; full documentation is available on Filtering in REST .
Paginate your results using the $top
, $skip
, and $orderby
parameters.
You may specify one or more of the following values in the '$include' parameter to fetch additional nested data, using commas to separate multiple values:
- Parameters
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
244 245 |
# File 'lib/avatax/client/nexus.rb', line 244 def list_nexus_by_company(companyId, ={}) path = "/api/v2/companies/#{companyId}/nexus" get(path, , AvaTax::VERSION) end |
#list_nexus_by_company_and_tax_type_group(companyId, taxTypeGroup, options = {}) ⇒ FetchResult
Retrieve nexus for this company By TaxTypeGroup
List all nexus objects defined for this company filtered by TaxTypeGroup.
The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your accountant or lawyer prior to declaring nexus.
Search for specific objects using the criteria in the $filter
parameter; full documentation is available on Filtering in REST .
Paginate your results using the $top
, $skip
, and $orderby
parameters.
You may specify one or more of the following values in the '$include' parameter to fetch additional nested data, using commas to separate multiple values:
- Parameters
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
273 274 |
# File 'lib/avatax/client/nexus.rb', line 273 def list_nexus_by_company_and_tax_type_group(companyId, taxTypeGroup, ={}) path = "/api/v2/companies/#{companyId}/nexus/byTaxTypeGroup/#{taxTypeGroup}" get(path, , AvaTax::VERSION) end |
#list_nexus_parameters(companyId, nexusId, options = {}) ⇒ FetchResult
Retrieve parameters for a nexus
List parameters for a nexus. Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to an nexus will be used by default in tax calculation but will not show on the transaction line referencing the nexus.
A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name.
Search for specific objects using the criteria in the $filter
parameter; full documentation is available on Filtering in REST .
Paginate your results using the $top
, $skip
, and $orderby
parameters.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
299 300 |
# File 'lib/avatax/client/nexus.rb', line 299 def list_nexus_parameters(companyId, nexusId, ={}) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters" get(path, , AvaTax::VERSION) end |
#query_nexus(options = {}) ⇒ FetchResult
Retrieve all nexus
Get multiple nexus objects across all companies.
The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your accountant or lawyer prior to declaring nexus.
Search for specific objects using the criteria in the $filter
parameter; full documentation is available on Filtering in REST .
Paginate your results using the $top
, $skip
, and $orderby
parameters.
You may specify one or more of the following values in the '$include' parameter to fetch additional nested data, using commas to separate multiple values:
- Parameters
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
326 327 |
# File 'lib/avatax/client/nexus.rb', line 326 def query_nexus(={}) path = "/api/v2/nexus" get(path, , AvaTax::VERSION) end |
#update_nexus(companyId, id, model) ⇒ Object
Update a single nexus
Replace the existing nexus declaration object at this URL with an updated object.
The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your accountant or lawyer prior to declaring nexus.
To create a nexus declaration for your company, you must first call the Definitions API ListNexus
to obtain a
list of Avalara-defined nexus. Once you have determined which nexus you wish to declare, you should customize
only the user-selectable fields in this object.
The user selectable fields for the nexus object are companyId
, effectiveDate
, endDate
, localNexusTypeId
,
taxId
, nexusTypeId
, hasPermanentEstablishment
, and isSellerImporterOfRecord
.
When calling CreateNexus
or UpdateNexus
, all values in your nexus object except for the user-selectable fields
must match an Avalara-defined system nexus object. You can retrieve a list of Avalara-defined system nexus objects
by calling ListNexus
. If any data does not match, AvaTax may not recognize your nexus declaration.
Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance of calculating tax for a location.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
359 360 |
# File 'lib/avatax/client/nexus.rb', line 359 def update_nexus(companyId, id, model) path = "/api/v2/companies/#{companyId}/nexus/#{id}" put(path, model, {}, AvaTax::VERSION) end |
#update_nexus_parameter(companyId, nexusId, id, model) ⇒ Object
Update an nexus parameter
Update an nexus parameter.
Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to a nexus will be used in tax calculation based on the locationcode and parameter value the transaction state line might have lines added.
A parameter specified on a transaction line will override an item parameter if they share the same parameter name.????? I dont know about this?
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
381 382 |
# File 'lib/avatax/client/nexus.rb', line 381 def update_nexus_parameter(companyId, nexusId, id, model) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}" put(path, model, {}, AvaTax::VERSION) end |