avatax 21.9.0 → 22.2.0

Sign up to get free protection for your applications and to get access to all the features.
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 +22 -11
  16. data/lib/avatax/client/addresses.rb +4 -2
  17. data/lib/avatax/client/advancedrules.rb +10 -5
  18. data/lib/avatax/client/ageverification.rb +29 -0
  19. data/lib/avatax/client/avafileforms.rb +10 -5
  20. data/lib/avatax/client/batches.rb +16 -8
  21. data/lib/avatax/client/certexpressinvites.rb +6 -3
  22. data/lib/avatax/client/certificates.rb +30 -15
  23. data/lib/avatax/client/companies.rb +61 -21
  24. data/lib/avatax/client/compliance.rb +25 -14
  25. data/lib/avatax/client/contacts.rb +12 -6
  26. data/lib/avatax/client/customers.rb +26 -13
  27. data/lib/avatax/client/datasources.rb +12 -6
  28. data/lib/avatax/client/definitions.rb +140 -70
  29. data/lib/avatax/client/distancethresholds.rb +12 -6
  30. data/lib/avatax/client/ecms.rb +73 -73
  31. data/lib/avatax/client/ecommercetoken.rb +4 -2
  32. data/lib/avatax/client/errortransactions.rb +61 -61
  33. data/lib/avatax/client/filingcalendars.rb +9 -4
  34. data/lib/avatax/client/filings.rb +6 -2
  35. data/lib/avatax/client/firmclientlinkages.rb +18 -9
  36. data/lib/avatax/client/free.rb +2 -1
  37. data/lib/avatax/client/fundingrequests.rb +4 -2
  38. data/lib/avatax/client/items.rb +50 -25
  39. data/lib/avatax/client/jurisdictionoverrides.rb +12 -6
  40. data/lib/avatax/client/locations.rb +24 -12
  41. data/lib/avatax/client/multidocument.rb +20 -10
  42. data/lib/avatax/client/nexus.rb +30 -15
  43. data/lib/avatax/client/notices.rb +8 -4
  44. data/lib/avatax/client/notifications.rb +6 -3
  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 +4 -2
  48. data/lib/avatax/client/registrar.rb +22 -11
  49. data/lib/avatax/client/reports.rb +8 -4
  50. data/lib/avatax/client/settings.rb +12 -6
  51. data/lib/avatax/client/shippingverification.rb +66 -0
  52. data/lib/avatax/client/subscriptions.rb +6 -3
  53. data/lib/avatax/client/taxcodes.rb +12 -6
  54. data/lib/avatax/client/taxcontent.rb +10 -5
  55. data/lib/avatax/client/taxprofiles.rb +42 -42
  56. data/lib/avatax/client/taxrules.rb +12 -6
  57. data/lib/avatax/client/transactions.rb +42 -21
  58. data/lib/avatax/client/upcs.rb +12 -6
  59. data/lib/avatax/client/userdefinedfields.rb +52 -0
  60. data/lib/avatax/client/users.rb +16 -8
  61. data/lib/avatax/client/utilities.rb +6 -3
  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
@@ -30,11 +30,12 @@ module AvaTax
30
30
  #
31
31
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
32
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
36
  # @return [Object]
36
37
  def add_lines(model, options={}) path = "/api/v2/companies/transactions/lines/add"
37
- post(path, model, options) end
38
+ post(path, model, options, "22.2.0") end
38
39
 
39
40
  # Correct a previously created transaction
40
41
  #
@@ -72,6 +73,7 @@ module AvaTax
72
73
  #
73
74
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
74
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)
@@ -79,7 +81,7 @@ module AvaTax
79
81
  # @param model [Object] The adjustment you wish to make
80
82
  # @return [Object]
81
83
  def adjust_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/adjust"
82
- post(path, model, options) end
84
+ post(path, model, options, "22.2.0") end
83
85
 
84
86
  # Get audit information about a transaction
85
87
  #
@@ -111,11 +113,12 @@ module AvaTax
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
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
119
  # @return [Object]
117
120
  def audit_transaction(companyCode, transactionCode) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/audit"
