avatax 20.1.0 → 20.9.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.
- checksums.yaml +4 -4
- data/avatax.gemspec +0 -1
- data/lib/avatax/client/accounts.rb +236 -172
- data/lib/avatax/client/addresses.rb +54 -54
- data/lib/avatax/client/advancedrules.rb +63 -162
- data/lib/avatax/client/avafileforms.rb +78 -78
- data/lib/avatax/client/batches.rb +223 -170
- data/lib/avatax/client/certexpressinvites.rb +97 -97
- data/lib/avatax/client/certificates.rb +424 -424
- data/lib/avatax/client/companies.rb +457 -350
- data/lib/avatax/client/compliance.rb +15 -15
- data/lib/avatax/client/contacts.rb +106 -106
- data/lib/avatax/client/customers.rb +376 -376
- data/lib/avatax/client/datasources.rb +99 -99
- data/lib/avatax/client/definitions.rb +862 -847
- data/lib/avatax/client/distancethresholds.rb +122 -122
- data/lib/avatax/client/ecommercetoken.rb +37 -0
- data/lib/avatax/client/filingcalendars.rb +20 -508
- data/lib/avatax/client/filings.rb +37 -26
- data/lib/avatax/client/firmclientlinkages.rb +123 -123
- data/lib/avatax/client/free.rb +100 -100
- data/lib/avatax/client/fundingrequests.rb +52 -52
- data/lib/avatax/client/items.rb +423 -423
- data/lib/avatax/client/jurisdictionoverrides.rb +118 -118
- data/lib/avatax/client/locations.rb +253 -139
- data/lib/avatax/client/multidocument.rb +390 -310
- data/lib/avatax/client/nexus.rb +341 -201
- data/lib/avatax/client/notifications.rb +75 -75
- data/lib/avatax/client/provisioning.rb +49 -49
- data/lib/avatax/client/registrar.rb +198 -198
- data/lib/avatax/client/reports.rb +97 -97
- data/lib/avatax/client/settings.rb +156 -156
- data/lib/avatax/client/subscriptions.rb +62 -62
- data/lib/avatax/client/taxcodes.rb +120 -120
- data/lib/avatax/client/taxcontent.rb +133 -133
- data/lib/avatax/client/taxrules.rb +170 -170
- data/lib/avatax/client/transactions.rb +836 -791
- data/lib/avatax/client/upcs.rb +111 -111
- data/lib/avatax/client/users.rb +183 -183
- data/lib/avatax/client/utilities.rb +61 -61
- data/lib/avatax/connection.rb +3 -3
- data/lib/avatax/request.rb +2 -0
- data/lib/avatax/version.rb +1 -1
- metadata +4 -17
@@ -1,53 +1,53 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module FundingRequests
|
4
|
-
|
5
|
-
|
6
|
-
# Request the javascript for a funding setup widget
|
7
|
-
#
|
8
|
-
# This API is available by invitation only.
|
9
|
-
# Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are
|
10
|
-
# required to setup their funding configuration before Avalara can begin filing tax returns on their
|
11
|
-
# behalf.
|
12
|
-
# Funding configuration for each company is set up by submitting a funding setup request, which can
|
13
|
-
# be sent either via email or via an embedded HTML widget.
|
14
|
-
# When the funding configuration is submitted to Avalara, it will be reviewed by treasury team members
|
15
|
-
# before approval.
|
16
|
-
# This API returns back the actual javascript code to insert into your application to render the
|
17
|
-
# JavaScript funding setup widget inline.
|
18
|
-
# Use the 'methodReturn.javaScript' return value to insert this widget into your HTML page.
|
19
|
-
# This API requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
|
20
|
-
#
|
21
|
-
# ### Security Policies
|
22
|
-
#
|
23
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
24
|
-
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
25
|
-
# @param id [Integer] The unique ID number of this funding request
|
26
|
-
# @return [Object]
|
27
|
-
def activate_funding_request(id) path = "/api/v2/fundingrequests/#{id}/widget"
|
28
|
-
get(path) end
|
29
|
-
|
30
|
-
# Retrieve status about a funding setup request
|
31
|
-
#
|
32
|
-
# This API is available by invitation only.
|
33
|
-
# Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are
|
34
|
-
# required to setup their funding configuration before Avalara can begin filing tax returns on their
|
35
|
-
# behalf.
|
36
|
-
# Funding configuration for each company is set up by submitting a funding setup request, which can
|
37
|
-
# be sent either via email or via an embedded HTML widget.
|
38
|
-
# When the funding configuration is submitted to Avalara, it will be reviewed by treasury team members
|
39
|
-
# before approval.
|
40
|
-
# This API checks the status on an existing funding request.
|
41
|
-
# This API requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
|
42
|
-
#
|
43
|
-
# ### Security Policies
|
44
|
-
#
|
45
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
46
|
-
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
47
|
-
# @param id [Integer] The unique ID number of this funding request
|
48
|
-
# @return [Object]
|
49
|
-
def funding_request_status(id) path = "/api/v2/fundingrequests/#{id}"
|
50
|
-
get(path) end
|
51
|
-
end
|
52
|
-
end
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module FundingRequests
|
4
|
+
|
5
|
+
|
6
|
+
# Request the javascript for a funding setup widget
|
7
|
+
#
|
8
|
+
# This API is available by invitation only.
|
9
|
+
# Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are
|
10
|
+
# required to setup their funding configuration before Avalara can begin filing tax returns on their
|
11
|
+
# behalf.
|
12
|
+
# Funding configuration for each company is set up by submitting a funding setup request, which can
|
13
|
+
# be sent either via email or via an embedded HTML widget.
|
14
|
+
# When the funding configuration is submitted to Avalara, it will be reviewed by treasury team members
|
15
|
+
# before approval.
|
16
|
+
# This API returns back the actual javascript code to insert into your application to render the
|
17
|
+
# JavaScript funding setup widget inline.
|
18
|
+
# Use the 'methodReturn.javaScript' return value to insert this widget into your HTML page.
|
19
|
+
# This API requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
|
20
|
+
#
|
21
|
+
# ### Security Policies
|
22
|
+
#
|
23
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
24
|
+
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
25
|
+
# @param id [Integer] The unique ID number of this funding request
|
26
|
+
# @return [Object]
|
27
|
+
def activate_funding_request(id) path = "/api/v2/fundingrequests/#{id}/widget"
|
28
|
+
get(path) end
|
29
|
+
|
30
|
+
# Retrieve status about a funding setup request
|
31
|
+
#
|
32
|
+
# This API is available by invitation only.
|
33
|
+
# Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are
|
34
|
+
# required to setup their funding configuration before Avalara can begin filing tax returns on their
|
35
|
+
# behalf.
|
36
|
+
# Funding configuration for each company is set up by submitting a funding setup request, which can
|
37
|
+
# be sent either via email or via an embedded HTML widget.
|
38
|
+
# When the funding configuration is submitted to Avalara, it will be reviewed by treasury team members
|
39
|
+
# before approval.
|
40
|
+
# This API checks the status on an existing funding request.
|
41
|
+
# This API requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
|
42
|
+
#
|
43
|
+
# ### Security Policies
|
44
|
+
#
|
45
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
46
|
+
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
|
47
|
+
# @param id [Integer] The unique ID number of this funding request
|
48
|
+
# @return [Object]
|
49
|
+
def funding_request_status(id) path = "/api/v2/fundingrequests/#{id}"
|
50
|
+
get(path) end
|
51
|
+
end
|
52
|
+
end
|
53
53
|
end
|
data/lib/avatax/client/items.rb
CHANGED
@@ -1,424 +1,424 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Items
|
4
|
-
|
5
|
-
|
6
|
-
# Delete all classifications for an item
|
7
|
-
#
|
8
|
-
# Delete all the classifications for a given item.
|
9
|
-
#
|
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.
|
11
|
-
#
|
12
|
-
# When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
|
13
|
-
#
|
14
|
-
# ### Security Policies
|
15
|
-
#
|
16
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
17
|
-
# @param companyId [Integer] The ID of the company that owns this item.
|
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
|
-
#
|
25
|
-
# Delete all the parameters for a given item.
|
26
|
-
#
|
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".
|
28
|
-
#
|
29
|
-
# A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
|
30
|
-
#
|
31
|
-
# A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
|
32
|
-
#
|
33
|
-
# ### Security Policies
|
34
|
-
#
|
35
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
36
|
-
# @param companyId [Integer] The ID of the company that owns this item.
|
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
|
-
# Add classifications to an item.
|
43
|
-
#
|
44
|
-
# Add classifications to an item.
|
45
|
-
#
|
46
|
-
# 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.
|
47
|
-
#
|
48
|
-
# When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
|
49
|
-
#
|
50
|
-
# An item may only have one classification per tax system.
|
51
|
-
#
|
52
|
-
# ### Security Policies
|
53
|
-
#
|
54
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
55
|
-
# @param companyId [Integer] The company id.
|
56
|
-
# @param itemId [Integer] The item id.
|
57
|
-
# @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
|
-
#
|
64
|
-
# Add parameters to an item.
|
65
|
-
#
|
66
|
-
# 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".
|
67
|
-
#
|
68
|
-
# A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
|
69
|
-
#
|
70
|
-
# A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
|
71
|
-
#
|
72
|
-
# To see available parameters for this item, call `/api/v2/definitions/parameters?$filter=attributeType eq Product`
|
73
|
-
#
|
74
|
-
# Some parameters are only available for use if you have subscribed to specific AvaTax services. To see which parameters you are able to use, add the query parameter "$showSubscribed=true" to the parameter definition call above.
|
75
|
-
#
|
76
|
-
# ### Security Policies
|
77
|
-
#
|
78
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
79
|
-
# @param companyId [Integer] The ID of the company that owns this item parameter.
|
80
|
-
# @param itemId [Integer] The item id.
|
81
|
-
# @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
|
-
#
|
88
|
-
# Creates one or more new item objects attached to this company.
|
89
|
-
#
|
90
|
-
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
91
|
-
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
92
|
-
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
93
|
-
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
94
|
-
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
95
|
-
#
|
96
|
-
# The tax code takes precedence over the tax code id if both are provided.
|
97
|
-
#
|
98
|
-
# ### Security Policies
|
99
|
-
#
|
100
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
101
|
-
# @param companyId [Integer] The ID of the company that owns this item.
|
102
|
-
# @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
|
-
# Delete a single item
|
108
|
-
#
|
109
|
-
# Deletes the item object at this URL.
|
110
|
-
#
|
111
|
-
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
112
|
-
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
113
|
-
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
114
|
-
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
115
|
-
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
116
|
-
#
|
117
|
-
# Deleting an item will also delete the parameters and classifications associated with that item.
|
118
|
-
#
|
119
|
-
# ### Security Policies
|
120
|
-
#
|
121
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
122
|
-
# @param companyId [Integer] The ID of the company that owns this item.
|
123
|
-
# @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
|
-
#
|
130
|
-
# Delete a single item classification.
|
131
|
-
#
|
132
|
-
# 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.
|
133
|
-
#
|
134
|
-
# When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
|
135
|
-
#
|
136
|
-
# ### Security Policies
|
137
|
-
#
|
138
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
139
|
-
# @param companyId [Integer] The company id.
|
140
|
-
# @param itemId [Integer] The item id.
|
141
|
-
# @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
|
-
#
|
148
|
-
# Delete a single item parameter.
|
149
|
-
#
|
150
|
-
# 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".
|
151
|
-
#
|
152
|
-
# A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
|
153
|
-
#
|
154
|
-
# A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
|
155
|
-
#
|
156
|
-
# ### Security Policies
|
157
|
-
#
|
158
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
159
|
-
# @param companyId [Integer] The company id
|
160
|
-
# @param itemId [Integer] The item id
|
161
|
-
# @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
|
-
# Retrieve a single item
|
167
|
-
#
|
168
|
-
# Get the `Item` object identified by this URL.
|
169
|
-
#
|
170
|
-
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
171
|
-
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
172
|
-
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
173
|
-
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
174
|
-
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
175
|
-
#
|
176
|
-
# ### Security Policies
|
177
|
-
#
|
178
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
179
|
-
# @param companyId [Integer] The ID of the company that owns this item object
|
180
|
-
# @param id [Integer] The primary key of this item
|
181
|
-
# @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
|
-
#
|
188
|
-
# Retrieve a single item classification.
|
189
|
-
#
|
190
|
-
# 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.
|
191
|
-
#
|
192
|
-
# When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
|
193
|
-
#
|
194
|
-
# ### Security Policies
|
195
|
-
#
|
196
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
197
|
-
# @param companyId [Integer] The company id.
|
198
|
-
# @param itemId [Integer] The item id.
|
199
|
-
# @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
|
-
#
|
206
|
-
# Retrieve a single item parameter.
|
207
|
-
#
|
208
|
-
# 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".
|
209
|
-
#
|
210
|
-
# A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
|
211
|
-
#
|
212
|
-
# A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
|
213
|
-
#
|
214
|
-
# ### Security Policies
|
215
|
-
#
|
216
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
217
|
-
# @param companyId [Integer] The company id
|
218
|
-
# @param itemId [Integer] The item id
|
219
|
-
# @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 classifications for an item.
|
225
|
-
#
|
226
|
-
# List classifications for an item.
|
227
|
-
#
|
228
|
-
# 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.
|
229
|
-
#
|
230
|
-
# When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
|
231
|
-
#
|
232
|
-
# Search for specific objects using the criteria in the `$filter` classification; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
233
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` classifications.
|
234
|
-
#
|
235
|
-
# ### Security Policies
|
236
|
-
#
|
237
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
238
|
-
# @param companyId [Integer] The company id.
|
239
|
-
# @param itemId [Integer] The item id.
|
240
|
-
# @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
|
-
# @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
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
243
|
-
# @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
|
-
#
|
250
|
-
# List parameters for an item.
|
251
|
-
#
|
252
|
-
# 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".
|
253
|
-
#
|
254
|
-
# A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
|
255
|
-
#
|
256
|
-
# A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
|
257
|
-
#
|
258
|
-
# 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/) .
|
259
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
260
|
-
#
|
261
|
-
# ### Security Policies
|
262
|
-
#
|
263
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
264
|
-
# @param companyId [Integer] The company id
|
265
|
-
# @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
|
267
|
-
# @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
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
269
|
-
# @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
|
-
#
|
276
|
-
# List all items defined for the current company.
|
277
|
-
#
|
278
|
-
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
279
|
-
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
280
|
-
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
281
|
-
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
282
|
-
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
283
|
-
#
|
284
|
-
# 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/) .
|
285
|
-
#
|
286
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
287
|
-
#
|
288
|
-
# 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
|
-
#
|
290
|
-
# * Parameters
|
291
|
-
# * Classifications
|
292
|
-
#
|
293
|
-
# ### Security Policies
|
294
|
-
#
|
295
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
296
|
-
# @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
|
298
|
-
# @param include [String] A comma separated list of additional data to retrieve.
|
299
|
-
# @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
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
301
|
-
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
302
|
-
# @return [FetchResult]
|
303
|
-
def list_items_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/items"
|
304
|
-
get(path, options) end
|
305
|
-
|
306
|
-
# Retrieve all items
|
307
|
-
#
|
308
|
-
# Get multiple item objects across all companies.
|
309
|
-
#
|
310
|
-
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
311
|
-
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
312
|
-
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
313
|
-
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
314
|
-
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
315
|
-
#
|
316
|
-
# 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/) .
|
317
|
-
#
|
318
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
319
|
-
#
|
320
|
-
# ### Security Policies
|
321
|
-
#
|
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
|
324
|
-
# @param include [String] A comma separated list of additional data to retrieve.
|
325
|
-
# @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
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
327
|
-
# @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
|
-
# Sync items from a product catalog
|
333
|
-
#
|
334
|
-
# Syncs a list of items with AvaTax without waiting for them to be created. It is ideal for syncing large product catalogs
|
335
|
-
# with AvaTax.
|
336
|
-
#
|
337
|
-
# Any invalid or duplicate items will be ignored. To diagnose why an item is not created, use the normal create transaction API to receive validation information.
|
338
|
-
#
|
339
|
-
# This API is currently limited to 1000 items per call (the limit is subject to change).
|
340
|
-
#
|
341
|
-
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
342
|
-
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
343
|
-
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
344
|
-
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
345
|
-
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
346
|
-
#
|
347
|
-
# ### Security Policies
|
348
|
-
#
|
349
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
350
|
-
# @param companyId [Integer] The ID of the company that owns this item.
|
351
|
-
# @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
|
-
#
|
358
|
-
# Replace the existing `Item` object at this URL with an updated object.
|
359
|
-
#
|
360
|
-
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
361
|
-
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
362
|
-
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
363
|
-
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
364
|
-
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
365
|
-
#
|
366
|
-
# All data from the existing object will be replaced with data in the object you PUT. To set a field's value to null,
|
367
|
-
# you may either set its value to null or omit that field from the object you post.
|
368
|
-
#
|
369
|
-
# The tax code takes precedence over the tax code id if both are provided.
|
370
|
-
#
|
371
|
-
# ### Security Policies
|
372
|
-
#
|
373
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
374
|
-
# @param companyId [Integer] The ID of the company that this item belongs to.
|
375
|
-
# @param id [Integer] The ID of the item you wish to update
|
376
|
-
# @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
|
-
#
|
383
|
-
# Update an item classification.
|
384
|
-
#
|
385
|
-
# 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.
|
386
|
-
#
|
387
|
-
# When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
|
388
|
-
#
|
389
|
-
# An item may only have one classification per tax system.
|
390
|
-
#
|
391
|
-
# ### Security Policies
|
392
|
-
#
|
393
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
394
|
-
# @param companyId [Integer] The company id.
|
395
|
-
# @param itemId [Integer] The item id.
|
396
|
-
# @param id [Integer] The item classification id.
|
397
|
-
# @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
|
-
#
|
404
|
-
# Update an item parameter.
|
405
|
-
#
|
406
|
-
# 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".
|
407
|
-
#
|
408
|
-
# A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
|
409
|
-
#
|
410
|
-
# A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
|
411
|
-
#
|
412
|
-
# ### Security Policies
|
413
|
-
#
|
414
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
415
|
-
# @param companyId [Integer] The company id.
|
416
|
-
# @param itemId [Integer] The item id
|
417
|
-
# @param id [Integer] The item parameter id
|
418
|
-
# @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
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Items
|
4
|
+
|
5
|
+
|
6
|
+
# Delete all classifications for an item
|
7
|
+
#
|
8
|
+
# Delete all the classifications for a given item.
|
9
|
+
#
|
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.
|
11
|
+
#
|
12
|
+
# When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
|
13
|
+
#
|
14
|
+
# ### Security Policies
|
15
|
+
#
|
16
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
17
|
+
# @param companyId [Integer] The ID of the company that owns this item.
|
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
|
+
#
|
25
|
+
# Delete all the parameters for a given item.
|
26
|
+
#
|
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".
|
28
|
+
#
|
29
|
+
# A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
|
30
|
+
#
|
31
|
+
# A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
|
32
|
+
#
|
33
|
+
# ### Security Policies
|
34
|
+
#
|
35
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
36
|
+
# @param companyId [Integer] The ID of the company that owns this item.
|
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
|
+
# Add classifications to an item.
|
43
|
+
#
|
44
|
+
# Add classifications to an item.
|
45
|
+
#
|
46
|
+
# 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.
|
47
|
+
#
|
48
|
+
# When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
|
49
|
+
#
|
50
|
+
# An item may only have one classification per tax system.
|
51
|
+
#
|
52
|
+
# ### Security Policies
|
53
|
+
#
|
54
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
55
|
+
# @param companyId [Integer] The company id.
|
56
|
+
# @param itemId [Integer] The item id.
|
57
|
+
# @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
|
+
#
|
64
|
+
# Add parameters to an item.
|
65
|
+
#
|
66
|
+
# 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".
|
67
|
+
#
|
68
|
+
# A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
|
69
|
+
#
|
70
|
+
# A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
|
71
|
+
#
|
72
|
+
# To see available parameters for this item, call `/api/v2/definitions/parameters?$filter=attributeType eq Product`
|
73
|
+
#
|
74
|
+
# Some parameters are only available for use if you have subscribed to specific AvaTax services. To see which parameters you are able to use, add the query parameter "$showSubscribed=true" to the parameter definition call above.
|
75
|
+
#
|
76
|
+
# ### Security Policies
|
77
|
+
#
|
78
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
79
|
+
# @param companyId [Integer] The ID of the company that owns this item parameter.
|
80
|
+
# @param itemId [Integer] The item id.
|
81
|
+
# @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
|
+
#
|
88
|
+
# Creates one or more new item objects attached to this company.
|
89
|
+
#
|
90
|
+
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
91
|
+
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
92
|
+
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
93
|
+
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
94
|
+
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
95
|
+
#
|
96
|
+
# The tax code takes precedence over the tax code id if both are provided.
|
97
|
+
#
|
98
|
+
# ### Security Policies
|
99
|
+
#
|
100
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
101
|
+
# @param companyId [Integer] The ID of the company that owns this item.
|
102
|
+
# @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
|
+
# Delete a single item
|
108
|
+
#
|
109
|
+
# Deletes the item object at this URL.
|
110
|
+
#
|
111
|
+
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
112
|
+
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
113
|
+
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
114
|
+
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
115
|
+
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
116
|
+
#
|
117
|
+
# Deleting an item will also delete the parameters and classifications associated with that item.
|
118
|
+
#
|
119
|
+
# ### Security Policies
|
120
|
+
#
|
121
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
122
|
+
# @param companyId [Integer] The ID of the company that owns this item.
|
123
|
+
# @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
|
+
#
|
130
|
+
# Delete a single item classification.
|
131
|
+
#
|
132
|
+
# 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.
|
133
|
+
#
|
134
|
+
# When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
|
135
|
+
#
|
136
|
+
# ### Security Policies
|
137
|
+
#
|
138
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
139
|
+
# @param companyId [Integer] The company id.
|
140
|
+
# @param itemId [Integer] The item id.
|
141
|
+
# @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
|
+
#
|
148
|
+
# Delete a single item parameter.
|
149
|
+
#
|
150
|
+
# 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".
|
151
|
+
#
|
152
|
+
# A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
|
153
|
+
#
|
154
|
+
# A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
|
155
|
+
#
|
156
|
+
# ### Security Policies
|
157
|
+
#
|
158
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
159
|
+
# @param companyId [Integer] The company id
|
160
|
+
# @param itemId [Integer] The item id
|
161
|
+
# @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
|
+
# Retrieve a single item
|
167
|
+
#
|
168
|
+
# Get the `Item` object identified by this URL.
|
169
|
+
#
|
170
|
+
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
171
|
+
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
172
|
+
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
173
|
+
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
174
|
+
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
175
|
+
#
|
176
|
+
# ### Security Policies
|
177
|
+
#
|
178
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
179
|
+
# @param companyId [Integer] The ID of the company that owns this item object
|
180
|
+
# @param id [Integer] The primary key of this item
|
181
|
+
# @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
|
+
#
|
188
|
+
# Retrieve a single item classification.
|
189
|
+
#
|
190
|
+
# 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.
|
191
|
+
#
|
192
|
+
# When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
|
193
|
+
#
|
194
|
+
# ### Security Policies
|
195
|
+
#
|
196
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
197
|
+
# @param companyId [Integer] The company id.
|
198
|
+
# @param itemId [Integer] The item id.
|
199
|
+
# @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
|
+
#
|
206
|
+
# Retrieve a single item parameter.
|
207
|
+
#
|
208
|
+
# 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".
|
209
|
+
#
|
210
|
+
# A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
|
211
|
+
#
|
212
|
+
# A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
|
213
|
+
#
|
214
|
+
# ### Security Policies
|
215
|
+
#
|
216
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
217
|
+
# @param companyId [Integer] The company id
|
218
|
+
# @param itemId [Integer] The item id
|
219
|
+
# @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 classifications for an item.
|
225
|
+
#
|
226
|
+
# List classifications for an item.
|
227
|
+
#
|
228
|
+
# 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.
|
229
|
+
#
|
230
|
+
# When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
|
231
|
+
#
|
232
|
+
# Search for specific objects using the criteria in the `$filter` classification; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
233
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` classifications.
|
234
|
+
#
|
235
|
+
# ### Security Policies
|
236
|
+
#
|
237
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
238
|
+
# @param companyId [Integer] The company id.
|
239
|
+
# @param itemId [Integer] The item id.
|
240
|
+
# @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
|
+
# @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
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
243
|
+
# @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
|
+
#
|
250
|
+
# List parameters for an item.
|
251
|
+
#
|
252
|
+
# 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".
|
253
|
+
#
|
254
|
+
# A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
|
255
|
+
#
|
256
|
+
# A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
|
257
|
+
#
|
258
|
+
# 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/) .
|
259
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
260
|
+
#
|
261
|
+
# ### Security Policies
|
262
|
+
#
|
263
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
264
|
+
# @param companyId [Integer] The company id
|
265
|
+
# @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
|
267
|
+
# @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
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
269
|
+
# @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
|
+
#
|
276
|
+
# List all items defined for the current company.
|
277
|
+
#
|
278
|
+
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
279
|
+
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
280
|
+
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
281
|
+
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
282
|
+
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
283
|
+
#
|
284
|
+
# 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/) .
|
285
|
+
#
|
286
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
287
|
+
#
|
288
|
+
# 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
|
+
#
|
290
|
+
# * Parameters
|
291
|
+
# * Classifications
|
292
|
+
#
|
293
|
+
# ### Security Policies
|
294
|
+
#
|
295
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
296
|
+
# @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
|
298
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
299
|
+
# @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
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
301
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
302
|
+
# @return [FetchResult]
|
303
|
+
def list_items_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/items"
|
304
|
+
get(path, options) end
|
305
|
+
|
306
|
+
# Retrieve all items
|
307
|
+
#
|
308
|
+
# Get multiple item objects across all companies.
|
309
|
+
#
|
310
|
+
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
311
|
+
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
312
|
+
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
313
|
+
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
314
|
+
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
315
|
+
#
|
316
|
+
# 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/) .
|
317
|
+
#
|
318
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
319
|
+
#
|
320
|
+
# ### Security Policies
|
321
|
+
#
|
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
|
324
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
325
|
+
# @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
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
327
|
+
# @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
|
+
# Sync items from a product catalog
|
333
|
+
#
|
334
|
+
# Syncs a list of items with AvaTax without waiting for them to be created. It is ideal for syncing large product catalogs
|
335
|
+
# with AvaTax.
|
336
|
+
#
|
337
|
+
# Any invalid or duplicate items will be ignored. To diagnose why an item is not created, use the normal create transaction API to receive validation information.
|
338
|
+
#
|
339
|
+
# This API is currently limited to 1000 items per call (the limit is subject to change).
|
340
|
+
#
|
341
|
+
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
342
|
+
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
343
|
+
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
344
|
+
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
345
|
+
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
346
|
+
#
|
347
|
+
# ### Security Policies
|
348
|
+
#
|
349
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
350
|
+
# @param companyId [Integer] The ID of the company that owns this item.
|
351
|
+
# @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
|
+
#
|
358
|
+
# Replace the existing `Item` object at this URL with an updated object.
|
359
|
+
#
|
360
|
+
# Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
|
361
|
+
# can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
|
362
|
+
# and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
|
363
|
+
# from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
|
364
|
+
# team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
|
365
|
+
#
|
366
|
+
# All data from the existing object will be replaced with data in the object you PUT. To set a field's value to null,
|
367
|
+
# you may either set its value to null or omit that field from the object you post.
|
368
|
+
#
|
369
|
+
# The tax code takes precedence over the tax code id if both are provided.
|
370
|
+
#
|
371
|
+
# ### Security Policies
|
372
|
+
#
|
373
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
374
|
+
# @param companyId [Integer] The ID of the company that this item belongs to.
|
375
|
+
# @param id [Integer] The ID of the item you wish to update
|
376
|
+
# @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
|
+
#
|
383
|
+
# Update an item classification.
|
384
|
+
#
|
385
|
+
# 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.
|
386
|
+
#
|
387
|
+
# When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
|
388
|
+
#
|
389
|
+
# An item may only have one classification per tax system.
|
390
|
+
#
|
391
|
+
# ### Security Policies
|
392
|
+
#
|
393
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
394
|
+
# @param companyId [Integer] The company id.
|
395
|
+
# @param itemId [Integer] The item id.
|
396
|
+
# @param id [Integer] The item classification id.
|
397
|
+
# @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
|
+
#
|
404
|
+
# Update an item parameter.
|
405
|
+
#
|
406
|
+
# 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".
|
407
|
+
#
|
408
|
+
# A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
|
409
|
+
#
|
410
|
+
# A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
|
411
|
+
#
|
412
|
+
# ### Security Policies
|
413
|
+
#
|
414
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
415
|
+
# @param companyId [Integer] The company id.
|
416
|
+
# @param itemId [Integer] The item id
|
417
|
+
# @param id [Integer] The item parameter id
|
418
|
+
# @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
|
424
424
|
end
|