avatax 20.1.0 → 20.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/avatax.gemspec +0 -1
- data/lib/avatax/client/accounts.rb +236 -172
- data/lib/avatax/client/addresses.rb +54 -54
- data/lib/avatax/client/advancedrules.rb +63 -162
- data/lib/avatax/client/avafileforms.rb +78 -78
- data/lib/avatax/client/batches.rb +223 -170
- data/lib/avatax/client/certexpressinvites.rb +97 -97
- data/lib/avatax/client/certificates.rb +424 -424
- data/lib/avatax/client/companies.rb +457 -350
- data/lib/avatax/client/compliance.rb +15 -15
- data/lib/avatax/client/contacts.rb +106 -106
- data/lib/avatax/client/customers.rb +376 -376
- data/lib/avatax/client/datasources.rb +99 -99
- data/lib/avatax/client/definitions.rb +862 -847
- data/lib/avatax/client/distancethresholds.rb +122 -122
- data/lib/avatax/client/ecommercetoken.rb +37 -0
- data/lib/avatax/client/filingcalendars.rb +20 -508
- data/lib/avatax/client/filings.rb +37 -26
- data/lib/avatax/client/firmclientlinkages.rb +123 -123
- data/lib/avatax/client/free.rb +100 -100
- data/lib/avatax/client/fundingrequests.rb +52 -52
- data/lib/avatax/client/items.rb +423 -423
- data/lib/avatax/client/jurisdictionoverrides.rb +118 -118
- data/lib/avatax/client/locations.rb +253 -139
- data/lib/avatax/client/multidocument.rb +390 -310
- data/lib/avatax/client/nexus.rb +341 -201
- data/lib/avatax/client/notifications.rb +75 -75
- data/lib/avatax/client/provisioning.rb +49 -49
- data/lib/avatax/client/registrar.rb +198 -198
- data/lib/avatax/client/reports.rb +97 -97
- data/lib/avatax/client/settings.rb +156 -156
- data/lib/avatax/client/subscriptions.rb +62 -62
- data/lib/avatax/client/taxcodes.rb +120 -120
- data/lib/avatax/client/taxcontent.rb +133 -133
- data/lib/avatax/client/taxrules.rb +170 -170
- data/lib/avatax/client/transactions.rb +836 -791
- data/lib/avatax/client/upcs.rb +111 -111
- data/lib/avatax/client/users.rb +183 -183
- data/lib/avatax/client/utilities.rb +61 -61
- data/lib/avatax/connection.rb +3 -3
- data/lib/avatax/request.rb +2 -0
- data/lib/avatax/version.rb +1 -1
- metadata +4 -17
data/lib/avatax/client/nexus.rb
CHANGED
@@ -1,202 +1,342 @@
|
|
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) path = "/api/v2/companies/#{companyId}/nexus"
|
35
|
-
post(path, model) end
|
36
|
-
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
# of
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
#
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
#
|
65
|
-
#
|
66
|
-
#
|
67
|
-
#
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
71
|
-
#
|
72
|
-
#
|
73
|
-
#
|
74
|
-
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
80
|
-
#
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
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
|
-
# a
|
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
|
-
# @param
|
140
|
-
# @param
|
141
|
-
# @
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
#
|
147
|
-
#
|
148
|
-
#
|
149
|
-
#
|
150
|
-
# The
|
151
|
-
#
|
152
|
-
#
|
153
|
-
#
|
154
|
-
#
|
155
|
-
#
|
156
|
-
#
|
157
|
-
#
|
158
|
-
#
|
159
|
-
#
|
160
|
-
# @param
|
161
|
-
# @param include [String]
|
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
|
-
|
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) path = "/api/v2/companies/#{companyId}/nexus"
|
35
|
+
post(path, model) end
|
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
|
+
|
60
|
+
# Creates nexus for a list of addresses.
|
61
|
+
#
|
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
|
+
#
|
80
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
81
|
+
# @param companyId [Integer] The ID of the company that will own this nexus.
|
82
|
+
# @param model [DeclareNexusByAddressModel[]] The nexus you wish to create.
|
83
|
+
# @return [NexusByAddressModel[]]
|
84
|
+
def declare_nexus_by_address(companyId, model) path = "/api/v2/companies/#{companyId}/nexus/byaddress"
|
85
|
+
post(path, model) end
|
86
|
+
|
87
|
+
# Delete a single nexus
|
88
|
+
#
|
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
|
+
#
|
138
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
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.
|
141
|
+
# @return [ErrorDetail[]]
|
142
|
+
def delete_nexus_parameters(companyId, nexusId) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters"
|
143
|
+
delete(path) end
|
144
|
+
|
145
|
+
# Retrieve a single nexus
|
146
|
+
#
|
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
|
+
#
|
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.
|
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]
|
162
|
+
# @return [Object]
|
163
|
+
def get_nexus(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{id}"
|
164
|
+
get(path, options) end
|
165
|
+
|
166
|
+
# List company nexus related to a tax form
|
167
|
+
#
|
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
|
+
#
|
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.
|
203
|
+
# @param companyId [Integer] The company id
|
204
|
+
# @param nexusId [Integer] The nexus id
|
205
|
+
# @param id [Integer] The parameter id
|
206
|
+
# @return [Object]
|
207
|
+
def get_nexus_parameter(companyId, nexusId, id) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}"
|
208
|
+
get(path) end
|
209
|
+
|
210
|
+
# Retrieve nexus for this company
|
211
|
+
#
|
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
|
+
#
|
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.
|
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`.
|
233
|
+
# @return [FetchResult]
|
234
|
+
def list_nexus_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/nexus"
|
235
|
+
get(path, options) end
|
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
|
+
|
262
|
+
# Retrieve all nexus
|
263
|
+
#
|
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
|
+
#
|
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.
|
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`.
|
284
|
+
# @return [FetchResult]
|
285
|
+
def query_nexus(options={}) path = "/api/v2/nexus"
|
286
|
+
get(path, options) end
|
287
|
+
|
288
|
+
# Update a single nexus
|
289
|
+
#
|
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
|
+
#
|
312
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
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.
|
316
|
+
# @return [Object]
|
317
|
+
def update_nexus(companyId, id, model) path = "/api/v2/companies/#{companyId}/nexus/#{id}"
|
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
|
340
|
+
end
|
341
|
+
end
|
202
342
|
end
|