avatax 19.12.0 → 20.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/avatax.gemspec +0 -1
- data/lib/avatax/client/accounts.rb +269 -193
- data/lib/avatax/client/addresses.rb +60 -60
- data/lib/avatax/client/advancedrules.rb +81 -162
- data/lib/avatax/client/avafileforms.rb +93 -93
- data/lib/avatax/client/batches.rb +247 -188
- data/lib/avatax/client/certexpressinvites.rb +106 -106
- data/lib/avatax/client/certificates.rb +469 -469
- data/lib/avatax/client/companies.rb +400 -398
- data/lib/avatax/client/compliance.rb +18 -18
- data/lib/avatax/client/contacts.rb +124 -124
- data/lib/avatax/client/customers.rb +415 -415
- data/lib/avatax/client/datasources.rb +117 -117
- data/lib/avatax/client/definitions.rb +1039 -1007
- data/lib/avatax/client/distancethresholds.rb +140 -140
- data/lib/avatax/client/filingcalendars.rb +23 -508
- data/lib/avatax/client/filings.rb +29 -29
- data/lib/avatax/client/firmclientlinkages.rb +150 -150
- data/lib/avatax/client/free.rb +109 -109
- data/lib/avatax/client/fundingrequests.rb +58 -58
- data/lib/avatax/client/items.rb +480 -480
- data/lib/avatax/client/jurisdictionoverrides.rb +136 -136
- data/lib/avatax/client/locations.rb +163 -160
- data/lib/avatax/client/multidocument.rb +420 -340
- data/lib/avatax/client/nexus.rb +240 -225
- data/lib/avatax/client/notifications.rb +84 -84
- data/lib/avatax/client/provisioning.rb +55 -55
- data/lib/avatax/client/registrar.rb +228 -228
- data/lib/avatax/client/reports.rb +109 -109
- data/lib/avatax/client/settings.rb +174 -174
- data/lib/avatax/client/subscriptions.rb +71 -71
- data/lib/avatax/client/taxcodes.rb +138 -138
- data/lib/avatax/client/taxcontent.rb +142 -142
- data/lib/avatax/client/taxrules.rb +188 -188
- data/lib/avatax/client/transactions.rb +899 -854
- data/lib/avatax/client/upcs.rb +129 -129
- data/lib/avatax/client/users.rb +207 -207
- data/lib/avatax/client/utilities.rb +70 -70
- data/lib/avatax/connection.rb +3 -3
- data/lib/avatax/request.rb +2 -0
- data/lib/avatax/version.rb +1 -1
- metadata +4 -25
data/lib/avatax/client/nexus.rb
CHANGED
@@ -1,226 +1,241 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Nexus
|
4
|
-
|
5
|
-
|
6
|
-
# Create a new nexus
|
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
|
-
#
|
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.
|
33
|
-
# @return [NexusModel[]]
|
34
|
-
def create_nexus(companyId, model)
|
35
|
-
path = "/api/v2/companies/#{companyId}/nexus"
|
36
|
-
post(path, model)
|
37
|
-
end
|
38
|
-
|
39
|
-
|
40
|
-
# Creates nexus for a list of addresses.
|
41
|
-
#
|
42
|
-
# This call is intended to simplify adding all applicable nexus to a company, for an address or addresses. Calling this
|
43
|
-
# API declares nexus for this company, for the list of addresses provided,
|
44
|
-
# for the date range provided. You may also use this API to extend effective date on an already-declared nexus.
|
45
|
-
#
|
46
|
-
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
47
|
-
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
48
|
-
# accountant or lawyer prior to declaring nexus.
|
49
|
-
#
|
50
|
-
# Note that not all fields within a nexus can be updated; Avalara publishes a list of all defined nexus at the
|
51
|
-
# '/api/v2/definitions/nexus' endpoint.
|
52
|
-
#
|
53
|
-
# You may only define nexus matching the official list of declared nexus.
|
54
|
-
#
|
55
|
-
# Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
|
56
|
-
# of calculating tax for a location.
|
57
|
-
#
|
58
|
-
# ### Security Policies
|
59
|
-
#
|
60
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
61
|
-
# @param companyId [Integer] The ID of the company that will own this nexus.
|
62
|
-
# @param model [DeclareNexusByAddressModel[]] The nexus you wish to create.
|
63
|
-
# @return [NexusByAddressModel[]]
|
64
|
-
def declare_nexus_by_address(companyId, model)
|
65
|
-
path = "/api/v2/companies/#{companyId}/nexus/byaddress"
|
66
|
-
post(path, model)
|
67
|
-
end
|
68
|
-
|
69
|
-
|
70
|
-
# Delete a single nexus
|
71
|
-
#
|
72
|
-
# Marks the existing nexus object at this URL as deleted.
|
73
|
-
#
|
74
|
-
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
75
|
-
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
76
|
-
# accountant or lawyer prior to declaring nexus.
|
77
|
-
#
|
78
|
-
# Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
|
79
|
-
# of calculating tax for a location.
|
80
|
-
#
|
81
|
-
# ### Security Policies
|
82
|
-
#
|
83
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
84
|
-
# @param companyId [Integer] The ID of the company that owns this nexus.
|
85
|
-
# @param id [Integer] The ID of the nexus you wish to delete.
|
86
|
-
# @
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
#
|
95
|
-
#
|
96
|
-
#
|
97
|
-
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
#
|
101
|
-
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
#
|
119
|
-
#
|
120
|
-
#
|
121
|
-
#
|
122
|
-
#
|
123
|
-
#
|
124
|
-
#
|
125
|
-
#
|
126
|
-
#
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
#
|
138
|
-
#
|
139
|
-
#
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
#
|
147
|
-
#
|
148
|
-
#
|
149
|
-
#
|
150
|
-
#
|
151
|
-
#
|
152
|
-
#
|
153
|
-
#
|
154
|
-
#
|
155
|
-
#
|
156
|
-
#
|
157
|
-
#
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
#
|
165
|
-
#
|
166
|
-
#
|
167
|
-
#
|
168
|
-
#
|
169
|
-
#
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
#
|
177
|
-
#
|
178
|
-
#
|
179
|
-
#
|
180
|
-
#
|
181
|
-
#
|
182
|
-
#
|
183
|
-
#
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
#
|
191
|
-
#
|
192
|
-
#
|
193
|
-
#
|
194
|
-
#
|
195
|
-
#
|
196
|
-
#
|
197
|
-
#
|
198
|
-
#
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
#
|
206
|
-
#
|
207
|
-
#
|
208
|
-
#
|
209
|
-
#
|
210
|
-
#
|
211
|
-
#
|
212
|
-
#
|
213
|
-
#
|
214
|
-
#
|
215
|
-
#
|
216
|
-
#
|
217
|
-
#
|
218
|
-
#
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Nexus
|
4
|
+
|
5
|
+
|
6
|
+
# Create a new nexus
|
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
|
+
#
|
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.
|
33
|
+
# @return [NexusModel[]]
|
34
|
+
def create_nexus(companyId, model)
|
35
|
+
path = "/api/v2/companies/#{companyId}/nexus"
|
36
|
+
post(path, model)
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
# Creates nexus for a list of addresses.
|
41
|
+
#
|
42
|
+
# This call is intended to simplify adding all applicable nexus to a company, for an address or addresses. Calling this
|
43
|
+
# API declares nexus for this company, for the list of addresses provided,
|
44
|
+
# for the date range provided. You may also use this API to extend effective date on an already-declared nexus.
|
45
|
+
#
|
46
|
+
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
47
|
+
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
48
|
+
# accountant or lawyer prior to declaring nexus.
|
49
|
+
#
|
50
|
+
# Note that not all fields within a nexus can be updated; Avalara publishes a list of all defined nexus at the
|
51
|
+
# '/api/v2/definitions/nexus' endpoint.
|
52
|
+
#
|
53
|
+
# You may only define nexus matching the official list of declared nexus.
|
54
|
+
#
|
55
|
+
# Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
|
56
|
+
# of calculating tax for a location.
|
57
|
+
#
|
58
|
+
# ### Security Policies
|
59
|
+
#
|
60
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
61
|
+
# @param companyId [Integer] The ID of the company that will own this nexus.
|
62
|
+
# @param model [DeclareNexusByAddressModel[]] The nexus you wish to create.
|
63
|
+
# @return [NexusByAddressModel[]]
|
64
|
+
def declare_nexus_by_address(companyId, model)
|
65
|
+
path = "/api/v2/companies/#{companyId}/nexus/byaddress"
|
66
|
+
post(path, model)
|
67
|
+
end
|
68
|
+
|
69
|
+
|
70
|
+
# Delete a single nexus
|
71
|
+
#
|
72
|
+
# Marks the existing nexus object at this URL as deleted.
|
73
|
+
#
|
74
|
+
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
75
|
+
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
76
|
+
# accountant or lawyer prior to declaring nexus.
|
77
|
+
#
|
78
|
+
# Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
|
79
|
+
# of calculating tax for a location.
|
80
|
+
#
|
81
|
+
# ### Security Policies
|
82
|
+
#
|
83
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
84
|
+
# @param companyId [Integer] The ID of the company that owns this nexus.
|
85
|
+
# @param id [Integer] The ID of the nexus you wish to delete.
|
86
|
+
# @param cascadeDelete [Boolean] If true, deletes all the child nexus if they exist along with parent nexus
|
87
|
+
# @return [ErrorDetail[]]
|
88
|
+
def delete_nexus(companyId, id, options={})
|
89
|
+
path = "/api/v2/companies/#{companyId}/nexus/#{id}"
|
90
|
+
delete(path, options)
|
91
|
+
end
|
92
|
+
|
93
|
+
|
94
|
+
# Retrieve a single nexus
|
95
|
+
#
|
96
|
+
# Get the nexus object identified by this URL.
|
97
|
+
#
|
98
|
+
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
99
|
+
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
100
|
+
# accountant or lawyer prior to declaring nexus.
|
101
|
+
# 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:
|
102
|
+
#
|
103
|
+
# * Parameters
|
104
|
+
#
|
105
|
+
# ### Security Policies
|
106
|
+
#
|
107
|
+
# * 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.
|
108
|
+
# @param companyId [Integer] The ID of the company that owns this nexus object
|
109
|
+
# @param id [Integer] The primary key of this nexus
|
110
|
+
# @param include [String]
|
111
|
+
# @return [Object]
|
112
|
+
def get_nexus(companyId, id, options={})
|
113
|
+
path = "/api/v2/companies/#{companyId}/nexus/#{id}"
|
114
|
+
get(path, options)
|
115
|
+
end
|
116
|
+
|
117
|
+
|
118
|
+
# List company nexus related to a tax form
|
119
|
+
#
|
120
|
+
# Retrieves a list of nexus related to a tax form.
|
121
|
+
#
|
122
|
+
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
123
|
+
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
124
|
+
# accountant or lawyer prior to declaring nexus.
|
125
|
+
#
|
126
|
+
# This API is intended to provide useful information when examining a tax form. If you are about to begin filing
|
127
|
+
# a tax form, you may want to know whether you have declared nexus in all the jurisdictions related to that tax
|
128
|
+
# form in order to better understand how the form will be filled out.
|
129
|
+
# 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:
|
130
|
+
#
|
131
|
+
# * Parameters
|
132
|
+
#
|
133
|
+
# ### Security Policies
|
134
|
+
#
|
135
|
+
# * 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 this nexus object
|
137
|
+
# @param formCode [String] The form code that we are looking up the nexus for
|
138
|
+
# @param include [String]
|
139
|
+
# @return [Object]
|
140
|
+
def get_nexus_by_form_code(companyId, formCode, options={})
|
141
|
+
path = "/api/v2/companies/#{companyId}/nexus/byform/#{formCode}"
|
142
|
+
get(path, options)
|
143
|
+
end
|
144
|
+
|
145
|
+
|
146
|
+
# Retrieve nexus for this company
|
147
|
+
#
|
148
|
+
# List all nexus objects defined for this company.
|
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
|
+
# 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:
|
157
|
+
#
|
158
|
+
# * Parameters
|
159
|
+
#
|
160
|
+
# ### Security Policies
|
161
|
+
#
|
162
|
+
# * 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.
|
163
|
+
# @param companyId [Integer] The ID of the company that owns these nexus objects
|
164
|
+
# @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
|
165
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
166
|
+
# @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.
|
167
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
168
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
169
|
+
# @return [FetchResult]
|
170
|
+
def list_nexus_by_company(companyId, options={})
|
171
|
+
path = "/api/v2/companies/#{companyId}/nexus"
|
172
|
+
get(path, options)
|
173
|
+
end
|
174
|
+
|
175
|
+
|
176
|
+
# Retrieve all nexus
|
177
|
+
#
|
178
|
+
# Get multiple nexus objects across all companies.
|
179
|
+
#
|
180
|
+
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
181
|
+
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
182
|
+
# accountant or lawyer prior to declaring nexus.
|
183
|
+
#
|
184
|
+
# 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/) .
|
185
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
186
|
+
# 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:
|
187
|
+
#
|
188
|
+
# * Parameters
|
189
|
+
#
|
190
|
+
# ### Security Policies
|
191
|
+
#
|
192
|
+
# * 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.
|
193
|
+
# @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
|
194
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
195
|
+
# @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.
|
196
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
197
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
198
|
+
# @return [FetchResult]
|
199
|
+
def query_nexus(options={})
|
200
|
+
path = "/api/v2/nexus"
|
201
|
+
get(path, options)
|
202
|
+
end
|
203
|
+
|
204
|
+
|
205
|
+
# Update a single nexus
|
206
|
+
#
|
207
|
+
# Replace the existing nexus declaration object at this URL with an updated object.
|
208
|
+
#
|
209
|
+
# The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
|
210
|
+
# taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
|
211
|
+
# accountant or lawyer prior to declaring nexus.
|
212
|
+
#
|
213
|
+
# To create a nexus declaration for your company, you must first call the Definitions API `ListNexus` to obtain a
|
214
|
+
# list of Avalara-defined nexus. Once you have determined which nexus you wish to declare, you should customize
|
215
|
+
# only the user-selectable fields in this object.
|
216
|
+
#
|
217
|
+
# The user selectable fields for the nexus object are `companyId`, `effectiveDate`, `endDate`, `localNexusTypeId`,
|
218
|
+
# `taxId`, `nexusTypeId`, `hasPermanentEstablishment`, and `isSellerImporterOfRecord`.
|
219
|
+
#
|
220
|
+
# When calling `CreateNexus` or `UpdateNexus`, all values in your nexus object except for the user-selectable fields
|
221
|
+
# must match an Avalara-defined system nexus object. You can retrieve a list of Avalara-defined system nexus objects
|
222
|
+
# by calling `ListNexus`. If any data does not match, AvaTax may not recognize your nexus declaration.
|
223
|
+
#
|
224
|
+
# Please note that nexus changes may not take effect immediately and you should plan to update your nexus settings in advance
|
225
|
+
# of calculating tax for a location.
|
226
|
+
#
|
227
|
+
# ### Security Policies
|
228
|
+
#
|
229
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
230
|
+
# @param companyId [Integer] The ID of the company that this nexus belongs to.
|
231
|
+
# @param id [Integer] The ID of the nexus you wish to update
|
232
|
+
# @param model [Object] The nexus object you wish to update.
|
233
|
+
# @return [Object]
|
234
|
+
def update_nexus(companyId, id, model)
|
235
|
+
path = "/api/v2/companies/#{companyId}/nexus/#{id}"
|
236
|
+
put(path, model)
|
237
|
+
end
|
238
|
+
|
239
|
+
end
|
240
|
+
end
|
226
241
|
end
|