avatax 20.9.0 → 21.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.vs/slnx.sqlite +0 -0
  3. data/lib/avatax/client/accounts.rb +83 -83
  4. data/lib/avatax/client/addresses.rb +21 -21
  5. data/lib/avatax/client/advancedrules.rb +41 -51
  6. data/lib/avatax/client/avafileforms.rb +41 -41
  7. data/lib/avatax/client/batches.rb +62 -62
  8. data/lib/avatax/client/certexpressinvites.rb +39 -39
  9. data/lib/avatax/client/certificates.rb +163 -163
  10. data/lib/avatax/client/companies.rb +157 -156
  11. data/lib/avatax/client/contacts.rb +48 -48
  12. data/lib/avatax/client/customers.rb +145 -145
  13. data/lib/avatax/client/datasources.rb +48 -48
  14. data/lib/avatax/client/definitions.rb +591 -422
  15. data/lib/avatax/client/distancethresholds.rb +48 -48
  16. data/lib/avatax/client/ecms.rb +26 -31
  17. data/lib/avatax/client/ecommercetoken.rb +17 -17
  18. data/lib/avatax/client/errortransactions.rb +27 -15
  19. data/lib/avatax/client/filingcalendars.rb +48 -12
  20. data/lib/avatax/client/filings.rb +23 -21
  21. data/lib/avatax/client/firmclientlinkages.rb +69 -69
  22. data/lib/avatax/client/free.rb +13 -86
  23. data/lib/avatax/client/fundingrequests.rb +20 -20
  24. data/lib/avatax/client/items.rb +255 -137
  25. data/lib/avatax/client/jurisdictionoverrides.rb +48 -48
  26. data/lib/avatax/client/locations.rb +92 -92
  27. data/lib/avatax/client/multidocument.rb +78 -78
  28. data/lib/avatax/client/nexus.rb +133 -105
  29. data/lib/avatax/client/notices.rb +43 -504
  30. data/lib/avatax/client/notifications.rb +27 -27
  31. data/lib/avatax/client/provisioning.rb +20 -20
  32. data/lib/avatax/client/registrar.rb +85 -75
  33. data/lib/avatax/client/reports.rb +44 -35
  34. data/lib/avatax/client/settings.rb +55 -50
  35. data/lib/avatax/client/subscriptions.rb +27 -27
  36. data/lib/avatax/client/taxcodes.rb +48 -48
  37. data/lib/avatax/client/taxcontent.rb +90 -27
  38. data/lib/avatax/client/taxprofiles.rb +14 -10
  39. data/lib/avatax/client/taxrules.rb +50 -50
  40. data/lib/avatax/client/transactions.rb +155 -155
  41. data/lib/avatax/client/upcs.rb +48 -48
  42. data/lib/avatax/client/users.rb +64 -64
  43. data/lib/avatax/client/utilities.rb +27 -27
  44. data/lib/avatax/configuration.rb +1 -1
  45. data/lib/avatax/request.rb +11 -5
  46. data/lib/avatax/version.rb +1 -1
  47. data/spec/avatax/request_spec.rb +25 -0
  48. metadata +12 -4
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module MultiDocument
4
-
5
-
6
- # Adjust a MultiDocument transaction
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module MultiDocument
4
+
5
+
6
+ # Adjust a MultiDocument transaction
7
+ #
8
8
  # Adjusts the current MultiDocument transaction uniquely identified by this URL.
9
9
  #
10
10
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
@@ -27,17 +27,17 @@ module AvaTax
27
27
  # ### Security Policies
28
28
  #
29
29
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
30
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
30
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
31
31
  # @param code [String] The transaction code for this MultiDocument transaction
32
32
  # @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
33
33
  # @param include [String] Specifies objects to include in this fetch call
34
34
  # @param model [Object] The adjust request you wish to execute
