avatax 21.8.0 → 22.2.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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +55 -55
  3. data/.rspec +1 -1
  4. data/.travis.yml +18 -18
  5. data/.vs/VSWorkspaceState.json +5 -5
  6. data/.yardopts +4 -4
  7. data/Gemfile +2 -2
  8. data/LICENSE +201 -201
  9. data/README.md +98 -98
  10. data/Rakefile +9 -9
  11. data/avatax.gemspec +38 -38
  12. data/example/avatax.rb +47 -47
  13. data/example/credentials.example.yaml +5 -5
  14. data/lib/avatax/api.rb +27 -27
  15. data/lib/avatax/client/accounts.rb +94 -83
  16. data/lib/avatax/client/addresses.rb +22 -20
  17. data/lib/avatax/client/advancedrules.rb +46 -41
  18. data/lib/avatax/client/ageverification.rb +29 -0
  19. data/lib/avatax/client/avafileforms.rb +46 -41
  20. data/lib/avatax/client/batches.rb +70 -62
  21. data/lib/avatax/client/certexpressinvites.rb +30 -27
  22. data/lib/avatax/client/certificates.rb +126 -111
  23. data/lib/avatax/client/companies.rb +192 -152
  24. data/lib/avatax/client/compliance.rb +25 -14
  25. data/lib/avatax/client/contacts.rb +54 -48
  26. data/lib/avatax/client/customers.rb +110 -97
  27. data/lib/avatax/client/datasources.rb +54 -48
  28. data/lib/avatax/client/definitions.rb +620 -446
  29. data/lib/avatax/client/distancethresholds.rb +54 -48
  30. data/lib/avatax/client/ecms.rb +73 -73
  31. data/lib/avatax/client/ecommercetoken.rb +20 -18
  32. data/lib/avatax/client/errortransactions.rb +61 -61
  33. data/lib/avatax/client/filingcalendars.rb +44 -20
  34. data/lib/avatax/client/filings.rb +24 -20
  35. data/lib/avatax/client/firmclientlinkages.rb +78 -69
  36. data/lib/avatax/client/free.rb +14 -13
  37. data/lib/avatax/client/fundingrequests.rb +22 -20
  38. data/lib/avatax/client/items.rb +206 -181
  39. data/lib/avatax/client/jurisdictionoverrides.rb +54 -48
  40. data/lib/avatax/client/locations.rb +102 -90
  41. data/lib/avatax/client/multidocument.rb +86 -76
  42. data/lib/avatax/client/nexus.rb +146 -103
  43. data/lib/avatax/client/notices.rb +30 -26
  44. data/lib/avatax/client/notifications.rb +30 -27
  45. data/lib/avatax/client/onboarding.rb +55 -55
  46. data/lib/avatax/client/pointofsale.rb +21 -21
  47. data/lib/avatax/client/provisioning.rb +22 -20
  48. data/lib/avatax/client/registrar.rb +94 -83
  49. data/lib/avatax/client/reports.rb +38 -34
  50. data/lib/avatax/client/settings.rb +54 -48
  51. data/lib/avatax/client/shippingverification.rb +66 -0
  52. data/lib/avatax/client/subscriptions.rb +30 -27
  53. data/lib/avatax/client/taxcodes.rb +54 -48
  54. data/lib/avatax/client/taxcontent.rb +46 -41
  55. data/lib/avatax/client/taxprofiles.rb +42 -42
  56. data/lib/avatax/client/taxrules.rb +56 -50
  57. data/lib/avatax/client/transactions.rb +174 -153
  58. data/lib/avatax/client/upcs.rb +54 -48
  59. data/lib/avatax/client/userdefinedfields.rb +52 -0
  60. data/lib/avatax/client/users.rb +70 -62
  61. data/lib/avatax/client/utilities.rb +30 -27
  62. data/lib/avatax/client.rb +37 -35
  63. data/lib/avatax/configuration.rb +76 -76
  64. data/lib/avatax/connection.rb +49 -49
  65. data/lib/avatax/request.rb +51 -42
  66. data/lib/avatax/version.rb +3 -3
  67. data/lib/avatax.rb +26 -26
  68. data/spec/avatax/client/accounts_spec.rb +13 -13
  69. data/spec/avatax/client/transactions_spec.rb +80 -80
  70. data/spec/avatax/request_spec.rb +25 -25
  71. data/spec/avatax_spec.rb +45 -45
  72. data/spec/credentials.yaml.example +4 -4
  73. data/spec/fixtures/accounts.json +15 -15
  74. data/spec/spec_helper.rb +27 -27
  75. metadata +9 -13
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module Transactions
4
-
5
-
6
- # Add lines to an existing unlocked transaction
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Transactions
4
+
5
+
6
+ # Add lines to an existing unlocked transaction
7
+ #
8
8
  # Add lines to an existing unlocked transaction.