118
- get(path) end
121
+ get(path, {}, "22.2.0") end
119
122
 
120
123
  # Get audit information about a transaction
121
124
  #
@@ -147,12 +150,13 @@ module AvaTax
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
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
157
  # @return [Object]
154
158
  def audit_transaction_with_type(companyCode, transactionCode, documentType) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}/audit"
155
- get(path) end
159
+ get(path, {}, "22.2.0") end
156
160
 
157
161
  # Lock a set of documents
158
162
  #
@@ -168,10 +172,11 @@ module AvaTax
168
172
  #
169
173
  # * This API requires the user role Compliance Root User.
170
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
177
  # @return [Object]
173
178
  def bulk_lock_transaction(model) path = "/api/v2/transactions/lock"
174
- post(path, model) end
179
+ post(path, model, {}, "22.2.0") end
175
180
 
176
181
  # Change a transaction's code
177
182
  #
@@ -209,6 +214,7 @@ module AvaTax
209
214
  #
210
215
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
211
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)
@@ -216,7 +222,7 @@ module AvaTax
216
222
  # @param model [Object] The code change request you wish to execute
217
223
  # @return [Object]
218
224
  def change_transaction_code(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/changecode"
219
- post(path, model, options) end
225
+ post(path, model, options, "22.2.0") end
220
226
 
221
227
  # Commit a transaction for reporting
222
228
  #
@@ -252,6 +258,7 @@ module AvaTax
252
258
  # ### Security Policies
253
259
  #
254
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)
@@ -259,7 +266,7 @@ module AvaTax
259
266
  # @param model [Object] The commit request you wish to execute
260
267
  # @return [Object]
261
268
  def commit_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/commit"
262
- post(path, model, options) end
269
+ post(path, model, options, "22.2.0") end
263
270
 
264
271
  # Create or adjust a transaction
265
272
  #
@@ -301,11 +308,12 @@ module AvaTax
301
308
  #
302
309
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
303
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
314
  # @return [Object]
307
315
  def create_or_adjust_transaction(model, options={}) path = "/api/v2/transactions/createoradjust"
308
- post(path, model, options) end
316
+ post(path, model, options, "22.2.0") end
309
317
 
310
318
  # Create a new transaction
311
319
  #
@@ -354,11 +362,12 @@ module AvaTax
354
362
  #
355
363
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
356
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
368
  # @return [Object]
360
369
  def create_transaction(model, options={}) path = "/api/v2/transactions/create"
361
- post(path, model, options) end
370
+ post(path, model, options, "22.2.0") end
362
371
 
363
372
  # Remove lines from an existing unlocked transaction
364
373
  #
@@ -384,11 +393,12 @@ module AvaTax
384
393
  #
385
394
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
386
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
399
  # @return [Object]
390
400
  def delete_lines(model, options={}) path = "/api/v2/companies/transactions/lines/delete"
391
- post(path, model, options) end
401
+ post(path, model, options, "22.2.0") end
392
402
 
393
403
  # Retrieve a single transaction by code
394
404
  #
@@ -423,13 +433,14 @@ module AvaTax
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
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
441
  # @return [Object]
431
442
  def get_transaction_by_code(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}"
432
- get(path, options) end
443
+ get(path, options, "22.2.0") end
433
444
 
434
445
  # Retrieve a single transaction by code
435
446
  #
@@ -447,13 +458,14 @@ module AvaTax
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
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
466
  # @return [Object]
455
467
  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
468
+ get(path, options, "22.2.0") end
457
469
 
458
470
  # Retrieve a single transaction by ID
459
471
  #
@@ -479,11 +491,12 @@ module AvaTax
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
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
497
  # @return [Object]
485
498
  def get_transaction_by_id(id, options={}) path = "/api/v2/transactions/#{id}"
486
- get(path, options) end
499
+ get(path, options, "22.2.0") end
487
500
 
488
501
  # Retrieve all transactions
489
502
  #
@@ -521,6 +534,7 @@ module AvaTax
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
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
@@ -530,7 +544,7 @@ module AvaTax
530
544
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
531
545
  # @return [FetchResult]
