avatax 19.12.1 → 20.1.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 (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avatax/client/accounts.rb +14 -35
  3. data/lib/avatax/client/addresses.rb +4 -10
  4. data/lib/avatax/client/avafileforms.rb +10 -25
  5. data/lib/avatax/client/batches.rb +12 -30
  6. data/lib/avatax/client/certexpressinvites.rb +6 -15
  7. data/lib/avatax/client/certificates.rb +31 -76
  8. data/lib/avatax/client/companies.rb +32 -80
  9. data/lib/avatax/client/compliance.rb +2 -5
  10. data/lib/avatax/client/contacts.rb +12 -30
  11. data/lib/avatax/client/customers.rb +26 -65
  12. data/lib/avatax/client/datasources.rb +12 -30
  13. data/lib/avatax/client/definitions.rb +124 -284
  14. data/lib/avatax/client/distancethresholds.rb +12 -30
  15. data/lib/avatax/client/filings.rb +2 -5
  16. data/lib/avatax/client/firmclientlinkages.rb +18 -45
  17. data/lib/avatax/client/free.rb +6 -15
  18. data/lib/avatax/client/fundingrequests.rb +4 -10
  19. data/lib/avatax/client/items.rb +38 -95
  20. data/lib/avatax/client/jurisdictionoverrides.rb +12 -30
  21. data/lib/avatax/client/locations.rb +14 -35
  22. data/lib/avatax/client/multidocument.rb +20 -50
  23. data/lib/avatax/client/nexus.rb +16 -40
  24. data/lib/avatax/client/notifications.rb +6 -15
  25. data/lib/avatax/client/provisioning.rb +4 -10
  26. data/lib/avatax/client/registrar.rb +20 -50
  27. data/lib/avatax/client/reports.rb +8 -20
  28. data/lib/avatax/client/settings.rb +12 -30
  29. data/lib/avatax/client/subscriptions.rb +6 -15
  30. data/lib/avatax/client/taxcodes.rb +12 -30
  31. data/lib/avatax/client/taxcontent.rb +6 -15
  32. data/lib/avatax/client/taxrules.rb +12 -30
  33. data/lib/avatax/client/transactions.rb +49 -112
  34. data/lib/avatax/client/upcs.rb +12 -30
  35. data/lib/avatax/client/users.rb +16 -40
  36. data/lib/avatax/client/utilities.rb +6 -15
  37. data/lib/avatax/version.rb +1 -1
  38. 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
  #
@@ -78,11 +75,8 @@ module AvaTax
78
75
  # @param include [String] Specifies objects to include in this fetch call
79
76
  # @param model [Object] The adjustment you wish to make
80
77
  # @return [Object]
81
- def adjust_transaction(companyCode, transactionCode, model, options={})
82
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/adjust"
83
- post(path, model, options)
84
- end
85
-
78
+ def adjust_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/adjust"
79
+ post(path, model, options) end
86
80
 
87
81
  # Get audit information about a transaction
88
82
  #
@@ -114,11 +108,8 @@ module AvaTax
114
108
  # @param companyCode [String] The code identifying the company that owns this transaction
115
109
  # @param transactionCode [String] The code identifying the transaction
116
110
  # @return [Object]
117
- def audit_transaction(companyCode, transactionCode)
118
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/audit"
119
- get(path)
120
- end
121
-
111
+ def audit_transaction(companyCode, transactionCode) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/audit"
112
+ get(path) end
122
113
 
123
114
  # Get audit information about a transaction
124
115
  #
@@ -151,11 +142,8 @@ module AvaTax
151
142
  # @param transactionCode [String] The code identifying the transaction
152
143
  # @param documentType [String] The document type of the original transaction (See DocumentType::* for a list of allowable values)
153
144
  # @return [Object]
154
- def audit_transaction_with_type(companyCode, transactionCode, documentType)
155
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}/audit"
156
- get(path)
157
- end
158
-
145
+ def audit_transaction_with_type(companyCode, transactionCode, documentType) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}/audit"
146
+ get(path) end
159
147
 
160
148
  # Lock a set of documents
161
149
  #
@@ -173,11 +161,8 @@ module AvaTax
173
161
  # * 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.
174
162
  # @param model [Object] bulk lock request
175
163
  # @return [Object]
176
- def bulk_lock_transaction(model)
177
- path = "/api/v2/transactions/lock"
178
- post(path, model)
179
- end
180
-
164
+ def bulk_lock_transaction(model) path = "/api/v2/transactions/lock"
165
+ post(path, model) end
181
166
 
182
167
  # Change a transaction's code
183
168
  #
@@ -211,18 +196,15 @@ module AvaTax
211
196
  # ### Security Policies
212
197
  #
213
198
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
214
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, AvaTaxST.
199
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
215
200
  # @param companyCode [String] The company code of the company that recorded this transaction
216
201
  # @param transactionCode [String] The transaction code to change
217
202
  # @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)
