avatax 20.7.0 → 20.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avatax/client/accounts.rb +22 -55
  3. data/lib/avatax/client/addresses.rb +4 -10
  4. data/lib/avatax/client/advancedrules.rb +12 -30
  5. data/lib/avatax/client/avafileforms.rb +10 -25
  6. data/lib/avatax/client/batches.rb +16 -40
  7. data/lib/avatax/client/certexpressinvites.rb +6 -15
  8. data/lib/avatax/client/certificates.rb +30 -75
  9. data/lib/avatax/client/companies.rb +32 -80
  10. data/lib/avatax/client/compliance.rb +2 -5
  11. data/lib/avatax/client/contacts.rb +12 -30
  12. data/lib/avatax/client/customers.rb +26 -65
  13. data/lib/avatax/client/datasources.rb +12 -30
  14. data/lib/avatax/client/definitions.rb +118 -295
  15. data/lib/avatax/client/distancethresholds.rb +12 -30
  16. data/lib/avatax/client/filingcalendars.rb +2 -5
  17. data/lib/avatax/client/filings.rb +2 -5
  18. data/lib/avatax/client/firmclientlinkages.rb +18 -45
  19. data/lib/avatax/client/free.rb +6 -15
  20. data/lib/avatax/client/fundingrequests.rb +4 -10
  21. data/lib/avatax/client/items.rb +38 -95
  22. data/lib/avatax/client/jurisdictionoverrides.rb +12 -30
  23. data/lib/avatax/client/locations.rb +14 -35
  24. data/lib/avatax/client/multidocument.rb +20 -50
  25. data/lib/avatax/client/nexus.rb +16 -40
  26. data/lib/avatax/client/notifications.rb +6 -15
  27. data/lib/avatax/client/provisioning.rb +4 -10
  28. data/lib/avatax/client/registrar.rb +20 -50
  29. data/lib/avatax/client/reports.rb +8 -20
  30. data/lib/avatax/client/settings.rb +12 -30
  31. data/lib/avatax/client/subscriptions.rb +6 -15
  32. data/lib/avatax/client/taxcodes.rb +12 -30
  33. data/lib/avatax/client/taxcontent.rb +6 -15
  34. data/lib/avatax/client/taxrules.rb +12 -30
  35. data/lib/avatax/client/transactions.rb +42 -105
  36. data/lib/avatax/client/upcs.rb +12 -30
  37. data/lib/avatax/client/users.rb +16 -40
  38. data/lib/avatax/client/utilities.rb +6 -15
  39. data/lib/avatax/version.rb +1 -1
  40. metadata +2 -2
@@ -25,11 +25,8 @@ module AvaTax
25
25
  # @param companyId [Integer] The ID of the company that owns this tax rule.
26
26
  # @param model [TaxRuleModel[]] The tax rule you wish to create.
27
27
  # @return [TaxRuleModel[]]
28
- def create_tax_rules(companyId, model)
29
- path = "/api/v2/companies/#{companyId}/taxrules"
30
- post(path, model)
31
- end
32
-
28
+ def create_tax_rules(companyId, model) path = "/api/v2/companies/#{companyId}/taxrules"
29
+ post(path, model) end
33
30
 
34
31
  # Delete a single tax rule
35
32
  #
@@ -53,11 +50,8 @@ module AvaTax
53
50
  # @param companyId [Integer] The ID of the company that owns this tax rule.
54
51
  # @param id [Integer] The ID of the tax rule you wish to delete.
55
52
  # @return [ErrorDetail[]]
56
- def delete_tax_rule(companyId, id)
57
- path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
58
- delete(path)
59
- end
60
-
53
+ def delete_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
54
+ delete(path) end
61
55
 
62
56
  # Retrieve a single tax rule
63
57
  #
@@ -81,11 +75,8 @@ module AvaTax
81
75
  # @param companyId [Integer] The ID of the company that owns this tax rule
82
76
  # @param id [Integer] The primary key of this tax rule
83
77
  # @return [Object]
84
- def get_tax_rule(companyId, id)
85
- path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
86
- get(path)
87
- end
88
-
78
+ def get_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
79
+ get(path) end
89
80
 
