avatax 18.10.4 → 18.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 942efd18c56cc34488053835d09455aaefe85bf820a11f6f4523242cf0aaf921
4
- data.tar.gz: 3c82787b0124aca3dcc74ccdf802519a45581c723d1cdbbb09039b6477935731
3
+ metadata.gz: 132060abc63d39b7ecf6c2fc8f095a13968cebb10f54ada77b56dc4385a1ed70
4
+ data.tar.gz: ccb1b50a25333bba9b97734548605cabbf936c0922bbe1e7587faa189ffa0eb3
5
5
  SHA512:
6
- metadata.gz: 00e5bbb63181a933ee7a5d932db2eff61aa1edf681c20fd8aaf7600dc5540556010184268a6cd00a9f53942bdca6bf9f346ed94e060177f2b30f32d4acb50890
7
- data.tar.gz: 96fa7eb1613bf6b6119f034c2ddf02dc3db174b4ae536b4f2833e1334b65fa42bf3c9cc1f84438a8ab5a846fc488d704fb2fdabce425fa46693899235232872b
6
+ metadata.gz: 6becd1f888c411a2ccb827dafe92eb93e4930592793cd1c027fdb8b8f6794d5532b0a7e2d0f73bb88c5c11547247f7c69093a7a6f724e7a936d0fe884b0efd9b
7
+ data.tar.gz: 8ef5a68756f65523037acbcd6c37646f10587b67057541af65d60baf04acaf5dfd76ec5d6a0d7ce53b2d4c4f002055eef648150349a25174014096ea26a06d0a
@@ -39,12 +39,11 @@ module AvaTax
39
39
  # If you have not read or accepted the terms and conditions, this API call will return the
40
40
  # unchanged account model.
41
41
  # @param id [Integer] The ID of the account to activate
42
- # @param include [String] Elements to include when fetching the account
43
42
  # @param model [Object] The activation request
44
43
  # @return [Object]
45
- def activate_account(id, model, options={})
44
+ def activate_account(id, model)
46
45
  path = "/api/v2/accounts/#{id}/activate"
47
- post(path, model, options)
46
+ post(path, model)
48
47
  end
49
48
 
50
49
 
@@ -29,7 +29,7 @@ module AvaTax
29
29
  # Retrieve a single AvaFileForm
30
30
  #
31
31
  # Get the AvaFileForm object identified by this URL.
32
- # @param id [String] The primary key of this AvaFileForm
32
+ # @param id [Integer] The primary key of this AvaFileForm
33
33
  # @return [Object]
34
34
  def get_ava_file_form(id)
35
35
  path = "/api/v2/avafileforms/#{id}"
@@ -25,11 +25,12 @@ module AvaTax
25
25
  # certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
26
26
  # storage for this company, call `RequestCertificateSetup`.
27
27
  # @param companyId [Integer] The ID number of the company recording this certificate
28
+ # @param preValidatedExemptionReason [Boolean] If set to true, the certificate will bypass the human verification process.
28
29
  # @param model [CertificateModel[]] Certificates to be created
29
30
  # @return [CertificateModel[]]
30
- def create_certificates(companyId, model)
31
+ def create_certificates(companyId, model, options={})
31
32
  path = "/api/v2/companies/#{companyId}/certificates"
32
- post(path, model)
33
+ post(path, model, options)
33
34
  end
34
35
 
35
36
 
@@ -151,15 +151,15 @@ module AvaTax
151
151
  # Retrieve a list of all configuration settings tied to this company.
152
152
  #
153
153
  # Configuration settings provide you with the ability to control features of your account and of your
154
- # tax software. The category names `AvaCertServiceConfig` is reserved for
155
- # Avalara internal software configuration values; to store your own account-level settings, please
154
+ # tax software. The category name `AvaCertServiceConfig` is reserved for
155
+ # Avalara internal software configuration values; to store your own company-level settings, please
156
156
  # create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
157
157
  #
158
158
  # Company settings are permanent settings that cannot be deleted. You can set the value of a
159
- # company setting to null if desired.
159
+ # company setting to null if desired and if the particular setting supports it.
160
160
  #
