avatax 17.5.0 → 17.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,467 +4,429 @@ module AvaTax
4
4
 
5
5
 
6
6
  # Add lines to an existing unlocked transaction
7
- #
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
11
11
  # be able to append multiple calls together and form an extremely large transaction. If customer does not specify line number
12
12
  # in the lines to be added, a new random Guid string will be generated for line number. If customer are not satisfied with
13
- # the line number for the transaction lines, they can turn on the renumber switch to have REST v2 automatically renumber all
13
+ # the line number for the transaction lines, they can turn on the renumber switch to have REST v2 automatically renumber all
14
14
  # transaction lines for them, in this case, the line number becomes: "1", "2", "3", ...
15
- #
15
+ #
16
16
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
17
17
  # sales, purchases, inventory transfer, and returns (also called refunds).
18
18
  # 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:
19
- #
19
+ #
20
20
  # * Lines
21
21
  # * Details (implies lines)
22
22
  # * Summary (implies details)
23
23
  # * Addresses
24
- #
24
+ #
25
25
  # If you don't specify '$include' parameter, it will include both details and addresses.
26
- #
27
- # @param string include A comma separated list of child objects to return underneath the primary object.
28
- # @param AddTransactionLineModel model information about the transaction and lines to be added
29
- # @return TransactionModel
26
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
27
+ # @param model [Object] information about the transaction and lines to be added
28
+ # @return [Object]
30
29
  def add_lines(model, options={})
31
30
  path = "/api/v2/companies/transactions/lines/add"
32
-
33
31
  post(path, model, options)
34
32
  end
35
33
 
36
34
 
37
35
  # Correct a previously created transaction
38
- #
36
+ #
39
37
  # Replaces the current transaction uniquely identified by this URL with a new transaction.
40
- #
38
+ #
41
39
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
42
40
  # sales, purchases, inventory transfer, and returns (also called refunds).
43
- #
41
+ #
44
42
  # When you adjust a committed transaction, the original transaction will be updated with the status code `Adjusted`, and
45
43
  # both revisions will be available for retrieval based on their code and ID numbers.
46
44
  # Only transactions in `Committed` status are reported by Avalara Managed Returns.
47
- #
48
- # Transactions that have been previously reported to a tax authority by Avalara Managed Returns are considered `locked` and are
45
+ #
46
+ # Transactions that have been previously reported to a tax authority by Avalara Managed Returns are considered `locked` and are
49
47
  # no longer available for adjustments.
50
- #
51
- # @param string companyCode The company code of the company that recorded this transaction
52
- # @param string transactionCode The transaction code to adjust
53
- # @param AdjustTransactionModel model The adjustment you wish to make
54
- # @return TransactionModel
48
+ # @param companyCode [String] The company code of the company that recorded this transaction
49
+ # @param transactionCode [String] The transaction code to adjust
50
+ # @param model [Object] The adjustment you wish to make
51
+ # @return [Object]
55
52
  def adjust_transaction(companyCode, transactionCode, model)
56
53
  path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/adjust"
57
-
58
54
  post(path, model)
59
55
  end
60
56
 
61
57
 
62
58
  # Get audit information about a transaction
63
- #
59
+ #
64
60
  # Retrieve audit information about a transaction stored in AvaTax.
65
- #
66
- # The 'AuditTransaction' endpoint retrieves audit information related to a specific transaction. This audit
61
+ #
62
+ # The 'AuditTransaction' endpoint retrieves audit information related to a specific transaction. This audit
67
63
  # information includes the following:
68
- #
64
+ #
69
65
  # * The `CompanyId` of the company that created the transaction
70
66
  # * The server timestamp representing the exact server time when the transaction was created
71
67
  # * The server duration - how long it took to process this transaction
72
68
  # * Whether exact API call details were logged
73
69
  # * A reconstructed API call showing what the original CreateTransaction call looked like
74
- #
70
+ #
75
71
  # This API can be used to examine information about a previously created transaction.
