avatax 21.9.0 → 22.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +55 -55
- data/.rspec +1 -1
- data/.travis.yml +18 -18
- data/.vs/VSWorkspaceState.json +5 -5
- data/.yardopts +4 -4
- data/Gemfile +2 -2
- data/LICENSE +201 -201
- data/README.md +98 -98
- data/Rakefile +9 -9
- data/avatax.gemspec +38 -38
- data/example/avatax.rb +47 -47
- data/example/credentials.example.yaml +5 -5
- data/lib/avatax/api.rb +27 -27
- data/lib/avatax/client/accounts.rb +22 -11
- data/lib/avatax/client/addresses.rb +4 -2
- data/lib/avatax/client/advancedrules.rb +10 -5
- data/lib/avatax/client/ageverification.rb +29 -0
- data/lib/avatax/client/avafileforms.rb +10 -5
- data/lib/avatax/client/batches.rb +16 -8
- data/lib/avatax/client/certexpressinvites.rb +6 -3
- data/lib/avatax/client/certificates.rb +30 -15
- data/lib/avatax/client/companies.rb +61 -21
- data/lib/avatax/client/compliance.rb +25 -14
- data/lib/avatax/client/contacts.rb +12 -6
- data/lib/avatax/client/customers.rb +26 -13
- data/lib/avatax/client/datasources.rb +12 -6
- data/lib/avatax/client/definitions.rb +140 -70
- data/lib/avatax/client/distancethresholds.rb +12 -6
- data/lib/avatax/client/ecms.rb +73 -73
- data/lib/avatax/client/ecommercetoken.rb +4 -2
- data/lib/avatax/client/errortransactions.rb +61 -61
- data/lib/avatax/client/filingcalendars.rb +9 -4
- data/lib/avatax/client/filings.rb +6 -2
- data/lib/avatax/client/firmclientlinkages.rb +18 -9
- data/lib/avatax/client/free.rb +2 -1
- data/lib/avatax/client/fundingrequests.rb +4 -2
- data/lib/avatax/client/items.rb +50 -25
- data/lib/avatax/client/jurisdictionoverrides.rb +12 -6
- data/lib/avatax/client/locations.rb +24 -12
- data/lib/avatax/client/multidocument.rb +20 -10
- data/lib/avatax/client/nexus.rb +30 -15
- data/lib/avatax/client/notices.rb +8 -4
- data/lib/avatax/client/notifications.rb +6 -3
- data/lib/avatax/client/onboarding.rb +55 -55
- data/lib/avatax/client/pointofsale.rb +21 -21
- data/lib/avatax/client/provisioning.rb +4 -2
- data/lib/avatax/client/registrar.rb +22 -11
- data/lib/avatax/client/reports.rb +8 -4
- data/lib/avatax/client/settings.rb +12 -6
- data/lib/avatax/client/shippingverification.rb +66 -0
- data/lib/avatax/client/subscriptions.rb +6 -3
- data/lib/avatax/client/taxcodes.rb +12 -6
- data/lib/avatax/client/taxcontent.rb +10 -5
- data/lib/avatax/client/taxprofiles.rb +42 -42
- data/lib/avatax/client/taxrules.rb +12 -6
- data/lib/avatax/client/transactions.rb +42 -21
- data/lib/avatax/client/upcs.rb +12 -6
- data/lib/avatax/client/userdefinedfields.rb +52 -0
- data/lib/avatax/client/users.rb +16 -8
- data/lib/avatax/client/utilities.rb +6 -3
- data/lib/avatax/client.rb +37 -35
- data/lib/avatax/configuration.rb +76 -76
- data/lib/avatax/connection.rb +49 -49
- data/lib/avatax/request.rb +51 -42
- data/lib/avatax/version.rb +3 -3
- data/lib/avatax.rb +26 -26
- data/spec/avatax/client/accounts_spec.rb +13 -13
- data/spec/avatax/client/transactions_spec.rb +80 -80
- data/spec/avatax/request_spec.rb +25 -25
- data/spec/avatax_spec.rb +45 -45
- data/spec/credentials.yaml.example +4 -4
- data/spec/fixtures/accounts.json +15 -15
- data/spec/spec_helper.rb +27 -27
- metadata +9 -13
@@ -22,10 +22,11 @@ module AvaTax
|
|
22
22
|
#
|
23
23
|
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
24
24
|
# * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
25
|
+
# Swagger Name: AvaTaxClient
|
25
26
|
# @param id [Integer] The unique ID number of this funding request
|
26
27
|
# @return [Object]
|
27
28
|
def activate_funding_request(id) path = "/api/v2/fundingrequests/#{id}/widget"
|
28
|
-
get(path) end
|
29
|
+
get(path, {}, "22.2.0") end
|
29
30
|
|
30
31
|
# Retrieve status about a funding setup request
|
31
32
|
#
|
@@ -44,10 +45,11 @@ module AvaTax
|
|
44
45
|
#
|
45
46
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
46
47
|
# * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
48
|
+
# Swagger Name: AvaTaxClient
|
47
49
|
# @param id [Integer] The unique ID number of this funding request
|
48
50
|
# @return [Object]
|
49
51
|
def funding_request_status(id) path = "/api/v2/fundingrequests/#{id}"
|
50
|
-
get(path) end
|
52
|
+
get(path, {}, "22.2.0") end
|
51
53
|
end
|
52
54
|
end
|
53
55
|
end
|
data/lib/avatax/client/items.rb
CHANGED
@@ -14,11 +14,12 @@ module AvaTax
|
|
14
14
|
# ### Security Policies
|
15
15
|
#
|
16
16
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
17
|
+
# Swagger Name: AvaTaxClient
|
17
18
|
# @param companyId [Integer] The ID of the company that owns this item.
|
18
19
|
# @param itemId [Integer] The ID of the item you wish to delete the classifications.
|
19
20
|
# @return [ErrorDetail[]]
|
20
21
|
def batch_delete_item_classifications(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
|
21
|
-
delete(path) end
|
22
|
+
delete(path, {}, "22.2.0") end
|
22
23
|
|
23
24
|
# Delete all parameters for an item
|
24
25
|
#
|
@@ -33,11 +34,12 @@ module AvaTax
|
|
33
34
|
# ### Security Policies
|
34
35
|
#
|
35
36
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
37
|
+
# Swagger Name: AvaTaxClient
|
36
38
|
# @param companyId [Integer] The ID of the company that owns this item.
|
37
39
|
# @param itemId [Integer] The ID of the item you wish to delete the parameters.
|
38
40
|
# @return [ErrorDetail[]]
|
39
41
|
def batch_delete_item_parameters(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
|
40
|
-
delete(path) end
|
42
|
+
delete(path, {}, "22.2.0") end
|
41
43
|
|
42
44
|
# Bulk upload items from a product catalog
|
43
45
|
#
|
@@ -54,11 +56,12 @@ module AvaTax
|
|
54
56
|
# ### Security Policies
|
55
57
|
#
|
56
58
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
59
|
+
# Swagger Name: AvaTaxClient
|
57
60
|
# @param companyId [Integer] The ID of the company that owns this items.
|
58
61
|
# @param model [Object] The items you wish to upload.
|
59
62
|
# @return [Object]
|
60
63
|
def bulk_upload_items(companyId, model) path = "/api/v2/companies/#{companyId}/items/upload"
|
61
|
-
post(path, model) end
|
64
|
+
post(path, model, {}, "22.2.0") end
|
62
65
|
|
63
66
|
# Add classifications to an item.
|
64
67
|
#
|
@@ -73,12 +76,13 @@ module AvaTax
|
|
73
76
|
# ### Security Policies
|
74
77
|
#
|
75
78
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
79
|
+
# Swagger Name: AvaTaxClient
|
76
80
|
# @param companyId [Integer] The company id.
|
77
81
|
# @param itemId [Integer] The item id.
|
78
82
|
# @param model [ItemClassificationInputModel[]] The item classifications you wish to create.
|
79
83
|
# @return [ItemClassificationOutputModel[]]
|
80
84
|
def create_item_classifications(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
|
81
|
-
post(path, model) end
|
85
|
+
post(path, model, {}, "22.2.0") end
|
82
86
|
|
83
87
|
# Add parameters to an item.
|
84
88
|
#
|
@@ -97,12 +101,13 @@ module AvaTax
|
|
97
101
|
# ### Security Policies
|
98
102
|
#
|
99
103
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
104
|
+
# Swagger Name: AvaTaxClient
|
100
105
|
# @param companyId [Integer] The ID of the company that owns this item parameter.
|
101
106
|
# @param itemId [Integer] The item id.
|
102
107
|
# @param model [ItemParameterModel[]] The item parameters you wish to create.
|
103
108
|
# @return [ItemParameterModel[]]
|
104
109
|
def create_item_parameters(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
|
105
|
-
post(path, model) end
|
110
|
+
post(path, model, {}, "22.2.0") end
|
106
111
|
|
107
112
|
# Create a new item
|
108
113
|
#
|
@@ -119,11 +124,12 @@ module AvaTax
|
|
119
124
|
# ### Security Policies
|
120
125
|
#
|
121
126
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
127
|
+
# Swagger Name: AvaTaxClient
|
122
128
|
# @param companyId [Integer] The ID of the company that owns this item.
|
123
129
|
# @param model [ItemModel[]] The item you wish to create.
|
124
130
|
# @return [ItemModel[]]
|
125
131
|
def create_items(companyId, model) path = "/api/v2/companies/#{companyId}/items"
|
126
|
-
post(path, model) end
|
132
|
+
post(path, model, {}, "22.2.0") end
|
127
133
|
|
128
134
|
# Create tags for a item
|
129
135
|
#
|
@@ -134,12 +140,13 @@ module AvaTax
|
|
134
140
|
# ### Security Policies
|
135
141
|
#
|
136
142
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
143
|
+
# Swagger Name: AvaTaxClient
|
137
144
|
# @param companyId [Integer] The ID of the company that defined these items
|
138
145
|
# @param itemId [Integer] The ID of the item as defined by the company that owns this tag.
|
139
146
|
# @param model [ItemTagDetailModel[]] Tags you wish to associate with the Item
|
140
147
|
# @return [ItemTagDetailModel[]]
|
141
148
|
def create_item_tags(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
|
142
|
-
post(path, model) end
|
149
|
+
post(path, model, {}, "22.2.0") end
|
143
150
|
|
144
151
|
# Delete a single item
|
145
152
|
#
|
@@ -156,11 +163,12 @@ module AvaTax
|
|
156
163
|
# ### Security Policies
|
157
164
|
#
|
158
165
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
166
|
+
# Swagger Name: AvaTaxClient
|
159
167
|
# @param companyId [Integer] The ID of the company that owns this item.
|
160
168
|
# @param id [Integer] The ID of the item you wish to delete.
|
161
169
|
# @return [ErrorDetail[]]
|
162
170
|
def delete_item(companyId, id) path = "/api/v2/companies/#{companyId}/items/#{id}"
|
163
|
-
delete(path) end
|
171
|
+
delete(path, {}, "22.2.0") end
|
164
172
|
|
165
173
|
# Delete a single item classification.
|
166
174
|
#
|
@@ -173,12 +181,13 @@ module AvaTax
|
|
173
181
|
# ### Security Policies
|
174
182
|
#
|
175
183
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
184
|
+
# Swagger Name: AvaTaxClient
|
176
185
|
# @param companyId [Integer] The company id.
|
177
186
|
# @param itemId [Integer] The item id.
|
178
187
|
# @param id [Integer] The item classification id.
|
179
188
|
# @return [ErrorDetail[]]
|
180
189
|
def delete_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
|
181
|
-
delete(path) end
|
190
|
+
delete(path, {}, "22.2.0") end
|
182
191
|
|
183
192
|
# Delete a single item parameter
|
184
193
|
#
|
@@ -193,12 +202,13 @@ module AvaTax
|
|
193
202
|
# ### Security Policies
|
194
203
|
#
|
195
204
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
205
|
+
# Swagger Name: AvaTaxClient
|
196
206
|
# @param companyId [Integer] The company id
|
197
207
|
# @param itemId [Integer] The item id
|
198
208
|
# @param id [Integer] The parameter id
|
199
209
|
# @return [ErrorDetail[]]
|
200
210
|
def delete_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
|
201
|
-
delete(path) end
|
211
|
+
delete(path, {}, "22.2.0") end
|
202
212
|
|
203
213
|
# Delete item tag by id
|
204
214
|
#
|
@@ -209,12 +219,13 @@ module AvaTax
|
|
209
219
|
# ### Security Policies
|
210
220
|
#
|
211
221
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
222
|
+
# Swagger Name: AvaTaxClient
|
212
223
|
# @param companyId [Integer] The ID of the company that defined these items
|
213
224
|
# @param itemId [Integer] The ID of the item as defined by the company that owns this tag.
|
214
225
|
# @param itemTagDetailId [Integer] The ID of the item tag detail you wish to delete.
|
215
226
|
# @return [ErrorDetail[]]
|
216
227
|
def delete_item_tag(companyId, itemId, itemTagDetailId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags/#{itemTagDetailId}"
|
217
|
-
delete(path) end
|
228
|
+
delete(path, {}, "22.2.0") end
|
218
229
|
|
219
230
|
# Delete all item tags
|
220
231
|
#
|
@@ -225,11 +236,12 @@ module AvaTax
|
|
225
236
|
# ### Security Policies
|
226
237
|
#
|
227
238
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
239
|
+
# Swagger Name: AvaTaxClient
|
228
240
|
# @param companyId [Integer] The ID of the company that defined these items.
|
229
241
|
# @param itemId [Integer] The ID of the item as defined by the company that owns this tag.
|
230
242
|
# @return [ErrorDetail[]]
|
231
243
|
def delete_item_tags(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
|
232
|
-
delete(path) end
|
244
|
+
delete(path, {}, "22.2.0") end
|
233
245
|
|
234
246
|
# Retrieve a single item
|
235
247
|
#
|
@@ -244,12 +256,13 @@ module AvaTax
|
|
244
256
|
# ### Security Policies
|
245
257
|
#
|
246
258
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
259
|
+
# Swagger Name: AvaTaxClient
|
247
260
|
# @param companyId [Integer] The ID of the company that owns this item object
|
248
261
|
# @param id [Integer] The primary key of this item
|
249
262
|
# @param include [String] A comma separated list of additional data to retrieve.
|
250
263
|
# @return [Object]
|
251
264
|
def get_item(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/items/#{id}"
|
252
|
-
get(path, options) end
|
265
|
+
get(path, options, "22.2.0") end
|
253
266
|
|
254
267
|
# Retrieve a single item classification.
|
255
268
|
#
|
@@ -262,12 +275,13 @@ module AvaTax
|
|
262
275
|
# ### Security Policies
|
263
276
|
#
|
264
277
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
278
|
+
# Swagger Name: AvaTaxClient
|
265
279
|
# @param companyId [Integer] The company id.
|
266
280
|
# @param itemId [Integer] The item id.
|
267
281
|
# @param id [Integer] The item classification id.
|
268
282
|
# @return [Object]
|
269
283
|
def get_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
|
270
|
-
get(path) end
|
284
|
+
get(path, {}, "22.2.0") end
|
271
285
|
|
272
286
|
# Retrieve a single item parameter
|
273
287
|
#
|
@@ -282,12 +296,13 @@ module AvaTax
|
|
282
296
|
# ### Security Policies
|
283
297
|
#
|
284
298
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
299
|
+
# Swagger Name: AvaTaxClient
|
285
300
|
# @param companyId [Integer] The company id
|
286
301
|
# @param itemId [Integer] The item id
|
287
302
|
# @param id [Integer] The parameter id
|
288
303
|
# @return [Object]
|
289
304
|
def get_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
|
290
|
-
get(path) end
|
305
|
+
get(path, {}, "22.2.0") end
|
291
306
|
|
292
307
|
# Retrieve tags for an item
|
293
308
|
#
|
@@ -298,6 +313,7 @@ module AvaTax
|
|
298
313
|
# ### Security Policies
|
299
314
|
#
|
300
315
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
316
|
+
# Swagger Name: AvaTaxClient
|
301
317
|
# @param companyId [Integer] The ID of the company that defined these items
|
302
318
|
# @param itemId [Integer] The ID of the item as defined by the company that owns this tag.
|
303
319
|
# @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:* tagName
|
@@ -305,7 +321,7 @@ module AvaTax
|
|
305
321
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
306
322
|
# @return [FetchResult]
|
307
323
|
def get_item_tags(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
|
308
|
-
get(path, options) end
|
324
|
+
get(path, options, "22.2.0") end
|
309
325
|
|
310
326
|
# Retrieve classifications for an item.
|
311
327
|
#
|
@@ -321,6 +337,7 @@ module AvaTax
|
|
321
337
|
# ### Security Policies
|
322
338
|
#
|
323
339
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
340
|
+
# Swagger Name: AvaTaxClient
|
324
341
|
# @param companyId [Integer] The company id.
|
325
342
|
# @param itemId [Integer] The item id.
|
326
343
|
# @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:* productCode, systemCode
|
@@ -329,7 +346,7 @@ module AvaTax
|
|
329
346
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
330
347
|
# @return [FetchResult]
|
331
348
|
def list_item_classifications(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
|
332
|
-
get(path, options) end
|
349
|
+
get(path, options, "22.2.0") end
|
333
350
|
|
334
351
|
# Retrieve parameters for an item
|
335
352
|
#
|
@@ -347,6 +364,7 @@ module AvaTax
|
|
347
364
|
# ### Security Policies
|
348
365
|
#
|
349
366
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
367
|
+
# Swagger Name: AvaTaxClient
|
350
368
|
# @param companyId [Integer] The company id
|
351
369
|
# @param itemId [Integer] The item id
|
352
370
|
# @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, isNeededForCalculation, isNeededForReturns, isNeededForClassification
|
@@ -355,7 +373,7 @@ module AvaTax
|
|
355
373
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
356
374
|
# @return [FetchResult]
|
357
375
|
def list_item_parameters(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
|
358
|
-
get(path, options) end
|
376
|
+
get(path, options, "22.2.0") end
|
359
377
|
|
360
378
|
# Retrieve items for this company
|
361
379
|
#
|
@@ -382,6 +400,7 @@ module AvaTax
|
|
382
400
|
# ### Security Policies
|
383
401
|
#
|
384
402
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
403
|
+
# Swagger Name: AvaTaxClient
|
385
404
|
# @param companyId [Integer] The ID of the company that defined these items
|
386
405
|
# @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:* taxCode, classifications, parameters, tags
|
387
406
|
# @param include [String] A comma separated list of additional data to retrieve.
|
@@ -391,7 +410,7 @@ module AvaTax
|
|
391
410
|
# @param tagName [String] Tag Name on the basis of which you want to filter Items
|
392
411
|
# @return [FetchResult]
|
393
412
|
def list_items_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/items"
|
394
|
-
get(path, options) end
|
413
|
+
get(path, options, "22.2.0") end
|
395
414
|
|
396
415
|
# Retrieve all items
|
397
416
|
#
|
@@ -410,6 +429,7 @@ module AvaTax
|
|
410
429
|
# ### Security Policies
|
411
430
|
#
|
412
431
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
432
|
+
# Swagger Name: AvaTaxClient
|
413
433
|
# @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:* taxCode, classifications, parameters, tags
|
414
434
|
# @param include [String] A comma separated list of additional data to retrieve.
|
415
435
|
# @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.
|
@@ -417,7 +437,7 @@ module AvaTax
|
|
417
437
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
418
438
|
# @return [FetchResult]
|
419
439
|
def query_items(options={}) path = "/api/v2/items"
|
420
|
-
get(path, options) end
|
440
|
+
get(path, options, "22.2.0") end
|
421
441
|
|
422
442
|
# Retrieve all items associated with given tag
|
423
443
|
#
|
@@ -436,6 +456,7 @@ module AvaTax
|
|
436
456
|
# ### Security Policies
|
437
457
|
#
|
438
458
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
459
|
+
# Swagger Name: AvaTaxClient
|
439
460
|
# @param companyId [Integer] The ID of the company that defined these items.
|
440
461
|
# @param tag [String] The master tag to be associated with item.
|
441
462
|
# @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:* taxCode, classifications, parameters, tags
|
@@ -445,7 +466,7 @@ module AvaTax
|
|
445
466
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
446
467
|
# @return [FetchResult]
|
447
468
|
def query_items_by_tag(companyId, tag, options={}) path = "/api/v2/companies/#{companyId}/items/bytags/#{tag}"
|
448
|
-
get(path, options) end
|
469
|
+
get(path, options, "22.2.0") end
|
449
470
|
|
450
471
|
# Sync items from a product catalog
|
451
472
|
#
|
@@ -465,11 +486,12 @@ module AvaTax
|
|
465
486
|
# ### Security Policies
|
466
487
|
#
|
467
488
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
489
|
+
# Swagger Name: AvaTaxClient
|
468
490
|
# @param companyId [Integer] The ID of the company that owns this item.
|
469
491
|
# @param model [Object] The request object.
|
470
492
|
# @return [Object]
|
471
493
|
def sync_items(companyId, model) path = "/api/v2/companies/#{companyId}/items/sync"
|
472
|
-
post(path, model) end
|
494
|
+
post(path, model, {}, "22.2.0") end
|
473
495
|
|
474
496
|
# Update a single item
|
475
497
|
#
|
@@ -489,12 +511,13 @@ module AvaTax
|
|
489
511
|
# ### Security Policies
|
490
512
|
#
|
491
513
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
514
|
+
# Swagger Name: AvaTaxClient
|
492
515
|
# @param companyId [Integer] The ID of the company that this item belongs to.
|
493
516
|
# @param id [Integer] The ID of the item you wish to update
|
494
517
|
# @param model [Object] The item object you wish to update.
|
495
518
|
# @return [Object]
|
496
519
|
def update_item(companyId, id, model) path = "/api/v2/companies/#{companyId}/items/#{id}"
|
497
|
-
put(path, model) end
|
520
|
+
put(path, model, {}, "22.2.0") end
|
498
521
|
|
499
522
|
# Update an item classification.
|
500
523
|
#
|
@@ -509,13 +532,14 @@ module AvaTax
|
|
509
532
|
# ### Security Policies
|
510
533
|
#
|
511
534
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
535
|
+
# Swagger Name: AvaTaxClient
|
512
536
|
# @param companyId [Integer] The company id.
|
513
537
|
# @param itemId [Integer] The item id.
|
514
538
|
# @param id [Integer] The item classification id.
|
515
539
|
# @param model [Object] The item object you wish to update.
|
516
540
|
# @return [Object]
|
517
541
|
def update_item_classification(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
|
518
|
-
put(path, model) end
|
542
|
+
put(path, model, {}, "22.2.0") end
|
519
543
|
|
520
544
|
# Update an item parameter
|
521
545
|
#
|
@@ -530,13 +554,14 @@ module AvaTax
|
|
530
554
|
# ### Security Policies
|
531
555
|
#
|
532
556
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
557
|
+
# Swagger Name: AvaTaxClient
|
533
558
|
# @param companyId [Integer] The company id.
|
534
559
|
# @param itemId [Integer] The item id
|
535
560
|
# @param id [Integer] The item parameter id
|
536
561
|
# @param model [Object] The item object you wish to update.
|
537
562
|
# @return [Object]
|
538
563
|
def update_item_parameter(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
|
539
|
-
put(path, model) end
|
564
|
+
put(path, model, {}, "22.2.0") end
|
540
565
|
end
|
541
566
|
end
|
542
567
|
end
|
@@ -15,11 +15,12 @@ module AvaTax
|
|
15
15
|
# ### Security Policies
|
16
16
|
#
|
17
17
|
# * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
18
|
+
# Swagger Name: AvaTaxClient
|
18
19
|
# @param accountId [Integer] The ID of the account that owns this override
|
19
20
|
# @param model [JurisdictionOverrideModel[]] The jurisdiction override objects to create
|
20
21
|
# @return [JurisdictionOverrideModel[]]
|
21
22
|
def create_jurisdiction_overrides(accountId, model) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides"
|
22
|
-
post(path, model) end
|
23
|
+
post(path, model, {}, "22.2.0") end
|
23
24
|
|
24
25
|
# Delete a single override
|
25
26
|
#
|
@@ -28,11 +29,12 @@ module AvaTax
|
|
28
29
|
# ### Security Policies
|
29
30
|
#
|
30
31
|
# * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
32
|
+
# Swagger Name: AvaTaxClient
|
31
33
|
# @param accountId [Integer] The ID of the account that owns this override
|
32
34
|
# @param id [Integer] The ID of the override you wish to delete
|
33
35
|
# @return [ErrorDetail[]]
|
34
36
|
def delete_jurisdiction_override(accountId, id) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
|
35
|
-
delete(path) end
|
37
|
+
delete(path, {}, "22.2.0") end
|
36
38
|
|
37
39
|
# Retrieve a single override
|
38
40
|
#
|
@@ -46,11 +48,12 @@ module AvaTax
|
|
46
48
|
# ### Security Policies
|
47
49
|
#
|
48
50
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
51
|
+
# Swagger Name: AvaTaxClient
|
49
52
|
# @param accountId [Integer] The ID of the account that owns this override
|
50
53
|
# @param id [Integer] The primary key of this override
|
51
54
|
# @return [Object]
|
52
55
|
def get_jurisdiction_override(accountId, id) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
|
53
|
-
get(path) end
|
56
|
+
get(path, {}, "22.2.0") end
|
54
57
|
|
55
58
|
# Retrieve overrides for this account
|
56
59
|
#
|
@@ -67,6 +70,7 @@ module AvaTax
|
|
67
70
|
# ### Security Policies
|
68
71
|
#
|
69
72
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
73
|
+
# Swagger Name: AvaTaxClient
|
70
74
|
# @param accountId [Integer] The ID of the account that owns this override
|
71
75
|
# @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:* country, Jurisdictions
|
72
76
|
# @param include [String] A comma separated list of additional data to retrieve.
|
@@ -75,7 +79,7 @@ module AvaTax
|
|
75
79
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
76
80
|
# @return [FetchResult]
|
77
81
|
def list_jurisdiction_overrides_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides"
|
78
|
-
get(path, options) end
|
82
|
+
get(path, options, "22.2.0") end
|
79
83
|
|
80
84
|
# Retrieve all overrides
|
81
85
|
#
|
@@ -92,6 +96,7 @@ module AvaTax
|
|
92
96
|
# ### Security Policies
|
93
97
|
#
|
94
98
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
99
|
+
# Swagger Name: AvaTaxClient
|
95
100
|
# @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:* country, Jurisdictions
|
96
101
|
# @param include [String] A comma separated list of additional data to retrieve.
|
97
102
|
# @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.
|
@@ -99,7 +104,7 @@ module AvaTax
|
|
99
104
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
100
105
|
# @return [FetchResult]
|
101
106
|
def query_jurisdiction_overrides(options={}) path = "/api/v2/jurisdictionoverrides"
|
102
|
-
get(path, options) end
|
107
|
+
get(path, options, "22.2.0") end
|
103
108
|
|
104
109
|
# Update a single jurisdictionoverride
|
105
110
|
#
|
@@ -108,12 +113,13 @@ module AvaTax
|
|
108
113
|
# ### Security Policies
|
109
114
|
#
|
110
115
|
# * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
116
|
+
# Swagger Name: AvaTaxClient
|
111
117
|
# @param accountId [Integer] The ID of the account that this jurisdictionoverride belongs to.
|
112
118
|
# @param id [Integer] The ID of the jurisdictionoverride you wish to update
|
113
119
|
# @param model [Object] The jurisdictionoverride object you wish to update.
|
114
120
|
# @return [Object]
|
115
121
|
def update_jurisdiction_override(accountId, id, model) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
|
116
|
-
put(path, model) end
|
122
|
+
put(path, model, {}, "22.2.0") end
|
117
123
|
end
|
118
124
|
end
|
119
125
|
end
|