avatax 21.12.0 → 22.3.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.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +55 -55
  3. data/.rspec +1 -1
  4. data/.travis.yml +18 -18
  5. data/.vs/VSWorkspaceState.json +5 -5
  6. data/.yardopts +4 -4
  7. data/Gemfile +2 -2
  8. data/LICENSE +201 -201
  9. data/README.md +98 -98
  10. data/Rakefile +9 -9
  11. data/avatax.gemspec +38 -38
  12. data/example/avatax.rb +47 -47
  13. data/example/credentials.example.yaml +5 -5
  14. data/lib/avatax/api.rb +27 -27
  15. data/lib/avatax/client/accounts.rb +11 -11
  16. data/lib/avatax/client/addresses.rb +2 -2
  17. data/lib/avatax/client/advancedrules.rb +5 -5
  18. data/lib/avatax/client/avafileforms.rb +5 -5
  19. data/lib/avatax/client/batches.rb +8 -8
  20. data/lib/avatax/client/certexpressinvites.rb +3 -3
  21. data/lib/avatax/client/certificates.rb +15 -15
  22. data/lib/avatax/client/companies.rb +40 -21
  23. data/lib/avatax/client/compliance.rb +1 -1
  24. data/lib/avatax/client/contacts.rb +6 -6
  25. data/lib/avatax/client/customers.rb +13 -13
  26. data/lib/avatax/client/datasources.rb +6 -6
  27. data/lib/avatax/client/definitions.rb +75 -72
  28. data/lib/avatax/client/distancethresholds.rb +6 -6
  29. data/lib/avatax/client/ecms.rb +73 -73
  30. data/lib/avatax/client/ecommercetoken.rb +2 -2
  31. data/lib/avatax/client/errortransactions.rb +61 -61
  32. data/lib/avatax/client/filingcalendars.rb +3 -3
  33. data/lib/avatax/client/filings.rb +2 -2
  34. data/lib/avatax/client/firmclientlinkages.rb +9 -9
  35. data/lib/avatax/client/free.rb +1 -1
  36. data/lib/avatax/client/fundingrequests.rb +2 -2
  37. data/lib/avatax/client/items.rb +165 -28
  38. data/lib/avatax/client/jurisdictionoverrides.rb +6 -6
  39. data/lib/avatax/client/locations.rb +12 -12
  40. data/lib/avatax/client/multidocument.rb +10 -10
  41. data/lib/avatax/client/nexus.rb +15 -15
  42. data/lib/avatax/client/notices.rb +4 -4
  43. data/lib/avatax/client/notifications.rb +3 -3
  44. data/lib/avatax/client/onboarding.rb +55 -55
  45. data/lib/avatax/client/pointofsale.rb +21 -21
  46. data/lib/avatax/client/provisioning.rb +2 -2
  47. data/lib/avatax/client/registrar.rb +10 -21
  48. data/lib/avatax/client/reports.rb +4 -4
  49. data/lib/avatax/client/settings.rb +6 -6
  50. data/lib/avatax/client/shippingverification.rb +25 -9
  51. data/lib/avatax/client/subscriptions.rb +3 -3
  52. data/lib/avatax/client/taxcodes.rb +6 -6
  53. data/lib/avatax/client/taxcontent.rb +5 -5
  54. data/lib/avatax/client/taxprofiles.rb +42 -42
  55. data/lib/avatax/client/taxrules.rb +6 -6
  56. data/lib/avatax/client/transactions.rb +22 -23
  57. data/lib/avatax/client/upcs.rb +6 -6
  58. data/lib/avatax/client/userdefinedfields.rb +3 -3
  59. data/lib/avatax/client/users.rb +8 -8
  60. data/lib/avatax/client/utilities.rb +3 -3
  61. data/lib/avatax/client.rb +37 -37
  62. data/lib/avatax/configuration.rb +76 -76
  63. data/lib/avatax/connection.rb +49 -49
  64. data/lib/avatax/request.rb +51 -50
  65. data/lib/avatax/version.rb +3 -3
  66. data/lib/avatax.rb +26 -26
  67. data/spec/avatax/client/accounts_spec.rb +13 -13
  68. data/spec/avatax/client/transactions_spec.rb +80 -80
  69. data/spec/avatax/request_spec.rb +25 -25
  70. data/spec/avatax_spec.rb +45 -45
  71. data/spec/credentials.yaml.example +4 -4
  72. data/spec/fixtures/accounts.json +15 -15
  73. data/spec/spec_helper.rb +27 -27
  74. metadata +6 -13