76
- #
72
+ #
77
73
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
78
74
  # sales, purchases, inventory transfer, and returns (also called refunds).
79
- #
80
- # @param string companyCode The code identifying the company that owns this transaction
81
- # @param string transactionCode The code identifying the transaction
82
- # @return AuditTransactionModel
75
+ # @param companyCode [String] The code identifying the company that owns this transaction
76
+ # @param transactionCode [String] The code identifying the transaction
77
+ # @return [Object]
83
78
  def audit_transaction(companyCode, transactionCode)
84
79
  path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/audit"
85
-
86
80
  get(path)
87
81
  end
88
82
 
89
83
 
90
84
  # Get audit information about a transaction
91
- #
85
+ #
92
86
  # Retrieve audit information about a transaction stored in AvaTax.
93
- #
94
- # The 'AuditTransaction' endpoint retrieves audit information related to a specific transaction. This audit
87
+ #
88
+ # The 'AuditTransaction' endpoint retrieves audit information related to a specific transaction. This audit
95
89
  # information includes the following:
96
- #
90
+ #
97
91
  # * The `CompanyId` of the company that created the transaction
98
92
  # * The server timestamp representing the exact server time when the transaction was created
99
93
  # * The server duration - how long it took to process this transaction
100
94
  # * Whether exact API call details were logged
101
95
  # * A reconstructed API call showing what the original CreateTransaction call looked like
102
- #
96
+ #
103
97
  # This API can be used to examine information about a previously created transaction.
104
- #
98
+ #
105
99
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
106
100
  # sales, purchases, inventory transfer, and returns (also called refunds).
107
- #
108
- # @param string companyCode The code identifying the company that owns this transaction
109
- # @param string transactionCode The code identifying the transaction
110
- # @param string documentType The document type of the original transaction (See DocumentType::* for a list of allowable values)
111
- # @return AuditTransactionModel
101
+ # @param companyCode [String] The code identifying the company that owns this transaction
102
+ # @param transactionCode [String] The code identifying the transaction
103
+ # @param documentType [String] The document type of the original transaction (See DocumentType::* for a list of allowable values)
104
+ # @return [Object]
112
105
  def audit_transaction_with_type(companyCode, transactionCode, documentType)
113
106
  path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}/audit"
114
-
115
107
  get(path)
116
108
  end
117
109
 
118
110
 
119
111
  # Lock a set of documents
120
- #
112
+ #
121
113
  # This API is available by invitation only.
122
- #
114
+ #
123
115
  # Lock a set of transactions uniquely identified by DocumentIds provided. This API allows locking multiple documents at once.
124
116
  # After this API call succeeds, documents will be locked and can't be voided.
125
- #
117
+ #
126
118
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
127
119
  # sales, purchases, inventory transfer, and returns (also called refunds).
128
- #
129
- # @param BulkLockTransactionModel model bulk lock request
130
- # @return BulkLockTransactionResult
120
+ # @param model [Object] bulk lock request
121
+ # @return [Object]
131
122
  def bulk_lock_transaction(model)
132
123
  path = "/api/v2/transactions/lock"
133
-
134
124
  post(path, model)
135
125
  end
136
126
 
137
127
 
138
128
  # Change a transaction's code
139
- #
129
+ #
140
130
  # Renames a transaction uniquely identified by this URL by changing its code to a new code.
141
131
  # After this API call succeeds, the transaction will have a new URL matching its new code.
142
132
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
143
133
  # sales, purchases, inventory transfer, and returns (also called refunds).
144
- #
145
- # @param string companyCode The company code of the company that recorded this transaction
146
- # @param string transactionCode The transaction code to change
147
- # @param ChangeTransactionCodeModel model The code change request you wish to execute
148
- # @return TransactionModel
134
+ # @param companyCode [String] The company code of the company that recorded this transaction
135
+ # @param transactionCode [String] The transaction code to change
136
+ # @param model [Object] The code change request you wish to execute
137
+ # @return [Object]
149
138
  def change_transaction_code(companyCode, transactionCode, model)
