avatax 20.1.0 → 20.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/avatax/client/accounts.rb +180 -116
- data/lib/avatax/client/addresses.rb +34 -34
- data/lib/avatax/client/advancedrules.rb +33 -142
- data/lib/avatax/client/avafileforms.rb +37 -37
- data/lib/avatax/client/batches.rb +122 -122
- data/lib/avatax/client/certexpressinvites.rb +70 -70
- data/lib/avatax/client/certificates.rb +313 -313
- data/lib/avatax/client/companies.rb +234 -232
- data/lib/avatax/client/compliance.rb +2 -2
- data/lib/avatax/client/contacts.rb +58 -58
- data/lib/avatax/client/customers.rb +279 -279
- data/lib/avatax/client/datasources.rb +51 -51
- data/lib/avatax/client/definitions.rb +448 -435
- data/lib/avatax/client/distancethresholds.rb +74 -74
- data/lib/avatax/client/filingcalendars.rb +10 -498
- data/lib/avatax/client/filings.rb +13 -13
- data/lib/avatax/client/firmclientlinkages.rb +54 -54
- data/lib/avatax/client/free.rb +73 -73
- data/lib/avatax/client/fundingrequests.rb +32 -32
- data/lib/avatax/client/items.rb +284 -284
- data/lib/avatax/client/jurisdictionoverrides.rb +70 -70
- data/lib/avatax/client/locations.rb +87 -84
- data/lib/avatax/client/multidocument.rb +294 -234
- data/lib/avatax/client/nexus.rb +283 -143
- data/lib/avatax/client/notifications.rb +48 -48
- data/lib/avatax/client/provisioning.rb +29 -29
- data/lib/avatax/client/registrar.rb +122 -122
- data/lib/avatax/client/reports.rb +63 -63
- data/lib/avatax/client/settings.rb +108 -108
- data/lib/avatax/client/subscriptions.rb +35 -35
- data/lib/avatax/client/taxcodes.rb +72 -72
- data/lib/avatax/client/taxcontent.rb +106 -106
- data/lib/avatax/client/taxrules.rb +122 -122
- data/lib/avatax/client/transactions.rb +654 -639
- data/lib/avatax/client/upcs.rb +63 -63
- data/lib/avatax/client/users.rb +121 -121
- data/lib/avatax/client/utilities.rb +34 -34
- data/lib/avatax/connection.rb +1 -1
- data/lib/avatax/request.rb +2 -0
- data/lib/avatax/version.rb +1 -1
- metadata +3 -3
data/lib/avatax/client/nexus.rb
CHANGED
@@ -5,198 +5,338 @@ module AvaTax
|
|
5
5
|
|
6
6
|
# Create a new nexus
|
7
7
|
#
|
8
|
-
# Creates one or more new nexus declarations attached to this company.
|
9
|
-
#
|
10
|
-
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
11
|
-
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
12
|
-
# accountant or lawyer prior to declaring nexus.
|
13
|
-
#
|
14
|
-
# To create a nexus declaration for your company, you must first call the Definitions API `ListNexus` to obtain a
|
15
|
-
# list of Avalara-defined nexus. Once you have determined which nexus you wish to declare, you should customize
|
16
|
-
# only the user-selectable fields in this object.
|
17
|
-
#
|
18
|
-
# The user selectable fields for the nexus object are `companyId`, `effectiveDate`, `endDate`, `localNexusTypeId`,
|
19
|
-
# `taxId`, `nexusTypeId`, `hasPermanentEstablishment`, and `isSellerImporterOfRecord`.
|
20
|
-
#
|
21
|
-
# When calling `CreateNexus` or `UpdateNexus`, all values in your nexus object except for the user-selectable fields
|
22
|
-
# must match an Avalara-defined system nexus object. You can retrieve a list of Avalara-defined system nexus objects
|
23
|
-
# by calling `ListNexus`. If any data does not match, AvaTax may not recognize your nexus declaration.
|
24
|
-
#
|
25
|
-
# Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
|
26
|
-
# of calculating tax for a location.
|
27
|
-
#
|
28
|
-
# ### Security Policies
|
29
|
-
#
|
8
|
+
# Creates one or more new nexus declarations attached to this company.
|
9
|
+
#
|
10
|
+
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
11
|
+
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
12
|
+
# accountant or lawyer prior to declaring nexus.
|
13
|
+
#
|
14
|
+
# To create a nexus declaration for your company, you must first call the Definitions API `ListNexus` to obtain a
|
15
|
+
# list of Avalara-defined nexus. Once you have determined which nexus you wish to declare, you should customize
|
16
|
+
# only the user-selectable fields in this object.
|
17
|
+
#
|
18
|
+
# The user selectable fields for the nexus object are `companyId`, `effectiveDate`, `endDate`, `localNexusTypeId`,
|
19
|
+
# `taxId`, `nexusTypeId`, `hasPermanentEstablishment`, and `isSellerImporterOfRecord`.
|
20
|
+
#
|
21
|
+
# When calling `CreateNexus` or `UpdateNexus`, all values in your nexus object except for the user-selectable fields
|
22
|
+
# must match an Avalara-defined system nexus object. You can retrieve a list of Avalara-defined system nexus objects
|
23
|
+
# by calling `ListNexus`. If any data does not match, AvaTax may not recognize your nexus declaration.
|
24
|
+
#
|
25
|
+
# Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
|
26
|
+
# of calculating tax for a location.
|
27
|
+
#
|
28
|
+
# ### Security Policies
|
29
|
+
#
|
30
30
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
31
|
-
# @param companyId [Integer] The ID of the company that owns this nexus.
|
32
|
-
# @param model [NexusModel[]] The nexus you wish to create.
|
31
|
+
# @param companyId [Integer] The ID of the company that owns this nexus.
|
32
|
+
# @param model [NexusModel[]] The nexus you wish to create.
|
33
33
|
# @return [NexusModel[]]
|
34
34
|
def create_nexus(companyId, model) path = "/api/v2/companies/#{companyId}/nexus"
|
35
35
|
post(path, model) end
|
36
36
|
|
37
|
+
# Add parameters to a nexus.
|
38
|
+
#
|
39
|
+
# Add parameters to the nexus.
|
40
|
+
# 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".
|
41
|
+
#
|
42
|
+
# 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.
|
43
|
+
#
|
44
|
+
# A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name.
|
45
|
+
#
|
46
|
+
# To see available parameters for this item, call `/api/v2/definitions/parameters?$filter=attributeType eq Nexus`
|
47
|
+
#
|
48
|
+
# 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.
|
49
|
+
#
|
50
|
+
# ### Security Policies
|
51
|
+
#
|
52
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
53
|
+
# @param companyId [Integer] The ID of the company that owns this nexus parameter.
|
54
|
+
# @param nexusId [Integer] The nexus id.
|
55
|
+
# @param model [NexusParameterDetailModel[]] The nexus parameters you wish to create.
|
56
|
+
# @return [NexusParameterDetailModel[]]
|
57
|
+
def create_nexus_parameters(companyId, nexusId, model) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters"
|
58
|
+
post(path, model) end
|
59
|
+
|
37
60
|
# Creates nexus for a list of addresses.
|
38
61
|
#
|
39
|
-
# This call is intended to simplify adding all applicable nexus to a company, for an address or addresses. Calling this
|
40
|
-
# API declares nexus for this company, for the list of addresses provided,
|
41
|
-
# for the date range provided. You may also use this API to extend effective date on an already-declared nexus.
|
42
|
-
#
|
43
|
-
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
44
|
-
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
45
|
-
# accountant or lawyer prior to declaring nexus.
|
46
|
-
#
|
47
|
-
# Note that not all fields within a nexus can be updated; Avalara publishes a list of all defined nexus at the
|
48
|
-
# '/api/v2/definitions/nexus' endpoint.
|
49
|
-
#
|
50
|
-
# You may only define nexus matching the official list of declared nexus.
|
51
|
-
#
|
52
|
-
# Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
|
53
|
-
# of calculating tax for a location.
|
54
|
-
#
|
55
|
-
# ### Security Policies
|
56
|
-
#
|
62
|
+
# This call is intended to simplify adding all applicable nexus to a company, for an address or addresses. Calling this
|
63
|
+
# API declares nexus for this company, for the list of addresses provided,
|
64
|
+
# for the date range provided. You may also use this API to extend effective date on an already-declared nexus.
|
65
|
+
#
|
66
|
+
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
67
|
+
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
68
|
+
# accountant or lawyer prior to declaring nexus.
|
69
|
+
#
|
70
|
+
# Note that not all fields within a nexus can be updated; Avalara publishes a list of all defined nexus at the
|
71
|
+
# '/api/v2/definitions/nexus' endpoint.
|
72
|
+
#
|
73
|
+
# You may only define nexus matching the official list of declared nexus.
|
74
|
+
#
|
75
|
+
# Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
|
76
|
+
# of calculating tax for a location.
|
77
|
+
#
|
78
|
+
# ### Security Policies
|
79
|
+
#
|
57
80
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
58
|
-
# @param companyId [Integer] The ID of the company that will own this nexus.
|
59
|
-
# @param model [DeclareNexusByAddressModel[]] The nexus you wish to create.
|
81
|
+
# @param companyId [Integer] The ID of the company that will own this nexus.
|
82
|
+
# @param model [DeclareNexusByAddressModel[]] The nexus you wish to create.
|
60
83
|
# @return [NexusByAddressModel[]]
|
61
84
|
def declare_nexus_by_address(companyId, model) path = "/api/v2/companies/#{companyId}/nexus/byaddress"
|
62
85
|
post(path, model) end
|
63
86
|
|
64
87
|
# Delete a single nexus
|
65
88
|
#
|
66
|
-
# Marks the existing nexus object at this URL as deleted.
|
67
|
-
#
|
68
|
-
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
69
|
-
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
70
|
-
# accountant or lawyer prior to declaring nexus.
|
71
|
-
#
|
72
|
-
# Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
|
73
|
-
# of calculating tax for a location.
|
74
|
-
#
|
75
|
-
# ### Security Policies
|
76
|
-
#
|
89
|
+
# Marks the existing nexus object at this URL as deleted.
|
90
|
+
#
|
91
|
+
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
92
|
+
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
93
|
+
# accountant or lawyer prior to declaring nexus.
|
94
|
+
#
|
95
|
+
# Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
|
96
|
+
# of calculating tax for a location.
|
97
|
+
#
|
98
|
+
# ### Security Policies
|
99
|
+
#
|
100
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
101
|
+
# @param companyId [Integer] The ID of the company that owns this nexus.
|
102
|
+
# @param id [Integer] The ID of the nexus you wish to delete.
|
103
|
+
# @param cascadeDelete [Boolean] If true, deletes all the child nexus if they exist along with parent nexus
|
104
|
+
# @return [ErrorDetail[]]
|
105
|
+
def delete_nexus(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{id}"
|
106
|
+
delete(path, options) end
|
107
|
+
|
108
|
+
# Delete a single nexus parameter
|
109
|
+
#
|
110
|
+
# Delete a single nexus parameter.
|
111
|
+
# 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".
|
112
|
+
#
|
113
|
+
# 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.
|
114
|
+
#
|
115
|
+
# A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name.
|
116
|
+
#
|
117
|
+
# ### Security Policies
|
118
|
+
#
|
119
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
120
|
+
# @param companyId [Integer] The company id
|
121
|
+
# @param nexusId [Integer] The nexus id
|
122
|
+
# @param id [Integer] The parameter id
|
123
|
+
# @return [ErrorDetail[]]
|
124
|
+
def delete_nexus_parameter(companyId, nexusId, id) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}"
|
125
|
+
delete(path) end
|
126
|
+
|
127
|
+
# Delete all parameters for an nexus
|
128
|
+
#
|
129
|
+
# Delete all the parameters for a given nexus.
|
130
|
+
# 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".
|
131
|
+
#
|
132
|
+
# 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.
|
133
|
+
#
|
134
|
+
# A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name.
|
135
|
+
#
|
136
|
+
# ### Security Policies
|
137
|
+
#
|
77
138
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
78
|
-
# @param companyId [Integer] The ID of the company that owns this nexus.
|
79
|
-
# @param
|
139
|
+
# @param companyId [Integer] The ID of the company that owns this nexus.
|
140
|
+
# @param nexusId [Integer] The ID of the nexus you wish to delete the parameters.
|
80
141
|
# @return [ErrorDetail[]]
|
81
|
-
def
|
142
|
+
def delete_nexus_parameters(companyId, nexusId) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters"
|
82
143
|
delete(path) end
|
83
144
|
|
84
145
|
# Retrieve a single nexus
|
85
146
|
#
|
86
|
-
# Get the nexus object identified by this URL.
|
87
|
-
#
|
88
|
-
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
89
|
-
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
90
|
-
# accountant or lawyer prior to declaring nexus.
|
91
|
-
#
|
92
|
-
#
|
93
|
-
#
|
147
|
+
# Get the nexus object identified by this URL.
|
148
|
+
#
|
149
|
+
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
150
|
+
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
151
|
+
# accountant or lawyer prior to declaring nexus.
|
152
|
+
# 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:
|
153
|
+
#
|
154
|
+
# * Parameters
|
155
|
+
#
|
156
|
+
# ### Security Policies
|
157
|
+
#
|
94
158
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
95
|
-
# @param companyId [Integer] The ID of the company that owns this nexus object
|
96
|
-
# @param id [Integer] The primary key of this nexus
|
159
|
+
# @param companyId [Integer] The ID of the company that owns this nexus object
|
160
|
+
# @param id [Integer] The primary key of this nexus
|
161
|
+
# @param include [String]
|
97
162
|
# @return [Object]
|
98
|
-
def get_nexus(companyId, id) path = "/api/v2/companies/#{companyId}/nexus/#{id}"
|
99
|
-
get(path) end
|
163
|
+
def get_nexus(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{id}"
|
164
|
+
get(path, options) end
|
100
165
|
|
101
166
|
# List company nexus related to a tax form
|
102
167
|
#
|
103
|
-
# Retrieves a list of nexus related to a tax form.
|
104
|
-
#
|
105
|
-
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
106
|
-
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
107
|
-
# accountant or lawyer prior to declaring nexus.
|
108
|
-
#
|
109
|
-
# This API is intended to provide useful information when examining a tax form. If you are about to begin filing
|
110
|
-
# a tax form, you may want to know whether you have declared nexus in all the jurisdictions related to that tax
|
111
|
-
# form in order to better understand how the form will be filled out.
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
168
|
+
# Retrieves a list of nexus related to a tax form.
|
169
|
+
#
|
170
|
+
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
171
|
+
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
172
|
+
# accountant or lawyer prior to declaring nexus.
|
173
|
+
#
|
174
|
+
# This API is intended to provide useful information when examining a tax form. If you are about to begin filing
|
175
|
+
# a tax form, you may want to know whether you have declared nexus in all the jurisdictions related to that tax
|
176
|
+
# form in order to better understand how the form will be filled out.
|
177
|
+
# 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:
|
178
|
+
#
|
179
|
+
# * Parameters
|
180
|
+
#
|
181
|
+
# ### Security Policies
|
182
|
+
#
|
183
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
184
|
+
# @param companyId [Integer] The ID of the company that owns this nexus object
|
185
|
+
# @param formCode [String] The form code that we are looking up the nexus for
|
186
|
+
# @param include [String]
|
187
|
+
# @return [Object]
|
188
|
+
def get_nexus_by_form_code(companyId, formCode, options={}) path = "/api/v2/companies/#{companyId}/nexus/byform/#{formCode}"
|
189
|
+
get(path, options) end
|
190
|
+
|
191
|
+
# Retrieve a single nexus parameter
|
192
|
+
#
|
193
|
+
# Retrieve a single nexus parameter.
|
194
|
+
# 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".
|
195
|
+
#
|
196
|
+
# 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.
|
197
|
+
#
|
198
|
+
# A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name.
|
199
|
+
#
|
200
|
+
# ### Security Policies
|
201
|
+
#
|
115
202
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
116
|
-
# @param companyId [Integer] The
|
117
|
-
# @param
|
203
|
+
# @param companyId [Integer] The company id
|
204
|
+
# @param nexusId [Integer] The nexus id
|
205
|
+
# @param id [Integer] The parameter id
|
118
206
|
# @return [Object]
|
119
|
-
def
|
207
|
+
def get_nexus_parameter(companyId, nexusId, id) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}"
|
120
208
|
get(path) end
|
121
209
|
|
122
210
|
# Retrieve nexus for this company
|
123
211
|
#
|
124
|
-
# List all nexus objects defined for this company.
|
125
|
-
#
|
126
|
-
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
127
|
-
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
128
|
-
# accountant or lawyer prior to declaring nexus.
|
129
|
-
#
|
130
|
-
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
131
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
132
|
-
#
|
133
|
-
#
|
134
|
-
#
|
212
|
+
# List all nexus objects defined for this company.
|
213
|
+
#
|
214
|
+
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
215
|
+
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
216
|
+
# accountant or lawyer prior to declaring nexus.
|
217
|
+
#
|
218
|
+
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
219
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
220
|
+
# 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:
|
221
|
+
#
|
222
|
+
# * Parameters
|
223
|
+
#
|
224
|
+
# ### Security Policies
|
225
|
+
#
|
135
226
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
136
|
-
# @param companyId [Integer] The ID of the company that owns these nexus objects
|
137
|
-
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId
|
138
|
-
# @param include [String] A comma separated list of additional data to retrieve.
|
139
|
-
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
|
140
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
141
|
-
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
227
|
+
# @param companyId [Integer] The ID of the company that owns these nexus objects
|
228
|
+
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters
|
229
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
230
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
|
231
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
232
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
142
233
|
# @return [FetchResult]
|
143
234
|
def list_nexus_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/nexus"
|
144
235
|
get(path, options) end
|
145
236
|
|
237
|
+
# Retrieve parameters for a nexus
|
238
|
+
#
|
239
|
+
# List parameters for a nexus.
|
240
|
+
# 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".
|
241
|
+
#
|
242
|
+
# 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.
|
243
|
+
#
|
244
|
+
# A parameter specified on a transaction line will override an nexus parameter if they share the same parameter name.
|
245
|
+
#
|
246
|
+
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
247
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
248
|
+
#
|
249
|
+
# ### Security Policies
|
250
|
+
#
|
251
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
252
|
+
# @param companyId [Integer] The company id
|
253
|
+
# @param nexusId [Integer] The nexus id
|
254
|
+
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* name, unit
|
255
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
|
256
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
257
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
258
|
+
# @return [FetchResult]
|
259
|
+
def list_nexus_parameters(companyId, nexusId, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters"
|
260
|
+
get(path, options) end
|
261
|
+
|
146
262
|
# Retrieve all nexus
|
147
263
|
#
|
148
|
-
# Get multiple nexus objects across all companies.
|
149
|
-
#
|
150
|
-
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
151
|
-
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
152
|
-
# accountant or lawyer prior to declaring nexus.
|
153
|
-
#
|
154
|
-
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
155
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
156
|
-
#
|
157
|
-
#
|
158
|
-
#
|
264
|
+
# Get multiple nexus objects across all companies.
|
265
|
+
#
|
266
|
+
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
267
|
+
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
268
|
+
# accountant or lawyer prior to declaring nexus.
|
269
|
+
#
|
270
|
+
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
271
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
272
|
+
# 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:
|
273
|
+
#
|
274
|
+
# * Parameters
|
275
|
+
#
|
276
|
+
# ### Security Policies
|
277
|
+
#
|
159
278
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
160
|
-
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId
|
161
|
-
# @param include [String] A comma separated list of additional data to retrieve.
|
162
|
-
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
|
163
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
164
|
-
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
279
|
+
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters
|
280
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
281
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.
|
282
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
283
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
165
284
|
# @return [FetchResult]
|
166
285
|
def query_nexus(options={}) path = "/api/v2/nexus"
|
167
286
|
get(path, options) end
|
168
287
|
|
169
288
|
# Update a single nexus
|
170
289
|
#
|
171
|
-
# Replace the existing nexus declaration object at this URL with an updated object.
|
172
|
-
#
|
173
|
-
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
174
|
-
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
175
|
-
# accountant or lawyer prior to declaring nexus.
|
176
|
-
#
|
177
|
-
# To create a nexus declaration for your company, you must first call the Definitions API `ListNexus` to obtain a
|
178
|
-
# list of Avalara-defined nexus. Once you have determined which nexus you wish to declare, you should customize
|
179
|
-
# only the user-selectable fields in this object.
|
180
|
-
#
|
181
|
-
# The user selectable fields for the nexus object are `companyId`, `effectiveDate`, `endDate`, `localNexusTypeId`,
|
182
|
-
# `taxId`, `nexusTypeId`, `hasPermanentEstablishment`, and `isSellerImporterOfRecord`.
|
183
|
-
#
|
184
|
-
# When calling `CreateNexus` or `UpdateNexus`, all values in your nexus object except for the user-selectable fields
|
185
|
-
# must match an Avalara-defined system nexus object. You can retrieve a list of Avalara-defined system nexus objects
|
186
|
-
# by calling `ListNexus`. If any data does not match, AvaTax may not recognize your nexus declaration.
|
187
|
-
#
|
188
|
-
# Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
|
189
|
-
# of calculating tax for a location.
|
190
|
-
#
|
191
|
-
# ### Security Policies
|
192
|
-
#
|
290
|
+
# Replace the existing nexus declaration object at this URL with an updated object.
|
291
|
+
#
|
292
|
+
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
293
|
+
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
294
|
+
# accountant or lawyer prior to declaring nexus.
|
295
|
+
#
|
296
|
+
# To create a nexus declaration for your company, you must first call the Definitions API `ListNexus` to obtain a
|
297
|
+
# list of Avalara-defined nexus. Once you have determined which nexus you wish to declare, you should customize
|
298
|
+
# only the user-selectable fields in this object.
|
299
|
+
#
|
300
|
+
# The user selectable fields for the nexus object are `companyId`, `effectiveDate`, `endDate`, `localNexusTypeId`,
|
301
|
+
# `taxId`, `nexusTypeId`, `hasPermanentEstablishment`, and `isSellerImporterOfRecord`.
|
302
|
+
#
|
303
|
+
# When calling `CreateNexus` or `UpdateNexus`, all values in your nexus object except for the user-selectable fields
|
304
|
+
# must match an Avalara-defined system nexus object. You can retrieve a list of Avalara-defined system nexus objects
|
305
|
+
# by calling `ListNexus`. If any data does not match, AvaTax may not recognize your nexus declaration.
|
306
|
+
#
|
307
|
+
# Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
|
308
|
+
# of calculating tax for a location.
|
309
|
+
#
|
310
|
+
# ### Security Policies
|
311
|
+
#
|
193
312
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
194
|
-
# @param companyId [Integer] The ID of the company that this nexus belongs to.
|
195
|
-
# @param id [Integer] The ID of the nexus you wish to update
|
196
|
-
# @param model [Object] The nexus object you wish to update.
|
313
|
+
# @param companyId [Integer] The ID of the company that this nexus belongs to.
|
314
|
+
# @param id [Integer] The ID of the nexus you wish to update
|
315
|
+
# @param model [Object] The nexus object you wish to update.
|
197
316
|
# @return [Object]
|
198
317
|
def update_nexus(companyId, id, model) path = "/api/v2/companies/#{companyId}/nexus/#{id}"
|
199
318
|
put(path, model) end
|
319
|
+
|
320
|
+
# Update an nexus parameter
|
321
|
+
#
|
322
|
+
# Update an nexus parameter.
|
323
|
+
#
|
324
|
+
# 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".
|
325
|
+
#
|
326
|
+
# 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.
|
327
|
+
#
|
328
|
+
# A parameter specified on a transaction line will override an item parameter if they share the same parameter name.????? I dont know about this?
|
329
|
+
#
|
330
|
+
# ### Security Policies
|
331
|
+
#
|
332
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
333
|
+
# @param companyId [Integer] The company id.
|
334
|
+
# @param nexusId [Integer] The nexus id
|
335
|
+
# @param id [Integer] The nexus parameter id
|
336
|
+
# @param model [Object] The nexus object you wish to update.
|
337
|
+
# @return [Object]
|
338
|
+
def update_nexus_parameter(companyId, nexusId, id, model) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}"
|
339
|
+
put(path, model) end
|
200
340
|
end
|
201
341
|
end
|
202
342
|
end
|