90
81
  # Retrieve tax rules for this company
91
82
  #
@@ -116,11 +107,8 @@ module AvaTax
116
107
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
117
108
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
118
109
  # @return [FetchResult]
119
- def list_tax_rules(companyId, options={})
120
- path = "/api/v2/companies/#{companyId}/taxrules"
121
- get(path, options)
122
- end
123
-
110
+ def list_tax_rules(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxrules"
111
+ get(path, options) end
124
112
 
125
113
  # Retrieve all tax rules
126
114
  #
@@ -150,11 +138,8 @@ module AvaTax
150
138
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
151
139
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
152
140
  # @return [FetchResult]
153
- def query_tax_rules(options={})
154
- path = "/api/v2/taxrules"
155
- get(path, options)
156
- end
157
-
141
+ def query_tax_rules(options={}) path = "/api/v2/taxrules"
142
+ get(path, options) end
158
143
 
159
144
  # Update a single tax rule
160
145
  #
@@ -179,11 +164,8 @@ module AvaTax
179
164
  # @param id [Integer] The ID of the tax rule you wish to update
180
165
  # @param model [Object] The tax rule you wish to update.
181
166
  # @return [Object]
182
- def update_tax_rule(companyId, id, model)
183
- path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
184
- put(path, model)
185
- end
186
-
167
+ def update_tax_rule(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
168
+ put(path, model) end
187
169
  end
188
170
  end
189
171
  end
@@ -33,11 +33,8 @@ module AvaTax
33
33
  # @param include [String] Specifies objects to include in the response after transaction is created
34
34
  # @param model [Object] information about the transaction and lines to be added
35
35
  # @return [Object]
36
- def add_lines(model, options={})
37
- path = "/api/v2/companies/transactions/lines/add"
38
- post(path, model, options)
39
- end
40
-
36
+ def add_lines(model, options={}) path = "/api/v2/companies/transactions/lines/add"
37
+ post(path, model, options) end
41
38
 
42
39
  # Correct a previously created transaction
43
40
  #
@@ -81,11 +78,8 @@ module AvaTax
81
78
  # @param include [String] Specifies objects to include in this fetch call
82
79
  # @param model [Object] The adjustment you wish to make
83
80
  # @return [Object]
84
- def adjust_transaction(companyCode, transactionCode, model, options={})
85
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/adjust"
86
- post(path, model, options)
87
- end
88
-
81
+ def adjust_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/adjust"
82
+ post(path, model, options) end
89
83
 
90
84
  # Get audit information about a transaction
91
85
  #
@@ -120,11 +114,8 @@ module AvaTax
120
114
  # @param companyCode [String] The code identifying the company that owns this transaction
121
115
  # @param transactionCode [String] The code identifying the transaction
122
116
  # @return [Object]
123
- def audit_transaction(companyCode, transactionCode)
124
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/audit"
125
- get(path)
126
- end
127
-
117
+ def audit_transaction(companyCode, transactionCode) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/audit"
118
+ get(path) end
128
119
 
129
120
  # Get audit information about a transaction
130
121
  #
@@ -160,11 +151,8 @@ module AvaTax
160
151
  # @param transactionCode [String] The code identifying the transaction
161
152
  # @param documentType [String] The document type of the original transaction (See DocumentType::* for a list of allowable values)
162
153
  # @return [Object]
163
- def audit_transaction_with_type(companyCode, transactionCode, documentType)
164
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}/audit"
165
- get(path)
166
- end
167
-
154
+ def audit_transaction_with_type(companyCode, transactionCode, documentType) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}/audit"
155
+ get(path) end
168
156
 
169
157
  # Lock a set of documents
170
158
  #
@@ -182,11 +170,8 @@ module AvaTax
182
170
  # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
183
171
  # @param model [Object] bulk lock request
184
172
  # @return [Object]
185
- def bulk_lock_transaction(model)
186
- path = "/api/v2/transactions/lock"
187
- post(path, model)
188
- end
189
-
173
+ def bulk_lock_transaction(model) path = "/api/v2/transactions/lock"
174
+ post(path, model) end
190
175
 