150
139
  path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/changecode"
151
-
152
140
  post(path, model)
153
141
  end
154
142
 
155
143
 
156
144
  # Commit a transaction for reporting
157
- #
145
+ #
158
146
  # Marks a transaction by changing its status to 'Committed'.
159
147
  # Transactions that are committed are available to be reported to a tax authority by Avalara Managed Returns.
160
148
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
161
149
  # sales, purchases, inventory transfer, and returns (also called refunds).
162
150
  # Any changes made to a committed transaction will generate a transaction history.
163
- #
164
- # @param string companyCode The company code of the company that recorded this transaction
165
- # @param string transactionCode The transaction code to commit
166
- # @param CommitTransactionModel model The commit request you wish to execute
167
- # @return TransactionModel
151
+ # @param companyCode [String] The company code of the company that recorded this transaction
152
+ # @param transactionCode [String] The transaction code to commit
153
+ # @param model [Object] The commit request you wish to execute
154
+ # @return [Object]
168
155
  def commit_transaction(companyCode, transactionCode, model)
169
156
  path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/commit"
170
-
171
157
  post(path, model)
172
158
  end
173
159
 
174
160
 
175
161
  # Create a new transaction
176
- #
162
+ #
177
163
  # Records a new transaction or adjust an existing in AvaTax.
178
- #
164
+ #
179
165
  # The `CreateOrAdjustTransaction` endpoint is used to create a new transaction if the input transaction does not exist
180
- # or if there exists a transaction identified by code, the original transaction will be adjusted by using the meta data
166
+ # or if there exists a transaction identified by code, the original transaction will be adjusted by using the meta data
181
167
  # in the input transaction
182
- #
168
+ #
183
169
  # If you don't specify type in the provided data, a new transaction with type of SalesOrder will be recorded by default.
184
- #
170
+ #
185
171
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
186
172
  # sales, purchases, inventory transfer, and returns (also called refunds).
187
173
  # 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:
188
- #
174
+ #
189
175
  # * Lines
190
176
  # * Details (implies lines)
191
177
  # * Summary (implies details)
192
178
  # * Addresses
193
- #
179
+ #
194
180
  # If you don't specify '$include' parameter, it will include both details and addresses.
195
- #
196
- # @param string include A comma separated list of child objects to return underneath the primary object.
197
- # @param CreateOrAdjustTransactionModel model The transaction you wish to create
198
- # @return TransactionModel
181
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
182
+ # @param model [Object] The transaction you wish to create
183
+ # @return [Object]
199
184
  def create_or_adjust_transaction(model, options={})
200
185
  path = "/api/v2/transactions/createoradjust"
201
-
202
186
  post(path, model, options)
203
187
  end
204
188
 
205
189
 
206
190
  # Create a new transaction
207
- #
191
+ #
208
192
  # Records a new transaction in AvaTax.
209
- #
193
+ #
210
194
  # The `CreateTransaction` endpoint uses the configuration values specified by your company to identify the correct tax rules
211
195
  # and rates to apply to all line items in this transaction, and reports the total tax calculated by AvaTax based on your
212
196
  # company's configuration and the data provided in this API call.
213
- #
197
+ #
214
198
  # If you don't specify type in the provided data, a new transaction with type of SalesOrder will be recorded by default.
215
- #
199
+ #
216
200
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
217
201
  # sales, purchases, inventory transfer, and returns (also called refunds).
218
202
  # 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:
219
- #
203
+ #
220
204
  # * Lines
221
205
  # * Details (implies lines)
222
206
  # * Summary (implies details)
223
207
  # * Addresses
224
- #
208
+ #
225
209
  # If you don't specify '$include' parameter, it will include both details and addresses.
226
- #
227
- # @param string include A comma separated list of child objects to return underneath the primary object.
228
- # @param CreateTransactionModel model The transaction you wish to create
229
- # @return TransactionModel
210
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
211
+ # @param model [Object] The transaction you wish to create
212
+ # @return [Object]
230
213
  def create_transaction(model, options={})
