avatax 21.7.1 → 21.12.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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avatax/client/accounts.rb +94 -83
  3. data/lib/avatax/client/addresses.rb +22 -20
  4. data/lib/avatax/client/advancedrules.rb +46 -41
  5. data/lib/avatax/client/ageverification.rb +29 -0
  6. data/lib/avatax/client/avafileforms.rb +46 -41
  7. data/lib/avatax/client/batches.rb +70 -62
  8. data/lib/avatax/client/certexpressinvites.rb +30 -27
  9. data/lib/avatax/client/certificates.rb +126 -111
  10. data/lib/avatax/client/companies.rb +174 -153
  11. data/lib/avatax/client/compliance.rb +25 -14
  12. data/lib/avatax/client/contacts.rb +54 -48
  13. data/lib/avatax/client/customers.rb +110 -97
  14. data/lib/avatax/client/datasources.rb +54 -48
  15. data/lib/avatax/client/definitions.rb +624 -450
  16. data/lib/avatax/client/distancethresholds.rb +54 -48
  17. data/lib/avatax/client/ecommercetoken.rb +20 -18
  18. data/lib/avatax/client/filingcalendars.rb +44 -20
  19. data/lib/avatax/client/filings.rb +24 -20
  20. data/lib/avatax/client/firmclientlinkages.rb +78 -69
  21. data/lib/avatax/client/free.rb +14 -13
  22. data/lib/avatax/client/fundingrequests.rb +22 -20
  23. data/lib/avatax/client/items.rb +209 -181
  24. data/lib/avatax/client/jurisdictionoverrides.rb +54 -48
  25. data/lib/avatax/client/locations.rb +102 -90
  26. data/lib/avatax/client/multidocument.rb +86 -76
  27. data/lib/avatax/client/nexus.rb +148 -105
  28. data/lib/avatax/client/notices.rb +30 -26
  29. data/lib/avatax/client/notifications.rb +30 -27
  30. data/lib/avatax/client/provisioning.rb +22 -20
  31. data/lib/avatax/client/registrar.rb +94 -83
  32. data/lib/avatax/client/reports.rb +38 -34
  33. data/lib/avatax/client/settings.rb +54 -48
  34. data/lib/avatax/client/shippingverification.rb +66 -0
  35. data/lib/avatax/client/subscriptions.rb +30 -27
  36. data/lib/avatax/client/taxcodes.rb +54 -48
  37. data/lib/avatax/client/taxcontent.rb +46 -41
  38. data/lib/avatax/client/taxrules.rb +56 -50
  39. data/lib/avatax/client/transactions.rb +174 -153
  40. data/lib/avatax/client/upcs.rb +54 -48
  41. data/lib/avatax/client/userdefinedfields.rb +52 -0
  42. data/lib/avatax/client/users.rb +70 -62
  43. data/lib/avatax/client/utilities.rb +30 -27
  44. data/lib/avatax/client.rb +2 -0
  45. data/lib/avatax/connection.rb +1 -1
  46. data/lib/avatax/request.rb +21 -12
  47. data/lib/avatax/version.rb +1 -1
  48. metadata +6 -3
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module Items
4
-
5
-
6
- # Delete all classifications for an item
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Items
4
+
5
+
6
+ # Delete all classifications for an item
7
+ #
8
8
  # Delete all the classifications for a given item.
9
9
  #
10
10
  # A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product.
@@ -13,15 +13,16 @@ module AvaTax
13
13
  #
14
14
  # ### Security Policies
15
15
  #