161
- # Avalara-based account settings for `AvaCertServiceConfig` affect your account's exemption certificate
162
- # processing, and should only be changed with care.
161
+ # Avalara-based company settings for `AvaCertServiceConfig` affect your company's exemption certificate
162
+ # processing, and should be changed with care.
163
163
  # @param id [Integer]
164
164
  # @return [CompanyConfigurationModel[]]
165
165
  def get_company_configuration(id)
@@ -247,20 +247,20 @@ module AvaTax
247
247
  end
248
248
 
249
249
 
250
- # Change configuration settings for this account
250
+ # Change configuration settings for this company
251
251
  #
252
- # Update configuration settings tied to this account.
252
+ # Update configuration settings tied to this company.
253
253
  #
254
254
  # Configuration settings provide you with the ability to control features of your account and of your
255
255
  # tax software. The category names `AvaCertServiceConfig` is reserved for
256
- # Avalara internal software configuration values; to store your own account-level settings, please
256
+ # Avalara internal software configuration values; to store your own company-level settings, please
257
257
  # create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
258
258
  #
259
259
  # Company settings are permanent settings that cannot be deleted. You can set the value of a
260
- # company setting to null if desired.
260
+ # company setting to null if desired and if the particular setting supports it.
261
261
  #
262
- # Avalara-based account settings for `AvaCertServiceConfig` affect your account's exemption certificate
263
- # processing, and should only be changed with care.
262
+ # Avalara-based company settings for `AvaCertServiceConfig` affect your company's exemption certificate
263
+ # processing, and should be changed with care.
264
264
  # @param id [Integer]
265
265
  # @param model [CompanyConfigurationModel[]]
266
266
  # @return [CompanyConfigurationModel[]]
@@ -27,8 +27,8 @@ module AvaTax
27
27
  # Test whether a form supports online login verification
28
28
  #
29
29
  # This API is intended to be useful to identify whether the user should be allowed
30
- # to automatically verify their login and password.
31
- # @param form [String] The name of the form you would like to verify. This can be the tax form code or the legacy return name
30
+ # to automatically verify their login and password. This API will provide a result only if the form supports automatic online login verification.
31
+ # @param form [String] The name of the form you would like to verify. This is the tax form code
32
32
  # @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/) .
33
33
  # @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.
34
34
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
@@ -640,6 +640,22 @@ module AvaTax
640
640
  end
641
641
 
642
642
 
643
+ # Retrieve the parameters by companyCode and itemCode.
644
+ #
645
+ # Returns the list of parameters based on the company country and state jurisdiction and the item code.
646
+ # @param companyCode [String] Company code.
647
+ # @param itemCode [String] Item code.
648
+ # @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/) .
649
+ # @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.
650
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
651
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
652
+ # @return [FetchResult]
653
+ def list_parameters_by_item(companyCode, itemCode, options={})
654
+ path = "/api/v2/definitions/parameters/byitem/#{companyCode}/#{itemCode}"
655
+ get(path, options)
656
+ end
657
+
658
+
643
659
  # Retrieve the full list of Avalara-supported permissions
644
660
  #
645
661
  # Returns the full list of Avalara-supported permission types.
@@ -689,6 +705,41 @@ module AvaTax
689
705
  end
690
706
 
691
707
 
708
+ # List all available product classification systems.
709
+ #
710
+ # List all available product classification systems.
711
+ #
712
+ # Tax authorities use product classification systems as a way to identify products and associate them with a tax rate.
713
+ # More than one tax authority might use the same product classification system, but they might charge different tax rates for products.
714
+ # @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/) .
715
+ # @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.
716
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
717
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
718
+ # @return [FetchResult]
719
+ def list_product_classification_systems(options={})
720
+ path = "/api/v2/definitions/productclassificationsystems"
721
+ get(path, options)
722
+ end
723
+
724
+
725
+ # List all product classification systems available to a company based on its nexus.
726
+ #
727
+ # Lists all product classification systems available to a company based on its nexus.
728
+ #
729
+ # Tax authorities use product classification systems as a way to identify products and associate them with a tax rate.
730
+ # More than one tax authority might use the same product classification system, but they might charge different tax rates for products.
731
+ # @param companyCode [String] The company code.
732
+ # @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/) .
733
+ # @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.
734
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
735
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
736
+ # @return [FetchResult]
737
+ def list_product_classification_systems_by_company(companyCode, options={})
738
+ path = "/api/v2/definitions/productclassificationsystems/bycompany/#{companyCode}"
739
+ get(path, options)
740
+ end
741
+
742
+
692
743
  # Retrieve the full list of rate types for each country