218
203
  # @param include [String] Specifies objects to include in this fetch call
219
204
  # @param model [Object] The code change request you wish to execute
220
205
  # @return [Object]
221
- def change_transaction_code(companyCode, transactionCode, model, options={})
222
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/changecode"
223
- post(path, model, options)
224
- end
225
-
206
+ def change_transaction_code(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/changecode"
207
+ post(path, model, options) end
226
208
 
227
209
  # Commit a transaction for reporting
228
210
  #
@@ -261,11 +243,8 @@ module AvaTax
261
243
  # @param include [String] Specifies objects to include in this fetch call
262
244
  # @param model [Object] The commit request you wish to execute
263
245
  # @return [Object]
264
- def commit_transaction(companyCode, transactionCode, model, options={})
265
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/commit"
266
- post(path, model, options)
267
- end
268
-
246
+ def commit_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/commit"
247
+ post(path, model, options) end
269
248
 
270
249
  # Create or adjust a transaction
271
250
  #
@@ -306,15 +285,12 @@ module AvaTax
306
285
  # ### Security Policies
307
286
  #
308
287
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
309
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
288
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
310
289
  # @param include [String] Specifies objects to include in the response after transaction is created
311
290
  # @param model [Object] The transaction you wish to create or adjust
312
291
  # @return [Object]
313
- def create_or_adjust_transaction(model, options={})
314
- path = "/api/v2/transactions/createoradjust"
315
- post(path, model, options)
316
- end
317
-
292
+ def create_or_adjust_transaction(model, options={}) path = "/api/v2/transactions/createoradjust"
293
+ post(path, model, options) end
318
294
 
319
295
  # Create a new transaction
320
296
  #
@@ -362,15 +338,12 @@ module AvaTax
362
338
  # ### Security Policies
363
339
  #
364
340
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
365
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
341
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
366
342
  # @param include [String] Specifies objects to include in the response after transaction is created
367
343
  # @param model [Object] The transaction you wish to create
368
344
  # @return [Object]
369
- def create_transaction(model, options={})
370
- path = "/api/v2/transactions/create"
371
- post(path, model, options)
372
- end
373
-
345
+ def create_transaction(model, options={}) path = "/api/v2/transactions/create"
346
+ post(path, model, options) end
374
347
 
375
348
  # Remove lines from an existing unlocked transaction
376
349
  #
@@ -399,11 +372,8 @@ module AvaTax
399
372
  # @param include [String] Specifies objects to include in the response after transaction is created
400
373
  # @param model [Object] information about the transaction and lines to be removed
401
374
  # @return [Object]
402
- def delete_lines(model, options={})
403
- path = "/api/v2/companies/transactions/lines/delete"
404
- post(path, model, options)
405
- end
406
-
375
+ def delete_lines(model, options={}) path = "/api/v2/companies/transactions/lines/delete"
376
+ post(path, model, options) end
407
377
 
408
378
  # Retrieve a single transaction by code
409
379
  #
@@ -434,17 +404,14 @@ module AvaTax
434
404
  # ### Security Policies
435
405
  #
436
406
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
437
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
407
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
438
408
  # @param companyCode [String] The company code of the company that recorded this transaction
439
409
  # @param transactionCode [String] The transaction code to retrieve
440
410
  # @param documentType [String] (Optional): The document type of the transaction to retrieve (See DocumentType::* for a list of allowable values)
441
411
  # @param include [String] Specifies objects to include in this fetch call
442
412
  # @return [Object]
443
- def get_transaction_by_code(companyCode, transactionCode, options={})
444
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}"
445
- get(path, options)
446
- end
447
-
413
+ def get_transaction_by_code(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}"
414
+ get(path, options) end
448
415
 
449
416
  # Retrieve a single transaction by code
450
417
  #
@@ -458,17 +425,14 @@ module AvaTax
458
425
  # ### Security Policies
459
426
  #
460
427
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
461
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
428
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
462
429
  # @param companyCode [String] The company code of the company that recorded this transaction
463
430
  # @param transactionCode [String] The transaction code to retrieve
464
431
  # @param documentType [String] The transaction type to retrieve (See DocumentType::* for a list of allowable values)
465
432
  # @param include [String] Specifies objects to include in this fetch call
466
433
  # @return [Object]
467
- def get_transaction_by_code_and_type(companyCode, transactionCode, documentType, options={})
468
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}"
469
- get(path, options)
470
- end
471
-
434
+ def get_transaction_by_code_and_type(companyCode, transactionCode, documentType, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}"
435
+ get(path, options) end
472
436
 
473
437
  # Retrieve a single transaction by ID
474
438
  #
@@ -493,15 +457,12 @@ module AvaTax
493
457
  # ### Security Policies
494
458
  #
495
459
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
496
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
460
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
497
461
  # @param id [Integer] The unique ID number of the transaction to retrieve
498
462
  # @param include [String] Specifies objects to include in this fetch call
