Skip to content

Commit c9a95d6

Browse files
feat(api): add category discriminator and payment fields to case transactions
1 parent 44ba106 commit c9a95d6

3 files changed

Lines changed: 66 additions & 24 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-d83e3ddb148bc0c81ff97bd31b82027d5b37efc110f5981103e7b9a2ae281c86.yml
3-
openapi_spec_hash: f607b0571c4ed82a93a3df7bc9e9351b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-9e397c65ffb81e2928b8ecf979769a79131ae6058b6fb373a5e930dc8a168732.yml
3+
openapi_spec_hash: 93aea3855d2d1c390107d223762aa818
44
config_hash: 5bb913c05ebeb301ec925b16e75bb251

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1876,19 +1876,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
18761876
'starting_after?: string;',
18771877
],
18781878
response:
1879-
'{ token: string; account_token: string; added_at: string; card_token: string; transaction_created_at: string; }',
1879+
"{ token: string; account_token: string; added_at: string; card_token: string; category: 'CARD'; transaction_created_at: string; } | { token: string; added_at: string; category: 'PAYMENT'; financial_account_token: string; transaction_created_at: string; account_token?: string; }",
18801880
markdown:
1881-
"## list_transactions\n\n`client.transactionMonitoring.cases.listTransactions(case_token: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; account_token: string; added_at: string; card_token: string; transaction_created_at: string; }`\n\n**get** `/v1/transaction_monitoring/cases/{case_token}/transactions`\n\nLists the transactions associated with a case.\n\n### Parameters\n\n- `case_token: string`\n\n- `ending_before?: string`\n A cursor representing an item's token before which a page of results should end. Used to retrieve the previous page of results before this item.\n\n- `page_size?: number`\n Page size (for pagination).\n\n- `starting_after?: string`\n A cursor representing an item's token after which a page of results should begin. Used to retrieve the next page of results after this item.\n\n### Returns\n\n- `{ token: string; account_token: string; added_at: string; card_token: string; transaction_created_at: string; }`\n A single transaction associated with a case\n\n - `token: string`\n - `account_token: string`\n - `added_at: string`\n - `card_token: string`\n - `transaction_created_at: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\n// Automatically fetches more pages as needed.\nfor await (const caseTransaction of client.transactionMonitoring.cases.listTransactions('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(caseTransaction);\n}\n```",
1881+
"## list_transactions\n\n`client.transactionMonitoring.cases.listTransactions(case_token: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; account_token: string; added_at: string; card_token: string; category: 'CARD'; transaction_created_at: string; } | { token: string; added_at: string; category: 'PAYMENT'; financial_account_token: string; transaction_created_at: string; account_token?: string; }`\n\n**get** `/v1/transaction_monitoring/cases/{case_token}/transactions`\n\nLists the transactions associated with a case.\n\n### Parameters\n\n- `case_token: string`\n\n- `ending_before?: string`\n A cursor representing an item's token before which a page of results should end. Used to retrieve the previous page of results before this item.\n\n- `page_size?: number`\n Page size (for pagination).\n\n- `starting_after?: string`\n A cursor representing an item's token after which a page of results should begin. Used to retrieve the next page of results after this item.\n\n### Returns\n\n- `{ token: string; account_token: string; added_at: string; card_token: string; category: 'CARD'; transaction_created_at: string; } | { token: string; added_at: string; category: 'PAYMENT'; financial_account_token: string; transaction_created_at: string; account_token?: string; }`\n A single transaction associated with a case. The `category` field identifies whether this is a\ncard transaction or a payment transaction.\n\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\n// Automatically fetches more pages as needed.\nfor await (const caseTransaction of client.transactionMonitoring.cases.listTransactions('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(caseTransaction);\n}\n```",
18821882
perLanguage: {
18831883
typescript: {
18841884
method: 'client.transactionMonitoring.cases.listTransactions',
18851885
example:
1886-
"import Lithic from 'lithic';\n\nconst client = new Lithic({\n apiKey: process.env['LITHIC_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const caseTransaction of client.transactionMonitoring.cases.listTransactions(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n)) {\n console.log(caseTransaction.token);\n}",
1886+
"import Lithic from 'lithic';\n\nconst client = new Lithic({\n apiKey: process.env['LITHIC_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const caseTransaction of client.transactionMonitoring.cases.listTransactions(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n)) {\n console.log(caseTransaction);\n}",
18871887
},
18881888
python: {
18891889
method: 'transaction_monitoring.cases.list_transactions',
18901890
example:
1891-
'import os\nfrom lithic import Lithic\n\nclient = Lithic(\n api_key=os.environ.get("LITHIC_API_KEY"), # This is the default and can be omitted\n)\npage = client.transaction_monitoring.cases.list_transactions(\n case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\npage = page.data[0]\nprint(page.token)',
1891+
'import os\nfrom lithic import Lithic\n\nclient = Lithic(\n api_key=os.environ.get("LITHIC_API_KEY"), # This is the default and can be omitted\n)\npage = client.transaction_monitoring.cases.list_transactions(\n case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\npage = page.data[0]\nprint(page)',
18921892
},
18931893
java: {
18941894
method: 'transactionMonitoring().cases().listTransactions',

src/resources/transaction-monitoring/cases/cases.ts

Lines changed: 60 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -241,33 +241,75 @@ export type CaseSortOrder =
241241
export type CaseStatus = 'OPEN' | 'ASSIGNED' | 'IN_REVIEW' | 'ESCALATED' | 'RESOLVED' | 'CLOSED';
242242

243243
/**
244-
* A single transaction associated with a case
244+
* A single transaction associated with a case. The `category` field identifies
245+
* whether this is a card transaction or a payment transaction.
245246
*/
246-
export interface CaseTransaction {
247-
/**
248-
* Globally unique identifier for the transaction
249-
*/
250-
token: string;
247+
export type CaseTransaction = CaseTransaction.CardCaseTransaction | CaseTransaction.PaymentCaseTransaction;
251248

249+
export namespace CaseTransaction {
252250
/**
253-
* Token of the account the transaction belongs to
251+
* A card transaction associated with a case
254252
*/
255-
account_token: string;
253+
export interface CardCaseTransaction {
254+
/**
255+
* Globally unique identifier for the card transaction
256+
*/
257+
token: string;
256258

257-
/**
258-
* Date and time at which the transaction was added to the case
259-
*/
260-
added_at: string;
259+
/**
260+
* Token of the account the transaction belongs to
261+
*/
262+
account_token: string;
261263

262-
/**
263-
* Token of the card the transaction was made on
264-
*/
265-
card_token: string;
264+
/**
265+
* Date and time at which the transaction was added to the case
266+
*/
267+
added_at: string;
268+
269+
/**
270+
* Token of the card the transaction was made on
271+
*/
272+
card_token: string;
273+
274+
category: 'CARD';
275+
276+
/**
277+
* Date and time at which the transaction was created
278+
*/
279+
transaction_created_at: string;
280+
}
266281

267282
/**
268-
* Date and time at which the transaction was created
283+
* A payment (ACH) transaction associated with a case
269284
*/
270-
transaction_created_at: string;
285+
export interface PaymentCaseTransaction {
286+
/**
287+
* Globally unique identifier for the payment transaction
288+
*/
289+
token: string;
290+
291+
/**
292+
* Date and time at which the transaction was added to the case
293+
*/
294+
added_at: string;
295+
296+
category: 'PAYMENT';
297+
298+
/**
299+
* Token of the financial account the payment belongs to
300+
*/
301+
financial_account_token: string;
302+
303+
/**
304+
* Date and time at which the transaction was created
305+
*/
306+
transaction_created_at: string;
307+
308+
/**
309+
* Token of the account the payment belongs to, if applicable
310+
*/
311+
account_token?: string;
312+
}
271313
}
272314

273315
/**

0 commit comments

Comments
 (0)