532
546
  def list_transactions_by_company(companyCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions"
533
- get(path, options) end
547
+ get(path, options, "22.2.0") end
534
548
 
535
549
  # Lock a single transaction
536
550
  #
@@ -568,6 +582,7 @@ module AvaTax
568
582
  #
569
583
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
570
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)
@@ -575,7 +590,7 @@ module AvaTax
575
590
  # @param model [Object] The lock request you wish to execute
576
591
  # @return [Object]
577
592
  def lock_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/lock"
578
- post(path, model, options) end
593
+ post(path, model, options, "22.2.0") end
579
594
 
580
595
  # Create a refund for a transaction
581
596
  #
@@ -623,6 +638,7 @@ module AvaTax
623
638
  #
624
639
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
625
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
@@ -631,7 +647,7 @@ module AvaTax
631
647
  # @param model [Object] Information about the refund to create
632
648
  # @return [Object]
633
649
  def refund_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/refund"
634
- post(path, model, options) end
650
+ post(path, model, options, "22.2.0") end
635
651
 
636
652
  # Perform multiple actions on a transaction
637
653
  #
@@ -667,6 +683,7 @@ module AvaTax
667
683
  # ### Security Policies
668
684
  #
669
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)
@@ -674,7 +691,7 @@ module AvaTax
674
691
  # @param model [Object] The data from an external system to reconcile against AvaTax
675
692
  # @return [Object]
676
693
  def settle_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/settle"
677
- post(path, model, options) end
694
+ post(path, model, options, "22.2.0") end
678
695
 
679
696
  # Uncommit a transaction for reporting
680
697
  #
@@ -705,13 +722,14 @@ module AvaTax
705
722
  #
706
723
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
707
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
730
  # @return [Object]
713
731
  def uncommit_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/uncommit"
714
- post(path, options) end
732
+ post(path, options, "22.2.0") end
715
733
 
716
734
  # Unvoids a transaction
717
735
  #
@@ -739,13 +757,14 @@ module AvaTax
739
757
  #
740
758
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
741
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
765
  # @return [Object]
747
766
  def unvoid_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/unvoid"
748
- post(path, options) end
767
+ post(path, options, "22.2.0") end
749
768
 
750
769
  # Verify a transaction
751
770
  #
@@ -780,6 +799,7 @@ module AvaTax
780
799
  #
781
800
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
782
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)
@@ -787,7 +807,7 @@ module AvaTax
787
807
  # @param model [Object] The data from an external system to reconcile against AvaTax
788
808
  # @return [Object]
789
809
  def verify_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/verify"
790
- post(path, model, options) end
810
+ post(path, model, options, "22.2.0") end
791
811
 
792
812
  # Void a transaction
793
813
  #
@@ -824,6 +844,7 @@ module AvaTax
824
844
  #
825
845
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
826
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)
@@ -831,7 +852,7 @@ module AvaTax
831
852
  # @param model [Object] The void request you wish to execute. To void a transaction the code must be set to 'DocVoided'
832
853
  # @return [Object]
833
854
  def void_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/void"
834
- post(path, model, options) end
855
+ post(path, model, options, "22.2.0") end
835
856
  end
836
857
  end
837
858
  end
@@ -12,11 +12,12 @@ module AvaTax
12
12
  #
13
13
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
14
14
  # * This API depends on the following active services:*Required* (all): AvaUpc.
15
+ # Swagger Name: AvaTaxClient
15
16
  # @param companyId [Integer] The ID of the company that owns this UPC.
16
17
  # @param model [UPCModel[]] The UPC you wish to create.
17
18
  # @return [UPCModel[]]
18
19
  def create_u_p_cs(companyId, model) path = "/api/v2/companies/#{companyId}/upcs"
19
- post(path, model) end
20
+ post(path, model, {}, "22.2.0") end
20
21
 
21
22
  # Delete a single UPC
22
23
  #
@@ -26,11 +27,12 @@ module AvaTax
26
27
  #