231
214
  path = "/api/v2/transactions/create"
232
-
233
215
  post(path, model, options)
234
216
  end
235
217
 
236
218
 
237
219
  # Remove lines from an existing unlocked transaction
238
- #
220
+ #
239
221
  # Remove lines to an existing unlocked transaction.
240
- #
222
+ #
241
223
  # The `DeleteLines` API allows you to remove transaction lines from existing unlocked transaction, so that customer will
242
224
  # be able to delete transaction lines and adjust original transaction the way they like
243
- #
225
+ #
244
226
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
245
227
  # sales, purchases, inventory transfer, and returns (also called refunds).
246
228
  # 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:
247
- #
229
+ #
248
230
  # * Lines
249
231
  # * Details (implies lines)
250
232
  # * Summary (implies details)
251
233
  # * Addresses
252
- #
234
+ #
253
235
  # If you don't specify '$include' parameter, it will include both details and addresses.
254
- #
255
- # @param string include A comma separated list of child objects to return underneath the primary object.
256
- # @param RemoveTransactionLineModel model information about the transaction and lines to be removed
257
- # @return TransactionModel
236
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
237
+ # @param model [Object] information about the transaction and lines to be removed
238
+ # @return [Object]
258
239
  def delete_lines(model, options={})
259
240
  path = "/api/v2/companies/transactions/lines/delete"
260
-
261
241
  post(path, model, options)
262
242
  end
263
243
 
264
244
 
265
245
  # Retrieve a single transaction by code
266
- #
246
+ #
267
247
  # Get the current transaction identified by this URL.
268
248
  # If this transaction was adjusted, the return value of this API will be the current transaction with this code, and previous revisions of
269
249
  # the transaction will be attached to the 'history' data field.
270
250
  # 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:
271
- #
251
+ #
272
252
  # * Lines
273
253
  # * Details (implies lines)
274
254
  # * Summary (implies details)
275
255
  # * Addresses
276
- #
277
- # @param string companyCode The company code of the company that recorded this transaction
278
- # @param string transactionCode The transaction code to retrieve
279
- # @param string include A comma separated list of child objects to return underneath the primary object.
280
- # @return TransactionModel
256
+ # @param companyCode [String] The company code of the company that recorded this transaction
257
+ # @param transactionCode [String] The transaction code to retrieve
258
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
259
+ # @return [Object]
281
260
  def get_transaction_by_code(companyCode, transactionCode, options={})
282
261
  path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}"
283
-
284
262
  get(path, options)
285
263
  end
286
264
 
287
265
 
288
266
  # Retrieve a single transaction by code
289
- #
267
+ #
290
268
  # Get the current transaction identified by this URL.
291
269
  # If this transaction was adjusted, the return value of this API will be the current transaction with this code, and previous revisions of
292
270
  # the transaction will be attached to the 'history' data field.
293
271
  # 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:
294
- #
272
+ #
295
273
  # * Lines
296
274
  # * Details (implies lines)
297
275
  # * Summary (implies details)
298
276
  # * Addresses
299
- #
300
- # @param string companyCode The company code of the company that recorded this transaction
301
- # @param string transactionCode The transaction code to retrieve
302
- # @param string documentType The transaction type to retrieve (See DocumentType::* for a list of allowable values)
303
- # @param string include A comma separated list of child objects to return underneath the primary object.
304
- # @return TransactionModel
277
+ # @param companyCode [String] The company code of the company that recorded this transaction
278
+ # @param transactionCode [String] The transaction code to retrieve
279
+ # @param documentType [String] The transaction type to retrieve (See DocumentType::* for a list of allowable values)
280
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
281
+ # @return [Object]
305
282
  def get_transaction_by_code_and_type(companyCode, transactionCode, documentType, options={})
306
283
  path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}"
307
-
308
284
  get(path, options)
309
285
  end
310
286
 
311
287
 
312
288
  # Retrieve a single transaction by ID