693
744
  #
694
745
  # Returns the full list of Avalara-supported rate type file types
@@ -257,7 +257,7 @@ module AvaTax
257
257
  # @param companyId [Integer] The ID of the company that owns the filings.
258
258
  # @param id [Integer] The id of the filing return your retrieving
259
259
  # @param details [Boolean] Indicates if you would like the credit details returned
260
- # @return [FetchResult]
260
+ # @return [Object]
261
261
  def get_filing_return(companyId, id, options={})
262
262
  path = "/api/v2/companies/#{companyId}/filings/returns/#{id}"
263
263
  get(path, options)
@@ -3,6 +3,48 @@ module AvaTax
3
3
  module Items
4
4
 
5
5
 
6
+ # Add classifications to an item.
7
+ #
8
+ # Add classifications to an 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
+ # An item may only have one classification per tax system.
15
+ # @param companyId [Integer] The company id.
16
+ # @param itemId [Integer] The item id.
17
+ # @param model [ItemClassificationInputModel[]] The item classifications you wish to create.
18
+ # @return [ItemClassificationOutputModel[]]
19
+ def create_item_classifications(companyId, itemId, model)
20
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
21
+ post(path, model)
22
+ end
23
+
24
+
25
+ # Add parameters to an item.
26
+ #
27
+ # Add parameters to an item.
28
+ #
29
+ # 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".
30
+ #
31
+ # 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 .
32
+ #
33
+ # A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
34
+ #
35
+ # To see available parameters for this item, call `/api/v2/definitions/parameters?$filter=attributeType eq Product`
36
+ #
37
+ # 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.
38
+ # @param companyId [Integer] The ID of the company that owns this item parameter.
39
+ # @param itemId [Integer] The item id.
40
+ # @param model [ItemParameterModel[]] The item parameters you wish to create.
41
+ # @return [ItemParameterModel[]]
42
+ def create_item_parameters(companyId, itemId, model)
43
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
44
+ post(path, model)
45
+ end
46
+
47
+
6
48
  # Create a new item
7
49
  #
8
50
  # Creates one or more new item objects attached to this company.
@@ -12,6 +54,8 @@ module AvaTax
12
54
  # and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
13
55
  # from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
14
56
  # team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
57
+ #
58
+ # The tax code takes precedence over the tax code id if both are provided.
15
59
  # @param companyId [Integer] The ID of the company that owns this item.
16
60
  # @param model [ItemModel[]] The item you wish to create.
17
61
  # @return [ItemModel[]]
@@ -23,13 +67,15 @@ module AvaTax
23
67
 
24
68
  # Delete a single item
25
69
  #
26
- # Marks the item object at this URL as deleted.
70
+ # Deletes the item object at this URL.
27
71
  #
28
72
  # Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
29
73
  # can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions,
30
74
  # and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters
31
75
  # from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
32
76
  # team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
77
+ #
78
+ # Deleting an item will also delete the parameters and classifications associated with that item.
33
79
  # @param companyId [Integer] The ID of the company that owns this item.
34
80
  # @param id [Integer] The ID of the item you wish to delete.
35
81
  # @return [ErrorDetail[]]
@@ -39,6 +85,42 @@ module AvaTax
39
85
  end
40
86
 
41
87
 