27
28
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
28
29
  # * This API depends on the following active services:*Required* (all): AvaUpc.
30
+ # Swagger Name: AvaTaxClient
29
31
  # @param companyId [Integer] The ID of the company that owns this UPC.
30
32
  # @param id [Integer] The ID of the UPC you wish to delete.
31
33
  # @return [ErrorDetail[]]
32
34
  def delete_u_p_c(companyId, id) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
33
- delete(path) end
35
+ delete(path, {}, "22.2.0") end
34
36
 
35
37
  # Retrieve a single UPC
36
38
  #
@@ -41,11 +43,12 @@ module AvaTax
41
43
  #
42
44
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
43
45
  # * This API depends on the following active services:*Required* (all): AvaUpc.
46
+ # Swagger Name: AvaTaxClient
44
47
  # @param companyId [Integer] The ID of the company that owns this UPC
45
48
  # @param id [Integer] The primary key of this UPC
46
49
  # @return [Object]
47
50
  def get_u_p_c(companyId, id) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
48
- get(path) end
51
+ get(path, {}, "22.2.0") end
49
52
 
50
53
  # Retrieve UPCs for this company
51
54
  #
@@ -59,6 +62,7 @@ module AvaTax
59
62
  #
60
63
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
61
64
  # * This API depends on the following active services:*Required* (all): AvaUpc.
65
+ # Swagger Name: AvaTaxClient
62
66
  # @param companyId [Integer] The ID of the company that owns these UPCs
63
67
  # @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/).
64
68
  # @param include [String] A comma separated list of additional data to retrieve.
@@ -67,7 +71,7 @@ module AvaTax
67
71
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
68
72
  # @return [FetchResult]
69
73
  def list_u_p_cs_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/upcs"
70
- get(path, options) end
74
+ get(path, options, "22.2.0") end
71
75
 
72
76
  # Retrieve all UPCs
73
77
  #
@@ -81,6 +85,7 @@ module AvaTax
81
85
  #
82
86
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
83
87
  # * This API depends on the following active services:*Required* (all): AvaUpc.
88
+ # Swagger Name: AvaTaxClient
84
89
  # @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/).
85
90
  # @param include [String] A comma separated list of additional data to retrieve.
86
91
  # @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.
@@ -88,7 +93,7 @@ module AvaTax
88
93
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
89
94
  # @return [FetchResult]
90
95
  def query_u_p_cs(options={}) path = "/api/v2/upcs"
91
- get(path, options) end
96
+ get(path, options, "22.2.0") end
92
97
 
93
98
  # Update a single UPC
94
99
  #
@@ -101,12 +106,13 @@ module AvaTax
101
106
  #
102
107
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
103
108
  # * This API depends on the following active services:*Required* (all): AvaUpc.
109
+ # Swagger Name: AvaTaxClient
104
110
  # @param companyId [Integer] The ID of the company that this UPC belongs to.
105
111
  # @param id [Integer] The ID of the UPC you wish to update
106
112
  # @param model [Object] The UPC you wish to update.
107
113
  # @return [Object]
108
114
  def update_u_p_c(companyId, id, model) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
109
- put(path, model) end
115
+ put(path, model, {}, "22.2.0") end
110
116
  end
111
117
  end
112
118
  end