9
9
  #
10
10
  # The `AddLines` API allows you to add additional transaction lines to existing transaction, so that customer will
@@ -29,15 +29,16 @@ module AvaTax
29
29
  # ### Security Policies
30
30
  #
31
31
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
32
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
32
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
33
+ # Swagger Name: AvaTaxClient
33
34
  # @param include [String] Specifies objects to include in the response after transaction is created
34
35
  # @param model [Object] information about the transaction and lines to be added
35
- # @return [Object]
36
- def add_lines(model, options={}) path = "/api/v2/companies/transactions/lines/add"
37
- post(path, model, options) end
38
-
39
- # Correct a previously created transaction
40
- #
36
+ # @return [Object]
37
+ def add_lines(model, options={}) path = "/api/v2/companies/transactions/lines/add"
38
+ post(path, model, options, "22.2.0") end
39
+
40
+ # Correct a previously created transaction
41
+ #
41
42
  # Replaces the current transaction uniquely identified by this URL with a new transaction.
42
43
  #
43
44
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
@@ -71,18 +72,19 @@ module AvaTax
71
72
  # ### Security Policies
72
73
  #
73
74
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
74
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
75
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
76
+ # Swagger Name: AvaTaxClient
75
77
  # @param companyCode [String] The company code of the company that recorded this transaction
76
78
  # @param transactionCode [String] The transaction code to adjust
77
79
  # @param documentType [String] (Optional): The document type of the transaction to adjust. (See DocumentType::* for a list of allowable values)
78
80
  # @param include [String] Specifies objects to include in this fetch call
79
81
  # @param model [Object] The adjustment you wish to make
80
- # @return [Object]
81
- def adjust_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/adjust"
82
- post(path, model, options) end
83
-
84
- # Get audit information about a transaction
85
- #
82
+ # @return [Object]
83
+ def adjust_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/adjust"
84
+ post(path, model, options, "22.2.0") end
85
+
86
+ # Get audit information about a transaction
87
+ #
86
88
  # Retrieve audit information about a transaction stored in AvaTax.
87
89
  #
88
90
  # The `AuditTransaction` API retrieves audit information related to a specific transaction. This audit
@@ -110,15 +112,16 @@ module AvaTax
110
112
  # ### Security Policies
111
113
  #
112
114
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
113
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
115
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
116
+ # Swagger Name: AvaTaxClient
114
117
  # @param companyCode [String] The code identifying the company that owns this transaction
115
118
  # @param transactionCode [String] The code identifying the transaction
116
- # @return [Object]
117
- def audit_transaction(companyCode, transactionCode) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/audit"
118
- get(path) end
119
-
120
- # Get audit information about a transaction
121
- #
119
+ # @return [Object]
120
+ def audit_transaction(companyCode, transactionCode) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/audit"
121
+ get(path, {}, "22.2.0") end
122
+
123
+ # Get audit information about a transaction
124
+ #
122
125
  # Retrieve audit information about a transaction stored in AvaTax.
123
126
  #
124
127
  # The `AuditTransaction` API retrieves audit information related to a specific transaction. This audit
@@ -146,16 +149,17 @@ module AvaTax
146
149
  # ### Security Policies
147
150
  #
148
151
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
149
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
152
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
153
+ # Swagger Name: AvaTaxClient
150
154
  # @param companyCode [String] The code identifying the company that owns this transaction
151
155
  # @param transactionCode [String] The code identifying the transaction
152
156
  # @param documentType [String] The document type of the original transaction (See DocumentType::* for a list of allowable values)
153
- # @return [Object]
154
- def audit_transaction_with_type(companyCode, transactionCode, documentType) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}/audit"
155
- get(path) end
156
-
157
- # Lock a set of documents
158
- #
157
+ # @return [Object]
158
+ def audit_transaction_with_type(companyCode, transactionCode, documentType) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}/audit"
159
+ get(path, {}, "22.2.0") end
160
+
161
+ # Lock a set of documents
162
+ #
159
163
  # This API is available by invitation only.
160
164
  #