88
+ # Delete a single item classification.
89
+ #
90
+ # Delete a single item classification.
91
+ #
92
+ # 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.
93
+ #
94
+ # When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
95
+ # @param companyId [Integer] The company id.
96
+ # @param itemId [Integer] The item id.
97
+ # @param id [Integer] The item classification id.
98
+ # @return [ErrorDetail[]]
99
+ def delete_item_classification(companyId, itemId, id)
100
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
101
+ delete(path)
102
+ end
103
+
104
+
105
+ # Delete a single item parameter
106
+ #
107
+ # Delete a single item parameter.
108
+ #
109
+ # 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".
110
+ #
111
+ # 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 .
112
+ #
113
+ # A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
114
+ # @param companyId [Integer] The company id
115
+ # @param itemId [Integer] The item id
116
+ # @param id [Integer] The parameter id
117
+ # @return [ErrorDetail[]]
118
+ def delete_item_parameter(companyId, itemId, id)
119
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
120
+ delete(path)
121
+ end
122
+
123
+
42
124
  # Retrieve a single item
43
125
  #
44
126
  # Get the `Item` object identified by this URL.
@@ -50,13 +132,98 @@ module AvaTax
50
132
  # team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
51
133
  # @param companyId [Integer] The ID of the company that owns this item object
52
134
  # @param id [Integer] The primary key of this item
135
+ # @param include [String] A comma separated list of additional data to retrieve.
53
136
  # @return [Object]
54
- def get_item(companyId, id)
137
+ def get_item(companyId, id, options={})
55
138
  path = "/api/v2/companies/#{companyId}/items/#{id}"
139
+ get(path, options)
140
+ end
141
+
142
+
143
+ # Retrieve a single item classification.
144
+ #
145
+ # Retrieve a single item classification.
146
+ #
147
+ # 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.
148
+ #
149
+ # When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
150
+ # @param companyId [Integer] The company id.
151
+ # @param itemId [Integer] The item id.
152
+ # @param id [Integer] The item classification id.
153
+ # @return [Object]
154
+ def get_item_classification(companyId, itemId, id)
155
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
156
+ get(path)
157
+ end
158
+
159
+
160
+ # Retrieve a single item parameter
161
+ #
162
+ # Retrieve a single item parameter.
163
+ #
164
+ # 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".
165
+ #
166
+ # 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 .
167
+ #
168
+ # A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
169
+ # @param companyId [Integer] The company id
170
+ # @param itemId [Integer] The item id
171
+ # @param id [Integer] The parameter id
172
+ # @return [Object]
173
+ def get_item_parameter(companyId, itemId, id)
174
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
56
175
  get(path)
57
176
  end
58
177
 
59
178
 