313
- #
289
+ #
314
290
  # Get the unique transaction identified by this URL.
315
291
  # This endpoint retrieves the exact transaction identified by this ID number even if that transaction was later adjusted
316
292
  # by using the 'Adjust Transaction' endpoint.
317
293
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
318
294
  # sales, purchases, inventory transfer, and returns (also called refunds).
319
295
  # 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:
320
- #
296
+ #
321
297
  # * Lines
322
298
  # * Details (implies lines)
323
299
  # * Summary (implies details)
324
300
  # * Addresses
325
- #
326
- # @param int id The unique ID number of the transaction to retrieve
327
- # @param string include A comma separated list of child objects to return underneath the primary object.
328
- # @return TransactionModel
301
+ # @param id [Integer] The unique ID number of the transaction to retrieve
302
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
303
+ # @return [Object]
329
304
  def get_transaction_by_id(id, options={})
330
305
  path = "/api/v2/transactions/#{id}"
331
-
332
306
  get(path, options)
333
307
  end
334
308
 
335
309
 
336
310
  # Retrieve all transactions
337
- #
311
+ #
338
312
  # List all transactions attached to this company.
339
313
  # This endpoint is limited to returning 1,000 transactions at a time maximum.
340
314
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
341
315
  # sales, purchases, inventory transfer, and returns (also called refunds).
342
- #
316
+ #
343
317
  # Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
344
318
  # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
345
319
  # 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:
346
- #
320
+ #
347
321
  # * Lines
348
322
  # * Details (implies lines)
349
323
  # * Summary (implies details)
350
324
  # * Addresses
351
- #
352
- # @param string companyCode The company code of the company that recorded this transaction
353
- # @param string include A comma separated list of child objects to return underneath the primary object.
354
- # @param string filter A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
355
- # @param int top If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
356
- # @param int skip If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
357
- # @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
358
- # @return FetchResult
325
+ # @param companyCode [String] The company code of the company that recorded this transaction
326
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
327
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
328
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
329
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
330
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
331
+ # @return [FetchResult]
359
332
  def list_transactions_by_company(companyCode, options={})
360
333
  path = "/api/v2/companies/#{companyCode}/transactions"
361
-
362
334
  get(path, options)
363
335
  end
364
336
 
365
337
 
366
338
  # Lock a single transaction
367
- #
368
- # Lock a transaction uniquely identified by this URL.
369
- #
339
+ #
340
+ # Lock a transaction uniquely identified by this URL.
341
+ #
370
342
  # This API is mainly used for connector developer to simulate what happens when Returns product locks a document.
371
343
  # After this API call succeeds, the document will be locked and can't be voided or adjusted.
372
- #
344
+ #
373
345
  # This API is only available to customers in Sandbox with AvaTaxPro subscription. On production servers, this API is available by invitation only.
374
- #
346
+ #
375
347
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
376
348
  # sales, purchases, inventory transfer, and returns (also called refunds).
377
- #
378
- # @param string companyCode The company code of the company that recorded this transaction
379
- # @param string transactionCode The transaction code to lock
380
- # @param LockTransactionModel model The lock request you wish to execute
381
- # @return TransactionModel
349
+ # @param companyCode [String] The company code of the company that recorded this transaction
350
+ # @param transactionCode [String] The transaction code to lock
351
+ # @param model [Object] The lock request you wish to execute
352
+ # @return [Object]
382
353
  def lock_transaction(companyCode, transactionCode, model)
383
354
  path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/lock"
384
-
385
355
  post(path, model)
386
356
  end
387
357
 
388
358
 
389
359
  # Create a refund for a transaction
390
- #
360
+ #
391
361
  # Create a refund for a transaction.
392
- #
362
+ #
393
363
  # The `RefundTransaction` API allows you to quickly and easily create a `ReturnInvoice` representing a refund
394
364
  # for a previously created `SalesInvoice` transaction. You can choose to create a full or partial refund, and
395
365
  # specify individual line items from the original sale for refund.
396
- #
366
+ #
397
367
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
398
368
  # sales, purchases, inventory transfer, and returns (also called refunds).
399
369
  # 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:
400
- #
370
+ #
401
371
  # * Lines
402
372
  # * Details (implies lines)
403
373
  # * Summary (implies details)
404
374
  # * Addresses
405
- #
375
+ #
406
376
  # If you don't specify '$include' parameter, it will include both details and addresses.
407
- #
408
- # @param string companyCode The code of the company that made the original sale
409
- # @param string transactionCode The transaction code of the original sale
410
- # @param string include A comma separated list of child objects to return underneath the primary object.
411
- # @param RefundTransactionModel model Information about the refund to create
412
- # @return TransactionModel
377
+ # @param companyCode [String] The code of the company that made the original sale
378
+ # @param transactionCode [String] The transaction code of the original sale
379
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
380
+ # @param model [Object] Information about the refund to create
381
+ # @return [Object]
413
382
  def refund_transaction(companyCode, transactionCode, model, options={})
414
383
  path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/refund"
415
-
416
384
  post(path, model, options)
417
385
  end
418
386
 
419
387
 
420
388
  # Perform multiple actions on a transaction
421
- #
389
+ #
422
390
  # Performs the same functions as /verify, /changecode, and /commit. You may specify one or many actions in each call to this endpoint.
423
- #
424
- # @param string companyCode The company code of the company that recorded this transaction
425
- # @param string transactionCode The transaction code to settle
426
- # @param SettleTransactionModel model The settle request containing the actions you wish to execute
427
- # @return TransactionModel
391
+ # @param companyCode [String] The company code of the company that recorded this transaction
392
+ # @param transactionCode [String] The transaction code to settle
393
+ # @param model [Object] The settle request containing the actions you wish to execute
394
+ # @return [Object]
428
395
  def settle_transaction(companyCode, transactionCode, model)
429
396
  path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/settle"
430
-
431
397
  post(path, model)
432
398
  end
433
399
 
434
400
 
435
401
  # Verify a transaction
436
- #
402
+ #
437
403
  # Verifies that the transaction uniquely identified by this URL matches certain expected values.
438
404
  # If the transaction does not match these expected values, this API will return an error code indicating which value did not match.
439
405
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
440
406
  # sales, purchases, inventory transfer, and returns (also called refunds).
441
- #
442
- # @param string companyCode The company code of the company that recorded this transaction
443
- # @param string transactionCode The transaction code to settle
444
- # @param VerifyTransactionModel model The settle request you wish to execute
445
- # @return TransactionModel
407
+ # @param companyCode [String] The company code of the company that recorded this transaction
408
+ # @param transactionCode [String] The transaction code to settle
409
+ # @param model [Object] The settle request you wish to execute
410
+ # @return [Object]
446
411
  def verify_transaction(companyCode, transactionCode, model)
447
412
  path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/verify"
448
-
449
413
  post(path, model)
450
414
  end
451
415
 
452
416
 
453
417
  # Void a transaction
454
- #
418
+ #
455
419
  # Voids the current transaction uniquely identified by this URL.
456
420
  # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
457
421
  # sales, purchases, inventory transfer, and returns (also called refunds).
458
422
  # When you void a transaction, that transaction's status is recorded as 'DocVoided'.
459
423
  # Transactions that have been previously reported to a tax authority by Avalara Managed Returns are no longer available to be voided.
460
- #
461
- # @param string companyCode The company code of the company that recorded this transaction
462
- # @param string transactionCode The transaction code to void
463
- # @param VoidTransactionModel model The void request you wish to execute
464
- # @return TransactionModel
424
+ # @param companyCode [String] The company code of the company that recorded this transaction
425
+ # @param transactionCode [String] The transaction code to void
426
+ # @param model [Object] The void request you wish to execute
427
+ # @return [Object]
465
428
  def void_transaction(companyCode, transactionCode, model)
466
429
  path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/void"
467
-
468
430
  post(path, model)
469
431
  end
470
432