161
165
  # Lock a set of transactions uniquely identified by DocumentIds provided. This API allows locking multiple documents at once.
@@ -167,14 +171,15 @@ module AvaTax
167
171
  # ### Security Policies
168
172
  #
169
173
  # * This API requires the user role Compliance Root User.
170
- # * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
174
+ # * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
175
+ # Swagger Name: AvaTaxClient
171
176
  # @param model [Object] bulk lock request
172
- # @return [Object]
173
- def bulk_lock_transaction(model) path = "/api/v2/transactions/lock"
174
- post(path, model) end
175
-
176
- # Change a transaction's code
177
- #
177
+ # @return [Object]
178
+ def bulk_lock_transaction(model) path = "/api/v2/transactions/lock"
179
+ post(path, model, {}, "22.2.0") end
180
+
181
+ # Change a transaction's code
182
+ #
178
183
  # Renames a transaction uniquely identified by this URL by changing its `code` value.
179
184
  #
180
185
  # This API is available as long as the transaction is in `saved` or `posted` status. When a transaction
@@ -208,18 +213,19 @@ module AvaTax
208
213
  # ### Security Policies
209
214
  #
210
215
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
211
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
216
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
217
+ # Swagger Name: AvaTaxClient
212
218
  # @param companyCode [String] The company code of the company that recorded this transaction
213
219
  # @param transactionCode [String] The transaction code to change
214
220
  # @param documentType [String] (Optional): The document type of the transaction to change document code. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
215
221
  # @param include [String] Specifies objects to include in this fetch call
216
222
  # @param model [Object] The code change request you wish to execute
