Skip to content

Commit 326d02d

Browse files
docs(api): clarify simulateClearing supports multiple calls
1 parent 85cabb2 commit 326d02d

4 files changed

Lines changed: 23 additions & 19 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 214
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-9e397c65ffb81e2928b8ecf979769a79131ae6058b6fb373a5e930dc8a168732.yml
3-
openapi_spec_hash: 93aea3855d2d1c390107d223762aa818
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-1514911f233cb8bf0d6752c45bfa53a61b8f9b8ff215a4ea94a95f9505911000.yml
3+
openapi_spec_hash: 9820a9c9a4ff778c627041eb53fd4ee5
44
config_hash: 5bb913c05ebeb301ec925b16e75bb251

lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateClearingParams.kt

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ import java.util.Optional
2323
* Clears an existing authorization, either debit or credit. After this event, the transaction
2424
* transitions from `PENDING` to `SETTLED` status.
2525
*
26-
* If `amount` is not set, the full amount of the transaction will be cleared. Transactions that
27-
* have already cleared, either partially or fully, cannot be cleared again using this endpoint.
26+
* If `amount` is not set, the full amount of the transaction will be cleared. This endpoint may be
27+
* called multiple times against the same authorization to simulate a multiple-completion scenario,
28+
* with each call creating a separate clearing event.
2829
*/
2930
class TransactionSimulateClearingParams
3031
private constructor(
@@ -48,8 +49,9 @@ private constructor(
4849
* result in a -100 amount in the transaction, if the original authorization is a credit
4950
* authorization.
5051
*
51-
* If `amount` is not set, the full amount of the transaction will be cleared. Transactions that
52-
* have already cleared, either partially or fully, cannot be cleared again using this endpoint.
52+
* If `amount` is not set, the full amount of the transaction will be cleared. This endpoint may
53+
* be called multiple times against the same authorization to simulate a multiple-completion
54+
* scenario, with each call creating a separate clearing event.
5355
*
5456
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
5557
* server responded with an unexpected value).
@@ -138,9 +140,9 @@ private constructor(
138140
* field will result in a -100 amount in the transaction, if the original authorization is a
139141
* credit authorization.
140142
*
141-
* If `amount` is not set, the full amount of the transaction will be cleared. Transactions
142-
* that have already cleared, either partially or fully, cannot be cleared again using this
143-
* endpoint.
143+
* If `amount` is not set, the full amount of the transaction will be cleared. This endpoint
144+
* may be called multiple times against the same authorization to simulate a
145+
* multiple-completion scenario, with each call creating a separate clearing event.
144146
*/
145147
fun amount(amount: Long) = apply { body.amount(amount) }
146148

@@ -324,9 +326,9 @@ private constructor(
324326
* field will result in a -100 amount in the transaction, if the original authorization is a
325327
* credit authorization.
326328
*
327-
* If `amount` is not set, the full amount of the transaction will be cleared. Transactions
328-
* that have already cleared, either partially or fully, cannot be cleared again using this
329-
* endpoint.
329+
* If `amount` is not set, the full amount of the transaction will be cleared. This endpoint
330+
* may be called multiple times against the same authorization to simulate a
331+
* multiple-completion scenario, with each call creating a separate clearing event.
330332
*
331333
* @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the
332334
* server responded with an unexpected value).
@@ -405,9 +407,9 @@ private constructor(
405407
* this field will result in a -100 amount in the transaction, if the original
406408
* authorization is a credit authorization.
407409
*
408-
* If `amount` is not set, the full amount of the transaction will be cleared.
409-
* Transactions that have already cleared, either partially or fully, cannot be cleared
410-
* again using this endpoint.
410+
* If `amount` is not set, the full amount of the transaction will be cleared. This
411+
* endpoint may be called multiple times against the same authorization to simulate a
412+
* multiple-completion scenario, with each call creating a separate clearing event.
411413
*/
412414
fun amount(amount: Long) = amount(JsonField.of(amount))
413415

lithic-java-core/src/main/kotlin/com/lithic/api/services/async/TransactionServiceAsync.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,9 @@ interface TransactionServiceAsync {
217217
* Clears an existing authorization, either debit or credit. After this event, the transaction
218218
* transitions from `PENDING` to `SETTLED` status.
219219
*
220-
* If `amount` is not set, the full amount of the transaction will be cleared. Transactions that
221-
* have already cleared, either partially or fully, cannot be cleared again using this endpoint.
220+
* If `amount` is not set, the full amount of the transaction will be cleared. This endpoint may
221+
* be called multiple times against the same authorization to simulate a multiple-completion
222+
* scenario, with each call creating a separate clearing event.
222223
*/
223224
fun simulateClearing(
224225
params: TransactionSimulateClearingParams

lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/TransactionService.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,9 @@ interface TransactionService {
206206
* Clears an existing authorization, either debit or credit. After this event, the transaction
207207
* transitions from `PENDING` to `SETTLED` status.
208208
*
209-
* If `amount` is not set, the full amount of the transaction will be cleared. Transactions that
210-
* have already cleared, either partially or fully, cannot be cleared again using this endpoint.
209+
* If `amount` is not set, the full amount of the transaction will be cleared. This endpoint may
210+
* be called multiple times against the same authorization to simulate a multiple-completion
211+
* scenario, with each call creating a separate clearing event.
211212
*/
212213
fun simulateClearing(
213214
params: TransactionSimulateClearingParams

0 commit comments

Comments
 (0)