191
176
  # Change a transaction's code
192
177
  #
@@ -230,11 +215,8 @@ module AvaTax
230
215
  # @param include [String] Specifies objects to include in this fetch call
231
216
  # @param model [Object] The code change request you wish to execute
232
217
  # @return [Object]
233
- def change_transaction_code(companyCode, transactionCode, model, options={})
234
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/changecode"
235
- post(path, model, options)
236
- end
237
-
218
+ def change_transaction_code(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/changecode"
219
+ post(path, model, options) end
238
220
 
239
221
  # Commit a transaction for reporting
240
222
  #
@@ -276,11 +258,8 @@ module AvaTax
276
258
  # @param include [String] Specifies objects to include in this fetch call
277
259
  # @param model [Object] The commit request you wish to execute
278
260
  # @return [Object]
279
- def commit_transaction(companyCode, transactionCode, model, options={})
280
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/commit"
281
- post(path, model, options)
282
- end
283
-
261
+ def commit_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/commit"
262
+ post(path, model, options) end
284
263
 
285
264
  # Create or adjust a transaction
286
265
  #
@@ -325,11 +304,8 @@ module AvaTax
325
304
  # @param include [String] Specifies objects to include in the response after transaction is created
326
305
  # @param model [Object] The transaction you wish to create or adjust
327
306
  # @return [Object]
328
- def create_or_adjust_transaction(model, options={})
329
- path = "/api/v2/transactions/createoradjust"
330
- post(path, model, options)
331
- end
332
-
307
+ def create_or_adjust_transaction(model, options={}) path = "/api/v2/transactions/createoradjust"
308
+ post(path, model, options) end
333
309
 
334
310
  # Create a new transaction
335
311
  #
@@ -381,11 +357,8 @@ module AvaTax
381
357
  # @param include [String] Specifies objects to include in the response after transaction is created
382
358
  # @param model [Object] The transaction you wish to create
383
359
  # @return [Object]
384
- def create_transaction(model, options={})
385
- path = "/api/v2/transactions/create"
386
- post(path, model, options)
387
- end
388
-
360
+ def create_transaction(model, options={}) path = "/api/v2/transactions/create"
361
+ post(path, model, options) end
389
362
 
390
363
  # Remove lines from an existing unlocked transaction
391
364
  #
@@ -414,11 +387,8 @@ module AvaTax
414
387
  # @param include [String] Specifies objects to include in the response after transaction is created
415
388
  # @param model [Object] information about the transaction and lines to be removed
416
389
  # @return [Object]
417
- def delete_lines(model, options={})
418
- path = "/api/v2/companies/transactions/lines/delete"
419
- post(path, model, options)
420
- end
421
-
390
+ def delete_lines(model, options={}) path = "/api/v2/companies/transactions/lines/delete"
391
+ post(path, model, options) end
422
392
 
423
393
  # Retrieve a single transaction by code
424
394
  #
@@ -458,11 +428,8 @@ module AvaTax
458
428
  # @param documentType [String] (Optional): The document type of the transaction to retrieve (See DocumentType::* for a list of allowable values)
459
429
  # @param include [String] Specifies objects to include in this fetch call
460
430
  # @return [Object]
461
- def get_transaction_by_code(companyCode, transactionCode, options={})
462
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}"
463
- get(path, options)
464
- end
465
-
431
+ def get_transaction_by_code(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}"
432
+ get(path, options) end
466
433
 
467
434
  # Retrieve a single transaction by code
468
435
  #
@@ -485,11 +452,8 @@ module AvaTax
485
452
  # @param documentType [String] The transaction type to retrieve (See DocumentType::* for a list of allowable values)
486
453
  # @param include [String] Specifies objects to include in this fetch call
487
454
  # @return [Object]
488
- def get_transaction_by_code_and_type(companyCode, transactionCode, documentType, options={})
489
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}"
490
- get(path, options)
491
- end
492
-
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
493
457
 
494
458
  # Retrieve a single transaction by ID
495
459
  #
