avatax 20.9.0 → 21.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.vs/slnx.sqlite +0 -0
- data/lib/avatax/client/accounts.rb +83 -83
- data/lib/avatax/client/addresses.rb +21 -21
- data/lib/avatax/client/advancedrules.rb +41 -51
- data/lib/avatax/client/avafileforms.rb +41 -41
- data/lib/avatax/client/batches.rb +62 -62
- data/lib/avatax/client/certexpressinvites.rb +39 -39
- data/lib/avatax/client/certificates.rb +163 -163
- data/lib/avatax/client/companies.rb +157 -156
- data/lib/avatax/client/contacts.rb +48 -48
- data/lib/avatax/client/customers.rb +145 -145
- data/lib/avatax/client/datasources.rb +48 -48
- data/lib/avatax/client/definitions.rb +591 -422
- data/lib/avatax/client/distancethresholds.rb +48 -48
- data/lib/avatax/client/ecms.rb +26 -31
- data/lib/avatax/client/ecommercetoken.rb +17 -17
- data/lib/avatax/client/errortransactions.rb +27 -15
- data/lib/avatax/client/filingcalendars.rb +48 -12
- data/lib/avatax/client/filings.rb +23 -21
- data/lib/avatax/client/firmclientlinkages.rb +69 -69
- data/lib/avatax/client/free.rb +13 -86
- data/lib/avatax/client/fundingrequests.rb +20 -20
- data/lib/avatax/client/items.rb +255 -137
- data/lib/avatax/client/jurisdictionoverrides.rb +48 -48
- data/lib/avatax/client/locations.rb +92 -92
- data/lib/avatax/client/multidocument.rb +78 -78
- data/lib/avatax/client/nexus.rb +133 -105
- data/lib/avatax/client/notices.rb +43 -504
- data/lib/avatax/client/notifications.rb +27 -27
- data/lib/avatax/client/provisioning.rb +20 -20
- data/lib/avatax/client/registrar.rb +85 -75
- data/lib/avatax/client/reports.rb +44 -35
- data/lib/avatax/client/settings.rb +55 -50
- data/lib/avatax/client/subscriptions.rb +27 -27
- data/lib/avatax/client/taxcodes.rb +48 -48
- data/lib/avatax/client/taxcontent.rb +90 -27
- data/lib/avatax/client/taxprofiles.rb +14 -10
- data/lib/avatax/client/taxrules.rb +50 -50
- data/lib/avatax/client/transactions.rb +155 -155
- data/lib/avatax/client/upcs.rb +48 -48
- data/lib/avatax/client/users.rb +64 -64
- data/lib/avatax/client/utilities.rb +27 -27
- data/lib/avatax/configuration.rb +1 -1
- data/lib/avatax/request.rb +11 -5
- data/lib/avatax/version.rb +1 -1
- data/spec/avatax/request_spec.rb +25 -0
- metadata +12 -4
data/lib/avatax/client/items.rb
CHANGED
@@ -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,15 @@ 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
17
|
# @param companyId [Integer] The ID of the company that owns this item.
|
18
18
|
# @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
|
-
#
|
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
|
+
#
|
25
25
|
# Delete all the parameters for a given item.
|
26
26
|
#
|
27
27
|
# 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 +32,36 @@ module AvaTax
|
|
32
32
|
#
|
33
33
|
# ### Security Policies
|
34
34
|
#
|
35
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
35
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
36
36
|
# @param companyId [Integer] The ID of the company that owns this item.
|
37
37
|
# @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
|
-
#
|
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
|
+
#
|
44
|
+
# Create/Update one or more item objects attached to this company.
|
45
|
+
#
|
46
|
+
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
47
|
+
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
48
|
+
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
49
|
+
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
50
|
+
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
51
|
+
#
|
52
|
+
# The tax code takes precedence over the tax code id if both are provided.
|
53
|
+
#
|
54
|
+
# ### Security Policies
|
43
55
|
#
|
56
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
57
|
+
# @param companyId [Integer] The ID of the company that owns this items.
|
58
|
+
# @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
|
+
#
|
44
65
|
# Add classifications to an item.
|
45
66
|
#
|
46
67
|
# 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.
|
@@ -51,16 +72,16 @@ module AvaTax
|
|
51
72
|
#
|
52
73
|
# ### Security Policies
|
53
74
|
#
|
54
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
75
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
55
76
|
# @param companyId [Integer] The company id.
|
56
77
|
# @param itemId [Integer] The item id.
|
57
78
|
# @param model [ItemClassificationInputModel[]] The item classifications you wish to create.
|
58
|
-
# @return [ItemClassificationOutputModel[]]
|
59
|
-
def create_item_classifications(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
|
60
|
-
post(path, model) end
|
61
|
-
|
62
|
-
# Add parameters to an item.
|
63
|
-
#
|
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
|
+
#
|
64
85
|
# Add parameters to an item.
|
65
86
|
#
|
66
87
|
# 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".
|
@@ -75,16 +96,16 @@ module AvaTax
|
|
75
96
|
#
|
76
97
|
# ### Security Policies
|
77
98
|
#
|
78
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
99
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
79
100
|
# @param companyId [Integer] The ID of the company that owns this item parameter.
|
80
101
|
# @param itemId [Integer] The item id.
|
81
102
|
# @param model [ItemParameterModel[]] The item parameters you wish to create.
|
82
|
-
# @return [ItemParameterModel[]]
|
83
|
-
def create_item_parameters(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
|
84
|
-
post(path, model) end
|
85
|
-
|
86
|
-
# Create a new item
|
87
|
-
#
|
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
|
+
#
|
88
109
|
# Creates one or more new item objects attached to this company.
|
89
110
|
#
|
90
111
|
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
@@ -97,15 +118,31 @@ module AvaTax
|
|
97
118
|
#
|
98
119
|
# ### Security Policies
|
99
120
|
#
|
100
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
121
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
101
122
|
# @param companyId [Integer] The ID of the company that owns this item.
|
102
123
|
# @param model [ItemModel[]] The item you wish to create.
|
103
|
-
# @return [ItemModel[]]
|
104
|
-
def create_items(companyId, model) path = "/api/v2/companies/#{companyId}/items"
|
105
|
-
post(path, model) end
|
106
|
-
|
107
|
-
#
|
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
|
+
# Creates one or more new `Tag` objects attached to this Item.
|
108
131
|
#
|
132
|
+
# Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.
|
133
|
+
#
|
134
|
+
# ### Security Policies
|
135
|
+
#
|
136
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
137
|
+
# @param companyId [Integer] The ID of the company that defined these items
|
138
|
+
# @param itemId [Integer] The ID of the item as defined by the company that owns this tag.
|
139
|
+
# @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
|
+
#
|
109
146
|
# Deletes the item object at this URL.
|
110
147
|
#
|
111
148
|
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
@@ -118,15 +155,15 @@ module AvaTax
|
|
118
155
|
#
|
119
156
|
# ### Security Policies
|
120
157
|
#
|
121
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
158
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
122
159
|
# @param companyId [Integer] The ID of the company that owns this item.
|
123
160
|
# @param id [Integer] The ID of the item you wish to delete.
|
124
|
-
# @return [ErrorDetail[]]
|
125
|
-
def delete_item(companyId, id) path = "/api/v2/companies/#{companyId}/items/#{id}"
|
126
|
-
delete(path) end
|
127
|
-
|
128
|
-
# Delete a single item classification.
|
129
|
-
#
|
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
|
+
#
|
130
167
|
# Delete a single item classification.
|
131
168
|
#
|
132
169
|
# 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.
|
@@ -135,16 +172,16 @@ module AvaTax
|
|
135
172
|
#
|
136
173
|
# ### Security Policies
|
137
174
|
#
|
138
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
175
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
139
176
|
# @param companyId [Integer] The company id.
|
140
177
|
# @param itemId [Integer] The item id.
|
141
178
|
# @param id [Integer] The item classification id.
|
142
|
-
# @return [ErrorDetail[]]
|
143
|
-
def delete_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
|
144
|
-
delete(path) end
|
145
|
-
|
146
|
-
# Delete a single item parameter
|
147
|
-
#
|
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
|
+
#
|
148
185
|
# Delete a single item parameter.
|
149
186
|
#
|
150
187
|
# 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".
|
@@ -155,16 +192,47 @@ module AvaTax
|
|
155
192
|
#
|
156
193
|
# ### Security Policies
|
157
194
|
#
|
158
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
195
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
159
196
|
# @param companyId [Integer] The company id
|
160
197
|
# @param itemId [Integer] The item id
|
161
198
|
# @param id [Integer] The parameter id
|
162
|
-
# @return [ErrorDetail[]]
|
163
|
-
def delete_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
|
164
|
-
delete(path) end
|
165
|
-
|
166
|
-
#
|
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
|
+
#
|
205
|
+
# Deletes the `Tag` object of an Item at this URL.
|
206
|
+
#
|
207
|
+
# Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.
|
167
208
|
#
|
209
|
+
# ### Security Policies
|
210
|
+
#
|
211
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
212
|
+
# @param companyId [Integer] The ID of the company that defined these items
|
213
|
+
# @param itemId [Integer] The ID of the item as defined by the company that owns this tag.
|
214
|
+
# @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
|
+
#
|
221
|
+
# Deletes all `Tags` objects of an Item at this URL.
|
222
|
+
#
|
223
|
+
# Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.
|
224
|
+
#
|
225
|
+
# ### Security Policies
|
226
|
+
#
|
227
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
228
|
+
# @param companyId [Integer] The ID of the company that defined these items.
|
229
|
+
# @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
|
+
#
|
168
236
|
# Get the `Item` object identified by this URL.
|
169
237
|
#
|
170
238
|
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
@@ -175,16 +243,16 @@ module AvaTax
|
|
175
243
|
#
|
176
244
|
# ### Security Policies
|
177
245
|
#
|
178
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
246
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
179
247
|
# @param companyId [Integer] The ID of the company that owns this item object
|
180
248
|
# @param id [Integer] The primary key of this item
|
181
249
|
# @param include [String] A comma separated list of additional data to retrieve.
|
182
|
-
# @return [Object]
|
183
|
-
def get_item(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/items/#{id}"
|
184
|
-
get(path, options) end
|
185
|
-
|
186
|
-
# Retrieve a single item classification.
|
187
|
-
#
|
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
|
+
#
|
188
256
|
# Retrieve a single item classification.
|
189
257
|
#
|
190
258
|
# 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.
|
@@ -193,16 +261,16 @@ module AvaTax
|
|
193
261
|
#
|
194
262
|
# ### Security Policies
|
195
263
|
#
|
196
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
264
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
197
265
|
# @param companyId [Integer] The company id.
|
198
266
|
# @param itemId [Integer] The item id.
|
199
267
|
# @param id [Integer] The item classification id.
|
200
|
-
# @return [Object]
|
201
|
-
def get_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
|
202
|
-
get(path) end
|
203
|
-
|
204
|
-
# Retrieve a single item parameter
|
205
|
-
#
|
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
|
+
#
|
206
274
|
# Retrieve a single item parameter.
|
207
275
|
#
|
208
276
|
# 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".
|
@@ -213,16 +281,34 @@ module AvaTax
|
|
213
281
|
#
|
214
282
|
# ### Security Policies
|
215
283
|
#
|
216
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
284
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
217
285
|
# @param companyId [Integer] The company id
|
218
286
|
# @param itemId [Integer] The item id
|
219
287
|
# @param id [Integer] The parameter id
|
220
|
-
# @return [Object]
|
221
|
-
def get_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
|
222
|
-
get(path) end
|
223
|
-
|
224
|
-
# Retrieve
|
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
|
+
#
|
294
|
+
# Get the `Tag` objects of an Item identified by this URL.
|
295
|
+
#
|
296
|
+
# Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.
|
297
|
+
#
|
298
|
+
# ### Security Policies
|
225
299
|
#
|
300
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
301
|
+
# @param companyId [Integer] The ID of the company that defined these items
|
302
|
+
# @param itemId [Integer] The ID of the item as defined by the company that owns this tag.
|
303
|
+
# @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
|
+
# @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
|
+
# @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
|
+
#
|
226
312
|
# List classifications for an item.
|
227
313
|
#
|
228
314
|
# 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.
|
@@ -234,19 +320,19 @@ module AvaTax
|
|
234
320
|
#
|
235
321
|
# ### Security Policies
|
236
322
|
#
|
237
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
323
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
238
324
|
# @param companyId [Integer] The company id.
|
239
325
|
# @param itemId [Integer] The item id.
|
240
326
|
# @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
|
241
327
|
# @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.
|
242
328
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
243
329
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
244
|
-
# @return [FetchResult]
|
245
|
-
def list_item_classifications(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
|
246
|
-
get(path, options) end
|
247
|
-
|
248
|
-
# Retrieve parameters for an item
|
249
|
-
#
|
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
|
+
#
|
250
336
|
# List parameters for an item.
|
251
337
|
#
|
252
338
|
# 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".
|
@@ -260,19 +346,19 @@ module AvaTax
|
|
260
346
|
#
|
261
347
|
# ### Security Policies
|
262
348
|
#
|
263
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
349
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
264
350
|
# @param companyId [Integer] The company id
|
265
351
|
# @param itemId [Integer] The item id
|
266
|
-
# @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
|
352
|
+
# @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
|
267
353
|
# @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.
|
268
354
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
269
355
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
270
|
-
# @return [FetchResult]
|
271
|
-
def list_item_parameters(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
|
272
|
-
get(path, options) end
|
273
|
-
|
274
|
-
# Retrieve items for this company
|
275
|
-
#
|
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
|
+
#
|
276
362
|
# List all items defined for the current company.
|
277
363
|
#
|
278
364
|
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
@@ -285,26 +371,30 @@ module AvaTax
|
|
285
371
|
#
|
286
372
|
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
287
373
|
#
|
374
|
+
# You may specify Tag Name in the `tagName` query parameter if you want to filter items on the basis of tagName
|
375
|
+
#
|
288
376
|
# 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:
|
289
377
|
#
|
290
378
|
# * Parameters
|
291
379
|
# * Classifications
|
380
|
+
# * Tags
|
292
381
|
#
|
293
382
|
# ### Security Policies
|
294
383
|
#
|
295
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
384
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
296
385
|
# @param companyId [Integer] The ID of the company that defined these items
|
297
|
-
# @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
|
386
|
+
# @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
|
298
387
|
# @param include [String] A comma separated list of additional data to retrieve.
|
299
388
|
# @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.
|
300
389
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
301
390
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
302
|
-
# @
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
#
|
391
|
+
# @param tagName [String] Tag Name on the basis of which you want to filter Items
|
392
|
+
# @return [FetchResult]
|
393
|
+
def list_items_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/items"
|
394
|
+
get(path, options) end
|
395
|
+
|
396
|
+
# Retrieve all items
|
397
|
+
#
|
308
398
|
# Get multiple item objects across all companies.
|
309
399
|
#
|
310
400
|
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
@@ -319,18 +409,46 @@ module AvaTax
|
|
319
409
|
#
|
320
410
|
# ### Security Policies
|
321
411
|
#
|
322
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
323
|
-
# @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
|
412
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
413
|
+
# @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
|
324
414
|
# @param include [String] A comma separated list of additional data to retrieve.
|
325
415
|
# @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.
|
326
416
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
327
417
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
328
|
-
# @return [FetchResult]
|
329
|
-
def query_items(options={}) path = "/api/v2/items"
|
330
|
-
get(path, options) end
|
331
|
-
|
332
|
-
#
|
418
|
+
# @return [FetchResult]
|
419
|
+
def query_items(options={}) path = "/api/v2/items"
|
420
|
+
get(path, options) end
|
421
|
+
|
422
|
+
# Retrieve all items associated with given tag
|
423
|
+
#
|
424
|
+
# Get multiple item objects associated with given tag.
|
333
425
|
#
|
426
|
+
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
427
|
+
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
428
|
+
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
429
|
+
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
430
|
+
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
431
|
+
#
|
432
|
+
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
433
|
+
#
|
434
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
435
|
+
#
|
436
|
+
# ### Security Policies
|
437
|
+
#
|
438
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
439
|
+
# @param companyId [Integer] The ID of the company that defined these items.
|
440
|
+
# @param tag [String] The master tag to be associated with item.
|
441
|
+
# @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
|
442
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
443
|
+
# @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.
|
444
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
445
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
446
|
+
# @return [FetchResult]
|
447
|
+
def query_items_by_tag(companyId, tag, options={}) path = "/api/v2/companies/#{companyId}/items/bytags/#{tag}"
|
448
|
+
get(path, options) end
|
449
|
+
|
450
|
+
# Sync items from a product catalog
|
451
|
+
#
|
334
452
|
# Syncs a list of items with AvaTax without waiting for them to be created. It is ideal for syncing large product catalogs
|
335
453
|
# with AvaTax.
|
336
454
|
#
|
@@ -346,15 +464,15 @@ module AvaTax
|
|
346
464
|
#
|
347
465
|
# ### Security Policies
|
348
466
|
#
|
349
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
467
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
350
468
|
# @param companyId [Integer] The ID of the company that owns this item.
|
351
469
|
# @param model [Object] The request object.
|
352
|
-
# @return [Object]
|
353
|
-
def sync_items(companyId, model) path = "/api/v2/companies/#{companyId}/items/sync"
|
354
|
-
post(path, model) end
|
355
|
-
|
356
|
-
# Update a single item
|
357
|
-
#
|
470
|
+
# @return [Object]
|
471
|
+
def sync_items(companyId, model) path = "/api/v2/companies/#{companyId}/items/sync"
|
472
|
+
post(path, model) end
|
473
|
+
|
474
|
+
# Update a single item
|
475
|
+
#
|
358
476
|
# Replace the existing `Item` object at this URL with an updated object.
|
359
477
|
#
|
360
478
|
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
@@ -370,16 +488,16 @@ module AvaTax
|
|
370
488
|
#
|
371
489
|
# ### Security Policies
|
372
490
|
#
|
373
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
491
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
374
492
|
# @param companyId [Integer] The ID of the company that this item belongs to.
|
375
493
|
# @param id [Integer] The ID of the item you wish to update
|
376
494
|
# @param model [Object] The item object you wish to update.
|
377
|
-
# @return [Object]
|
378
|
-
def update_item(companyId, id, model) path = "/api/v2/companies/#{companyId}/items/#{id}"
|
379
|
-
put(path, model) end
|
380
|
-
|
381
|
-
# Update an item classification.
|
382
|
-
#
|
495
|
+
# @return [Object]
|
496
|
+
def update_item(companyId, id, model) path = "/api/v2/companies/#{companyId}/items/#{id}"
|
497
|
+
put(path, model) end
|
498
|
+
|
499
|
+
# Update an item classification.
|
500
|
+
#
|
383
501
|
# Update an item classification.
|
384
502
|
#
|
385
503
|
# 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.
|
@@ -390,17 +508,17 @@ module AvaTax
|
|
390
508
|
#
|
391
509
|
# ### Security Policies
|
392
510
|
#
|
393
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
511
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
394
512
|
# @param companyId [Integer] The company id.
|
395
513
|
# @param itemId [Integer] The item id.
|
396
514
|
# @param id [Integer] The item classification id.
|
397
515
|
# @param model [Object] The item object you wish to update.
|
398
|
-
# @return [Object]
|
399
|
-
def update_item_classification(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
|
400
|
-
put(path, model) end
|
401
|
-
|
402
|
-
# Update an item parameter
|
403
|
-
#
|
516
|
+
# @return [Object]
|
517
|
+
def update_item_classification(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
|
518
|
+
put(path, model) end
|
519
|
+
|
520
|
+
# Update an item parameter
|
521
|
+
#
|
404
522
|
# Update an item parameter.
|
405
523
|
#
|
406
524
|
# 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".
|
@@ -411,14 +529,14 @@ module AvaTax
|
|
411
529
|
#
|
412
530
|
# ### Security Policies
|
413
531
|
#
|
414
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
532
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
415
533
|
# @param companyId [Integer] The company id.
|
416
534
|
# @param itemId [Integer] The item id
|
417
535
|
# @param id [Integer] The item parameter id
|
418
536
|
# @param model [Object] The item object you wish to update.
|
419
|
-
# @return [Object]
|
420
|
-
def update_item_parameter(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
|
421
|
-
put(path, model) end
|
422
|
-
end
|
423
|
-
end
|
537
|
+
# @return [Object]
|
538
|
+
def update_item_parameter(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
|
539
|
+
put(path, model) end
|
540
|
+
end
|
541
|
+
end
|
424
542
|
end
|