avatax 20.5.0 → 20.6.0

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 +116 -83
  3. data/lib/avatax/client/addresses.rb +26 -20
  4. data/lib/avatax/client/advancedrules.rb +56 -41
  5. data/lib/avatax/client/avafileforms.rb +56 -41
  6. data/lib/avatax/client/batches.rb +125 -48
  7. data/lib/avatax/client/certexpressinvites.rb +36 -27
  8. data/lib/avatax/client/certificates.rb +156 -111
  9. data/lib/avatax/client/companies.rb +166 -118
  10. data/lib/avatax/client/compliance.rb +16 -13
  11. data/lib/avatax/client/contacts.rb +66 -48
  12. data/lib/avatax/client/customers.rb +136 -97
  13. data/lib/avatax/client/datasources.rb +66 -48
  14. data/lib/avatax/client/definitions.rb +596 -419
  15. data/lib/avatax/client/distancethresholds.rb +66 -48
  16. data/lib/avatax/client/filingcalendars.rb +16 -13
  17. data/lib/avatax/client/filings.rb +16 -13
  18. data/lib/avatax/client/firmclientlinkages.rb +96 -69
  19. data/lib/avatax/client/free.rb +36 -27
  20. data/lib/avatax/client/fundingrequests.rb +26 -20
  21. data/lib/avatax/client/items.rb +196 -139
  22. data/lib/avatax/client/jurisdictionoverrides.rb +66 -48
  23. data/lib/avatax/client/locations.rb +76 -55
  24. data/lib/avatax/client/multidocument.rb +106 -76
  25. data/lib/avatax/client/nexus.rb +82 -183
  26. data/lib/avatax/client/notifications.rb +36 -27
  27. data/lib/avatax/client/provisioning.rb +26 -20
  28. data/lib/avatax/client/registrar.rb +106 -76
  29. data/lib/avatax/client/reports.rb +46 -34
  30. data/lib/avatax/client/settings.rb +66 -48
  31. data/lib/avatax/client/subscriptions.rb +36 -27
  32. data/lib/avatax/client/taxcodes.rb +66 -48
  33. data/lib/avatax/client/taxcontent.rb +36 -27
  34. data/lib/avatax/client/taxrules.rb +66 -48
  35. data/lib/avatax/client/transactions.rb +216 -153
  36. data/lib/avatax/client/upcs.rb +66 -48
  37. data/lib/avatax/client/users.rb +86 -62
  38. data/lib/avatax/client/utilities.rb +36 -27
  39. data/lib/avatax/version.rb +1 -1
  40. metadata +2 -2
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module Transactions
4
-
5
-
6
- # Add lines to an existing unlocked transaction
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Transactions
4
+
5
+
6
+ # Add lines to an existing unlocked transaction
7
+ #
8
8
  # Add lines to an existing unlocked transaction.
9
9
  #
10
10
  # The `AddLines` API allows you to add additional transaction lines to existing transaction, so that customer will
@@ -29,15 +29,18 @@ module AvaTax
29
29
  # ### Security Policies
30
30
  #
31
31
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
32
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
32
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
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
- # @return [Object]
36
- def add_lines(model, options={}) path = "/api/v2/companies/transactions/lines/add"
37
- post(path, model, options) end
38
-
39
- # Correct a previously created transaction
40
- #
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
+
41
+
42
+ # Correct a previously created transaction
43
+ #
41
44
  # Replaces the current transaction uniquely identified by this URL with a new transaction.
42
45
  #
43
46
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
@@ -69,18 +72,21 @@ module AvaTax
69
72
  # ### Security Policies
70
73
  #
71
74
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
72
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
75
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
73
76
  # @param companyCode [String] The company code of the company that recorded this transaction
74
77
  # @param transactionCode [String] The transaction code to adjust
75
78
  # @param documentType [String] (Optional): The document type of the transaction to adjust. (See DocumentType::* for a list of allowable values)
76
79
  # @param include [String] Specifies objects to include in this fetch call
77
80
  # @param model [Object] The adjustment you wish to make
78
- # @return [Object]
79
- def adjust_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/adjust"
80
- post(path, model, options) end
81
-
82
- # Get audit information about a transaction
83
- #
81
+ # @return [Object]
82
+ def adjust_transaction(companyCode, transactionCode, model, options={})
83
+ path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/adjust"
84
+ post(path, model, options)
85
+ end
86
+
87
+
88
+ # Get audit information about a transaction
89
+ #
84
90
  # Retrieve audit information about a transaction stored in AvaTax.
85
91
  #
86
92
  # The `AuditTransaction` API retrieves audit information related to a specific transaction. This audit
@@ -106,15 +112,18 @@ module AvaTax
106
112
  # ### Security Policies
107
113
  #
108
114
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
109
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
115
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
110
116
  # @param companyCode [String] The code identifying the company that owns this transaction
111
117
  # @param transactionCode [String] The code identifying the transaction
112
- # @return [Object]
113
- def audit_transaction(companyCode, transactionCode) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/audit"
114
- get(path) end
115
-
116
- # Get audit information about a transaction
117
- #
118
+ # @return [Object]
119
+ def audit_transaction(companyCode, transactionCode)
120
+ path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/audit"
121
+ get(path)
122
+ end
123
+
124
+
125
+ # Get audit information about a transaction
126
+ #
118
127
  # Retrieve audit information about a transaction stored in AvaTax.
119
128
  #
120
129
  # The `AuditTransaction` API retrieves audit information related to a specific transaction. This audit
@@ -140,16 +149,19 @@ module AvaTax
140
149
  # ### Security Policies
141
150
  #
142
151
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
143
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
152
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
144
153
  # @param companyCode [String] The code identifying the company that owns this transaction
145
154
  # @param transactionCode [String] The code identifying the transaction
146
155
  # @param documentType [String] The document type of the original transaction (See DocumentType::* for a list of allowable values)
147
- # @return [Object]
148
- def audit_transaction_with_type(companyCode, transactionCode, documentType) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}/audit"
149
- get(path) end
150
-
151
- # Lock a set of documents
152
- #
156
+ # @return [Object]
157
+ def audit_transaction_with_type(companyCode, transactionCode, documentType)
158
+ path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}/audit"
159
+ get(path)
160
+ end
161
+
162
+
163
+ # Lock a set of documents
164
+ #
153
165
  # This API is available by invitation only.
154
166
  #
155
167
  # Lock a set of transactions uniquely identified by DocumentIds provided. This API allows locking multiple documents at once.
@@ -161,14 +173,17 @@ module AvaTax
161
173
  # ### Security Policies
162
174
  #
163
175
  # * This API requires the user role Compliance Root User.
164
- # * 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.
176
+ # * 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.
165
177
  # @param model [Object] bulk lock request
166
- # @return [Object]
167
- def bulk_lock_transaction(model) path = "/api/v2/transactions/lock"
168
- post(path, model) end
169
-
170
- # Change a transaction's code
171
- #
178
+ # @return [Object]
179
+ def bulk_lock_transaction(model)
180
+ path = "/api/v2/transactions/lock"
181
+ post(path, model)
182
+ end
183
+
184
+
185
+ # Change a transaction's code
186
+ #
172
187
  # Renames a transaction uniquely identified by this URL by changing its `code` value.
173
188
  #
174
189
  # This API is available as long as the transaction is in `saved` or `posted` status. When a transaction
@@ -200,18 +215,21 @@ module AvaTax
200
215
  # ### Security Policies
201
216
  #
202
217
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
203
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
218
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
204
219
  # @param companyCode [String] The company code of the company that recorded this transaction
205
220
  # @param transactionCode [String] The transaction code to change
206
221
  # @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)
207
222
  # @param include [String] Specifies objects to include in this fetch call
208
223
  # @param model [Object] The code change request you wish to execute
209
- # @return [Object]
210
- def change_transaction_code(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/changecode"
211
- post(path, model, options) end
212
-
213
- # Commit a transaction for reporting
214
- #
224
+ # @return [Object]
225
+ def change_transaction_code(companyCode, transactionCode, model, options={})
226
+ path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/changecode"
227
+ post(path, model, options)
228
+ end
229
+
230
+
231
+ # Commit a transaction for reporting
232
+ #
215
233
  # Marks a transaction by changing its status to `Committed`.
216
234
  #
217
235
  # Transactions that are committed are available to be reported to a tax authority by Avalara Managed Returns.
@@ -241,18 +259,21 @@ module AvaTax
241
259
  #
242
260
  # ### Security Policies
243
261
  #
244
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
262
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
245
263
  # @param companyCode [String] The company code of the company that recorded this transaction
246
264
  # @param transactionCode [String] The transaction code to commit
247
265
  # @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)
248
266
  # @param include [String] Specifies objects to include in this fetch call
249
267
  # @param model [Object] The commit request you wish to execute
250
- # @return [Object]
251
- def commit_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/commit"
252
- post(path, model, options) end
253
-
254
- # Create or adjust a transaction
255
- #
268
+ # @return [Object]
269
+ def commit_transaction(companyCode, transactionCode, model, options={})
270
+ path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/commit"
271
+ post(path, model, options)
272
+ end
273
+
274
+
275
+ # Create or adjust a transaction
276
+ #
256
277
  # Records a new transaction or adjust an existing transaction in AvaTax.
257
278
  #
258
279
  # The `CreateOrAdjustTransaction` endpoint is used to create a new transaction or update an existing one. This API
@@ -290,15 +311,18 @@ module AvaTax
290
311
  # ### Security Policies
291
312
  #
292
313
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
293
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
314
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
294
315
  # @param include [String] Specifies objects to include in the response after transaction is created
295
316
  # @param model [Object] The transaction you wish to create or adjust
296
- # @return [Object]
297
- def create_or_adjust_transaction(model, options={}) path = "/api/v2/transactions/createoradjust"
298
- post(path, model, options) end
299
-
300
- # Create a new transaction
301
- #
317
+ # @return [Object]
318
+ def create_or_adjust_transaction(model, options={})
319
+ path = "/api/v2/transactions/createoradjust"
320
+ post(path, model, options)
321
+ end
322
+
323
+
324
+ # Create a new transaction
325
+ #
302
326
  # Records a new transaction in AvaTax.
303
327
  #
304
328
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
@@ -343,15 +367,18 @@ module AvaTax
343
367
  # ### Security Policies
344
368
  #
345
369
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
346
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
370
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
347
371
  # @param include [String] Specifies objects to include in the response after transaction is created
348
372
  # @param model [Object] The transaction you wish to create
349
- # @return [Object]
350
- def create_transaction(model, options={}) path = "/api/v2/transactions/create"
351
- post(path, model, options) end
352
-
353
- # Remove lines from an existing unlocked transaction
354
- #
373
+ # @return [Object]
374
+ def create_transaction(model, options={})
375
+ path = "/api/v2/transactions/create"
376
+ post(path, model, options)
377
+ end
378
+
379
+
380
+ # Remove lines from an existing unlocked transaction
381
+ #
355
382
  # Remove lines to an existing unlocked transaction.
356
383
  #
357
384
  # The `DeleteLines` API allows you to remove transaction lines from existing unlocked transaction, so that customer will
@@ -373,15 +400,18 @@ module AvaTax
373
400
  # ### Security Policies
374
401
  #
375
402
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
376
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
403
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
377
404
  # @param include [String] Specifies objects to include in the response after transaction is created
378
405
  # @param model [Object] information about the transaction and lines to be removed
379
- # @return [Object]
380
- def delete_lines(model, options={}) path = "/api/v2/companies/transactions/lines/delete"
381
- post(path, model, options) end
382
-
383
- # Retrieve a single transaction by code
384
- #
406
+ # @return [Object]
407
+ def delete_lines(model, options={})
408
+ path = "/api/v2/companies/transactions/lines/delete"
409
+ post(path, model, options)
410
+ end
411
+
412
+
413
+ # Retrieve a single transaction by code
414
+ #
385
415
  # Get the current transaction identified by this company code, transaction code, and document type.
386
416
  #
387
417
  # A transaction is uniquely identified by `companyCode`, `code` (often called Transaction Code), and `documentType`.
@@ -410,17 +440,20 @@ module AvaTax
410
440
  # ### Security Policies
411
441
  #
412
442
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
413
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
443
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
414
444
  # @param companyCode [String] The company code of the company that recorded this transaction
415
445
  # @param transactionCode [String] The transaction code to retrieve
416
446
  # @param documentType [String] (Optional): The document type of the transaction to retrieve (See DocumentType::* for a list of allowable values)
417
447
  # @param include [String] Specifies objects to include in this fetch call
418
- # @return [Object]
419
- def get_transaction_by_code(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}"
420
- get(path, options) end
421
-
422
- # Retrieve a single transaction by code
423
- #
448
+ # @return [Object]
449
+ def get_transaction_by_code(companyCode, transactionCode, options={})
450
+ path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}"
451
+ get(path, options)
452
+ end
453
+
454
+
455
+ # Retrieve a single transaction by code
456
+ #
424
457
  # DEPRECATED: Please use the `GetTransactionByCode` API instead.