179
+ # Retrieve classifications for an item.
180
+ #
181
+ # List classifications for an item.
182
+ #
183
+ # 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.
184
+ #
185
+ # When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
186
+ #
187
+ # 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/) .
188
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` classifications.
189
+ # @param companyId [Integer] The company id.
190
+ # @param itemId [Integer] The item id.
191
+ # @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/) .
192
+ # @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.
193
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
194
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
195
+ # @return [FetchResult]
196
+ def list_item_classifications(companyId, itemId, options={})
197
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
198
+ get(path, options)
199
+ end
200
+
201
+
202
+ # Retrieve parameters for an item
203
+ #
204
+ # List parameters for an item.
205
+ #
206
+ # 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".
207
+ #
208
+ # 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 .
209
+ #
210
+ # A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
211
+ #
212
+ # 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/) .
213
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
214
+ # @param companyId [Integer] The company id
215
+ # @param itemId [Integer] The item id
216
+ # @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/) .
217
+ # @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.
218
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
219
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
220
+ # @return [FetchResult]
221
+ def list_item_parameters(companyId, itemId, options={})
222
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
223
+ get(path, options)
224
+ end
225
+
226
+
60
227
  # Retrieve items for this company
61
228
  #
62
229
  # List all items defined for the current company.
@@ -73,7 +240,8 @@ module AvaTax
73
240
  #
74
241
  # 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:
75
242
  #
76
- # * Attributes
243
+ # * Parameters
244
+ # * Classifications
77
245
  # @param companyId [Integer] The ID of the company that defined these items
78
246
  # @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/) .
79
247
  # @param include [String] A comma separated list of additional data to retrieve.
@@ -100,10 +268,6 @@ module AvaTax
100
268
  # 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/) .
101
269
  #
102
270
  # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
103
- #
104
- # 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:
105
- #
106
- # * Attributes
107
271
  # @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/) .
108
272
  # @param include [String] A comma separated list of additional data to retrieve.
109
273
  # @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.
@@ -128,6 +292,8 @@ module AvaTax
128
292
  #
129
293
  # All data from the existing object will be replaced with data in the object you PUT. To set a field's value to null,
130
294
  # you may either set its value to null or omit that field from the object you post.
295
+ #
296
+ # The tax code takes precedence over the tax code id if both are provided.
131
297
  # @param companyId [Integer] The ID of the company that this item belongs to.
132
298
  # @param id [Integer] The ID of the item you wish to update
133
299
  # @param model [Object] The item object you wish to update.
@@ -137,6 +303,46 @@ module AvaTax
137
303
  put(path, model)
138
304
  end
139
305
 
306
+
307
+ # Update an item classification.
308
+ #
309
+ # Update an item classification.
310
+ #
311
+ # 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.
312
+ #
313
+ # When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
314
+ #
315
+ # An item may only have one classification per tax system.
316
+ # @param companyId [Integer] The company id.
317
+ # @param itemId [Integer] The item id.
318
+ # @param id [Integer] The item classification id.
319
+ # @param model [Object] The item object you wish to update.
320
+ # @return [Object]
321
+ def update_item_classification(companyId, itemId, id, model)
322
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
323
+ put(path, model)
324
+ end
325
+
326
+
327
+ # Update an item parameter
328
+ #
329
+ # Update an item parameter.
330
+ #
331
+ # 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".
332
+ #
333
+ # 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 .
334
+ #
335
+ # A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
336
+ # @param companyId [Integer] The company id.
337
+ # @param itemId [Integer] The item id
338
+ # @param id [Integer] The item parameter id
339
+ # @param model [Object] The item object you wish to update.
340
+ # @return [Object]
341
+ def update_item_parameter(companyId, itemId, id, model)
342
+ path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
343
+ put(path, model)
344
+ end
345
+
140
346
  end
141
347
  end
142
348
  end
@@ -114,11 +114,12 @@ module AvaTax
114
114
  # This API is only available for Avalara Registrar Admins, and can be used to reset the password of any
115
115
  # user based on internal Avalara business processes.
116
116
  # @param userId [Integer] The unique ID of the user whose password will be changed
117
+ # @param unmigrateFromAi [Boolean] If user's password was migrated to AI, undo this.
117
118
  # @param model [Object] The new password for this user
118
119
  # @return [String]
119
- def reset_password(userId, model)
120
+ def reset_password(userId, model, options={})
120
121
  path = "/api/v2/passwords/#{userId}/reset"
121
- post(path, model)
122
+ post(path, model, options)
122
123
  end
123
124
 
124
125
 
@@ -351,6 +351,7 @@ module AvaTax
351
351
  # * Addresses
352
352
  # * SummaryOnly (omit lines and details - reduces API response size)
353
353
  # * LinesOnly (omit details - reduces API response size)
354
+ # * TaxDetailsByTaxType - Includes the aggregated tax, exempt tax, taxable and non-taxable for each tax type returned in the transaction summary.
354
355
  # @param id [Integer] The unique ID number of the transaction to retrieve
355
356
  # @param include [String] Specifies objects to include in this fetch call
356
357
  # @return [Object]
@@ -541,7 +542,7 @@ module AvaTax
541
542
  # @param companyCode [String] The company code of the company that recorded this transaction
542
543
  # @param transactionCode [String] The transaction code to void
543
544
  # @param documentType [String] (Optional): The document type of the transaction to void. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
544
- # @param model [Object] The void request you wish to execute
545
+ # @param model [Object] The void request you wish to execute. To void a transaction the code must be set to 'DocVoided'
545
546
  # @return [Object]
546
547
  def void_transaction(companyCode, transactionCode, model, options={})
547
548
  path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/void"
@@ -1,3 +1,3 @@
1
1
  module AvaTax
2
- VERSION = '18.10.4'.freeze unless defined?(::AvaTax::VERSION)
2
+ VERSION = '18.12.0'.freeze unless defined?(::AvaTax::VERSION)
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avatax
3
3
  version: !ruby/object:Gem::Version
4
- version: 18.10.4
4
+ version: 18.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcus Vorwaller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-04 00:00:00.000000000 Z
11
+ date: 2019-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake