Skip to content

Commit be5af7c

Browse files
docs(api): clarify SimulateClearing supports multiple calls
1 parent 9bf33c0 commit be5af7c

2 files changed

Lines changed: 10 additions & 8 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

transaction.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,10 @@ func (r *TransactionService) SimulateAuthorizationAdvice(ctx context.Context, bo
136136
// Clears an existing authorization, either debit or credit. After this event, the
137137
// transaction transitions from `PENDING` to `SETTLED` status.
138138
//
139-
// If `amount` is not set, the full amount of the transaction will be cleared.
140-
// Transactions that have already cleared, either partially or fully, cannot be
141-
// cleared again using this endpoint.
139+
// If `amount` is not set, the full amount of the transaction will be cleared. This
140+
// endpoint may be called multiple times against the same authorization to simulate
141+
// a multiple-completion scenario, with each call creating a separate clearing
142+
// event.
142143
func (r *TransactionService) SimulateClearing(ctx context.Context, body TransactionSimulateClearingParams, opts ...option.RequestOption) (res *TransactionSimulateClearingResponse, err error) {
143144
opts = slices.Concat(r.Options, opts)
144145
path := "v1/simulate/clearing"
@@ -2140,9 +2141,10 @@ type TransactionSimulateClearingParams struct {
21402141
// example, entering 100 in this field will result in a -100 amount in the
21412142
// transaction, if the original authorization is a credit authorization.
21422143
//
2143-
// If `amount` is not set, the full amount of the transaction will be cleared.
2144-
// Transactions that have already cleared, either partially or fully, cannot be
2145-
// cleared again using this endpoint.
2144+
// If `amount` is not set, the full amount of the transaction will be cleared. This
2145+
// endpoint may be called multiple times against the same authorization to simulate
2146+
// a multiple-completion scenario, with each call creating a separate clearing
2147+
// event.
21462148
Amount param.Field[int64] `json:"amount"`
21472149
}
21482150

0 commit comments

Comments
 (0)