425
458
  #
426
459
  # NOTE: If your companyCode or transactionCode contains any of these characters /, +, ? or a space please use the following encoding before making a request:
@@ -432,17 +465,20 @@ module AvaTax
432
465
  # ### Security Policies
433
466
  #
434
467
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
435
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
468
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
436
469
  # @param companyCode [String] The company code of the company that recorded this transaction
437
470
  # @param transactionCode [String] The transaction code to retrieve
438
471
  # @param documentType [String] The transaction type to retrieve (See DocumentType::* for a list of allowable values)
439
472
  # @param include [String] Specifies objects to include in this fetch call
440
- # @return [Object]
441
- def get_transaction_by_code_and_type(companyCode, transactionCode, documentType, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}"
442
- get(path, options) end
443
-
444
- # Retrieve a single transaction by ID
445
- #
473
+ # @return [Object]
474
+ def get_transaction_by_code_and_type(companyCode, transactionCode, documentType, options={})
475
+ path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}"
476
+ get(path, options)
477
+ end
478
+
479
+
480
+ # Retrieve a single transaction by ID
481
+ #
446
482
  # Get the unique transaction identified by this URL.
447
483
  #
448
484
  # This endpoint retrieves the exact transaction identified by this ID number even if that transaction was later adjusted
@@ -464,15 +500,18 @@ module AvaTax
464
500
  # ### Security Policies
465
501
  #
466
502
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
467
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
503
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
468
504
  # @param id [Integer] The unique ID number of the transaction to retrieve
469
505
  # @param include [String] Specifies objects to include in this fetch call
470
- # @return [Object]
471
- def get_transaction_by_id(id, options={}) path = "/api/v2/transactions/#{id}"
472
- get(path, options) end
473
-
474
- # Retrieve all transactions
475
- #
506
+ # @return [Object]
507
+ def get_transaction_by_id(id, options={})
508
+ path = "/api/v2/transactions/#{id}"
509
+ get(path, options)
510
+ end
511
+
512
+
513
+ # Retrieve all transactions
514
+ #
476
515
  # List all transactions attached to this company.
477
516
  #
478
517
  # This endpoint is limited to returning 1,000 transactions at a time maximum.
@@ -504,7 +543,7 @@ module AvaTax
504
543
  # ### Security Policies
505
544
  #
506
545
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
507
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
546
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
508
547
  # @param companyCode [String] The company code of the company that recorded this transaction
509
548
  # @param dataSourceId [Integer] Optionally filter transactions to those from a specific data source.