499
463
  # @return [Object]
500
- def get_transaction_by_id(id, options={})
501
- path = "/api/v2/transactions/#{id}"
502
- get(path, options)
503
- end
504
-
464
+ def get_transaction_by_id(id, options={}) path = "/api/v2/transactions/#{id}"
465
+ get(path, options) end
505
466
 
506
467
  # Retrieve all transactions
507
468
  #
@@ -535,7 +496,7 @@ module AvaTax
535
496
  # ### Security Policies
536
497
  #
537
498
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
538
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
499
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
539
500
  # @param companyCode [String] The company code of the company that recorded this transaction
540
501
  # @param dataSourceId [Integer] Optionally filter transactions to those from a specific data source.
541
502
  # @param include [String] Specifies objects to include in this fetch call
@@ -544,11 +505,8 @@ module AvaTax
544
505
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
545
506
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
546
507
  # @return [FetchResult]
547
- def list_transactions_by_company(companyCode, options={})
548
- path = "/api/v2/companies/#{companyCode}/transactions"
549
- get(path, options)
550
- end
551
-
508
+ def list_transactions_by_company(companyCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions"
509
+ get(path, options) end
552
510
 
553
511
  # Lock a single transaction
554
512
  #
@@ -589,11 +547,8 @@ module AvaTax
589
547
  # @param include [String] Specifies objects to include in this fetch call
590
548
  # @param model [Object] The lock request you wish to execute
591
549
  # @return [Object]
592
- def lock_transaction(companyCode, transactionCode, model, options={})
593
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/lock"
594
- post(path, model, options)
595
- end
596
-
550
+ def lock_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/lock"
551
+ post(path, model, options) end
597
552
 
598
553
  # Create a refund for a transaction
599
554
  #
@@ -645,11 +600,8 @@ module AvaTax
645
600
  # @param useTaxDateOverride [Boolean] (Optional): If set to true, processes refund using taxDateOverride rather than taxAmountOverride (Note: taxAmountOverride is not allowed for SST states).
646
601
  # @param model [Object] Information about the refund to create
647
602
  # @return [Object]
648
- def refund_transaction(companyCode, transactionCode, model, options={})
649
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/refund"
650
- post(path, model, options)
651
- end
652
-
603
+ def refund_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/refund"
604
+ post(path, model, options) end
653
605
 
654
606
  # Perform multiple actions on a transaction
655
607
  #
@@ -688,11 +640,8 @@ module AvaTax
688
640
  # @param include [String] Specifies objects to include in this fetch call
689
641
  # @param model [Object] The data from an external system to reconcile against AvaTax
690
642
  # @return [Object]
691
- def settle_transaction(companyCode, transactionCode, model, options={})
692
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/settle"
693
- post(path, model, options)
694
- end
695
-
643
+ def settle_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/settle"
644
+ post(path, model, options) end
696
645
 
697
646
  # Uncommit a transaction for reporting
698
647
  #
@@ -725,11 +674,8 @@ module AvaTax
725
674
  # @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)
726
675
  # @param include [String] Specifies objects to include in this fetch call
727
676
  # @return [Object]
728
- def uncommit_transaction(companyCode, transactionCode, options={})
729
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/uncommit"
730
- post(path, options)
731
- end
732
-
677
+ def uncommit_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/uncommit"
678
+ post(path, options) end
733
679
 
734
680
  # Unvoids a transaction
735
681
  #
@@ -759,11 +705,8 @@ module AvaTax
759
705
  # @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)
760
706
  # @param include [String] Specifies objects to include in this fetch call
761
707
  # @return [Object]
762
- def unvoid_transaction(companyCode, transactionCode, options={})
763
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/unvoid"
764
- post(path, options)
765
- end
766
-
708
+ def unvoid_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/unvoid"
709
+ post(path, options) end
767
710
 
768
711
  # Verify a transaction
769
712
  #
@@ -801,11 +744,8 @@ module AvaTax
801
744
  # @param include [String] Specifies objects to include in this fetch call
802
745
  # @param model [Object] The data from an external system to reconcile against AvaTax
803
746
  # @return [Object]
804
- def verify_transaction(companyCode, transactionCode, model, options={})
805
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/verify"
806
- post(path, model, options)
807
- end
808
-
747
+ def verify_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/verify"
748
+ post(path, model, options) end
809
749
 
810
750
  # Void a transaction
811
751
  #
@@ -845,11 +785,8 @@ module AvaTax
845
785
  # @param include [String] Specifies objects to include in this fetch call
846
786
  # @param model [Object] The void request you wish to execute. To void a transaction the code must be set to 'DocVoided'
847
787
  # @return [Object]
848
- def void_transaction(companyCode, transactionCode, model, options={})
849
- path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/void"
850
- post(path, model, options)
851
- end
852
-
788
+ def void_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/void"
789
+ post(path, model, options) end
853
790
  end
854
791
  end
855
792
  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