35
- # @return [Object]
36
- def adjust_multi_document_transaction(code, type, model, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/adjust"
37
- post(path, model, options) end
38
-
39
- # Get audit information about a MultiDocument transaction
40
- #
35
+ # @return [Object]
36
+ def adjust_multi_document_transaction(code, type, model, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/adjust"
37
+ post(path, model, options) end
38
+
39
+ # Get audit information about a MultiDocument transaction
40
+ #
41
41
  # Retrieve audit information about a MultiDocument transaction stored in AvaTax.
42
42
  #
43
43
  # The audit API retrieves audit information related to a specific MultiDocument transaction. This audit
@@ -64,15 +64,15 @@ module AvaTax
64
64
  # ### Security Policies
65
65
  #
66
66
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
67
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
67
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
68
68
  # @param code [String] The transaction code for this MultiDocument transaction
69
69
  # @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
70
- # @return [Object]
71
- def audit_multi_document_transaction(code, type) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/audit"
72
- get(path) end
73
-
74
- # Commit a MultiDocument transaction
75
- #
70
+ # @return [Object]
71
+ def audit_multi_document_transaction(code, type) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/audit"
72
+ get(path) end
73
+
74
+ # Commit a MultiDocument transaction
75
+ #
76
76
  # Marks a list of transactions by changing its status to `Committed`.
77
77
  #
78
78
  # Transactions that are committed are available to be reported to a tax authority by Avalara Managed Returns.
@@ -93,14 +93,14 @@ module AvaTax
93
93
  # ### Security Policies
94
94
  #
95
95
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
96
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
96
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
97
97
  # @param model [Object] The commit request you wish to execute
98
- # @return [Object]
99
- def commit_multi_document_transaction(model) path = "/api/v2/transactions/multidocument/commit"
100
- post(path, model) end
101
-
102
- # Create a new MultiDocument transaction
103
- #
98
+ # @return [Object]
99
+ def commit_multi_document_transaction(model) path = "/api/v2/transactions/multidocument/commit"
100
+ post(path, model) end
101
+
102
+ # Create a new MultiDocument transaction
103
+ #
104
104
  # Records a new MultiDocument transaction in AvaTax.
105
105
  #
106
106
  # A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can
@@ -145,15 +145,15 @@ module AvaTax
145
145
  # ### Security Policies
146
146
  #
147
147
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
148
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
148
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
149
149
  # @param include [String] Specifies objects to include in the response after transaction is created
150
150
  # @param model [Object] the multi document transaction model
151
- # @return [Object]
152
- def create_multi_document_transaction(model, options={}) path = "/api/v2/transactions/multidocument"
153
- post(path, model, options) end
154
-
155
- # Retrieve a MultiDocument transaction
156
- #
151
+ # @return [Object]
152
+ def create_multi_document_transaction(model, options={}) path = "/api/v2/transactions/multidocument"
153
+ post(path, model, options) end
154
+
155
+ # Retrieve a MultiDocument transaction
156
+ #
157
157
  # Get the current MultiDocument transaction identified by this URL.
158
158
  #
159
159
  # If this transaction was adjusted, the return value of this API will be the current transaction with this code.
@@ -178,16 +178,16 @@ module AvaTax
178
178
  # ### Security Policies
179
179
  #
180
180
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
181
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
182
- # @param code [String]
183
- # @param type [String] (See DocumentType::* for a list of allowable values)
181
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
182
+ # @param code [String] The multidocument code to retrieve
183
+ # @param type [String] The transaction type to retrieve (See DocumentType::* for a list of allowable values)
184
184
  # @param include [String] Specifies objects to include in the response after transaction is created
185
- # @return [Object]
186
- def get_multi_document_transaction_by_code_and_type(code, type, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}"
187
- get(path, options) end
188
-
189
- # Retrieve a MultiDocument transaction by ID
190
- #
185
+ # @return [Object]
186
+ def get_multi_document_transaction_by_code_and_type(code, type, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}"
187
+ get(path, options) end
188
+
189
+ # Retrieve a MultiDocument transaction by ID
190
+ #
191
191
  # Get the unique MultiDocument transaction identified by this URL.
192
192
  #
193
193
  # A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can
@@ -221,15 +221,15 @@ module AvaTax
221
221
  # ### Security Policies
222
222
  #
223
223
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
224
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
224
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
225
225
  # @param id [Integer] The unique ID number of the MultiDocument transaction to retrieve
226
226
  # @param include [String] Specifies objects to include in the response after transaction is created
227
- # @return [Object]
228
- def get_multi_document_transaction_by_id(id, options={}) path = "/api/v2/transactions/multidocument/#{id}"
229
- get(path, options) end
230
-
231
- # Retrieve all MultiDocument transactions
232
- #
227
+ # @return [Object]
228
+ def get_multi_document_transaction_by_id(id, options={}) path = "/api/v2/transactions/multidocument/#{id}"
229
+ get(path, options) end
230
+
231
+ # Retrieve all MultiDocument transactions
232
+ #
233
233
  # List all MultiDocument transactions within this account.
234
234
  #
235
235
  # This endpoint is limited to returning 1,000 MultiDocument transactions at a time. To retrieve more than 1,000 MultiDocument
@@ -261,18 +261,18 @@ module AvaTax
261
261
  # ### Security Policies
262
262
  #
263
263
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
264
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
264
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
265
265
  # @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:* documents
266
266
  # @param include [String] Specifies objects to include in the response after transaction is created
267
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
268
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
269
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_multi_document_transactions(options={}) path = "/api/v2/transactions/multidocument"
272
- get(path, options) end
273
-
274
- # Create a refund for a MultiDocument transaction
275
- #
270
+ # @return [FetchResult]
271
+ def list_multi_document_transactions(options={}) path = "/api/v2/transactions/multidocument"
272
+ get(path, options) end
273
+
274
+ # Create a refund for a MultiDocument transaction
275
+ #
276
276
  # Create a refund for a MultiDocument transaction.
277
277
  #
278
278
  # A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can
@@ -321,17 +321,17 @@ module AvaTax
321
321
  # ### Security Policies
322
322
  #
323
323
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
324
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
324
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
325
325
  # @param code [String] The code of this MultiDocument transaction
326
326
  # @param type [String] The type of this MultiDocument transaction (See DocumentType::* for a list of allowable values)
327
327
  # @param include [String] Specifies objects to include in the response after transaction is created
328
328
  # @param model [Object] Information about the refund to create
329
- # @return [Object]
330
- def refund_multi_document_transaction(code, type, model, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/refund"
331
- post(path, model, options) end
332
-
333
- # Verify a MultiDocument transaction
334
- #
329
+ # @return [Object]
330
+ def refund_multi_document_transaction(code, type, model, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/refund"
331
+ post(path, model, options) end
332
+
333
+ # Verify a MultiDocument transaction
334
+ #
335
335
  # Verifies that the MultiDocument transaction uniquely identified by this URL matches certain expected values.
336
336
  #
337
337
  # If the transaction does not match these expected values, this API will return an error code indicating which value did not match.
@@ -350,14 +350,14 @@ module AvaTax
350
350
  # ### Security Policies
351
351
  #
352
352
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
353
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
353
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
354
354
  # @param model [Object] Information from your accounting system to verify against this MultiDocument transaction as it is stored in AvaTax
355
- # @return [Object]
356
- def verify_multi_document_transaction(model) path = "/api/v2/transactions/multidocument/verify"
357
- post(path, model) end
358
-
359
- # Void a MultiDocument transaction
360
- #
355
+ # @return [Object]
356
+ def verify_multi_document_transaction(model) path = "/api/v2/transactions/multidocument/verify"
357
+ post(path, model) end
358
+
359
+ # Void a MultiDocument transaction
360
+ #
361
361
  # Voids the current transaction uniquely identified by this URL.
362
362
  #
363
363
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
@@ -379,13 +379,13 @@ module AvaTax
379
379
  # ### Security Policies
380
380
  #
381
381
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
382
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
382
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
383
383
  # @param code [String] The transaction code for this MultiDocument transaction
384
384
  # @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
385
385
  # @param model [Object] The void request you wish to execute
386
- # @return [Object]
387
- def void_multi_document_transaction(code, type, model) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/void"
388
- post(path, model) end
389
- end
390
- end
386
+ # @return [Object]
387
+ def void_multi_document_transaction(code, type, model) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/void"
388
+ post(path, model) end
389
+ end
390
+ end
391
391
  end
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module Nexus
4
-
5
-
6
- # Create a new nexus
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Nexus
4
+
5
+
6
+ # Create a new nexus
7
+ #
8
8
  # Creates one or more new nexus declarations attached to this company.
9
9
  #
10
10
  # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
@@ -27,15 +27,15 @@ module AvaTax
27
27
  #
28
28
  # ### Security Policies
29
29
  #
30
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
30
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
31
31
  # @param companyId [Integer] The ID of the company that owns this nexus.
32
32
  # @param model [NexusModel[]] The nexus you wish to create.
33
- # @return [NexusModel[]]
34
- def create_nexus(companyId, model) path = "/api/v2/companies/#{companyId}/nexus"
35
- post(path, model) end
36
-
37
- # Add parameters to a nexus.
38
- #
33
+ # @return [NexusModel[]]
34
+ def create_nexus(companyId, model) path = "/api/v2/companies/#{companyId}/nexus"
35
+ post(path, model) end
36
+
37
+ # Add parameters to a nexus.
38
+ #
39
39
  # Add parameters to the nexus.
40
40
  # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters".
41
41
  #
@@ -49,16 +49,16 @@ module AvaTax
49
49
  #
50
50
  # ### Security Policies
51
51
  #
52
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
52
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
53
53
  # @param companyId [Integer] The ID of the company that owns this nexus parameter.
54
54
  # @param nexusId [Integer] The nexus id.
55
55
  # @param model [NexusParameterDetailModel[]] The nexus parameters you wish to create.
56
- # @return [NexusParameterDetailModel[]]
57
- def create_nexus_parameters(companyId, nexusId, model) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters"
58
- post(path, model) end
59
-
60
- # Creates nexus for a list of addresses.
61
- #
56
+ # @return [NexusParameterDetailModel[]]
57
+ def create_nexus_parameters(companyId, nexusId, model) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters"
58
+ post(path, model) end
59
+
60
+ # Creates nexus for a list of addresses.
61
+ #
62
62
  # This call is intended to simplify adding all applicable nexus to a company, for an address or addresses. Calling this
63
63
  # API declares nexus for this company, for the list of addresses provided,
64
64
  # for the date range provided. You may also use this API to extend effective date on an already-declared nexus.
@@ -77,15 +77,15 @@ module AvaTax
77
77
  #
78
78
  # ### Security Policies
79
79
  #
80
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
80
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
81
81
  # @param companyId [Integer] The ID of the company that will own this nexus.
82
82
  # @param model [DeclareNexusByAddressModel[]] The nexus you wish to create.
83
- # @return [NexusByAddressModel[]]
84
- def declare_nexus_by_address(companyId, model) path = "/api/v2/companies/#{companyId}/nexus/byaddress"
85
- post(path, model) end
86
-
87
- # Delete a single nexus
88
- #
83
+ # @return [NexusByAddressModel[]]
84
+ def declare_nexus_by_address(companyId, model) path = "/api/v2/companies/#{companyId}/nexus/byaddress"
85
+ post(path, model) end
86
+
87
+ # Delete a single nexus
88
+ #
89
89
  # Marks the existing nexus object at this URL as deleted.
90
90
  #
91
91
  # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
@@ -97,16 +97,16 @@ module AvaTax
97
97
  #
98
98
  # ### Security Policies
99
99
  #
100
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
100
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
101
101
  # @param companyId [Integer] The ID of the company that owns this nexus.
102
102
  # @param id [Integer] The ID of the nexus you wish to delete.
103
103
  # @param cascadeDelete [Boolean] If true, deletes all the child nexus if they exist along with parent nexus
104
- # @return [ErrorDetail[]]
105
- def delete_nexus(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{id}"
106
- delete(path, options) end
107
-
108
- # Delete a single nexus parameter
109
- #
104
+ # @return [ErrorDetail[]]
105
+ def delete_nexus(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{id}"
106
+ delete(path, options) end
107
+
108
+ # Delete a single nexus parameter
109
+ #
110
110
  # Delete a single nexus parameter.
111
111
  # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters".
112
112
  #
@@ -116,16 +116,16 @@ module AvaTax
116
116
  #
117
117
  # ### Security Policies
118
118
  #
119
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
119
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
120
120
  # @param companyId [Integer] The company id
121
121
  # @param nexusId [Integer] The nexus id
122
122
  # @param id [Integer] The parameter id
123
- # @return [ErrorDetail[]]
124
- def delete_nexus_parameter(companyId, nexusId, id) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}"
125
- delete(path) end
126
-
127
- # Delete all parameters for an nexus
128
- #
123
+ # @return [ErrorDetail[]]
124
+ def delete_nexus_parameter(companyId, nexusId, id) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}"
125
+ delete(path) end
126
+
127
+ # Delete all parameters for an nexus
128
+ #
129
129
  # Delete all the parameters for a given nexus.
130
130
  # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters".
131
131
  #
@@ -135,15 +135,15 @@ module AvaTax
135
135
  #
136
136
  # ### Security Policies
137
137
  #
138
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
138
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
139
139
  # @param companyId [Integer] The ID of the company that owns this nexus.
140
140
  # @param nexusId [Integer] The ID of the nexus you wish to delete the parameters.
141
- # @return [ErrorDetail[]]
142
- def delete_nexus_parameters(companyId, nexusId) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters"
143
- delete(path) end
144
-
145
- # Retrieve a single nexus
146
- #
141
+ # @return [ErrorDetail[]]
142
+ def delete_nexus_parameters(companyId, nexusId) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters"
143
+ delete(path) end
144
+
145
+ # Retrieve a single nexus
146
+ #
147
147
  # Get the nexus object identified by this URL.
148
148
  #
149
149
  # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
@@ -155,16 +155,16 @@ module AvaTax
155
155
  #
156
156
  # ### Security Policies
157
157
  #
158
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
158
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
159
159
  # @param companyId [Integer] The ID of the company that owns this nexus object
160
160
  # @param id [Integer] The primary key of this nexus
161
161
  # @param include [String]
162
- # @return [Object]
163
- def get_nexus(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{id}"
164
- get(path, options) end
165
-
166
- # List company nexus related to a tax form
167
- #
162
+ # @return [Object]
163
+ def get_nexus(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{id}"
164
+ get(path, options) end
165
+
166
+ # List company nexus related to a tax form
167
+ #
168
168
  # Retrieves a list of nexus related to a tax form.
169
169
  #
170
170
  # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
@@ -180,16 +180,16 @@ module AvaTax
180
180
  #
181
181
  # ### Security Policies
182
182
  #
183
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
183
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
184
184
  # @param companyId [Integer] The ID of the company that owns this nexus object
185
185
  # @param formCode [String] The form code that we are looking up the nexus for
186
186
  # @param include [String]
187
- # @return [Object]
188
- def get_nexus_by_form_code(companyId, formCode, options={}) path = "/api/v2/companies/#{companyId}/nexus/byform/#{formCode}"
189
- get(path, options) end
190
-
191
- # Retrieve a single nexus parameter
192
- #
187
+ # @return [Object]
188
+ def get_nexus_by_form_code(companyId, formCode, options={}) path = "/api/v2/companies/#{companyId}/nexus/byform/#{formCode}"
189
+ get(path, options) end
190
+
191
+ # Retrieve a single nexus parameter
192
+ #
193
193
  # Retrieve a single nexus parameter.
194
194
  # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller.In AvaTax, these tax-affecting properties are called "parameters".
195
195
  #
@@ -199,16 +199,16 @@ module AvaTax
199
199
  #
200
200
  # ### Security Policies
201
201
  #
202
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
202
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
203
203
  # @param companyId [Integer] The company id
204
204
  # @param nexusId [Integer] The nexus id
205
205
  # @param id [Integer] The parameter id
206
- # @return [Object]
207
- def get_nexus_parameter(companyId, nexusId, id) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}"
208
- get(path) end
209
-
210
- # Retrieve nexus for this company
211
- #
206
+ # @return [Object]
207
+ def get_nexus_parameter(companyId, nexusId, id) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}"
208
+ get(path) end
209
+
210
+ # Retrieve nexus for this company
211
+ #
212
212
  # List all nexus objects defined for this company.
213
213
  #
214
214
  # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
@@ -223,19 +223,47 @@ module AvaTax
223
223
  #
224
224
  # ### Security Policies
225
225
  #
226
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
226
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
227
227
  # @param companyId [Integer] The ID of the company that owns these nexus objects
228
- # @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters
228
+ # @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus
229
229
  # @param include [String] A comma separated list of additional data to retrieve.
230
230
  # @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.
231
231
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
232
232
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
233
- # @return [FetchResult]
234
- def list_nexus_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/nexus"
235
- get(path, options) end
236
-
237
- # Retrieve parameters for a nexus
233
+ # @return [FetchResult]
234
+ def list_nexus_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/nexus"
235
+ get(path, options) end
236
+
237
+ # Retrieve nexus for this company By TaxTypeGroup
238
+ #
239
+ # List all nexus objects defined for this company filtered by TaxTypeGroup.
240
+ #
241
+ # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
242
+ # taxes. The legal requirements for nexus may vary per country and per jurisdiction; please seek advice from your
243
+ # accountant or lawyer prior to declaring nexus.
244
+ #
245
+ # 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/) .
246
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
247
+ # 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:
248
+ #
249
+ # * Parameters
250
+ #
251
+ # ### Security Policies
238
252
  #
253
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
254
+ # @param companyId [Integer] The ID of the company that owns these nexus objects
255
+ # @param taxTypeGroup [String] Name of TaxTypeGroup to filter by
256
+ # @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus
257
+ # @param include [String] A comma separated list of additional data to retrieve.
258
+ # @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.
259
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
260
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
261
+ # @return [FetchResult]
262
+ def list_nexus_by_company_and_tax_type_group(companyId, taxTypeGroup, options={}) path = "/api/v2/companies/#{companyId}/nexus/byTaxTypeGroup/#{taxTypeGroup}"
263
+ get(path, options) end
264
+
265
+ # Retrieve parameters for a nexus
266
+ #
239
267
  # List parameters for a nexus.
240
268
  # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters".
241
269
  #
@@ -248,19 +276,19 @@ module AvaTax
248
276
  #
249
277
  # ### Security Policies
250
278
  #
251
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
279
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
252
280
  # @param companyId [Integer] The company id
253
281
  # @param nexusId [Integer] The nexus id
254
282
  # @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
255
283
  # @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.
256
284
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
257
285
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
258
- # @return [FetchResult]
259
- def list_nexus_parameters(companyId, nexusId, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters"
260
- get(path, options) end
261
-
262
- # Retrieve all nexus
263
- #
286
+ # @return [FetchResult]
287
+ def list_nexus_parameters(companyId, nexusId, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters"
288
+ get(path, options) end
289
+
290
+ # Retrieve all nexus
291
+ #
264
292
  # Get multiple nexus objects across all companies.
265
293
  #
266
294
  # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
@@ -275,18 +303,18 @@ module AvaTax
275
303
  #
276
304
  # ### Security Policies
277
305
  #
278
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
279
- # @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:* streamlinedSalesTax, isSSTActive, taxAuthorityId, taxName, parameters
306
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
307
+ # @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus
280
308
  # @param include [String] A comma separated list of additional data to retrieve.
281
309
  # @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.
282
310
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
283
311
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
284
- # @return [FetchResult]
285
- def query_nexus(options={}) path = "/api/v2/nexus"
286
- get(path, options) end
287
-
288
- # Update a single nexus
289
- #
312
+ # @return [FetchResult]
313
+ def query_nexus(options={}) path = "/api/v2/nexus"
314
+ get(path, options) end
315
+
316
+ # Update a single nexus
317
+ #
290
318
  # Replace the existing nexus declaration object at this URL with an updated object.
291
319
  #
292
320
  # The concept of Nexus indicates a place where your company is legally obligated to collect and remit transactional
@@ -309,16 +337,16 @@ module AvaTax
309
337
  #
310
338
  # ### Security Policies
311
339
  #
312
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
340
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
313
341
  # @param companyId [Integer] The ID of the company that this nexus belongs to.
314
342
  # @param id [Integer] The ID of the nexus you wish to update
315
343
  # @param model [Object] The nexus object you wish to update.
316
- # @return [Object]
317
- def update_nexus(companyId, id, model) path = "/api/v2/companies/#{companyId}/nexus/#{id}"
318
- put(path, model) end
319
-
320
- # Update an nexus parameter
321
- #
344
+ # @return [Object]
345
+ def update_nexus(companyId, id, model) path = "/api/v2/companies/#{companyId}/nexus/#{id}"
346
+ put(path, model) end
347
+
348
+ # Update an nexus parameter
349
+ #
322
350
  # Update an nexus parameter.
323
351
  #
324
352
  # Some tax calculation and reporting are different depending on the properties of the nexus, such as isRemoteSeller. In AvaTax, these tax-affecting properties are called "parameters".
@@ -329,14 +357,14 @@ module AvaTax
329
357
  #
330
358
  # ### Security Policies
331
359
  #
332
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
360
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
333
361
  # @param companyId [Integer] The company id.
334
362
  # @param nexusId [Integer] The nexus id
335
363
  # @param id [Integer] The nexus parameter id
336
364
  # @param model [Object] The nexus object you wish to update.
337
- # @return [Object]
338
- def update_nexus_parameter(companyId, nexusId, id, model) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}"
339
- put(path, model) end
340
- end
341
- end
365
+ # @return [Object]
366
+ def update_nexus_parameter(companyId, nexusId, id, model) path = "/api/v2/companies/#{companyId}/nexus/#{nexusId}/parameters/#{id}"
367
+ put(path, model) end
368
+ end
369
+ end
342
370
  end