avatax 20.5.0 → 20.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avatax/client/accounts.rb +116 -83
  3. data/lib/avatax/client/addresses.rb +26 -20
  4. data/lib/avatax/client/advancedrules.rb +56 -41
  5. data/lib/avatax/client/avafileforms.rb +56 -41
  6. data/lib/avatax/client/batches.rb +125 -48
  7. data/lib/avatax/client/certexpressinvites.rb +36 -27
  8. data/lib/avatax/client/certificates.rb +156 -111
  9. data/lib/avatax/client/companies.rb +166 -118
  10. data/lib/avatax/client/compliance.rb +16 -13
  11. data/lib/avatax/client/contacts.rb +66 -48
  12. data/lib/avatax/client/customers.rb +136 -97
  13. data/lib/avatax/client/datasources.rb +66 -48
  14. data/lib/avatax/client/definitions.rb +596 -419
  15. data/lib/avatax/client/distancethresholds.rb +66 -48
  16. data/lib/avatax/client/filingcalendars.rb +16 -13
  17. data/lib/avatax/client/filings.rb +16 -13
  18. data/lib/avatax/client/firmclientlinkages.rb +96 -69
  19. data/lib/avatax/client/free.rb +36 -27
  20. data/lib/avatax/client/fundingrequests.rb +26 -20
  21. data/lib/avatax/client/items.rb +196 -139
  22. data/lib/avatax/client/jurisdictionoverrides.rb +66 -48
  23. data/lib/avatax/client/locations.rb +76 -55
  24. data/lib/avatax/client/multidocument.rb +106 -76
  25. data/lib/avatax/client/nexus.rb +82 -183
  26. data/lib/avatax/client/notifications.rb +36 -27
  27. data/lib/avatax/client/provisioning.rb +26 -20
  28. data/lib/avatax/client/registrar.rb +106 -76
  29. data/lib/avatax/client/reports.rb +46 -34
  30. data/lib/avatax/client/settings.rb +66 -48
  31. data/lib/avatax/client/subscriptions.rb +36 -27
  32. data/lib/avatax/client/taxcodes.rb +66 -48
  33. data/lib/avatax/client/taxcontent.rb +36 -27
  34. data/lib/avatax/client/taxrules.rb +66 -48
  35. data/lib/avatax/client/transactions.rb +216 -153
  36. data/lib/avatax/client/upcs.rb +66 -48
  37. data/lib/avatax/client/users.rb +86 -62
  38. data/lib/avatax/client/utilities.rb +36 -27
  39. data/lib/avatax/version.rb +1 -1
  40. metadata +2 -2
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module Free
4
-
5
-
6
- # FREE API - Request a free trial of AvaTax
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Free
4
+
5
+
6
+ # FREE API - Request a free trial of AvaTax
7
+ #
8
8
  # Call this API to obtain a free AvaTax account.
9
9
  #
10
10
  # This API is free to use. No authentication credentials are required to call this API. You must read and
@@ -18,14 +18,17 @@ module AvaTax
18
18
  #
19
19
  # ### Security Policies
20
20
  #
21
- # * This API may be called without providing authentication credentials.
21
+ # * This API may be called without providing authentication credentials.
22
22
  # @param model [Object] Required information to provision a free trial account.
23
- # @return [Object]
24
- def request_free_trial(model) path = "/api/v2/accounts/freetrials/request"
25
- post(path, model) end
26
-
27
- # FREE API - Sales tax rates for a specified address
28
- #
23
+ # @return [Object]
24
+ def request_free_trial(model)
25
+ path = "/api/v2/accounts/freetrials/request"
26
+ post(path, model)
27
+ end
28
+
29
+
30
+ # FREE API - Sales tax rates for a specified address
31
+ #
29
32
  # # Free-To-Use
30
33
  #
31
34
  # The TaxRates API is a free-to-use, no cost option for estimating sales tax rates.
@@ -50,7 +53,7 @@ module AvaTax
50
53
  # * And more!
51
54
  #
52
55
  # Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
53
- # for information on how to upgrade to the full AvaTax CreateTransaction API.
56
+ # for information on how to upgrade to the full AvaTax CreateTransaction API.
54
57
  # @param line1 [String] The street address of the location.
55
58
  # @param line2 [String] The street address of the location.
56
59
  # @param line3 [String] The street address of the location.
@@ -58,12 +61,15 @@ module AvaTax
58
61
  # @param region [String] Name or ISO 3166 code identifying the region within the country. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`.
59
62
  # @param postalCode [String] The postal code of the location.
60
63
  # @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
61
- # @return [Object]
62
- def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress"
63
- get(path, options) end
64
-
65
- # FREE API - Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
66
- #
64
+ # @return [Object]
65
+ def tax_rates_by_address(options={})
66
+ path = "/api/v2/taxrates/byaddress"
67
+ get(path, options)
68
+ end
69
+
70
+
71
+ # FREE API - Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
72
+ #
67
73
  # # Free-To-Use
68
74
  #
69
75
  # This API is only available for a US postal codes.
@@ -90,12 +96,15 @@ module AvaTax
90
96
  # * And more!
91
97
  #
92
98
  # Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
93
- # for information on how to upgrade to the full AvaTax CreateTransaction API.
99
+ # for information on how to upgrade to the full AvaTax CreateTransaction API.
94
100
  # @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
95
101
  # @param postalCode [String] The postal code of the location.
96
- # @return [Object]
97
- def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode"
98
- get(path, options) end
99
- end
100
- end
102
+ # @return [Object]
103
+ def tax_rates_by_postal_code(options={})
104
+ path = "/api/v2/taxrates/bypostalcode"
105
+ get(path, options)
106
+ end
107
+
108
+ end
109
+ end
101
110
  end
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module FundingRequests
4
-
5
-
6
- # Request the javascript for a funding setup widget
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module FundingRequests
4
+
5
+
6
+ # Request the javascript for a funding setup widget
7
+ #
8
8
  # This API is available by invitation only.
9
9
  # Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are
10
10
  # required to setup their funding configuration before Avalara can begin filing tax returns on their
@@ -21,14 +21,17 @@ module AvaTax
21
21
  # ### Security Policies
22
22
  #
23
23
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
24
- # * 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.
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
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
- #
26
+ # @return [Object]
27
+ def activate_funding_request(id)
28
+ path = "/api/v2/fundingrequests/#{id}/widget"
29
+ get(path)
30
+ end
31
+
32
+
33
+ # Retrieve status about a funding setup request
34
+ #
32
35
  # This API is available by invitation only.
33
36
  # Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are
34
37
  # required to setup their funding configuration before Avalara can begin filing tax returns on their
@@ -43,11 +46,14 @@ module AvaTax
43
46
  # ### Security Policies
44
47
  #
45
48
  # * 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.
49
+ # * 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
50
  # @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
51
+ # @return [Object]
52
+ def funding_request_status(id)
53
+ path = "/api/v2/fundingrequests/#{id}"
54
+ get(path)
55
+ end
56
+
57
+ end
58
+ end
53
59
  end
@@ -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,18 @@ 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)
21
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
22
+ delete(path)
23
+ end
24
+
25
+
26
+ # Delete all parameters for an item
27
+ #
25
28
  # Delete all the parameters for a given item.
26
29
  #
27
30
  # 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 +35,18 @@ module AvaTax
32
35
  #
33
36
  # ### Security Policies
34
37
  #
35
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
38
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
36
39
  # @param companyId [Integer] The ID of the company that owns this item.
37
40
  # @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
- #
41
+ # @return [ErrorDetail[]]
42
+ def batch_delete_item_parameters(companyId, itemId)
43
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
44
+ delete(path)
45
+ end
46
+
47
+
48
+ # Add classifications to an item.
49
+ #
44
50
  # Add classifications to an item.
45
51
  #
46
52
  # 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 +57,19 @@ module AvaTax
51
57
  #
52
58
  # ### Security Policies
53
59
  #
54
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
60
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
55
61
  # @param companyId [Integer] The company id.
56
62
  # @param itemId [Integer] The item id.
57
63
  # @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
+ # @return [ItemClassificationOutputModel[]]
65
+ def create_item_classifications(companyId, itemId, model)
66
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
67
+ post(path, model)
68
+ end
69
+
70
+
71
+ # Add parameters to an item.
72
+ #
64
73
  # Add parameters to an item.
65
74
  #
66
75
  # 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 +84,19 @@ module AvaTax
75
84
  #
76
85
  # ### Security Policies
77
86
  #
78
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
87
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
79
88
  # @param companyId [Integer] The ID of the company that owns this item parameter.
80
89
  # @param itemId [Integer] The item id.
81
90
  # @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
- #
91
+ # @return [ItemParameterModel[]]
92
+ def create_item_parameters(companyId, itemId, model)
93
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
94
+ post(path, model)
95
+ end
96
+
97
+
98
+ # Create a new item
99
+ #
88
100
  # Creates one or more new item objects attached to this company.
89
101
  #
90
102
  # Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
@@ -97,15 +109,18 @@ module AvaTax
97
109
  #
98
110
  # ### Security Policies
99
111
  #
100
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
112
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
101
113
  # @param companyId [Integer] The ID of the company that owns this item.
102
114
  # @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
- #
115
+ # @return [ItemModel[]]
116
+ def create_items(companyId, model)
117
+ path = "/api/v2/companies/#{companyId}/items"
118
+ post(path, model)
119
+ end
120
+
121
+
122
+ # Delete a single item
123
+ #
109
124
  # Deletes the item object at this URL.
110
125
  #
111
126
  # Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
@@ -118,15 +133,18 @@ module AvaTax
118
133
  #
119
134
  # ### Security Policies
120
135
  #
121
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
136
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
122
137
  # @param companyId [Integer] The ID of the company that owns this item.
123
138
  # @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
- #
139
+ # @return [ErrorDetail[]]
140
+ def delete_item(companyId, id)
141
+ path = "/api/v2/companies/#{companyId}/items/#{id}"
142
+ delete(path)
143
+ end
144
+
145
+
146
+ # Delete a single item classification.
147
+ #
130
148
  # Delete a single item classification.
131
149
  #
132
150
  # 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 +153,19 @@ module AvaTax
135
153
  #
136
154
  # ### Security Policies
137
155
  #
138
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
156
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
139
157
  # @param companyId [Integer] The company id.
140
158
  # @param itemId [Integer] The item id.
141
159
  # @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
- #
160
+ # @return [ErrorDetail[]]
161
+ def delete_item_classification(companyId, itemId, id)
162
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
163
+ delete(path)
164
+ end
165
+
166
+
167
+ # Delete a single item parameter
168
+ #
148
169
  # Delete a single item parameter.
149
170
  #
150
171
  # 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 +176,19 @@ module AvaTax
155
176
  #
156
177
  # ### Security Policies
157
178
  #
158
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
179
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
159
180
  # @param companyId [Integer] The company id
160
181
  # @param itemId [Integer] The item id
161
182
  # @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
- #
183
+ # @return [ErrorDetail[]]
184
+ def delete_item_parameter(companyId, itemId, id)
185
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
186
+ delete(path)
187
+ end
188
+
189
+
190
+ # Retrieve a single item
191
+ #
168
192
  # Get the `Item` object identified by this URL.
169
193
  #
170
194
  # Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
@@ -175,16 +199,19 @@ module AvaTax
175
199
  #
176
200
  # ### Security Policies
177
201
  #
178
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
202
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
179
203
  # @param companyId [Integer] The ID of the company that owns this item object
180
204
  # @param id [Integer] The primary key of this item
181
205
  # @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
- #
206
+ # @return [Object]
207
+ def get_item(companyId, id, options={})
208
+ path = "/api/v2/companies/#{companyId}/items/#{id}"
209
+ get(path, options)
210
+ end
211
+
212
+
213
+ # Retrieve a single item classification.
214
+ #
188
215
  # Retrieve a single item classification.
189
216
  #
190
217
  # 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 +220,19 @@ module AvaTax
193
220
  #
194
221
  # ### Security Policies
195
222
  #
196
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
223
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
197
224
  # @param companyId [Integer] The company id.
198
225
  # @param itemId [Integer] The item id.
199
226
  # @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
- #
227
+ # @return [Object]
228
+ def get_item_classification(companyId, itemId, id)
229
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
230
+ get(path)
231
+ end
232
+
233
+
234
+ # Retrieve a single item parameter
235
+ #
206
236
  # Retrieve a single item parameter.
207
237
  #
208
238
  # 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 +243,19 @@ module AvaTax
213
243
  #
214
244
  # ### Security Policies
215
245
  #
216
- # * 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.
217
247
  # @param companyId [Integer] The company id
218
248
  # @param itemId [Integer] The item id
219
249
  # @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
- #
250
+ # @return [Object]
251
+ def get_item_parameter(companyId, itemId, id)
252
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
253
+ get(path)
254
+ end
255
+
256
+
257
+ # Retrieve classifications for an item.
258
+ #
226
259
  # List classifications for an item.
227
260
  #
228
261
  # 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 +267,22 @@ module AvaTax
234
267
  #
235
268
  # ### Security Policies
236
269
  #
237
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
270
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
238
271
  # @param companyId [Integer] The company id.
239
272
  # @param itemId [Integer] The item id.
240
273
  # @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
274
  # @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
275
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
243
276
  # @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
- #
277
+ # @return [FetchResult]
278
+ def list_item_classifications(companyId, itemId, options={})
279
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
280
+ get(path, options)
281
+ end
282
+
283
+
284
+ # Retrieve parameters for an item
285
+ #
250
286
  # List parameters for an item.