@@ -0,0 +1,52 @@
1
+ module AvaTax
2
+ class Client
3
+ module UserDefinedFields
4
+
5
+
6
+ # Delete a User Defined Field by User Defined Field id for a company.
7
+ #
8
+ # Marks the existing user defined field for a company as deleted.
9
+ #
10
+ # ### Security Policies
11
+ #
12
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
13
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
14
+ # Swagger Name: AvaTaxClient
15
+ # @param companyId [Integer] The id of the company the User Defined Field belongs to.
16
+ # @param id [Integer] The id of the User Defined Field you wish to delete.
17
+ # @return [ErrorDetail[]]
18
+ def delete_user_defined_field(companyId, id) path = "/api/v2/companies/#{companyId}/userdefinedfields/#{id}"
19
+ delete(path, {}, "22.2.0") end
20
+
21
+ #
22
+ #
23
+ # ### Security Policies
24
+ #
25
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
26
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
27
+ # Swagger Name: AvaTaxClient
28
+ # @param companyId [Integer]
29
+ # @param udfType [String] Document or Line level UDF (See UserDefinedFieldType::* for a list of allowable values)
30
+ # @param allowDefaults [Boolean] If true this will add defaulted UDFs to the list that are not named yet
31
+ # @return [FetchResult]
32
+ def list_user_defined_fields_by_company_id(companyId, options={}) path = "/api/v2/companies/#{companyId}/userdefinedfields"
33
+ get(path, options, "22.2.0") end
34
+
35
+ # Update a User Defined Field identified by id for a company
36
+ #
37
+ # Updates a User Defined Field for a company.
38
+ #
39
+ # ### Security Policies
40
+ #
41
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
42
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
43
+ # Swagger Name: AvaTaxClient
44
+ # @param companyId [Integer] The id of the company the user defined field belongs to.
45
+ # @param id [Integer]
46
+ # @param model [Object]
47
+ # @return [Object]
48
+ def update_user_defined_field(companyId, model, options={}) path = "/api/v2/companies/#{companyId}/userdefinedfields"
49
+ post(path, model, options, "22.2.0") end
50
+ end
51
+ end
52
+ end
@@ -16,10 +16,11 @@ module AvaTax
16
16
  # ### Security Policies
17
17
  #
18
18
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
19
+ # Swagger Name: AvaTaxClient
19
20
  # @param model [Object] An object containing your current password and the new password.
20
21
  # @return [String]
21
22
  def change_password(model) path = "/api/v2/passwords"
22
- put(path, model) end
23
+ put(path, model, {}, "22.2.0") end
23
24
 
24
25
  # Create new users
25
26
  #
@@ -36,11 +37,12 @@ module AvaTax
36
37
  # ### Security Policies
37
38
  #
38
39
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
40
+ # Swagger Name: AvaTaxClient
39
41
  # @param accountId [Integer] The unique ID number of the account where these users will be created.
40
42
  # @param model [UserModel[]] The user or array of users you wish to create.
41
43
  # @return [UserModel[]]
42
44
  def create_users(accountId, model) path = "/api/v2/accounts/#{accountId}/users"
43
- post(path, model) end
45
+ post(path, model, {}, "22.2.0") end
44
46
 
45
47
  # Delete a single user
46
48
  #
@@ -54,11 +56,12 @@ module AvaTax
54
56
  # ### Security Policies
55
57
  #
56
58
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, CSPTester, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TreasuryAdmin.
59
+ # Swagger Name: AvaTaxClient
57
60
  # @param id [Integer] The ID of the user you wish to delete.
58
61
  # @param accountId [Integer] The accountID of the user you wish to delete.
59
62
  # @return [ErrorDetail[]]
60
63
  def delete_user(id, accountId) path = "/api/v2/accounts/#{accountId}/users/#{id}"
61
- delete(path) end
64
+ delete(path, {}, "22.2.0") end
62
65
 
63
66
  # Retrieve a single user
64
67
  #
@@ -72,12 +75,13 @@ module AvaTax
72
75
  # ### Security Policies
73
76
  #
74
77
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
78
+ # Swagger Name: AvaTaxClient
75
79
  # @param id [Integer] The ID of the user to retrieve.
76
80
  # @param accountId [Integer] The accountID of the user you wish to get.
77
81
  # @param include [String] Optional fetch commands.
78
82
  # @return [Object]
79
83
  def get_user(id, accountId, options={}) path = "/api/v2/accounts/#{accountId}/users/#{id}"
80
- get(path, options) end
84
+ get(path, options, "22.2.0") end
81
85
 
82
86
  # Retrieve all entitlements for a single user
83
87
  #
@@ -100,11 +104,12 @@ module AvaTax
100
104
  # ### Security Policies
101
105
  #
102
106
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
107
+ # Swagger Name: AvaTaxClient
103
108
  # @param id [Integer] The ID of the user to retrieve.
104
109
  # @param accountId [Integer] The accountID of the user you wish to get.