@@ -19,7 +19,7 @@ module AvaTax
19
19
  # @param itemId [Integer] The ID of the item you wish to delete the classifications.
20
20
  # @return [ErrorDetail[]]
21
21
  def batch_delete_item_classifications(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
22
- delete(path, {}, "21.12.0") end
22
+ delete(path, {}, "22.3.0") end
23
23
 
24
24
  # Delete all parameters for an item
25
25
  #
@@ -39,7 +39,7 @@ module AvaTax
39
39
  # @param itemId [Integer] The ID of the item you wish to delete the parameters.
40
40
  # @return [ErrorDetail[]]
41
41
  def batch_delete_item_parameters(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
42
- delete(path, {}, "21.12.0") end
42
+ delete(path, {}, "22.3.0") end
43
43
 
44
44
  # Bulk upload items from a product catalog
45
45
  #
@@ -61,7 +61,7 @@ module AvaTax
61
61
  # @param model [Object] The items you wish to upload.
62
62
  # @return [Object]
63
63
  def bulk_upload_items(companyId, model) path = "/api/v2/companies/#{companyId}/items/upload"
64
- post(path, model, {}, "21.12.0") end
64
+ post(path, model, {}, "22.3.0") end
65
65
 
66
66
  # Add classifications to an item.
67
67
  #
@@ -82,7 +82,7 @@ module AvaTax
82
82
  # @param model [ItemClassificationInputModel[]] The item classifications you wish to create.
83
83
  # @return [ItemClassificationOutputModel[]]
84
84
  def create_item_classifications(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
85
- post(path, model, {}, "21.12.0") end
85
+ post(path, model, {}, "22.3.0") end
86
86
 
87
87
  # Add parameters to an item.
88
88
  #
@@ -107,7 +107,7 @@ module AvaTax
107
107
  # @param model [ItemParameterModel[]] The item parameters you wish to create.
108
108
  # @return [ItemParameterModel[]]
109
109
  def create_item_parameters(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
110
- post(path, model, {}, "21.12.0") end
110
+ post(path, model, {}, "22.3.0") end
111
111
 
112
112
  # Create a new item
113
113
  #
@@ -129,7 +129,7 @@ module AvaTax
129
129
  # @param model [ItemModel[]] The item you wish to create.
130
130
  # @return [ItemModel[]]
131
131
  def create_items(companyId, model) path = "/api/v2/companies/#{companyId}/items"
132
- post(path, model, {}, "21.12.0") end
132
+ post(path, model, {}, "22.3.0") end
133
133
 
134
134
  # Create tags for a item
135
135
  #
@@ -146,7 +146,53 @@ module AvaTax
146
146
  # @param model [ItemTagDetailModel[]] Tags you wish to associate with the Item
147
147
  # @return [ItemTagDetailModel[]]
148
148
  def create_item_tags(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
149
- post(path, model, {}, "21.12.0") end
149
+ post(path, model, {}, "22.3.0") end
150
+
151
+ # Create a new tax code classification request
152
+ #
153
+ # Creates a new tax code classification request.
154
+ #
155
+ # Avalara AvaTax system tax codes represent various goods and services classified by industry or consumer categories and
156
+ # major physical similarities. Taxability rules are associated with tax codes. Customers can map their Items to tax codes,
157
+ # allowing them to take advantage of thousands of tax rules in the AvaTax engine and resulting in accurate taxability determinations.
158
+ #
159
+ # ### Security Policies
160
+ #
161
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
162
+ # Swagger Name: AvaTaxClient
163
+ # @param companyId [Integer] The ID of the company creating this request.
164
+ # @param model [Object] The request you wish to create.
165
+ # @return [Object]
166
+ def create_tax_code_classification_request(companyId, model) path = "/api/v2/companies/#{companyId}/classificationrequests/taxcode"
167
+ post(path, model, {}, "22.3.0") end
168
+
169
+ # Delete a single item
170
+ #
171
+ # Deletes the item object at this URL.
172
+ #
173
+ # Items are a way of separating your tax calculation process from your tax configuration details.
174
+ # Use this endpoint to delete an existing item with item code.
175
+ #
176
+ # Deleting an item will also delete the parameters, classifications, and product categories associated with that item.
177
+ #
178
+ # NOTE: If your item code contains any of these characters /, +, ? or a space, please use the following encoding before making a request:
179
+ # * Replace '/' with '\_-ava2f-\_' For example: 'Item/Code' becomes 'Item_-ava2f-_Code'
180
+ # * Replace '+' with '\_-ava2b-\_' For example: 'Item+Code' becomes 'Item_-ava2b-_Code'
181
+ # * Replace '?' with '\_-ava3f-\_' For example: 'Item?Code' becomes 'Item_-ava3f-_Code'
182
+ # * Replace '%' with '\_-ava25-\_' For example: 'Item%Code' becomes 'Item_-ava25-_Code'
183
+ # * Replace '#' with '\_-ava23-\_' For example: 'Item#Code' becomes 'Item_-ava23-_Code'
184
+ # * Replace ''' with '\_-ava27-\_' For example: 'Item'Code' becomes 'Item_-ava27-_Code'
185
+ # * Replace '"' with '\_-ava22-\_' For example: 'Item"Code' becomes 'Item_-ava22-_Code'
186
+ #
187
+ # ### Security Policies
188
+ #
189
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
190
+ # Swagger Name: AvaTaxClient
191
+ # @param companyId [Integer] The ID of the company that owns this item.
192
+ # @param itemCode [String] The code of the item you want to delete.
193
+ # @return [ErrorDetail[]]
194
+ def delete_catalogue_item(companyId, itemCode) path = "/api/v2/companies/#{companyId}/itemcatalogue/#{itemCode}"
195
+ delete(path, {}, "22.3.0") end
150
196
 
151
197
  # Delete a single item
152
198
  #
@@ -168,7 +214,7 @@ module AvaTax
168
214
  # @param id [Integer] The ID of the item you wish to delete.
169
215
  # @return [ErrorDetail[]]
170
216
  def delete_item(companyId, id) path = "/api/v2/companies/#{companyId}/items/#{id}"
171
- delete(path, {}, "21.12.0") end
217
+ delete(path, {}, "22.3.0") end
172
218
 
173
219
  # Delete a single item classification.
174
220
  #
@@ -187,7 +233,7 @@ module AvaTax
187
233
  # @param id [Integer] The item classification id.
188
234
  # @return [ErrorDetail[]]
189
235
  def delete_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
190
- delete(path, {}, "21.12.0") end
236
+ delete(path, {}, "22.3.0") end
191
237
 
192
238
  # Delete a single item parameter
193
239
  #
@@ -208,7 +254,7 @@ module AvaTax
208
254
  # @param id [Integer] The parameter id
209
255
  # @return [ErrorDetail[]]
210
256
  def delete_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
211
- delete(path, {}, "21.12.0") end
257
+ delete(path, {}, "22.3.0") end
212
258
 
213
259
  # Delete item tag by id
214
260
  #
@@ -225,7 +271,7 @@ module AvaTax
225
271
  # @param itemTagDetailId [Integer] The ID of the item tag detail you wish to delete.
226
272
  # @return [ErrorDetail[]]
227
273
  def delete_item_tag(companyId, itemId, itemTagDetailId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags/#{itemTagDetailId}"
228
- delete(path, {}, "21.12.0") end
274
+ delete(path, {}, "22.3.0") end
229
275
 
230
276
  # Delete all item tags
231
277
  #
@@ -241,7 +287,31 @@ module AvaTax
241
287
  # @param itemId [Integer] The ID of the item as defined by the company that owns this tag.
242
288
  # @return [ErrorDetail[]]
243
289
  def delete_item_tags(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
244
- delete(path, {}, "21.12.0") end
290
+ delete(path, {}, "22.3.0") end
291
+
292
+ # Get the status of classification requests for a company
293
+ #
294
+ # Get the status of tax code classification requests for a company.
295
+ #
296
+ # Avalara AvaTax system tax codes represent various goods and services classified by industry or consumer categories and
297
+ # major physical similarities. Taxability rules are associated with tax codes. Customers can map their Items to tax codes,
298
+ # allowing them to take advantage of thousands of tax rules in the AvaTax engine and resulting in accurate taxability determinations.
299
+ #
300
+ # Enable includeClassificationDetails flag to get details of classification request status.
301
+ #
302
+ # ### Security Policies
303
+ #
304
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
305
+ # Swagger Name: AvaTaxClient
306
+ # @param companyId [Integer] The ID of the company that defined these items
307
+ # @param includeClassificationDetails [Boolean] A Boolean field that specifies whether to get a detailed classification status.
308
+ # @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:* classificationDetails, totalItems, status
309
+ # @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.
310
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
311
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
312
+ # @return [FetchResult]
313
+ def get_classification_status(companyId, options={}) path = "/api/v2/companies/#{companyId}/classificationrequests/taxcode"
314
+ get(path, options, "22.3.0") end
245
315
 
246
316
  # Retrieve a single item
247
317
  #
@@ -262,7 +332,7 @@ module AvaTax
262
332
  # @param include [String] A comma separated list of additional data to retrieve.
263
333
  # @return [Object]
264
334
  def get_item(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/items/#{id}"
265
- get(path, options, "21.12.0") end
335
+ get(path, options, "22.3.0") end
266
336
 
267
337
  # Retrieve a single item classification.
268
338
  #
@@ -281,7 +351,7 @@ module AvaTax
281
351
  # @param id [Integer] The item classification id.
282
352
  # @return [Object]
283
353
  def get_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
284
- get(path, {}, "21.12.0") end
354
+ get(path, {}, "22.3.0") end
285
355
 
286
356
  # Retrieve a single item parameter
287
357
  #
@@ -302,7 +372,7 @@ module AvaTax
302
372
  # @param id [Integer] The parameter id
303
373
  # @return [Object]
304
374
  def get_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
305
- get(path, {}, "21.12.0") end
375
+ get(path, {}, "22.3.0") end
306
376
 
307
377
  # Retrieve tags for an item
308
378
  #
@@ -321,7 +391,56 @@ module AvaTax
321
391
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
322
392
  # @return [FetchResult]
323
393
  def get_item_tags(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
324
- get(path, options, "21.12.0") end
394
+ get(path, options, "22.3.0") end
395
+
396
+ # Get tax code recommendations
397
+ #
398
+ # Get tax code recommendations.
399
+ #
400
+ # Avalara AvaTax system tax codes represent various goods and services classified by industry or consumer categories and
401
+ # major physical similarities. Taxability rules are associated with tax codes. Customers can map their Items to tax codes,
402
+ # allowing them to take advantage of thousands of tax rules in the AvaTax engine and resulting in accurate taxability determinations.
403
+ #
404
+ # ### Security Policies
405
+ #
406
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
407
+ # Swagger Name: AvaTaxClient
408
+ # @param companyId [Integer] The ID of the company that defined these items
409
+ # @param requestId [Integer] The ID of the classification request
410
+ # @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:* recommendations, url
411
+ # @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.
412
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
413
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
414
+ # @return [FetchResult]
415
+ def get_tax_code_recommendations(companyId, requestId, options={}) path = "/api/v2/companies/#{companyId}/classificationrequests/taxcode/#{requestId}/recommendations"
416
+ get(path, options, "22.3.0") end
417
+
418
+ # Retrieve Restrictions for Item by CountryOfImport
419
+ #
420
+ # Retrieve Restrictions for Item by CountryOfImport. This API will only return import restriction for the countryOfImport.
421
+ #
422
+ # NOTE: If your item code contains any of these characters /, +, ? or a space, please use the following encoding before making a request:
423
+ # * Replace '/' with '\_-ava2f-\_' For example: 'Item/Code' becomes 'Item_-ava2f-_Code'
424
+ # * Replace '+' with '\_-ava2b-\_' For example: 'Item+Code' becomes 'Item_-ava2b-_Code'
425
+ # * Replace '?' with '\_-ava3f-\_' For example: 'Item?Code' becomes 'Item_-ava3f-_Code'
426
+ # * Replace '%' with '\_-ava25-\_' For example: 'Item%Code' becomes 'Item_-ava25-_Code'
427
+ # * Replace '#' with '\_-ava23-\_' For example: 'Item#Code' becomes 'Item_-ava23-_Code'
428
+ # * Replace ''' with '\_-ava27-\_' For example: 'Item'Code' becomes 'Item_-ava27-_Code'
429
+ # * Replace '"' with '\_-ava22-\_' For example: 'Item"Code' becomes 'Item_-ava22-_Code'
430
+ #
431
+ # ### Security Policies
432
+ #
433
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
434
+ # Swagger Name: AvaTaxClient
435
+ # @param companyId [Integer] The ID of the company that owns this item object
436
+ # @param itemCode [String] ItemCode for the item
437
+ # @param countryOfImport [String] Country for which you want the restrictions for the Item.
438
+ # @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.
439
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
440
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
441
+ # @return [FetchResult]
442
+ def list_import_restrictions(companyId, itemCode, countryOfImport, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemCode}/restrictions/import/#{countryOfImport}"
443
+ get(path, options, "22.3.0") end
325
444
 
326
445
  # Retrieve classifications for an item.
327
446
  #
@@ -346,7 +465,7 @@ module AvaTax
346
465
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
347
466
  # @return [FetchResult]
348
467
  def list_item_classifications(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
349
- get(path, options, "21.12.0") end
468
+ get(path, options, "22.3.0") end
350
469
 
351
470
  # Retrieve parameters for an item
352
471
  #
@@ -373,7 +492,7 @@ module AvaTax
373
492
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
374
493
  # @return [FetchResult]
375
494
  def list_item_parameters(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
376
- get(path, options, "21.12.0") end
495
+ get(path, options, "22.3.0") end
377
496
 
378
497
  # Retrieve items for this company
379
498
  #
@@ -402,7 +521,7 @@ module AvaTax
402
521
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
403
522
  # Swagger Name: AvaTaxClient
404
523
  # @param companyId [Integer] The ID of the company that defined these items
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
524
+ # @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, source, upc, classifications, parameters, tags
406
525
  # @param include [String] A comma separated list of additional data to retrieve.
407
526
  # @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.
408
527
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
@@ -410,7 +529,7 @@ module AvaTax
410
529
  # @param tagName [String] Tag Name on the basis of which you want to filter Items
411
530
  # @return [FetchResult]
412
531
  def list_items_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/items"
413
- get(path, options, "21.12.0") end
532
+ get(path, options, "22.3.0") end
414
533
 
415
534
  # Retrieve all items
416
535
  #
@@ -430,14 +549,14 @@ module AvaTax
430
549
  #
431
550
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
432
551
  # Swagger Name: AvaTaxClient
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
552
+ # @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, source, upc, classifications, parameters, tags
434
553
  # @param include [String] A comma separated list of additional data to retrieve.
435
554
  # @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.
436
555
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
437
556
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
438
557
  # @return [FetchResult]
439
558
  def query_items(options={}) path = "/api/v2/items"
440
- get(path, options, "21.12.0") end
559
+ get(path, options, "22.3.0") end
441
560
 
442
561
  # Retrieve all items associated with given tag
443
562
  #
@@ -459,14 +578,32 @@ module AvaTax
459
578
  # Swagger Name: AvaTaxClient
460
579
  # @param companyId [Integer] The ID of the company that defined these items.
461
580
  # @param tag [String] The master tag to be associated with item.
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
581
+ # @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, source, upc, classifications, parameters, tags
463
582
  # @param include [String] A comma separated list of additional data to retrieve.
464
583
  # @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.
465
584
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
466
585
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
467
586
  # @return [FetchResult]
468
587
  def query_items_by_tag(companyId, tag, options={}) path = "/api/v2/companies/#{companyId}/items/bytags/#{tag}"
469
- get(path, options, "21.12.0") end
588
+ get(path, options, "22.3.0") end
589
+
590
+ # Create or update items from a product catalog.
591
+ #
592
+ # Creates/updates one or more item objects with additional properties and the AvaTax category attached to this company.
593
+ #
594
+ # Items are a way of separating your tax calculation process from your tax configuration details. Use this endpoint to create
595
+ # a new or update an existing item. This can be used to sync the items with Avalara. For example, an accounting software
596
+ # system can use this to sync all their items from an ERP with Avalara.
597
+ #
598
+ # ### Security Policies
599
+ #
600
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
601
+ # Swagger Name: AvaTaxClient
602
+ # @param companyId [Integer] The ID of the company that owns this item.
603
+ # @param model [ItemCatalogueInputModel[]] The items you want to create or update.
604
+ # @return [Object]
605
+ def sync_item_catalogue(companyId, model) path = "/api/v2/companies/#{companyId}/itemcatalogue"
606
+ post(path, model, {}, "22.3.0") end
470
607
 
471
608
  # Sync items from a product catalog
472
609
  #
@@ -491,7 +628,7 @@ module AvaTax
491
628
  # @param model [Object] The request object.
492
629
  # @return [Object]
493
630
  def sync_items(companyId, model) path = "/api/v2/companies/#{companyId}/items/sync"
494
- post(path, model, {}, "21.12.0") end
631
+ post(path, model, {}, "22.3.0") end
495
632
 
496
633
  # Update a single item
497
634
  #
@@ -517,7 +654,7 @@ module AvaTax
517
654
  # @param model [Object] The item object you wish to update.
518
655
  # @return [Object]
519
656
  def update_item(companyId, id, model) path = "/api/v2/companies/#{companyId}/items/#{id}"
520
- put(path, model, {}, "21.12.0") end
657
+ put(path, model, {}, "22.3.0") end
521
658
 
522
659
  # Update an item classification.
523
660
  #
@@ -539,7 +676,7 @@ module AvaTax
539
676
  # @param model [Object] The item object you wish to update.
540
677
  # @return [Object]
541
678
  def update_item_classification(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
542
- put(path, model, {}, "21.12.0") end
679
+ put(path, model, {}, "22.3.0") end
543
680
 
544
681
  # Update an item parameter
545
682
  #
@@ -561,7 +698,7 @@ module AvaTax
561
698
  # @param model [Object] The item object you wish to update.
562
699
  # @return [Object]
563
700
  def update_item_parameter(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
564
- put(path, model, {}, "21.12.0") end
701
+ put(path, model, {}, "22.3.0") end
565
702
  end
566
703
  end
567
704
  end
@@ -20,7 +20,7 @@ module AvaTax
20
20
  # @param model [JurisdictionOverrideModel[]] The jurisdiction override objects to create
21
21
  # @return [JurisdictionOverrideModel[]]
22
22
  def create_jurisdiction_overrides(accountId, model) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides"
23
- post(path, model, {}, "21.12.0") end
23
+ post(path, model, {}, "22.3.0") end
24
24
 
25
25
  # Delete a single override
26
26
  #
@@ -34,7 +34,7 @@ module AvaTax
34
34
  # @param id [Integer] The ID of the override you wish to delete
35
35
  # @return [ErrorDetail[]]
36
36
  def delete_jurisdiction_override(accountId, id) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
37
- delete(path, {}, "21.12.0") end
37
+ delete(path, {}, "22.3.0") end
38
38
 
39
39
  # Retrieve a single override
40
40
  #
@@ -53,7 +53,7 @@ module AvaTax
53
53
  # @param id [Integer] The primary key of this override
54
54
  # @return [Object]
55
55
  def get_jurisdiction_override(accountId, id) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
56
- get(path, {}, "21.12.0") end
56
+ get(path, {}, "22.3.0") end
57
57
 
58
58
  # Retrieve overrides for this account
59
59
  #
@@ -79,7 +79,7 @@ module AvaTax
79
79
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
80
80
  # @return [FetchResult]
81
81
  def list_jurisdiction_overrides_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides"
82
- get(path, options, "21.12.0") end
82
+ get(path, options, "22.3.0") end
83
83
 
84
84
  # Retrieve all overrides
85
85
  #
@@ -104,7 +104,7 @@ module AvaTax
104
104
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
105
105
  # @return [FetchResult]
106
106
  def query_jurisdiction_overrides(options={}) path = "/api/v2/jurisdictionoverrides"
107
- get(path, options, "21.12.0") end
107
+ get(path, options, "22.3.0") end
108
108
 
109
109
  # Update a single jurisdictionoverride
110
110
  #
@@ -119,7 +119,7 @@ module AvaTax
119
119
  # @param model [Object] The jurisdictionoverride object you wish to update.
120
120
  # @return [Object]
121
121
  def update_jurisdiction_override(accountId, id, model) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
122
- put(path, model, {}, "21.12.0") end
122
+ put(path, model, {}, "22.3.0") end
123
123
  end
124
124
  end
125
125
  end
@@ -26,7 +26,7 @@ module AvaTax
26
26
  # @param model [LocationParameterModel[]] The location parameters you wish to create.
27
27
  # @return [LocationParameterModel[]]
28
28
  def create_location_parameters(companyId, locationId, model) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters"
29
- post(path, model, {}, "21.12.0") end
29
+ post(path, model, {}, "22.3.0") end
30
30
 
31
31
  # Create a new location
32
32
  #
@@ -40,7 +40,7 @@ module AvaTax
40
40
  # @param model [LocationModel[]] The location you wish to create.
41
41
  # @return [LocationModel[]]
42
42
  def create_locations(companyId, model) path = "/api/v2/companies/#{companyId}/locations"
43
- post(path, model, {}, "21.12.0") end
43
+ post(path, model, {}, "22.3.0") end
44
44
 
45
45
  # Delete a single location
46
46
  #
@@ -54,7 +54,7 @@ module AvaTax
54
54
  # @param id [Integer] The ID of the location you wish to delete.
55
55
  # @return [ErrorDetail[]]
56
56
  def delete_location(companyId, id) path = "/api/v2/companies/#{companyId}/locations/#{id}"
57
- delete(path, {}, "21.12.0") end
57
+ delete(path, {}, "22.3.0") end
58
58
 
59
59
  # Delete a single location parameter
60
60
  #
@@ -75,7 +75,7 @@ module AvaTax
75
75
  # @param id [Integer] The parameter id
76
76
  # @return [ErrorDetail[]]
77
77
  def delete_location_parameter(companyId, locationId, id) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}"
78
- delete(path, {}, "21.12.0") end
78
+ delete(path, {}, "22.3.0") end
79
79
 
80
80
  # Retrieve a single location
81
81
  #
@@ -99,7 +99,7 @@ module AvaTax
99
99
  # @param include [String] A comma separated list of additional data to retrieve.
100
100
  # @return [Object]
101
101
  def get_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}"
102
- get(path, options, "21.12.0") end
102
+ get(path, options, "22.3.0") end
103
103
 
104
104
  # Retrieve a single company location parameter
105
105
  #
@@ -120,7 +120,7 @@ module AvaTax
120
120
  # @param id [Integer] The parameter id
121
121
  # @return [Object]
122
122
  def get_location_parameter(companyId, locationId, id) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}"
123
- get(path, {}, "21.12.0") end
123
+ get(path, {}, "22.3.0") end
124
124
 
125
125
  # Retrieve parameters for a location
126
126
  #
@@ -147,7 +147,7 @@ module AvaTax
147
147
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
148
148
  # @return [FetchResult]
149
149
  def list_location_parameters(companyId, locationId, options={}) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters"
150
- get(path, options, "21.12.0") end
150
+ get(path, options, "22.3.0") end
151
151
 
152
152
  # Retrieve locations for this company
153
153
  #
@@ -176,7 +176,7 @@ module AvaTax
176
176
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
177
177
  # @return [FetchResult]
178
178
  def list_locations_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/locations"
179
- get(path, options, "21.12.0") end
179
+ get(path, options, "22.3.0") end
180
180
 
181
181
  # Retrieve all locations
182
182
  #
@@ -205,7 +205,7 @@ module AvaTax
205
205
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
206
206
  # @return [FetchResult]
207
207
  def query_locations(options={}) path = "/api/v2/locations"
208
- get(path, options, "21.12.0") end
208
+ get(path, options, "22.3.0") end
209
209
 
210
210
  # Update a single location
211
211
  #
@@ -222,7 +222,7 @@ module AvaTax
222
222
  # @param model [Object] The location you wish to update.
223
223
  # @return [Object]
224
224
  def update_location(companyId, id, model) path = "/api/v2/companies/#{companyId}/locations/#{id}"
225
- put(path, model, {}, "21.12.0") end
225
+ put(path, model, {}, "22.3.0") end
226
226
 
227
227
  # Update a location parameter
228
228
  #
@@ -244,7 +244,7 @@ module AvaTax
244
244
  # @param model [Object] The location parameter object you wish to update.
245
245
  # @return [Object]
246
246
  def update_location_parameter(companyId, locationId, id, model) path = "/api/v2/companies/#{companyId}/locations/#{locationId}/parameters/#{id}"
247
- put(path, model, {}, "21.12.0") end
247
+ put(path, model, {}, "22.3.0") end
248
248
 
249
249
  # Validate the location against local requirements
250
250
  #
@@ -260,7 +260,7 @@ module AvaTax
260
260
  # @param id [Integer] The primary key of this location
261
261
  # @return [Object]
262
262
  def validate_location(companyId, id) path = "/api/v2/companies/#{companyId}/locations/#{id}/validate"
263
- get(path, {}, "21.12.0") end
263
+ get(path, {}, "22.3.0") end
264
264
  end
265
265
  end
266
266
  end
@@ -35,7 +35,7 @@ module AvaTax
35
35
  # @param model [Object] The adjust request you wish to execute
36
36
  # @return [Object]
37
37
  def adjust_multi_document_transaction(code, type, model, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/adjust"
38
- post(path, model, options, "21.12.0") end
38
+ post(path, model, options, "22.3.0") end
39
39
 
40
40
  # Get audit information about a MultiDocument transaction
41
41
  #
@@ -71,7 +71,7 @@ module AvaTax
71
71
  # @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
72
72
  # @return [Object]
73
73
  def audit_multi_document_transaction(code, type) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/audit"
74
- get(path, {}, "21.12.0") end
74
+ get(path, {}, "22.3.0") end
75
75
 
76
76
  # Commit a MultiDocument transaction
77
77
  #
@@ -100,7 +100,7 @@ module AvaTax
100
100
  # @param model [Object] The commit request you wish to execute
101
101
  # @return [Object]
102
102
  def commit_multi_document_transaction(model) path = "/api/v2/transactions/multidocument/commit"
103
- post(path, model, {}, "21.12.0") end
103
+ post(path, model, {}, "22.3.0") end
104
104
 
105
105
  # Create a new MultiDocument transaction
106
106
  #
@@ -154,7 +154,7 @@ module AvaTax
154
154
  # @param model [Object] the multi document transaction model
155
155
  # @return [Object]
156
156
  def create_multi_document_transaction(model, options={}) path = "/api/v2/transactions/multidocument"
157
- post(path, model, options, "21.12.0") end
157
+ post(path, model, options, "22.3.0") end
158
158
 
159
159
  # Retrieve a MultiDocument transaction
160
160
  #
@@ -189,7 +189,7 @@ module AvaTax
189
189
  # @param include [String] Specifies objects to include in the response after transaction is created
190
190
  # @return [Object]
191
191
  def get_multi_document_transaction_by_code_and_type(code, type, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}"
192
- get(path, options, "21.12.0") end
192
+ get(path, options, "22.3.0") end
193
193
 
194
194
  # Retrieve a MultiDocument transaction by ID
195
195
  #
@@ -232,7 +232,7 @@ module AvaTax
232
232
  # @param include [String] Specifies objects to include in the response after transaction is created
233
233
  # @return [Object]
234
234
  def get_multi_document_transaction_by_id(id, options={}) path = "/api/v2/transactions/multidocument/#{id}"
235
- get(path, options, "21.12.0") end
235
+ get(path, options, "22.3.0") end
236
236
 
237
237
  # Retrieve all MultiDocument transactions
238
238
  #
@@ -276,7 +276,7 @@ module AvaTax
276
276
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
277
277
  # @return [FetchResult]
278
278
  def list_multi_document_transactions(options={}) path = "/api/v2/transactions/multidocument"
279
- get(path, options, "21.12.0") end
279
+ get(path, options, "22.3.0") end
280
280
 
281
281
  # Create a refund for a MultiDocument transaction
282
282
  #
@@ -336,7 +336,7 @@ module AvaTax
336
336
  # @param model [Object] Information about the refund to create
337
337
  # @return [Object]
338
338
  def refund_multi_document_transaction(code, type, model, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/refund"
339
- post(path, model, options, "21.12.0") end
339
+ post(path, model, options, "22.3.0") end
340
340
 
341
341
  # Verify a MultiDocument transaction
342
342
  #
@@ -363,7 +363,7 @@ module AvaTax
363
363
  # @param model [Object] Information from your accounting system to verify against this MultiDocument transaction as it is stored in AvaTax
364
364
  # @return [Object]
365
365
  def verify_multi_document_transaction(model) path = "/api/v2/transactions/multidocument/verify"
366
- post(path, model, {}, "21.12.0") end
366
+ post(path, model, {}, "22.3.0") end
367
367
 
368
368
  # Void a MultiDocument transaction
369
369
  #
@@ -395,7 +395,7 @@ module AvaTax
395
395
  # @param model [Object] The void request you wish to execute
396
396
  # @return [Object]
397
397
  def void_multi_document_transaction(code, type, model) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/void"
398
- post(path, model, {}, "21.12.0") end
398
+ post(path, model, {}, "22.3.0") end
399
399
  end
400
400
  end
401
401
  end