217
- # @return [Object]
218
- def change_transaction_code(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/changecode"
219
- post(path, model, options) end
220
-
221
- # Commit a transaction for reporting
222
- #
223
+ # @return [Object]
224
+ def change_transaction_code(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/changecode"
225
+ post(path, model, options, "22.2.0") end
226
+
227
+ # Commit a transaction for reporting
228
+ #
223
229
  # Marks a transaction by changing its status to `Committed`.
224
230
  #
225
231
  # Transactions that are committed are available to be reported to a tax authority by Avalara Managed Returns.
@@ -251,18 +257,19 @@ module AvaTax
251
257
  #
252
258
  # ### Security Policies
253
259
  #
254
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
260
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
261
+ # Swagger Name: AvaTaxClient
255
262
  # @param companyCode [String] The company code of the company that recorded this transaction
256
263
  # @param transactionCode [String] The transaction code to commit
257
264
  # @param documentType [String] (Optional): The document type of the transaction to commit. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
258
265
  # @param include [String] Specifies objects to include in this fetch call
259
266
  # @param model [Object] The commit request you wish to execute
260
- # @return [Object]
261
- def commit_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/commit"
262
- post(path, model, options) end
263
-
264
- # Create or adjust a transaction
265
- #
267
+ # @return [Object]
268
+ def commit_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/commit"
269
+ post(path, model, options, "22.2.0") end
270
+
271
+ # Create or adjust a transaction
272
+ #
266
273
  # Records a new transaction or adjust an existing transaction in AvaTax.
267
274
  #
268
275
  # The `CreateOrAdjustTransaction` endpoint is used to create a new transaction or update an existing one. This API
@@ -300,15 +307,16 @@ module AvaTax
300
307
  # ### Security Policies
301
308
  #
302
309
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
303
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
310
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
311
+ # Swagger Name: AvaTaxClient
304
312
  # @param include [String] Specifies objects to include in the response after transaction is created
305
313
  # @param model [Object] The transaction you wish to create or adjust
306
- # @return [Object]
307
- def create_or_adjust_transaction(model, options={}) path = "/api/v2/transactions/createoradjust"
308
- post(path, model, options) end
309
-
310
- # Create a new transaction
311
- #
314
+ # @return [Object]
315
+ def create_or_adjust_transaction(model, options={}) path = "/api/v2/transactions/createoradjust"
316
+ post(path, model, options, "22.2.0") end
317
+
318
+ # Create a new transaction
319
+ #
312
320
  # Records a new transaction in AvaTax.
313
321
  #
314
322
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
@@ -353,15 +361,16 @@ module AvaTax
353
361
  # ### Security Policies
354
362
  #
355
363
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
356
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
364
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
365
+ # Swagger Name: AvaTaxClient
357
366
  # @param include [String] Specifies objects to include in the response after transaction is created
358
367
  # @param model [Object] The transaction you wish to create
359
- # @return [Object]
360
- def create_transaction(model, options={}) path = "/api/v2/transactions/create"
361
- post(path, model, options) end
362
-
363
- # Remove lines from an existing unlocked transaction
364
- #
368
+ # @return [Object]
369
+ def create_transaction(model, options={}) path = "/api/v2/transactions/create"
370
+ post(path, model, options, "22.2.0") end
371
+
372
+ # Remove lines from an existing unlocked transaction
373
+ #
365
374
  # Remove lines to an existing unlocked transaction.
366
375
  #
367
376
  # The `DeleteLines` API allows you to remove transaction lines from existing unlocked transaction, so that customer will
@@ -383,15 +392,16 @@ module AvaTax
383
392
  # ### Security Policies
384
393
  #
385
394
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
386
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
395
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
396
+ # Swagger Name: AvaTaxClient
387
397
  # @param include [String] Specifies objects to include in the response after transaction is created
388
398
  # @param model [Object] information about the transaction and lines to be removed
389
- # @return [Object]
390
- def delete_lines(model, options={}) path = "/api/v2/companies/transactions/lines/delete"
391
- post(path, model, options) end
392
-
393
- # Retrieve a single transaction by code
394
- #
399
+ # @return [Object]
400
+ def delete_lines(model, options={}) path = "/api/v2/companies/transactions/lines/delete"
401
+ post(path, model, options, "22.2.0") end
402
+
403
+ # Retrieve a single transaction by code
404
+ #
395
405
  # Get the current transaction identified by this company code, transaction code, and document type.
396
406
  #
397
407
  # A transaction is uniquely identified by `companyCode`, `code` (often called Transaction Code), and `documentType`.
@@ -422,17 +432,18 @@ module AvaTax
422
432
  # ### Security Policies
423
433
  #
424
434
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
425
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
435
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
436
+ # Swagger Name: AvaTaxClient
426
437
  # @param companyCode [String] The company code of the company that recorded this transaction
427
438
  # @param transactionCode [String] The transaction code to retrieve
428
439
  # @param documentType [String] (Optional): The document type of the transaction to retrieve (See DocumentType::* for a list of allowable values)
429
440
  # @param include [String] Specifies objects to include in this fetch call
430
- # @return [Object]
431
- def get_transaction_by_code(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}"
432
- get(path, options) end
433
-
434
- # Retrieve a single transaction by code
435
- #
441
+ # @return [Object]
442
+ def get_transaction_by_code(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}"
443
+ get(path, options, "22.2.0") end
444
+
445
+ # Retrieve a single transaction by code
446
+ #
436
447
  # DEPRECATED: Please use the `GetTransactionByCode` API instead.
437
448
  #
438
449
  # NOTE: If your companyCode or transactionCode contains any of these characters /, +, ? or a space please use the following encoding before making a request:
@@ -446,17 +457,18 @@ module AvaTax
446
457
  # ### Security Policies
447
458
  #
448
459
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
449
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
460
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
461
+ # Swagger Name: AvaTaxClient
450
462
  # @param companyCode [String] The company code of the company that recorded this transaction
451
463
  # @param transactionCode [String] The transaction code to retrieve
452
464
  # @param documentType [String] The transaction type to retrieve (See DocumentType::* for a list of allowable values)
453
465
  # @param include [String] Specifies objects to include in this fetch call
454
- # @return [Object]
455
- def get_transaction_by_code_and_type(companyCode, transactionCode, documentType, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}"
456
- get(path, options) end
457
-
458
- # Retrieve a single transaction by ID
459
- #
466
+ # @return [Object]
467
+ def get_transaction_by_code_and_type(companyCode, transactionCode, documentType, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}"
468
+ get(path, options, "22.2.0") end
469
+
470
+ # Retrieve a single transaction by ID
471
+ #
460
472
  # Get the unique transaction identified by this URL.
461
473
  #
462
474
  # This endpoint retrieves the exact transaction identified by this ID number even if that transaction was later adjusted
@@ -478,15 +490,16 @@ module AvaTax
478
490
  # ### Security Policies
479
491
  #
480
492
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
481
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
493
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
494
+ # Swagger Name: AvaTaxClient
482
495
  # @param id [Integer] The unique ID number of the transaction to retrieve
483
496
  # @param include [String] Specifies objects to include in this fetch call
484
- # @return [Object]
485
- def get_transaction_by_id(id, options={}) path = "/api/v2/transactions/#{id}"
486
- get(path, options) end
487
-
488
- # Retrieve all transactions
489
- #
497
+ # @return [Object]
498
+ def get_transaction_by_id(id, options={}) path = "/api/v2/transactions/#{id}"
499
+ get(path, options, "22.2.0") end
500
+
501
+ # Retrieve all transactions
502
+ #
490
503
  # List all transactions attached to this company.
491
504
  #
492
505
  # This endpoint is limited to returning 1,000 transactions at a time maximum.
@@ -520,7 +533,8 @@ module AvaTax
520
533
  # ### Security Policies
521
534
  #
522
535
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
523
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
536
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
537
+ # Swagger Name: AvaTaxClient
524
538
  # @param companyCode [String] The company code of the company that recorded this transaction
525
539
  # @param dataSourceId [Integer] Optionally filter transactions to those from a specific data source.
526
540
  # @param include [String] Specifies objects to include in this fetch call
@@ -528,12 +542,12 @@ module AvaTax
528
542
  # @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.
529
543
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
530
544
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
531
- # @return [FetchResult]
532
- def list_transactions_by_company(companyCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions"
533
- get(path, options) end
534
-
535
- # Lock a single transaction
536
- #
545
+ # @return [FetchResult]
546
+ def list_transactions_by_company(companyCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions"
547
+ get(path, options, "22.2.0") end
548
+
549
+ # Lock a single transaction
550
+ #
537
551
  # Lock a transaction uniquely identified by this URL.
538
552
  #
539
553
  # This API is mainly used for connector developers to simulate what happens when the Returns product locks a document.
@@ -567,18 +581,19 @@ module AvaTax
567
581
  # ### Security Policies
568
582
  #
569
583
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
570
- # * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
584
+ # * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
585
+ # Swagger Name: AvaTaxClient
571
586
  # @param companyCode [String] The company code of the company that recorded this transaction
572
587
  # @param transactionCode [String] The transaction code to lock
573
588
  # @param documentType [String] (Optional): The document type of the transaction to lock. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
574
589
  # @param include [String] Specifies objects to include in this fetch call
575
590
  # @param model [Object] The lock request you wish to execute
576
- # @return [Object]
577
- def lock_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/lock"
578
- post(path, model, options) end
579
-
580
- # Create a refund for a transaction
581
- #
591
+ # @return [Object]
592
+ def lock_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/lock"
593
+ post(path, model, options, "22.2.0") end
594
+
595
+ # Create a refund for a transaction
596
+ #
582
597
  # Create a refund for a transaction.
583
598
  #
584
599
  # The `RefundTransaction` API allows you to quickly and easily create a `ReturnInvoice` representing a refund
@@ -622,19 +637,20 @@ module AvaTax
622
637
  # ### Security Policies
623
638
  #
624
639
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
625
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
640
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
641
+ # Swagger Name: AvaTaxClient
626
642
  # @param companyCode [String] The code of the company that made the original sale
627
643
  # @param transactionCode [String] The transaction code of the original sale
628
644
  # @param include [String] Specifies objects to include in the response after transaction is created
629
645
  # @param documentType [String] (Optional): The document type of the transaction to refund. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
630
646
  # @param useTaxDateOverride [Boolean] (Optional): If set to true, processes refund using taxDateOverride rather than taxAmountOverride (Note: taxAmountOverride is not allowed for SST states).
631
647
  # @param model [Object] Information about the refund to create
632
- # @return [Object]
633
- def refund_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/refund"
634
- post(path, model, options) end
635
-
636
- # Perform multiple actions on a transaction
637
- #
648
+ # @return [Object]
649
+ def refund_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/refund"
650
+ post(path, model, options, "22.2.0") end
651
+
652
+ # Perform multiple actions on a transaction
653
+ #
638
654
  # Performs one or more actions against the current transaction uniquely identified by this URL.
639
655
  #
640
656
  # The `SettleTransaction` API call can perform the work of `ChangeCode`, `VerifyTransaction`, and `CommitTransaction`.
@@ -666,18 +682,19 @@ module AvaTax
666
682
  #
667
683
  # ### Security Policies
668
684
  #
669
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
685
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
686
+ # Swagger Name: AvaTaxClient
670
687
  # @param companyCode [String] The company code of the company that recorded this transaction
671
688
  # @param transactionCode [String] The transaction code to settle
672
689
  # @param documentType [String] (Optional): The document type of the transaction to settle. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
673
690
  # @param include [String] Specifies objects to include in this fetch call
674
691
  # @param model [Object] The data from an external system to reconcile against AvaTax
675
- # @return [Object]
676
- def settle_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/settle"
677
- post(path, model, options) end
678
-
679
- # Uncommit a transaction for reporting
680
- #
692
+ # @return [Object]
693
+ def settle_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/settle"
694
+ post(path, model, options, "22.2.0") end
695
+
696
+ # Uncommit a transaction for reporting
697
+ #
681
698
  # Adjusts a transaction by changing it to an uncommitted status.
682
699
  #
683
700
  # Transactions that have been previously reported to a tax authority by Avalara Managed Returns are considered `locked` and are
@@ -704,17 +721,18 @@ module AvaTax
704
721
  # ### Security Policies
705
722
  #
706
723
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
707
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
724
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
725
+ # Swagger Name: AvaTaxClient
708
726
  # @param companyCode [String] The company code of the company that recorded this transaction
709
727
  # @param transactionCode [String] The transaction code to Uncommit
710
728
  # @param documentType [String] (Optional): The document type of the transaction to Uncommit. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
711
729
  # @param include [String] Specifies objects to include in this fetch call
712
- # @return [Object]
713
- def uncommit_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/uncommit"
714
- post(path, options) end
715
-
716
- # Unvoids a transaction
717
- #
730
+ # @return [Object]
731
+ def uncommit_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/uncommit"
732
+ post(path, options, "22.2.0") end
733
+
734
+ # Unvoids a transaction
735
+ #
718
736
  # Unvoids a voided transaction
719
737
  #
720
738
  # 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:
@@ -738,17 +756,18 @@ module AvaTax
738
756
  # ### Security Policies
739
757
  #
740
758
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
741
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
759
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
760
+ # Swagger Name: AvaTaxClient
742
761
  # @param companyCode [String] The company code of the company that recorded this transaction
743
762
  # @param transactionCode [String] The transaction code to commit
744
763
  # @param documentType [String] (Optional): The document type of the transaction to commit. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
745
764
  # @param include [String] Specifies objects to include in this fetch call
746
- # @return [Object]
747
- def unvoid_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/unvoid"
748
- post(path, options) end
749
-
750
- # Verify a transaction
751
- #
765
+ # @return [Object]
766
+ def unvoid_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/unvoid"
767
+ post(path, options, "22.2.0") end
768
+
769
+ # Verify a transaction
770
+ #
752
771
  # Verifies that the transaction uniquely identified by this URL matches certain expected values.
753
772
  #
754
773
  # If the transaction does not match these expected values, this API will return an error code indicating which value did not match.
@@ -779,18 +798,19 @@ module AvaTax
779
798
  # ### Security Policies
780
799
  #
781
800
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
782
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
801
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
802
+ # Swagger Name: AvaTaxClient
783
803
  # @param companyCode [String] The company code of the company that recorded this transaction
784
804
  # @param transactionCode [String] The transaction code to settle
785
805
  # @param documentType [String] (Optional): The document type of the transaction to verify. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
786
806
  # @param include [String] Specifies objects to include in this fetch call
787
807
  # @param model [Object] The data from an external system to reconcile against AvaTax
788
- # @return [Object]
789
- def verify_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/verify"
790
- post(path, model, options) end
791
-
792
- # Void a transaction
793
- #
808
+ # @return [Object]
809
+ def verify_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/verify"
810
+ post(path, model, options, "22.2.0") end
811
+
812
+ # Void a transaction
813
+ #
794
814
  # Voids the current transaction uniquely identified by this URL.
795
815
  #
796
816
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
@@ -823,15 +843,16 @@ module AvaTax
823
843
  # ### Security Policies
824
844
  #
825
845
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
826
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
846
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
847
+ # Swagger Name: AvaTaxClient
827
848
  # @param companyCode [String] The company code of the company that recorded this transaction
828
849
  # @param transactionCode [String] The transaction code to void
829
850
  # @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)
830
851
  # @param include [String] Specifies objects to include in this fetch call
831
852
  # @param model [Object] The void request you wish to execute. To void a transaction the code must be set to 'DocVoided'
832
- # @return [Object]
833
- def void_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/void"
834
- post(path, model, options) end
835
- end
836
- end
853
+ # @return [Object]
854
+ def void_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/void"
855
+ post(path, model, options, "22.2.0") end
856
+ end
857
+ end
837
858
  end