Skip to content

Commit ce3f22c

Browse files
docs(api): update simulate_clearing method documentation in transactions
1 parent 22be597 commit ce3f22c

4 files changed

Lines changed: 15 additions & 13 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

packages/mcp-server/src/local-docs-search.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7187,13 +7187,13 @@ const EMBEDDED_METHODS: MethodEntry[] = [
71877187
httpMethod: 'post',
71887188
summary: 'Simulate clearing',
71897189
description:
7190-
'Clears an existing authorization, either debit or credit. After this event, the transaction transitions from `PENDING` to `SETTLED` status.\n\nIf `amount` is not set, the full amount of the transaction will be cleared. Transactions that have already cleared, either partially or fully, cannot be cleared again using this endpoint.\n',
7190+
'Clears an existing authorization, either debit or credit. After this event, the transaction transitions from `PENDING` to `SETTLED` status.\n\nIf `amount` is not set, the full amount of the transaction will be cleared. This endpoint may be called multiple times against the same authorization to simulate a multiple-completion scenario, with each call creating a separate clearing event.\n',
71917191
stainlessPath: '(resource) transactions > (method) simulate_clearing',
71927192
qualified: 'client.transactions.simulateClearing',
71937193
params: ['token: string;', 'amount?: number;'],
71947194
response: '{ debugging_request_id?: string; }',
71957195
markdown:
7196-
"## simulate_clearing\n\n`client.transactions.simulateClearing(token: string, amount?: number): { debugging_request_id?: string; }`\n\n**post** `/v1/simulate/clearing`\n\nClears an existing authorization, either debit or credit. After this event, the transaction transitions from `PENDING` to `SETTLED` status.\n\nIf `amount` is not set, the full amount of the transaction will be cleared. Transactions that have already cleared, either partially or fully, cannot be cleared again using this endpoint.\n\n\n### Parameters\n\n- `token: string`\n The transaction token returned from the /v1/simulate/authorize response.\n\n- `amount?: number`\n Amount (in cents) to clear. Typically this will match the amount in the original authorization, but can be higher or lower. The sign of this amount will automatically match the sign of the original authorization's amount. For example, entering 100 in this field will result in a -100 amount in the transaction, if the original authorization is a credit authorization.\n\nIf `amount` is not set, the full amount of the transaction will be cleared. Transactions that have already cleared, either partially or fully, cannot be cleared again using this endpoint.\n\n\n### Returns\n\n- `{ debugging_request_id?: string; }`\n\n - `debugging_request_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.transactions.simulateClearing({ token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac' });\n\nconsole.log(response);\n```",
7196+
"## simulate_clearing\n\n`client.transactions.simulateClearing(token: string, amount?: number): { debugging_request_id?: string; }`\n\n**post** `/v1/simulate/clearing`\n\nClears an existing authorization, either debit or credit. After this event, the transaction transitions from `PENDING` to `SETTLED` status.\n\nIf `amount` is not set, the full amount of the transaction will be cleared. This endpoint may be called multiple times against the same authorization to simulate a multiple-completion scenario, with each call creating a separate clearing event.\n\n\n### Parameters\n\n- `token: string`\n The transaction token returned from the /v1/simulate/authorize response.\n\n- `amount?: number`\n Amount (in cents) to clear. Typically this will match the amount in the original authorization, but can be higher or lower. The sign of this amount will automatically match the sign of the original authorization's amount. For example, entering 100 in this field will result in a -100 amount in the transaction, if the original authorization is a credit authorization.\n\nIf `amount` is not set, the full amount of the transaction will be cleared. This endpoint may be called multiple times against the same authorization to simulate a multiple-completion scenario, with each call creating a separate clearing event.\n\n\n### Returns\n\n- `{ debugging_request_id?: string; }`\n\n - `debugging_request_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.transactions.simulateClearing({ token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac' });\n\nconsole.log(response);\n```",
71977197
perLanguage: {
71987198
typescript: {
71997199
method: 'client.transactions.simulateClearing',

src/resources/transactions/transactions.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,10 @@ export class Transactions extends APIResource {
138138
* Clears an existing authorization, either debit or credit. After this event, the
139139
* transaction transitions from `PENDING` to `SETTLED` status.
140140
*
141-
* If `amount` is not set, the full amount of the transaction will be cleared.
142-
* Transactions that have already cleared, either partially or fully, cannot be
143-
* cleared again using this endpoint.
141+
* If `amount` is not set, the full amount of the transaction will be cleared. This
142+
* endpoint may be called multiple times against the same authorization to simulate
143+
* a multiple-completion scenario, with each call creating a separate clearing
144+
* event.
144145
*
145146
* @example
146147
* ```ts
@@ -1440,9 +1441,10 @@ export interface TransactionSimulateClearingParams {
14401441
* example, entering 100 in this field will result in a -100 amount in the
14411442
* transaction, if the original authorization is a credit authorization.
14421443
*
1443-
* If `amount` is not set, the full amount of the transaction will be cleared.
1444-
* Transactions that have already cleared, either partially or fully, cannot be
1445-
* cleared again using this endpoint.
1444+
* If `amount` is not set, the full amount of the transaction will be cleared. This
1445+
* endpoint may be called multiple times against the same authorization to simulate
1446+
* a multiple-completion scenario, with each call creating a separate clearing
1447+
* event.
14461448
*/
14471449
amount?: number;
14481450
}

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,9 +1220,9 @@ baseline-browser-mapping@^2.9.0:
12201220
integrity sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg==
12211221

12221222
brace-expansion@^2.0.2:
1223-
version "2.1.1"
1224-
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.1.tgz#c68b1c4111c76aae3a6fba55d496cee10c39dad8"
1225-
integrity sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==
1223+
version "2.1.2"
1224+
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.2.tgz#0bba2271feb7d458b0d31ad13625aaa4754431e2"
1225+
integrity sha512-w5JZcKgdhDOgOwm8H+KgbosopHMuGcl6qbulwjtz3SM7I7P3yW1eAjzMPLrIE+NQ9vjgANKHWeMHnrT0OXW1oA==
12261226
dependencies:
12271227
balanced-match "^1.0.0"
12281228

0 commit comments

Comments
 (0)