105
110
  # @return [Object]
106
111
  def get_user_entitlements(id, accountId) path = "/api/v2/accounts/#{accountId}/users/#{id}/entitlements"
107
- get(path) end
112
+ get(path, {}, "22.2.0") end
108
113
 
109
114
  # Retrieve users for this account
110
115
  #
@@ -124,6 +129,7 @@ module AvaTax
124
129
  # ### Security Policies
125
130
  #
126
131
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
132
+ # Swagger Name: AvaTaxClient
127
133
  # @param accountId [Integer] The accountID of the user you wish to list.
128
134
  # @param include [String] Optional fetch commands.
129
135
  # @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:* SuppressNewUserEmail
@@ -132,7 +138,7 @@ module AvaTax
132
138
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
133
139
  # @return [FetchResult]
134
140
  def list_users_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/users"
135
- get(path, options) end
141
+ get(path, options, "22.2.0") end
136
142
 
137
143
  # Retrieve all users
138
144
  #
@@ -154,6 +160,7 @@ module AvaTax
154
160
  # ### Security Policies
155
161
  #
156
162
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
163
+ # Swagger Name: AvaTaxClient
157
164
  # @param include [String] Optional fetch commands.
158
165
  # @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:* SuppressNewUserEmail
159
166
  # @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.
@@ -161,7 +168,7 @@ module AvaTax
161
168
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
162
169
  # @return [FetchResult]
163
170
  def query_users(options={}) path = "/api/v2/users"
164
- get(path, options) end
171
+ get(path, options, "22.2.0") end
165
172
 
166
173
  # Update a single user
167
174
  #
@@ -173,12 +180,13 @@ module AvaTax
173
180
  # ### Security Policies
174
181
  #
175
182
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
183
+ # Swagger Name: AvaTaxClient
176
184
  # @param id [Integer] The ID of the user you wish to update.
177
185
  # @param accountId [Integer] The accountID of the user you wish to update.
178
186
  # @param model [Object] The user object you wish to update.
179
187
  # @return [Object]
180
188
  def update_user(id, accountId, model) path = "/api/v2/accounts/#{accountId}/users/#{id}"
181
- put(path, model) end
189
+ put(path, model, {}, "22.2.0") end
182
190
  end
183
191
  end
184
192
  end
@@ -13,10 +13,11 @@ module AvaTax
13
13
  # within AvaTax. You can examine the subscriptions returned from this API call to look for a particular product
14
14
  # or subscription to provide useful information to the current user as to whether they are entitled to use
15
15
  # specific features of AvaTax.
16
+ # Swagger Name: AvaTaxClient
16
17
  # @param serviceTypeId [String] The service to check
17
18
  # @return [Object]
18
19
  def get_my_subscription(serviceTypeId) path = "/api/v2/utilities/subscriptions/#{serviceTypeId}"
19
- get(path) end
20
+ get(path, {}, "22.2.0") end
20
21
 
21
22
  # List all services to which the current user is subscribed
22
23
  #
@@ -28,9 +29,10 @@ module AvaTax
28
29
  # within AvaTax. You can examine the subscriptions returned from this API call to look for a particular product
29
30
  # or subscription to provide useful information to the current user as to whether they are entitled to use
30
31
  # specific features of AvaTax.
32
+ # Swagger Name: AvaTaxClient
31
33
  # @return [FetchResult]
32
34
  def list_my_subscriptions() path = "/api/v2/utilities/subscriptions"
33
- get(path) end
35
+ get(path, {}, "22.2.0") end
34
36
 
35
37
  # Tests connectivity and version of the service
36
38
  #
@@ -54,9 +56,10 @@ module AvaTax
54
56
  # ### Security Policies
55
57
  #
56
58
  # * This API may be called without providing authentication credentials.
59
+ # Swagger Name: AvaTaxClient
57
60
  # @return [Object]
58
61
  def ping() path = "/api/v2/utilities/ping"
59
- get(path) end
62
+ get(path, {}, "22.2.0") end
60
63
  end
61
64
  end
62
65
  end