16
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
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
- # @return [ErrorDetail[]]
20
- def batch_delete_item_classifications(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
21
- delete(path) end
22
-
23
- # Delete all parameters for an item
24
- #
20
+ # @return [ErrorDetail[]]
21
+ def batch_delete_item_classifications(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
22
+ delete(path, {}, "21.12.0") end
23
+
24
+ # Delete all parameters for an item
25
+ #
25
26
  # Delete all the parameters for a given item.
26
27
  #
27
28
  # Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters".
@@ -32,15 +33,16 @@ module AvaTax
32
33
  #
33
34
  # ### Security Policies
34
35
  #
35
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
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
- # @return [ErrorDetail[]]
39
- def batch_delete_item_parameters(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
40
- delete(path) end
41
-
42
- # Bulk upload items from a product catalog
43
- #
40
+ # @return [ErrorDetail[]]
41
+ def batch_delete_item_parameters(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
42
+ delete(path, {}, "21.12.0") end
43
+
44
+ # Bulk upload items from a product catalog
45
+ #
44
46
  # Create/Update one or more item objects attached to this company.
45
47
  #
46
48
  # Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
@@ -53,15 +55,16 @@ module AvaTax
53
55
  #
54
56
  # ### Security Policies
55
57
  #
56
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
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
- # @return [Object]
60
- def bulk_upload_items(companyId, model) path = "/api/v2/companies/#{companyId}/items/upload"
61
- post(path, model) end
62
-
63
- # Add classifications to an item.
64
- #
62
+ # @return [Object]
63
+ def bulk_upload_items(companyId, model) path = "/api/v2/companies/#{companyId}/items/upload"
64
+ post(path, model, {}, "21.12.0") end
65
+
66
+ # Add classifications to an item.
67
+ #
65
68
  # Add classifications to an item.
66
69
  #
67
70
  # A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product.
@@ -72,16 +75,17 @@ module AvaTax
72
75
  #
73
76
  # ### Security Policies
74
77
  #
75
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
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
- # @return [ItemClassificationOutputModel[]]
80
- def create_item_classifications(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
81
- post(path, model) end
82
-
83
- # Add parameters to an item.
84
- #
83
+ # @return [ItemClassificationOutputModel[]]
84
+ def create_item_classifications(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
85
+ post(path, model, {}, "21.12.0") end
86
+
87
+ # Add parameters to an item.
88
+ #
85
89
  # Add parameters to an item.
86
90
  #
87
91
  # Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters".
@@ -96,16 +100,17 @@ module AvaTax
96
100
  #
97
101
  # ### Security Policies
98
102
  #
99
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
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
- # @return [ItemParameterModel[]]
104
- def create_item_parameters(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
105
- post(path, model) end
106
-
107
- # Create a new item
108
- #
108
+ # @return [ItemParameterModel[]]
109
+ def create_item_parameters(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
110
+ post(path, model, {}, "21.12.0") end
111
+
112
+ # Create a new item
113
+ #
109
114
  # Creates one or more new item objects attached to this company.
110
115
  #
111
116
  # Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
@@ -118,31 +123,33 @@ module AvaTax
118
123
  #
119
124
  # ### Security Policies
120
125
  #
121
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
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
- # @return [ItemModel[]]
125
- def create_items(companyId, model) path = "/api/v2/companies/#{companyId}/items"
126
- post(path, model) end
127
-
128
- # Create tags for a item
129
- #
130
+ # @return [ItemModel[]]
131
+ def create_items(companyId, model) path = "/api/v2/companies/#{companyId}/items"
132
+ post(path, model, {}, "21.12.0") end
133
+
134
+ # Create tags for a item
135
+ #
130
136
  # Creates one or more new `Tag` objects attached to this Item.
131
137
  #
132
138
  # Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.
133
139
  #
134
140
  # ### Security Policies
135
141
  #
136
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
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
- # @return [ItemTagDetailModel[]]
141
- def create_item_tags(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
142
- post(path, model) end
143
-
144
- # Delete a single item
145
- #
147
+ # @return [ItemTagDetailModel[]]
148
+ def create_item_tags(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
149
+ post(path, model, {}, "21.12.0") end
150
+
151
+ # Delete a single item
152
+ #
146
153
  # Deletes the item object at this URL.
147
154
  #
148
155
  # Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
@@ -155,15 +162,16 @@ module AvaTax
155
162
  #
156
163
  # ### Security Policies
157
164
  #
158
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
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
- # @return [ErrorDetail[]]
162
- def delete_item(companyId, id) path = "/api/v2/companies/#{companyId}/items/#{id}"
163
- delete(path) end
164
-
165
- # Delete a single item classification.
166
- #
169
+ # @return [ErrorDetail[]]
170
+ def delete_item(companyId, id) path = "/api/v2/companies/#{companyId}/items/#{id}"
171
+ delete(path, {}, "21.12.0") end
172
+
173
+ # Delete a single item classification.
174
+ #
167
175
  # Delete a single item classification.
168
176
  #
169
177
  # A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product.
@@ -172,16 +180,17 @@ module AvaTax
172
180
  #
173
181
  # ### Security Policies
174
182
  #
175
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
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
- # @return [ErrorDetail[]]
180
- def delete_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
181
- delete(path) end
182
-
183
- # Delete a single item parameter
184
- #
188
+ # @return [ErrorDetail[]]
189
+ def delete_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
190
+ delete(path, {}, "21.12.0") end
191
+
192
+ # Delete a single item parameter
193
+ #
185
194
  # Delete a single item parameter.
186
195
  #
187
196
  # Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters".
@@ -192,47 +201,50 @@ module AvaTax
192
201
  #
193
202
  # ### Security Policies
194
203
  #
195
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
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
- # @return [ErrorDetail[]]
200
- def delete_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
201
- delete(path) end
202
-
203
- # Delete item tag by id
204
- #
209
+ # @return [ErrorDetail[]]
210
+ def delete_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
211
+ delete(path, {}, "21.12.0") end
212
+
213
+ # Delete item tag by id
214
+ #
205
215
  # Deletes the `Tag` object of an Item at this URL.
206
216
  #
207
217
  # Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.
208
218
  #
209
219
  # ### Security Policies
210
220
  #
211
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
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
- # @return [ErrorDetail[]]
216
- def delete_item_tag(companyId, itemId, itemTagDetailId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags/#{itemTagDetailId}"
217
- delete(path) end
218
-
219
- # Delete all item tags
220
- #
226
+ # @return [ErrorDetail[]]
227
+ def delete_item_tag(companyId, itemId, itemTagDetailId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags/#{itemTagDetailId}"
228
+ delete(path, {}, "21.12.0") end
229
+
230
+ # Delete all item tags
231
+ #
221
232
  # Deletes all `Tags` objects of an Item at this URL.
222
233
  #
223
234
  # Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.
224
235
  #
225
236
  # ### Security Policies
226
237
  #
227
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
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
- # @return [ErrorDetail[]]
231
- def delete_item_tags(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
232
- delete(path) end
233
-
234
- # Retrieve a single item
235
- #
242
+ # @return [ErrorDetail[]]
243
+ def delete_item_tags(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
244
+ delete(path, {}, "21.12.0") end
245
+
246
+ # Retrieve a single item
247
+ #
236
248
  # Get the `Item` object identified by this URL.
237
249
  #
238
250
  # Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
@@ -243,16 +255,17 @@ module AvaTax
243
255
  #
244
256
  # ### Security Policies
245
257
  #
246
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
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
- # @return [Object]
251
- def get_item(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/items/#{id}"
252
- get(path, options) end
253
-
254
- # Retrieve a single item classification.
255
- #
263
+ # @return [Object]
264
+ def get_item(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/items/#{id}"
265
+ get(path, options, "21.12.0") end
266
+
267
+ # Retrieve a single item classification.
268
+ #
256
269
  # Retrieve a single item classification.
257
270
  #
258
271
  # A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product.
@@ -261,16 +274,17 @@ module AvaTax
261
274
  #
262
275
  # ### Security Policies
263
276
  #
264
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
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
- # @return [Object]
269
- def get_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
270
- get(path) end
271
-
272
- # Retrieve a single item parameter
273
- #
282
+ # @return [Object]
283
+ def get_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
284
+ get(path, {}, "21.12.0") end
285
+
286
+ # Retrieve a single item parameter
287
+ #
274
288
  # Retrieve a single item parameter.
275
289
  #
276
290
  # Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters".
@@ -281,34 +295,36 @@ module AvaTax
281
295
  #
282
296
  # ### Security Policies
283
297
  #
284
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
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
- # @return [Object]
289
- def get_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
290
- get(path) end
291
-
292
- # Retrieve tags for an item
293
- #
303
+ # @return [Object]
304
+ def get_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
305
+ get(path, {}, "21.12.0") end
306
+
307
+ # Retrieve tags for an item
308
+ #
294
309
  # Get the `Tag` objects of an Item identified by this URL.
295
310
  #
296
311
  # Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.
297
312
  #
298
313
  # ### Security Policies
299
314
  #
300
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
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
304
320
  # @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.
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
- # @return [FetchResult]
307
- def get_item_tags(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
308
- get(path, options) end
309
-
310
- # Retrieve classifications for an item.
311
- #
322
+ # @return [FetchResult]
323
+ def get_item_tags(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
324
+ get(path, options, "21.12.0") end
325
+
326
+ # Retrieve classifications for an item.
327
+ #
312
328
  # List classifications for an item.
313
329
  #
314
330
  # A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product.
@@ -320,19 +336,20 @@ module AvaTax
320
336
  #
321
337
  # ### Security Policies
322
338
  #
323
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
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
327
344
  # @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.
328
345
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
329
346
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
330
- # @return [FetchResult]
331
- def list_item_classifications(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
332
- get(path, options) end
333
-
334
- # Retrieve parameters for an item
335
- #
347
+ # @return [FetchResult]
348
+ def list_item_classifications(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
349
+ get(path, options, "21.12.0") end
350
+
351
+ # Retrieve parameters for an item
352
+ #
336
353
  # List parameters for an item.
337
354
  #
338
355
  # Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters".
@@ -346,19 +363,20 @@ module AvaTax
346
363
  #
347
364
  # ### Security Policies
348
365
  #
349
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
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
353
371
  # @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.
354
372
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
355
373
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
356
- # @return [FetchResult]
357
- def list_item_parameters(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
358
- get(path, options) end
359
-
360
- # Retrieve items for this company
361
- #
374
+ # @return [FetchResult]
375
+ def list_item_parameters(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
376
+ get(path, options, "21.12.0") end
377
+
378
+ # Retrieve items for this company
379
+ #
362
380
  # List all items defined for the current company.
363
381
  #
364
382
  # Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
@@ -371,6 +389,8 @@ module AvaTax
371
389
  #
372
390
  # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
373
391
  #
392
+ # You may specify Tag Name in the `tagName` query parameter if you want to filter items on the basis of tagName
393
+ #
374
394
  # 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:
375
395
  #
376
396
  # * Parameters
@@ -379,19 +399,21 @@ module AvaTax
379
399
  #
380
400
  # ### Security Policies
381
401
  #
382
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
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
383
404
  # @param companyId [Integer] The ID of the company that defined these items
384
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
385
406
  # @param include [String] A comma separated list of additional data to retrieve.
386
407
  # @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.
387
408
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
388
409
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
389
- # @return [FetchResult]
390
- def list_items_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/items"
391
- get(path, options) end
392
-
393
- # Retrieve all items
394
- #
410
+ # @param tagName [String] Tag Name on the basis of which you want to filter Items
411
+ # @return [FetchResult]
412
+ def list_items_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/items"
413
+ get(path, options, "21.12.0") end
414
+
415
+ # Retrieve all items
416
+ #
395
417
  # Get multiple item objects across all companies.
396
418
  #
397
419
  # Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
@@ -406,18 +428,19 @@ module AvaTax
406
428
  #
407
429
  # ### Security Policies
408
430
  #
409
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
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
410
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
411
434
  # @param include [String] A comma separated list of additional data to retrieve.
412
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.
413
436
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
414
437
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
415
- # @return [FetchResult]
416
- def query_items(options={}) path = "/api/v2/items"
417
- get(path, options) end
418
-
419
- # Retrieve all items associated with given tag
420
- #
438
+ # @return [FetchResult]
439
+ def query_items(options={}) path = "/api/v2/items"
440
+ get(path, options, "21.12.0") end
441
+
442
+ # Retrieve all items associated with given tag
443
+ #
421
444
  # Get multiple item objects associated with given tag.
422
445
  #
423
446
  # Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
@@ -432,7 +455,8 @@ module AvaTax
432
455
  #
433
456
  # ### Security Policies
434
457
  #
435
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
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
436
460
  # @param companyId [Integer] The ID of the company that defined these items.
437
461
  # @param tag [String] The master tag to be associated with item.
438
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
@@ -440,12 +464,12 @@ module AvaTax
440
464
  # @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.
441
465
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
442
466
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
443
- # @return [FetchResult]
444
- def query_items_by_tag(companyId, tag, options={}) path = "/api/v2/companies/#{companyId}/items/bytags/#{tag}"
445
- get(path, options) end
446
-
447
- # Sync items from a product catalog
448
- #
467
+ # @return [FetchResult]
468
+ def query_items_by_tag(companyId, tag, options={}) path = "/api/v2/companies/#{companyId}/items/bytags/#{tag}"
469
+ get(path, options, "21.12.0") end
470
+
471
+ # Sync items from a product catalog
472
+ #
449
473
  # Syncs a list of items with AvaTax without waiting for them to be created. It is ideal for syncing large product catalogs
450
474
  # with AvaTax.
451
475
  #
@@ -461,15 +485,16 @@ module AvaTax
461
485
  #
462
486
  # ### Security Policies
463
487
  #
464
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
488
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
489
+ # Swagger Name: AvaTaxClient
465
490
  # @param companyId [Integer] The ID of the company that owns this item.
466
491
  # @param model [Object] The request object.
467
- # @return [Object]
468
- def sync_items(companyId, model) path = "/api/v2/companies/#{companyId}/items/sync"
469
- post(path, model) end
470
-
471
- # Update a single item
472
- #
492
+ # @return [Object]
493
+ def sync_items(companyId, model) path = "/api/v2/companies/#{companyId}/items/sync"
494
+ post(path, model, {}, "21.12.0") end
495
+
496
+ # Update a single item
497
+ #
473
498
  # Replace the existing `Item` object at this URL with an updated object.
474
499
  #
475
500
  # Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
@@ -485,16 +510,17 @@ module AvaTax
485
510
  #
486
511
  # ### Security Policies
487
512
  #
488
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
513
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
514
+ # Swagger Name: AvaTaxClient
489
515
  # @param companyId [Integer] The ID of the company that this item belongs to.
490
516
  # @param id [Integer] The ID of the item you wish to update
491
517
  # @param model [Object] The item object you wish to update.
492
- # @return [Object]
493
- def update_item(companyId, id, model) path = "/api/v2/companies/#{companyId}/items/#{id}"
494
- put(path, model) end
495
-
496
- # Update an item classification.
497
- #
518
+ # @return [Object]
519
+ def update_item(companyId, id, model) path = "/api/v2/companies/#{companyId}/items/#{id}"
520
+ put(path, model, {}, "21.12.0") end
521
+
522
+ # Update an item classification.
523
+ #
498
524
  # Update an item classification.
499
525
  #
500
526
  # A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product.
@@ -505,17 +531,18 @@ module AvaTax
505
531
  #
506
532
  # ### Security Policies
507
533
  #
508
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
534
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
535
+ # Swagger Name: AvaTaxClient
509
536
  # @param companyId [Integer] The company id.
510
537
  # @param itemId [Integer] The item id.
511
538
  # @param id [Integer] The item classification id.
512
539
  # @param model [Object] The item object you wish to update.
513
- # @return [Object]
514
- def update_item_classification(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
515
- put(path, model) end
516
-
517
- # Update an item parameter
518
- #
540
+ # @return [Object]
541
+ 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
543
+
544
+ # Update an item parameter
545
+ #
519
546
  # Update an item parameter.
520
547
  #
521
548
  # Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters".
@@ -526,14 +553,15 @@ module AvaTax
526
553
  #
527
554
  # ### Security Policies
528
555
  #
529
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
556
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
557
+ # Swagger Name: AvaTaxClient
530
558
  # @param companyId [Integer] The company id.
531
559
  # @param itemId [Integer] The item id
532
560
  # @param id [Integer] The item parameter id
533
561
  # @param model [Object] The item object you wish to update.
534
- # @return [Object]
535
- def update_item_parameter(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
536
- put(path, model) end
537
- end
538
- end
562
+ # @return [Object]
563
+ 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
565
+ end
566
+ end
539
567
  end