510
549
  # @param include [String] Specifies objects to include in this fetch call
@@ -512,12 +551,15 @@ module AvaTax
512
551
  # @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.
513
552
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
514
553
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
515
- # @return [FetchResult]
516
- def list_transactions_by_company(companyCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions"
517
- get(path, options) end
518
-
519
- # Lock a single transaction
520
- #
554
+ # @return [FetchResult]
555
+ def list_transactions_by_company(companyCode, options={})
556
+ path = "/api/v2/companies/#{companyCode}/transactions"
557
+ get(path, options)
558
+ end
559
+
560
+
561
+ # Lock a single transaction
562
+ #
521
563
  # Lock a transaction uniquely identified by this URL.
522
564
  #
523
565
  # This API is mainly used for connector developer to simulate what happens when Returns product locks a document.
@@ -549,18 +591,21 @@ module AvaTax
549
591
  # ### Security Policies
550
592
  #
551
593
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
552
- # * 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.
594
+ # * 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.
553
595
  # @param companyCode [String] The company code of the company that recorded this transaction
554
596
  # @param transactionCode [String] The transaction code to lock
555
597
  # @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)
556
598
  # @param include [String] Specifies objects to include in this fetch call
557
599
  # @param model [Object] The lock request you wish to execute
558
- # @return [Object]
559
- def lock_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/lock"
560
- post(path, model, options) end
561
-
562
- # Create a refund for a transaction
563
- #
600
+ # @return [Object]
601
+ def lock_transaction(companyCode, transactionCode, model, options={})
602
+ path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/lock"
603
+ post(path, model, options)
604
+ end
605
+
606
+
607
+ # Create a refund for a transaction
608
+ #
564
609
  # Create a refund for a transaction.
565
610
  #
566
611
  # The `RefundTransaction` API allows you to quickly and easily create a `ReturnInvoice` representing a refund
@@ -602,19 +647,22 @@ module AvaTax
602
647
  # ### Security Policies
603
648
  #
604
649
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
605
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
650
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
606
651
  # @param companyCode [String] The code of the company that made the original sale
607
652
  # @param transactionCode [String] The transaction code of the original sale
608
653
  # @param include [String] Specifies objects to include in the response after transaction is created
609
654
  # @param documentType [String] (Optional): The document type of the transaction to refund. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values)
610
655
  # @param useTaxDateOverride [Boolean] (Optional): If set to true, processes refund using taxDateOverride rather than taxAmountOverride (Note: taxAmountOverride is not allowed for SST states).
611
656
  # @param model [Object] Information about the refund to create
612
- # @return [Object]
613
- def refund_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/refund"
614
- post(path, model, options) end
615
-
616
- # Perform multiple actions on a transaction
617
- #
657
+ # @return [Object]
658
+ def refund_transaction(companyCode, transactionCode, model, options={})
659
+ path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/refund"
660
+ post(path, model, options)
661
+ end
662
+
663
+
664
+ # Perform multiple actions on a transaction
665
+ #
618
666
  # Performs one or more actions against the current transaction uniquely identified by this URL.
619
667
  #
620
668
  # The `SettleTransaction` API call can perform the work of `ChangeCode`, `VerifyTransaction`, and `CommitTransaction`.
@@ -644,18 +692,21 @@ module AvaTax
644
692
  #
645
693
  # ### Security Policies
646
694
  #
647
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
695
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
648
696
  # @param companyCode [String] The company code of the company that recorded this transaction
649
697
  # @param transactionCode [String] The transaction code to settle
650
698
  # @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)
651
699
  # @param include [String] Specifies objects to include in this fetch call
652
700
  # @param model [Object] The data from an external system to reconcile against AvaTax
653
- # @return [Object]
654
- def settle_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/settle"
655
- post(path, model, options) end
656
-
657
- # Uncommit a transaction for reporting
658
- #
701
+ # @return [Object]
702
+ def settle_transaction(companyCode, transactionCode, model, options={})
703
+ path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/settle"
704
+ post(path, model, options)
705
+ end
706
+
707
+
708
+ # Uncommit a transaction for reporting
709
+ #
659
710
  # Adjusts a transaction by changing it to an uncommitted status.
660
711
  #
661
712
  # Transactions that have been previously reported to a tax authority by Avalara Managed Returns are considered `locked` and are
@@ -680,17 +731,20 @@ module AvaTax
680
731
  # ### Security Policies
681
732
  #
682
733
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
683
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
734
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
684
735
  # @param companyCode [String] The company code of the company that recorded this transaction
685
736
  # @param transactionCode [String] The transaction code to Uncommit
686
737
  # @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)
687
738
  # @param include [String] Specifies objects to include in this fetch call
688
- # @return [Object]
689
- def uncommit_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/uncommit"
690
- post(path, options) end
691
-
692
- # Unvoids a transaction
693
- #
739
+ # @return [Object]
740
+ def uncommit_transaction(companyCode, transactionCode, options={})
741
+ path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/uncommit"
742
+ post(path, options)
743
+ end
744
+
745
+
746
+ # Unvoids a transaction
747
+ #
694
748
  # Unvoids a voided transaction
695
749
  #
696
750
  # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
@@ -712,17 +766,20 @@ module AvaTax
712
766
  # ### Security Policies
713
767
  #
714
768
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
715
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
769
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
716
770
  # @param companyCode [String] The company code of the company that recorded this transaction
717
771
  # @param transactionCode [String] The transaction code to commit
718
772
  # @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)
719
773
  # @param include [String] Specifies objects to include in this fetch call
720
- # @return [Object]
721
- def unvoid_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/unvoid"
722
- post(path, options) end
723
-
724
- # Verify a transaction
725
- #
774
+ # @return [Object]
775
+ def unvoid_transaction(companyCode, transactionCode, options={})
776
+ path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/unvoid"
777
+ post(path, options)
778
+ end
779
+
780
+
781
+ # Verify a transaction
782
+ #
726
783
  # Verifies that the transaction uniquely identified by this URL matches certain expected values.
727
784
  #
728
785
  # If the transaction does not match these expected values, this API will return an error code indicating which value did not match.
@@ -751,18 +808,21 @@ module AvaTax
751
808
  # ### Security Policies
752
809
  #
753
810
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
754
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
811
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
755
812
  # @param companyCode [String] The company code of the company that recorded this transaction
756
813
  # @param transactionCode [String] The transaction code to settle
757
814
  # @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)
758
815
  # @param include [String] Specifies objects to include in this fetch call
759
816
  # @param model [Object] The data from an external system to reconcile against AvaTax
760
- # @return [Object]
761
- def verify_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/verify"
762
- post(path, model, options) end
763
-
764
- # Void a transaction
765
- #
817
+ # @return [Object]
818
+ def verify_transaction(companyCode, transactionCode, model, options={})
819
+ path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/verify"
820
+ post(path, model, options)
821
+ end
822
+
823
+
824
+ # Void a transaction
825
+ #
766
826
  # Voids the current transaction uniquely identified by this URL.
767
827
  #
768
828
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
@@ -793,15 +853,18 @@ module AvaTax
793
853
  # ### Security Policies
794
854
  #
795
855
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
796
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
856
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro, BasicReturns.
797
857
  # @param companyCode [String] The company code of the company that recorded this transaction
798
858
  # @param transactionCode [String] The transaction code to void
799
859
  # @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)
800
860
  # @param include [String] Specifies objects to include in this fetch call
801
861
  # @param model [Object] The void request you wish to execute. To void a transaction the code must be set to 'DocVoided'
802
- # @return [Object]
803
- def void_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/void"
804
- post(path, model, options) end
805
- end
806
- end
862
+ # @return [Object]
863
+ def void_transaction(companyCode, transactionCode, model, options={})
864
+ path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/void"
865
+ post(path, model, options)
866
+ end
867
+
868
+ end
869
+ end
807
870
  end