@@ -518,11 +482,8 @@ module AvaTax
518
482
  # @param id [Integer] The unique ID number of the transaction to retrieve
519
483
  # @param include [String] Specifies objects to include in this fetch call
520
484
  # @return [Object]
521
- def get_transaction_by_id(id, options={})
522
- path = "/api/v2/transactions/#{id}"
523
- get(path, options)
524
- end
525
-
485
+ def get_transaction_by_id(id, options={}) path = "/api/v2/transactions/#{id}"
486
+ get(path, options) end
526
487
 
527
488
  # Retrieve all transactions
528
489
  #
@@ -568,11 +529,8 @@ module AvaTax
568
529
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
569
530
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
570
531
  # @return [FetchResult]
571
- def list_transactions_by_company(companyCode, options={})
572
- path = "/api/v2/companies/#{companyCode}/transactions"
573
- get(path, options)
574
- end
575
-
532
+ def list_transactions_by_company(companyCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions"
533
+ get(path, options) end
576
534
 
577
535
  # Lock a single transaction
578
536
  #
@@ -616,11 +574,8 @@ module AvaTax
616
574
  # @param include [String] Specifies objects to include in this fetch call
617
575
  # @param model [Object] The lock request you wish to execute
618
576
  # @return [Object]
619
- def lock_transaction(companyCode, transactionCode, model, options={})
620
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/lock"
621
- post(path, model, options)
622
- end
623
-
577
+ def lock_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/lock"
578
+ post(path, model, options) end
624
579
 
625
580
  # Create a refund for a transaction
626
581
  #
@@ -675,11 +630,8 @@ module AvaTax
675
630
  # @param useTaxDateOverride [Boolean] (Optional): If set to true, processes refund using taxDateOverride rather than taxAmountOverride (Note: taxAmountOverride is not allowed for SST states).
676
631
  # @param model [Object] Information about the refund to create
677
632
  # @return [Object]
678
- def refund_transaction(companyCode, transactionCode, model, options={})
679
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/refund"
680
- post(path, model, options)
681
- end
682
-
633
+ def refund_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/refund"
634
+ post(path, model, options) end
683
635
 
684
636
  # Perform multiple actions on a transaction
685
637
  #
@@ -721,11 +673,8 @@ module AvaTax
721
673
  # @param include [String] Specifies objects to include in this fetch call
722
674
  # @param model [Object] The data from an external system to reconcile against AvaTax
723
675
  # @return [Object]
724
- def settle_transaction(companyCode, transactionCode, model, options={})
725
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/settle"
726
- post(path, model, options)
727
- end
728
-
676
+ def settle_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/settle"
677
+ post(path, model, options) end
729
678
 
730
679
  # Uncommit a transaction for reporting
731
680
  #
@@ -761,11 +710,8 @@ module AvaTax
761
710
  # @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)
762
711
  # @param include [String] Specifies objects to include in this fetch call
763
712
  # @return [Object]
764
- def uncommit_transaction(companyCode, transactionCode, options={})
765
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/uncommit"
766
- post(path, options)
767
- end
768
-
713
+ def uncommit_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/uncommit"
714
+ post(path, options) end
769
715
 
770
716
  # Unvoids a transaction
771
717
  #
@@ -798,11 +744,8 @@ module AvaTax
798
744
  # @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)
799
745
  # @param include [String] Specifies objects to include in this fetch call
800
746
  # @return [Object]
801
- def unvoid_transaction(companyCode, transactionCode, options={})
802
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/unvoid"
803
- post(path, options)
804
- end
805
-
747
+ def unvoid_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/unvoid"
748
+ post(path, options) end
806
749
 
807
750
  # Verify a transaction
808
751
  #
@@ -843,11 +786,8 @@ module AvaTax
843
786
  # @param include [String] Specifies objects to include in this fetch call
844
787
  # @param model [Object] The data from an external system to reconcile against AvaTax
845
788
  # @return [Object]
846
- def verify_transaction(companyCode, transactionCode, model, options={})
847
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/verify"
848
- post(path, model, options)
849
- end
850
-
789
+ def verify_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/verify"
790
+ post(path, model, options) end
851
791
 
852
792
  # Void a transaction
853
793
  #
@@ -890,11 +830,8 @@ module AvaTax
890
830
  # @param include [String] Specifies objects to include in this fetch call
891
831
  # @param model [Object] The void request you wish to execute. To void a transaction the code must be set to 'DocVoided'
892
832
  # @return [Object]
893
- def void_transaction(companyCode, transactionCode, model, options={})
894
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/void"
895
- post(path, model, options)
896
- end
897
-
833
+ def void_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/void"
834
+ post(path, model, options) end
898
835
  end
899
836
  end
900
837
  end
@@ -15,11 +15,8 @@ module AvaTax
15
15
  # @param companyId [Integer] The ID of the company that owns this UPC.
16
16
  # @param model [UPCModel[]] The UPC you wish to create.
17
17
  # @return [UPCModel[]]
18
- def create_u_p_cs(companyId, model)
19
- path = "/api/v2/companies/#{companyId}/upcs"
20
- post(path, model)
21
- end
22
-
18
+ def create_u_p_cs(companyId, model) path = "/api/v2/companies/#{companyId}/upcs"
19
+ post(path, model) end
23
20
 
24
21
  # Delete a single UPC
25
22
  #
@@ -32,11 +29,8 @@ module AvaTax
32
29
  # @param companyId [Integer] The ID of the company that owns this UPC.
33
30
  # @param id [Integer] The ID of the UPC you wish to delete.
34
31
  # @return [ErrorDetail[]]
35
- def delete_u_p_c(companyId, id)
36
- path = "/api/v2/companies/#{companyId}/upcs/#{id}"
37
- delete(path)
38
- end
39
-
32
+ def delete_u_p_c(companyId, id) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
33
+ delete(path) end
40
34
 
41
35
  # Retrieve a single UPC
42
36
  #
@@ -50,11 +44,8 @@ module AvaTax
50
44
  # @param companyId [Integer] The ID of the company that owns this UPC
51
45
  # @param id [Integer] The primary key of this UPC
52
46
  # @return [Object]
53
- def get_u_p_c(companyId, id)
54
- path = "/api/v2/companies/#{companyId}/upcs/#{id}"
55
- get(path)
56
- end
57
-
47
+ def get_u_p_c(companyId, id) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
48
+ get(path) end
58
49
 
59
50
  # Retrieve UPCs for this company
60
51
  #
@@ -75,11 +66,8 @@ module AvaTax
75
66
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
76
67
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
77
68
  # @return [FetchResult]
78
- def list_u_p_cs_by_company(companyId, options={})
79
- path = "/api/v2/companies/#{companyId}/upcs"
80
- get(path, options)
81
- end
82
-
69
+ def list_u_p_cs_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/upcs"
70
+ get(path, options) end
83
71
 
84
72
  # Retrieve all UPCs
85
73
  #
@@ -99,11 +87,8 @@ module AvaTax
99
87
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
100
88
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
101
89
  # @return [FetchResult]
102
- def query_u_p_cs(options={})
103
- path = "/api/v2/upcs"
104
- get(path, options)
105
- end
106
-
90
+ def query_u_p_cs(options={}) path = "/api/v2/upcs"
91
+ get(path, options) end
107
92
 
108
93
  # Update a single UPC
109
94
  #
@@ -120,11 +105,8 @@ module AvaTax
120
105
  # @param id [Integer] The ID of the UPC you wish to update
121
106
  # @param model [Object] The UPC you wish to update.
122
107
  # @return [Object]
123
- def update_u_p_c(companyId, id, model)
124
- path = "/api/v2/companies/#{companyId}/upcs/#{id}"
125
- put(path, model)
126
- end
127
-
108
+ def update_u_p_c(companyId, id, model) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
109
+ put(path, model) end
128
110
  end
129
111
  end
130
112
  end
@@ -18,11 +18,8 @@ module AvaTax
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
19
  # @param model [Object] An object containing your current password and the new password.
20
20
  # @return [String]
21
- def change_password(model)
22
- path = "/api/v2/passwords"
23
- put(path, model)
24
- end
25
-
21
+ def change_password(model) path = "/api/v2/passwords"
22
+ put(path, model) end
26
23
 
27
24
  # Create new users
28
25
  #
@@ -42,11 +39,8 @@ module AvaTax
42
39
  # @param accountId [Integer] The unique ID number of the account where these users will be created.
43
40
  # @param model [UserModel[]] The user or array of users you wish to create.
44
41
  # @return [UserModel[]]
45
- def create_users(accountId, model)
46
- path = "/api/v2/accounts/#{accountId}/users"
47
- post(path, model)
48
- end
49
-
42
+ def create_users(accountId, model) path = "/api/v2/accounts/#{accountId}/users"
43
+ post(path, model) end
50
44
 
51
45
  # Delete a single user
52
46
  #
@@ -63,11 +57,8 @@ module AvaTax
63
57
  # @param id [Integer] The ID of the user you wish to delete.
64
58
  # @param accountId [Integer] The accountID of the user you wish to delete.
65
59
  # @return [ErrorDetail[]]
66
- def delete_user(id, accountId)
67
- path = "/api/v2/accounts/#{accountId}/users/#{id}"
68
- delete(path)
69
- end
70
-
60
+ def delete_user(id, accountId) path = "/api/v2/accounts/#{accountId}/users/#{id}"
61
+ delete(path) end
71
62
 
72
63
  # Retrieve a single user
73
64
  #
@@ -85,11 +76,8 @@ module AvaTax
85
76
  # @param accountId [Integer] The accountID of the user you wish to get.
86
77
  # @param include [String] Optional fetch commands.
87
78
  # @return [Object]
88
- def get_user(id, accountId, options={})
89
- path = "/api/v2/accounts/#{accountId}/users/#{id}"
90
- get(path, options)
91
- end
92
-
79
+ def get_user(id, accountId, options={}) path = "/api/v2/accounts/#{accountId}/users/#{id}"
80
+ get(path, options) end
93
81
 
94
82
  # Retrieve all entitlements for a single user
95
83
  #
@@ -115,11 +103,8 @@ module AvaTax
115
103
  # @param id [Integer] The ID of the user to retrieve.
116
104
  # @param accountId [Integer] The accountID of the user you wish to get.
117
105
  # @return [Object]
118
- def get_user_entitlements(id, accountId)
119
- path = "/api/v2/accounts/#{accountId}/users/#{id}/entitlements"
120
- get(path)
121
- end
122
-
106
+ def get_user_entitlements(id, accountId) path = "/api/v2/accounts/#{accountId}/users/#{id}/entitlements"
107
+ get(path) end
123
108
 
124
109
  # Retrieve users for this account
125
110
  #
@@ -146,11 +131,8 @@ module AvaTax
146
131
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
147
132
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
148
133
  # @return [FetchResult]
149
- def list_users_by_account(accountId, options={})
150
- path = "/api/v2/accounts/#{accountId}/users"
151
- get(path, options)
152
- end
153
-
134
+ def list_users_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/users"
135
+ get(path, options) end
154
136
 
155
137
  # Retrieve all users
156
138
  #
@@ -178,11 +160,8 @@ module AvaTax
178
160
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
179
161
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
180
162
  # @return [FetchResult]
181
- def query_users(options={})
182
- path = "/api/v2/users"
183
- get(path, options)
184
- end
185
-
163
+ def query_users(options={}) path = "/api/v2/users"
164
+ get(path, options) end
186
165
 
187
166
  # Update a single user
188
167
  #
@@ -198,11 +177,8 @@ module AvaTax
198
177
  # @param accountId [Integer] The accountID of the user you wish to update.
199
178
  # @param model [Object] The user object you wish to update.
200
179
  # @return [Object]
201
- def update_user(id, accountId, model)
202
- path = "/api/v2/accounts/#{accountId}/users/#{id}"
203
- put(path, model)
204
- end
205
-
180
+ def update_user(id, accountId, model) path = "/api/v2/accounts/#{accountId}/users/#{id}"
181
+ put(path, model) end
206
182
  end
207
183
  end
208
184
  end