251
287
  #
252
288
  # 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 +296,22 @@ module AvaTax
260
296
  #
261
297
  # ### Security Policies
262
298
  #
263
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
299
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
264
300
  # @param companyId [Integer] The company id
265
301
  # @param itemId [Integer] The item id
266
302
  # @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
303
  # @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
304
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
269
305
  # @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
- #
306
+ # @return [FetchResult]
307
+ def list_item_parameters(companyId, itemId, options={})
308
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
309
+ get(path, options)
310
+ end
311
+
312
+
313
+ # Retrieve items for this company
314
+ #
276
315
  # List all items defined for the current company.
277
316
  #
278
317
  # Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
@@ -292,19 +331,22 @@ module AvaTax
292
331
  #
293
332
  # ### Security Policies
294
333
  #
295
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
334
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
296
335
  # @param companyId [Integer] The ID of the company that defined these items
297
336
  # @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
337
  # @param include [String] A comma separated list of additional data to retrieve.
299
338
  # @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
339
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
301
340
  # @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
- #
341
+ # @return [FetchResult]
342
+ def list_items_by_company(companyId, options={})
343
+ path = "/api/v2/companies/#{companyId}/items"
344
+ get(path, options)
345
+ end
346
+
347
+
348
+ # Retrieve all items
349
+ #
308
350
  # Get multiple item objects across all companies.
309
351
  #
310
352
  # Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
@@ -319,18 +361,21 @@ module AvaTax
319
361
  #
320
362
  # ### Security Policies
321
363
  #
322
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
364
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
323
365
  # @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
366
  # @param include [String] A comma separated list of additional data to retrieve.
325
367
  # @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
368
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
327
369
  # @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
- #
370
+ # @return [FetchResult]
371
+ def query_items(options={})
372
+ path = "/api/v2/items"
373
+ get(path, options)
374
+ end
375
+
376
+
377
+ # Sync items from a product catalog
378
+ #
334
379
  # Syncs a list of items with AvaTax without waiting for them to be created. It is ideal for syncing large product catalogs
335
380
  # with AvaTax.
336
381
  #
@@ -346,15 +391,18 @@ module AvaTax
346
391
  #
347
392
  # ### Security Policies
348
393
  #
349
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
394
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
350
395
  # @param companyId [Integer] The ID of the company that owns this item.
351
396
  # @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
- #
397
+ # @return [Object]
398
+ def sync_items(companyId, model)
399
+ path = "/api/v2/companies/#{companyId}/items/sync"
400
+ post(path, model)
401
+ end
402
+
403
+
404
+ # Update a single item
405
+ #
358
406
  # Replace the existing `Item` object at this URL with an updated object.
359
407
  #
360
408
  # Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
@@ -370,16 +418,19 @@ module AvaTax
370
418
  #
371
419
  # ### Security Policies
372
420
  #
373
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
421
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
374
422
  # @param companyId [Integer] The ID of the company that this item belongs to.
375
423
  # @param id [Integer] The ID of the item you wish to update
376
424
  # @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
- #
425
+ # @return [Object]
426
+ def update_item(companyId, id, model)
427
+ path = "/api/v2/companies/#{companyId}/items/#{id}"
428
+ put(path, model)
429
+ end
430
+
431
+
432
+ # Update an item classification.
433
+ #
383
434
  # Update an item classification.
384
435
  #
385
436
  # 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 +441,20 @@ module AvaTax
390
441
  #
391
442
  # ### Security Policies
392
443
  #
393
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
444
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
394
445
  # @param companyId [Integer] The company id.
395
446
  # @param itemId [Integer] The item id.
396
447
  # @param id [Integer] The item classification id.
397
448
  # @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
- #
449
+ # @return [Object]
450
+ def update_item_classification(companyId, itemId, id, model)
451
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
452
+ put(path, model)
453
+ end
454
+
455
+
456
+ # Update an item parameter
457
+ #
404
458
  # Update an item parameter.
405
459
  #
406
460
  # 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 +465,17 @@ module AvaTax
411
465
  #
412
466
  # ### Security Policies
413
467
  #
414
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
468
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
415
469
  # @param companyId [Integer] The company id.
416
470
  # @param itemId [Integer] The item id
417
471
  # @param id [Integer] The item parameter id
418
472
  # @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
473
+ # @return [Object]
474
+ def update_item_parameter(companyId, itemId, id, model)
475
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
476
+ put(path, model)
477
+ end
478
+
479
+ end
480
+ end
424
481
  end