From 954b27e3fb8dd7b8c55ea57b42d878094efbe3d8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 14:40:55 +0000 Subject: [PATCH 01/17] feat(api): add override_company_name parameter to payments ACH --- .stats.yml | 4 ++-- src/resources/payments.ts | 6 ++++++ tests/api-resources/payments.test.ts | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2c9eb4a3..8315b1d8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 190 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-17c04dd1b0508b380c21e3acc3d4cd1e86b590f81d14fa26d1973b236f660e38.yml -openapi_spec_hash: f8ddee07358d2c938450a6889fbf7940 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-7349acbc90f2ba5668e44039a8e16c678944a2e83281f78e54812ba45904f49a.yml +openapi_spec_hash: d749723cb9a5dca308c467a01cfdc3e9 config_hash: edbdfefeb0d3d927c2f9fe3402793215 diff --git a/src/resources/payments.ts b/src/resources/payments.ts index 90b3600f..b102f62c 100644 --- a/src/resources/payments.ts +++ b/src/resources/payments.ts @@ -676,6 +676,12 @@ export namespace PaymentCreateParams { ach_hold_period?: number; addenda?: string | null; + + /** + * Value to override the configured company name with. Can only be used if allowed + * to override + */ + override_company_name?: string | null; } /** diff --git a/tests/api-resources/payments.test.ts b/tests/api-resources/payments.test.ts index d42b8cb6..6b57065a 100644 --- a/tests/api-resources/payments.test.ts +++ b/tests/api-resources/payments.test.ts @@ -36,6 +36,7 @@ describe('resource payments', () => { sec_code: 'CCD', ach_hold_period: 0, addenda: 'addenda', + override_company_name: 'override_company_name', }, type: 'COLLECTION', token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', From 10dfba6a8f96b1df7d76885f0a762f50b2ada322 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 15:21:20 +0000 Subject: [PATCH 02/17] chore(ci): skip lint on metadata-only changes Note that we still want to run tests, as these depend on the metadata. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01e23a27..6eb3f5dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: timeout-minutes: 10 name: lint runs-on: ${{ github.repository == 'stainless-sdks/lithic-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@v6 @@ -38,7 +38,7 @@ jobs: timeout-minutes: 5 name: build runs-on: ${{ github.repository == 'stainless-sdks/lithic-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') permissions: contents: read id-token: write From 4962972a0c59c6624a8928098332b2acd3eb26b4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 20:28:53 +0000 Subject: [PATCH 03/17] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8315b1d8..885c1016 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 190 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-7349acbc90f2ba5668e44039a8e16c678944a2e83281f78e54812ba45904f49a.yml -openapi_spec_hash: d749723cb9a5dca308c467a01cfdc3e9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-8b222de46ecf164a1d6e47c5e677d6e1772c7b1726d0574d9322305c9af4eec6.yml +openapi_spec_hash: f573dc729467c8c592750677f45a3ea4 config_hash: edbdfefeb0d3d927c2f9fe3402793215 From c36c99779ede1d40967ed1763e5124e2f38c3db1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 15:08:43 +0000 Subject: [PATCH 04/17] docs(api): clarify nature_of_business and qr_code_url field constraints --- .stats.yml | 4 ++-- src/resources/card-bulk-orders.ts | 29 +++++++++++++++-------------- src/resources/cards/cards.ts | 20 ++++++++++++-------- 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/.stats.yml b/.stats.yml index 885c1016..f20dc054 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 190 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-8b222de46ecf164a1d6e47c5e677d6e1772c7b1726d0574d9322305c9af4eec6.yml -openapi_spec_hash: f573dc729467c8c592750677f45a3ea4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-eb2cf51467f505a1d29c3ca40b9595ecbf6d6a3743f53bc42a52c8135a252ff0.yml +openapi_spec_hash: 2fbd71b69d71138b3e54432a38d759ed config_hash: edbdfefeb0d3d927c2f9fe3402793215 diff --git a/src/resources/card-bulk-orders.ts b/src/resources/card-bulk-orders.ts index 8d9ee205..c9f0a8b3 100644 --- a/src/resources/card-bulk-orders.ts +++ b/src/resources/card-bulk-orders.ts @@ -8,12 +8,11 @@ import { path } from '../internal/utils/path'; export class CardBulkOrders extends APIResource { /** - * Create a new bulk order for physical card shipments **[BETA]**. Cards can be - * added to the order via the POST /v1/cards endpoint by specifying the - * bulk_order_token. Lock the order via PATCH - * /v1/card_bulk_orders/{bulk_order_token} to prepare for shipment. Please work - * with your Customer Success Manager and card personalization bureau to ensure - * bulk shipping is supported for your program. + * Create a new bulk order for physical card shipments. Cards can be added to the + * order via the POST /v1/cards endpoint by specifying the bulk_order_token. Lock + * the order via PATCH /v1/card_bulk_orders/{bulk_order_token} to prepare for + * shipment. Please work with your Customer Success Manager and card + * personalization bureau to ensure bulk shipping is supported for your program. * * @example * ```ts @@ -37,7 +36,7 @@ export class CardBulkOrders extends APIResource { } /** - * Retrieve a specific bulk order by token **[BETA]** + * Retrieve a specific bulk order by token * * @example * ```ts @@ -51,8 +50,8 @@ export class CardBulkOrders extends APIResource { } /** - * Update a bulk order **[BETA]**. Primarily used to lock the order, preventing - * additional cards from being added + * Update a bulk order. Primarily used to lock the order, preventing additional + * cards from being added * * @example * ```ts @@ -71,7 +70,7 @@ export class CardBulkOrders extends APIResource { } /** - * List bulk orders for physical card shipments **[BETA]** + * List bulk orders for physical card shipments * * @example * ```ts @@ -122,9 +121,10 @@ export interface CardBulkOrder { shipping_address: unknown; /** - * Shipping method for all cards in this bulk order + * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and + * BULK_EXPRESS are only available with Perfect Plastic Printing */ - shipping_method: 'BULK_EXPEDITED'; + shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; /** * Status of the bulk order. OPEN indicates the order is accepting cards. LOCKED @@ -151,9 +151,10 @@ export interface CardBulkOrderCreateParams { shipping_address: unknown; /** - * Shipping method for all cards in this bulk order + * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and + * BULK_EXPRESS are only available with Perfect Plastic Printing */ - shipping_method: 'BULK_EXPEDITED'; + shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; } export interface CardBulkOrderUpdateParams { diff --git a/src/resources/cards/cards.ts b/src/resources/cards/cards.ts index 40af39d8..0ba3ba9b 100644 --- a/src/resources/cards/cards.ts +++ b/src/resources/cards/cards.ts @@ -1031,11 +1031,12 @@ export interface CardCreateParams { * tracking * - `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight * or similar international option, with tracking - * - `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * - `BULK` - Card will be shipped as part of a bulk fulfillment order. The + * shipping method and timeline are inherited from the parent bulk order. */ shipping_method?: | '2_DAY' - | 'BULK_EXPEDITED' + | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' @@ -1263,11 +1264,12 @@ export interface CardConvertPhysicalParams { * tracking * - `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight * or similar international option, with tracking - * - `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * - `BULK` - Card will be shipped as part of a bulk fulfillment order. The + * shipping method and timeline are inherited from the parent bulk order. */ shipping_method?: | '2_DAY' - | 'BULK_EXPEDITED' + | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' @@ -1431,11 +1433,12 @@ export interface CardReissueParams { * tracking * - `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight * or similar international option, with tracking - * - `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * - `BULK` - Card will be shipped as part of a bulk fulfillment order. The + * shipping method and timeline are inherited from the parent bulk order. */ shipping_method?: | '2_DAY' - | 'BULK_EXPEDITED' + | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' @@ -1488,11 +1491,12 @@ export interface CardRenewParams { * tracking * - `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight * or similar international option, with tracking - * - `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * - `BULK` - Card will be shipped as part of a bulk fulfillment order. The + * shipping method and timeline are inherited from the parent bulk order. */ shipping_method?: | '2_DAY' - | 'BULK_EXPEDITED' + | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' From 21854f4bfde44d17f4f22a0f25913f7e91d87c21 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 21:35:11 +0000 Subject: [PATCH 05/17] chore(internal): support custom-instructions-path flag in MCP servers --- packages/mcp-server/src/http.ts | 3 ++- packages/mcp-server/src/instructions.ts | 31 +++++++++++++++++++++---- packages/mcp-server/src/options.ts | 6 +++++ packages/mcp-server/src/server.ts | 10 ++++++-- packages/mcp-server/src/stdio.ts | 5 +++- 5 files changed, 47 insertions(+), 8 deletions(-) diff --git a/packages/mcp-server/src/http.ts b/packages/mcp-server/src/http.ts index 3f9b4878..39f35908 100644 --- a/packages/mcp-server/src/http.ts +++ b/packages/mcp-server/src/http.ts @@ -23,7 +23,8 @@ const newServer = async ({ res: express.Response; }): Promise => { const stainlessApiKey = getStainlessApiKey(req, mcpOptions); - const server = await newMcpServer(stainlessApiKey); + const customInstructionsPath = mcpOptions.customInstructionsPath; + const server = await newMcpServer({ stainlessApiKey, customInstructionsPath }); const authOptions = parseClientAuthHeaders(req, false); diff --git a/packages/mcp-server/src/instructions.ts b/packages/mcp-server/src/instructions.ts index 53deb6fc..818694cb 100644 --- a/packages/mcp-server/src/instructions.ts +++ b/packages/mcp-server/src/instructions.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import fs from 'fs/promises'; import { readEnv } from './util'; import { getLogger } from './logger'; @@ -12,9 +13,15 @@ interface InstructionsCacheEntry { const instructionsCache = new Map(); -export async function getInstructions(stainlessApiKey: string | undefined): Promise { +export async function getInstructions({ + stainlessApiKey, + customInstructionsPath, +}: { + stainlessApiKey?: string | undefined; + customInstructionsPath?: string | undefined; +}): Promise { const now = Date.now(); - const cacheKey = stainlessApiKey ?? ''; + const cacheKey = customInstructionsPath ?? stainlessApiKey ?? ''; const cached = instructionsCache.get(cacheKey); if (cached && now - cached.fetchedAt <= INSTRUCTIONS_CACHE_TTL_MS) { @@ -28,12 +35,28 @@ export async function getInstructions(stainlessApiKey: string | undefined): Prom } } - const fetchedInstructions = await fetchLatestInstructions(stainlessApiKey); + let fetchedInstructions: string; + + if (customInstructionsPath) { + fetchedInstructions = await fetchLatestInstructionsFromFile(customInstructionsPath); + } else { + fetchedInstructions = await fetchLatestInstructionsFromApi(stainlessApiKey); + } + instructionsCache.set(cacheKey, { fetchedInstructions, fetchedAt: now }); return fetchedInstructions; } -async function fetchLatestInstructions(stainlessApiKey: string | undefined): Promise { +async function fetchLatestInstructionsFromFile(path: string): Promise { + try { + return await fs.readFile(path, 'utf-8'); + } catch (error) { + getLogger().error({ error, path }, 'Error fetching instructions from file'); + throw error; + } +} + +async function fetchLatestInstructionsFromApi(stainlessApiKey: string | undefined): Promise { // Setting the stainless API key is optional, but may be required // to authenticate requests to the Stainless API. const response = await fetch( diff --git a/packages/mcp-server/src/options.ts b/packages/mcp-server/src/options.ts index b9e8e8a6..d68058dc 100644 --- a/packages/mcp-server/src/options.ts +++ b/packages/mcp-server/src/options.ts @@ -22,6 +22,7 @@ export type McpOptions = { codeAllowedMethods?: string[] | undefined; codeBlockedMethods?: string[] | undefined; codeExecutionMode: McpCodeExecutionMode; + customInstructionsPath?: string | undefined; }; export type McpCodeExecutionMode = 'stainless-sandbox' | 'local'; @@ -52,6 +53,10 @@ export function parseCLIOptions(): CLIOptions { description: "Where to run code execution in code tool; 'stainless-sandbox' will execute code in Stainless-hosted sandboxes whereas 'local' will execute code locally on the MCP server machine.", }) + .option('custom-instructions-path', { + type: 'string', + description: 'Path to custom instructions for the MCP server', + }) .option('debug', { type: 'boolean', description: 'Enable debug logging' }) .option('log-format', { type: 'string', @@ -117,6 +122,7 @@ export function parseCLIOptions(): CLIOptions { codeAllowedMethods: argv.codeAllowedMethods, codeBlockedMethods: argv.codeBlockedMethods, codeExecutionMode: argv.codeExecutionMode as McpCodeExecutionMode, + customInstructionsPath: argv.customInstructionsPath, transport, logFormat, port: argv.port, diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index 27a473bb..9bc40981 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -17,14 +17,20 @@ import { blockedMethodsForCodeTool } from './methods'; import { HandlerFunction, McpRequestContext, ToolCallResult, McpTool } from './types'; import { readEnv } from './util'; -export const newMcpServer = async (stainlessApiKey: string | undefined) => +export const newMcpServer = async ({ + stainlessApiKey, + customInstructionsPath, +}: { + stainlessApiKey?: string | undefined; + customInstructionsPath?: string | undefined; +}) => new McpServer( { name: 'lithic_api', version: '0.135.0', }, { - instructions: await getInstructions(stainlessApiKey), + instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }), capabilities: { tools: {}, logging: {} }, }, ); diff --git a/packages/mcp-server/src/stdio.ts b/packages/mcp-server/src/stdio.ts index e8bcbb19..b04a5441 100644 --- a/packages/mcp-server/src/stdio.ts +++ b/packages/mcp-server/src/stdio.ts @@ -4,7 +4,10 @@ import { initMcpServer, newMcpServer } from './server'; import { getLogger } from './logger'; export const launchStdioServer = async (mcpOptions: McpOptions) => { - const server = await newMcpServer(mcpOptions.stainlessApiKey); + const server = await newMcpServer({ + stainlessApiKey: mcpOptions.stainlessApiKey, + customInstructionsPath: mcpOptions.customInstructionsPath, + }); await initMcpServer({ server, mcpOptions, stainlessApiKey: mcpOptions.stainlessApiKey }); From 827a4344ef5a4e6a47a58564a69373d1135dedcf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 15:15:49 +0000 Subject: [PATCH 06/17] chore(internal): codegen related update --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 49adad97..b1a483e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1225,9 +1225,9 @@ baseline-browser-mapping@^2.9.0: integrity sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg== brace-expansion@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.2.tgz#54fc53237a613d854c7bd37463aad17df87214e7" - integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ== + version "2.0.3" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.3.tgz#0493338bdd58e319b1039c67cf7ee439892c01d9" + integrity sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA== dependencies: balanced-match "^1.0.0" From c7f9b6a3ef5ebd16763c7f17b9c93b407e32a4b2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 18:05:48 +0000 Subject: [PATCH 07/17] chore(internal): support local docs search in MCP servers --- packages/mcp-server/package.json | 1 + packages/mcp-server/src/docs-search-tool.ts | 66 +- packages/mcp-server/src/local-docs-search.ts | 3522 ++++++++++++++++++ packages/mcp-server/src/options.ts | 18 + packages/mcp-server/src/server.ts | 8 + 5 files changed, 3605 insertions(+), 10 deletions(-) create mode 100644 packages/mcp-server/src/local-docs-search.ts diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index a50b1d48..98904894 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -41,6 +41,7 @@ "cors": "^2.8.5", "express": "^5.1.0", "fuse.js": "^7.1.0", + "minisearch": "^7.2.0", "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.8/jq-web.tar.gz", "pino": "^10.3.1", "pino-http": "^11.0.0", diff --git a/packages/mcp-server/src/docs-search-tool.ts b/packages/mcp-server/src/docs-search-tool.ts index a3122cb9..b521738d 100644 --- a/packages/mcp-server/src/docs-search-tool.ts +++ b/packages/mcp-server/src/docs-search-tool.ts @@ -3,6 +3,7 @@ import { Tool } from '@modelcontextprotocol/sdk/types.js'; import { Metadata, McpRequestContext, asTextContentResult } from './types'; import { getLogger } from './logger'; +import type { LocalDocsSearch } from './local-docs-search'; export const metadata: Metadata = { resource: 'all', @@ -43,20 +44,49 @@ export const tool: Tool = { const docsSearchURL = process.env['DOCS_SEARCH_URL'] || 'https://api.stainless.com/api/projects/lithic/docs/search'; -export const handler = async ({ - reqContext, - args, -}: { - reqContext: McpRequestContext; - args: Record | undefined; -}) => { +let _localSearch: LocalDocsSearch | undefined; + +export function setLocalSearch(search: LocalDocsSearch): void { + _localSearch = search; +} + +const SUPPORTED_LANGUAGES = new Set(['http', 'typescript', 'javascript']); + +async function searchLocal(args: Record): Promise { + if (!_localSearch) { + throw new Error('Local search not initialized'); + } + + const query = (args['query'] as string) ?? ''; + const language = (args['language'] as string) ?? 'typescript'; + const detail = (args['detail'] as string) ?? 'verbose'; + + if (!SUPPORTED_LANGUAGES.has(language)) { + throw new Error( + `Local docs search only supports HTTP, TypeScript, and JavaScript. Got language="${language}". ` + + `Use --docs-search-mode stainless-api for other languages, or set language to "http", "typescript", or "javascript".`, + ); + } + + return _localSearch.search({ + query, + language, + detail, + maxResults: 10, + }).results; +} + +async function searchRemote( + args: Record, + stainlessApiKey: string | undefined, +): Promise { const body = args as any; const query = new URLSearchParams(body).toString(); const startTime = Date.now(); const result = await fetch(`${docsSearchURL}?${query}`, { headers: { - ...(reqContext.stainlessApiKey && { Authorization: reqContext.stainlessApiKey }), + ...(stainlessApiKey && { Authorization: stainlessApiKey }), }, }); @@ -75,7 +105,7 @@ export const handler = async ({ 'Got error response from docs search tool', ); - if (result.status === 404 && !reqContext.stainlessApiKey) { + if (result.status === 404 && !stainlessApiKey) { throw new Error( 'Could not find docs for this project. You may need to provide a Stainless API key via the STAINLESS_API_KEY environment variable, the --stainless-api-key flag, or the x-stainless-api-key HTTP header.', ); @@ -94,7 +124,23 @@ export const handler = async ({ }, 'Got docs search result', ); - return asTextContentResult(resultBody); + return resultBody; +} + +export const handler = async ({ + reqContext, + args, +}: { + reqContext: McpRequestContext; + args: Record | undefined; +}) => { + const body = args ?? {}; + + if (_localSearch) { + return asTextContentResult(await searchLocal(body)); + } + + return asTextContentResult(await searchRemote(body, reqContext.stainlessApiKey)); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts new file mode 100644 index 00000000..4810a0a2 --- /dev/null +++ b/packages/mcp-server/src/local-docs-search.ts @@ -0,0 +1,3522 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import MiniSearch from 'minisearch'; +import * as fs from 'node:fs/promises'; +import * as path from 'node:path'; +import { getLogger } from './logger'; + +type MethodEntry = { + name: string; + endpoint: string; + httpMethod: string; + summary: string; + description: string; + stainlessPath: string; + qualified: string; + params?: string[]; + response?: string; + markdown?: string; +}; + +type ProseChunk = { + content: string; + tag: string; + sectionContext?: string; + source?: string; +}; + +type MiniSearchDocument = { + id: string; + kind: 'http_method' | 'prose'; + name?: string; + endpoint?: string; + summary?: string; + description?: string; + qualified?: string; + stainlessPath?: string; + content?: string; + sectionContext?: string; + _original: Record; +}; + +type SearchResult = { + results: (string | Record)[]; +}; + +const EMBEDDED_METHODS: MethodEntry[] = [ + { + name: 'api_status', + endpoint: '/v1/status', + httpMethod: 'get', + summary: 'API status check', + description: 'Status of api', + stainlessPath: '(resource) $client > (method) api_status', + qualified: 'client.apiStatus', + response: '{ message?: string; }', + markdown: + "## api_status\n\n`client.apiStatus(): { message?: string; }`\n\n**get** `/v1/status`\n\nStatus of api\n\n### Returns\n\n- `{ message?: string; }`\n\n - `message?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst apiStatus = await client.apiStatus();\n\nconsole.log(apiStatus);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/accounts/{account_token}', + httpMethod: 'get', + summary: 'Get account', + description: 'Get account configuration such as spend limits.', + stainlessPath: '(resource) accounts > (method) retrieve', + qualified: 'client.accounts.retrieve', + params: ['account_token: string;'], + response: + "{ token: string; created: string; spend_limit: { daily: number; lifetime: number; monthly: number; }; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; }", + markdown: + "## retrieve\n\n`client.accounts.retrieve(account_token: string): { token: string; created: string; spend_limit: object; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: object; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: object; }`\n\n**get** `/v1/accounts/{account_token}`\n\nGet account configuration such as spend limits.\n\n### Parameters\n\n- `account_token: string`\n\n### Returns\n\n- `{ token: string; created: string; spend_limit: { daily: number; lifetime: number; monthly: number; }; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; }`\n\n - `token: string`\n - `created: string`\n - `spend_limit: { daily: number; lifetime: number; monthly: number; }`\n - `state: 'ACTIVE' | 'PAUSED' | 'CLOSED'`\n - `account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }`\n - `auth_rule_tokens?: string[]`\n - `cardholder_currency?: string`\n - `comment?: string`\n - `substatus?: string`\n - `verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst account = await client.accounts.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(account);\n```", + }, + { + name: 'update', + endpoint: '/v1/accounts/{account_token}', + httpMethod: 'patch', + summary: 'Update account', + description: + 'Update account configuration such as state or spend limits. Can only be run on accounts that are part of the program managed by this API key.\nAccounts that are in the `PAUSED` state will not be able to transact or create new cards.\n', + stainlessPath: '(resource) accounts > (method) update', + qualified: 'client.accounts.update', + params: [ + 'account_token: string;', + 'comment?: string;', + 'daily_spend_limit?: number;', + 'lifetime_spend_limit?: number;', + 'monthly_spend_limit?: number;', + "state?: 'ACTIVE' | 'PAUSED' | 'CLOSED';", + 'substatus?: string;', + 'verification_address?: { address1?: string; address2?: string; city?: string; country?: string; postal_code?: string; state?: string; };', + ], + response: + "{ token: string; created: string; spend_limit: { daily: number; lifetime: number; monthly: number; }; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; }", + markdown: + "## update\n\n`client.accounts.update(account_token: string, comment?: string, daily_spend_limit?: number, lifetime_spend_limit?: number, monthly_spend_limit?: number, state?: 'ACTIVE' | 'PAUSED' | 'CLOSED', substatus?: string, verification_address?: { address1?: string; address2?: string; city?: string; country?: string; postal_code?: string; state?: string; }): { token: string; created: string; spend_limit: object; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: object; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: object; }`\n\n**patch** `/v1/accounts/{account_token}`\n\nUpdate account configuration such as state or spend limits. Can only be run on accounts that are part of the program managed by this API key.\nAccounts that are in the `PAUSED` state will not be able to transact or create new cards.\n\n\n### Parameters\n\n- `account_token: string`\n\n- `comment?: string`\n Additional context or information related to the account.\n\n- `daily_spend_limit?: number`\n Amount (in cents) for the account's daily spend limit (e.g. 100000 would be a $1,000 limit).\nBy default the daily spend limit is set to $1,250.\n\n\n- `lifetime_spend_limit?: number`\n Amount (in cents) for the account's lifetime spend limit (e.g. 100000 would be a $1,000 limit). Once this limit is reached, no transactions will be accepted on any card created for this account until the limit is updated.\nNote that a spend limit of 0 is effectively no limit, and should only be used to reset or remove a prior limit. Only a limit of 1 or above will result in declined transactions due to checks against the account limit. This behavior differs from the daily spend limit and the monthly spend limit.\n\n\n- `monthly_spend_limit?: number`\n Amount (in cents) for the account's monthly spend limit (e.g. 100000 would be a $1,000 limit).\nBy default the monthly spend limit is set to $5,000.\n\n\n- `state?: 'ACTIVE' | 'PAUSED' | 'CLOSED'`\n Account states.\n\n- `substatus?: string`\n Account state substatus values:\n* `FRAUD_IDENTIFIED` - The account has been recognized as being created or used with stolen or fabricated identity information, encompassing both true identity theft and synthetic identities.\n* `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as unauthorized access or fraudulent transactions, necessitating further investigation.\n* `RISK_VIOLATION` - The account has been involved in deliberate misuse by the legitimate account holder. Examples include disputing valid transactions without cause, falsely claiming non-receipt of goods, or engaging in intentional bust-out schemes to exploit account services.\n* `END_USER_REQUEST` - The account holder has voluntarily requested the closure of the account for personal reasons. This encompasses situations such as bankruptcy, other financial considerations, or the account holder's death.\n* `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to business strategy, risk management, inactivity, product changes, regulatory concerns, or violations of terms and conditions.\n* `NOT_ACTIVE` - The account has not had any transactions or payment activity within a specified period. This status applies to accounts that are paused or closed due to inactivity.\n* `INTERNAL_REVIEW` - The account is temporarily paused pending further internal review. In future implementations, this status may prevent clients from activating the account via APIs until the review is completed.\n* `OTHER` - The reason for the account's current status does not fall into any of the above categories. A comment should be provided to specify the particular reason.\n\n- `verification_address?: { address1?: string; address2?: string; city?: string; country?: string; postal_code?: string; state?: string; }`\n Address used during Address Verification Service (AVS) checks during transactions if enabled via Auth Rules. This field is deprecated as AVS checks are no longer supported by Auth Rules. The field will be removed from the schema in a future release.\n - `address1?: string`\n - `address2?: string`\n - `city?: string`\n - `country?: string`\n - `postal_code?: string`\n - `state?: string`\n\n### Returns\n\n- `{ token: string; created: string; spend_limit: { daily: number; lifetime: number; monthly: number; }; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; }`\n\n - `token: string`\n - `created: string`\n - `spend_limit: { daily: number; lifetime: number; monthly: number; }`\n - `state: 'ACTIVE' | 'PAUSED' | 'CLOSED'`\n - `account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }`\n - `auth_rule_tokens?: string[]`\n - `cardholder_currency?: string`\n - `comment?: string`\n - `substatus?: string`\n - `verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst account = await client.accounts.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(account);\n```", + }, + { + name: 'list', + endpoint: '/v1/accounts', + httpMethod: 'get', + summary: 'List accounts', + description: 'List account configurations.\n', + stainlessPath: '(resource) accounts > (method) list', + qualified: 'client.accounts.list', + params: [ + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'page_size?: number;', + 'starting_after?: string;', + ], + response: + "{ token: string; created: string; spend_limit: { daily: number; lifetime: number; monthly: number; }; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; }", + markdown: + "## list\n\n`client.accounts.list(begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; created: string; spend_limit: object; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: object; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: object; }`\n\n**get** `/v1/accounts`\n\nList account configurations.\n\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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; created: string; spend_limit: { daily: number; lifetime: number; monthly: number; }; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; }`\n\n - `token: string`\n - `created: string`\n - `spend_limit: { daily: number; lifetime: number; monthly: number; }`\n - `state: 'ACTIVE' | 'PAUSED' | 'CLOSED'`\n - `account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }`\n - `auth_rule_tokens?: string[]`\n - `cardholder_currency?: string`\n - `comment?: string`\n - `substatus?: string`\n - `verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: 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 account of client.accounts.list()) {\n console.log(account);\n}\n```", + }, + { + name: 'retrieve_spend_limits', + endpoint: '/v1/accounts/{account_token}/spend_limits', + httpMethod: 'get', + summary: "Get account's available spend limits", + description: + "Get an Account's available spend limits, which is based on the spend limit configured on the Account and the amount already spent over the spend limit's duration. For example, if the Account has a daily spend limit of $1000 configured, and has spent $600 in the last 24 hours, the available spend limit returned would be $400.", + stainlessPath: '(resource) accounts > (method) retrieve_spend_limits', + qualified: 'client.accounts.retrieveSpendLimits', + params: ['account_token: string;'], + response: + '{ available_spend_limit: { daily?: number; lifetime?: number; monthly?: number; }; spend_limit?: { daily?: number; lifetime?: number; monthly?: number; }; spend_velocity?: { daily?: number; lifetime?: number; monthly?: number; }; }', + markdown: + "## retrieve_spend_limits\n\n`client.accounts.retrieveSpendLimits(account_token: string): { available_spend_limit: object; spend_limit?: object; spend_velocity?: object; }`\n\n**get** `/v1/accounts/{account_token}/spend_limits`\n\nGet an Account's available spend limits, which is based on the spend limit configured on the Account and the amount already spent over the spend limit's duration. For example, if the Account has a daily spend limit of $1000 configured, and has spent $600 in the last 24 hours, the available spend limit returned would be $400.\n\n### Parameters\n\n- `account_token: string`\n\n### Returns\n\n- `{ available_spend_limit: { daily?: number; lifetime?: number; monthly?: number; }; spend_limit?: { daily?: number; lifetime?: number; monthly?: number; }; spend_velocity?: { daily?: number; lifetime?: number; monthly?: number; }; }`\n\n - `available_spend_limit: { daily?: number; lifetime?: number; monthly?: number; }`\n - `spend_limit?: { daily?: number; lifetime?: number; monthly?: number; }`\n - `spend_velocity?: { daily?: number; lifetime?: number; monthly?: number; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst accountSpendLimits = await client.accounts.retrieveSpendLimits('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(accountSpendLimits);\n```", + }, + { + name: 'create', + endpoint: '/v1/account_holders', + httpMethod: 'post', + summary: 'Create an individual or business account holder', + description: + 'Create an account holder and initiate the appropriate onboarding workflow. Account holders and accounts have a 1:1 relationship. When an account holder is successfully created an associated account is also created.\nAll calls to this endpoint will return a synchronous response. The response time will depend on the workflow. In some cases, the response may indicate the workflow is under review or further action will be needed to complete the account creation process.\nThis endpoint can only be used on accounts that are part of the program that the calling API key manages.', + stainlessPath: '(resource) account_holders > (method) create', + qualified: 'client.accountHolders.create', + params: [ + "{ beneficial_owner_individuals: { address: object; dob: string; email: string; first_name: string; government_id: string; last_name: string; phone_number?: string; }[]; business_entity: { address: object; government_id: string; legal_business_name: string; phone_numbers: string[]; dba_business_name?: string; parent_company?: string; }; control_person: { address: object; dob: string; email: string; first_name: string; government_id: string; last_name: string; phone_number?: string; }; nature_of_business: string; tos_timestamp: string; workflow: 'KYB_BASIC' | 'KYB_BYO'; external_id?: string; kyb_passed_timestamp?: string; naics_code?: string; website_url?: string; } | { business_entity: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; legal_business_name: string; dba_business_name?: string; government_id?: string; parent_company?: string; phone_numbers?: string[]; }; beneficial_owner_individuals?: { first_name: string; last_name: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob?: string; email?: string; government_id?: string; phone_number?: string; }[]; control_person?: { first_name: string; last_name: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob?: string; email?: string; government_id?: string; phone_number?: string; }; external_id?: string; naics_code?: string; nature_of_business?: string; tos_timestamp?: string; website_url?: string; workflow?: 'KYB_DELEGATED'; } | { individual: { address: object; dob: string; email: string; first_name: string; government_id: string; last_name: string; phone_number: string; }; tos_timestamp: string; workflow: 'KYC_BASIC' | 'KYC_BYO'; external_id?: string; kyc_passed_timestamp?: string; } | { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; email: string; first_name: string; kyc_exemption_type: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; last_name: string; phone_number: string; workflow: 'KYC_EXEMPT'; business_account_token?: string; external_id?: string; };", + ], + response: + "{ token: string; account_token: string; status: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons: string[]; created?: string; external_id?: string; required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]; }", + }, + { + name: 'retrieve', + endpoint: '/v1/account_holders/{account_holder_token}', + httpMethod: 'get', + summary: 'Get an individual or business account holder', + description: 'Get an Individual or Business Account Holder and/or their KYC or KYB evaluation status.', + stainlessPath: '(resource) account_holders > (method) retrieve', + qualified: 'client.accountHolders.retrieve', + params: ['account_holder_token: string;'], + response: + "{ token: string; created: string; account_token?: string; beneficial_owner_individuals?: object[]; business_account_token?: string; business_entity?: object; control_person?: object; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: object; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: required_document[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: object; website_url?: string; }", + markdown: + "## retrieve\n\n`client.accountHolders.retrieve(account_holder_token: string): { token: string; created: string; account_token?: string; beneficial_owner_individuals?: object[]; business_account_token?: string; business_entity?: object; control_person?: object; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: object; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: required_document[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: object; website_url?: string; }`\n\n**get** `/v1/account_holders/{account_holder_token}`\n\nGet an Individual or Business Account Holder and/or their KYC or KYB evaluation status.\n\n### Parameters\n\n- `account_holder_token: string`\n\n### Returns\n\n- `{ token: string; created: string; account_token?: string; beneficial_owner_individuals?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }[]; business_account_token?: string; business_entity?: { address: object; dba_business_name: string; entity_token: string; government_id: string; legal_business_name: string; phone_numbers: string[]; parent_company?: string; }; control_person?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: { created?: string; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; updated?: string; }; website_url?: string; }`\n\n - `token: string`\n - `created: string`\n - `account_token?: string`\n - `beneficial_owner_individuals?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }[]`\n - `business_account_token?: string`\n - `business_entity?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dba_business_name: string; entity_token: string; government_id: string; legal_business_name: string; phone_numbers: string[]; parent_company?: string; }`\n - `control_person?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }`\n - `email?: string`\n - `exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'`\n - `external_id?: string`\n - `individual?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }`\n - `naics_code?: string`\n - `nature_of_business?: string`\n - `phone_number?: string`\n - `required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]`\n - `status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'`\n - `status_reasons?: string[]`\n - `user_type?: 'BUSINESS' | 'INDIVIDUAL'`\n - `verification_application?: { created?: string; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; updated?: string; }`\n - `website_url?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst accountHolder = await client.accountHolders.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(accountHolder);\n```", + }, + { + name: 'update', + endpoint: '/v1/account_holders/{account_holder_token}', + httpMethod: 'patch', + summary: 'Update account holder information and possibly resubmit for evaluation', + description: + "Update the information associated with a particular account holder (including business owners and control persons associated to a business account).\nIf Lithic is performing KYB or KYC and additional verification is required we will run the individual's or business's updated information again and return whether the status is accepted or pending (i.e., further action required).\nAll calls to this endpoint will return a synchronous response. The response time will depend on the workflow. In some cases, the response may indicate the workflow is under review or further action will be needed to complete the account creation process.\nThis endpoint can only be used on existing accounts that are part of the program that the calling API key manages.", + stainlessPath: '(resource) account_holders > (method) update', + qualified: 'client.accountHolders.update', + params: [ + 'account_holder_token: string;', + 'body: { beneficial_owner_individuals?: { entity_token: string; address?: { address1?: string; address2?: string; city?: string; country?: string; postal_code?: string; state?: string; }; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }[]; business_entity?: { entity_token: string; address?: { address1?: string; address2?: string; city?: string; country?: string; postal_code?: string; state?: string; }; dba_business_name?: string; government_id?: string; legal_business_name?: string; parent_company?: string; phone_numbers?: string[]; }; control_person?: { entity_token: string; address?: { address1?: string; address2?: string; city?: string; country?: string; postal_code?: string; state?: string; }; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }; external_id?: string; naics_code?: string; nature_of_business?: string; website_url?: string; } | { external_id?: string; individual?: { entity_token: string; address?: { address1?: string; address2?: string; city?: string; country?: string; postal_code?: string; state?: string; }; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }; } | { address?: { address1?: string; address2?: string; city?: string; country?: string; postal_code?: string; state?: string; }; business_account_token?: string; email?: string; first_name?: string; last_name?: string; legal_business_name?: string; phone_number?: string; };', + ], + response: + "{ token?: string; account_token?: string; beneficial_owner_individuals?: object[]; business_account_token?: string; business_entity?: kyb_business_entity; control_person?: object; created?: string; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: object; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: required_document[]; status?: 'ACCEPTED' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: object; website_url?: string; } | { token?: string; address?: object; business_account_token?: string; email?: string; first_name?: string; last_name?: string; legal_business_name?: string; phone_number?: string; }", + }, + { + name: 'list', + endpoint: '/v1/account_holders', + httpMethod: 'get', + summary: 'Get a list of individual or business account holders', + description: + 'Get a list of individual or business account holders and their KYC or KYB evaluation status.', + stainlessPath: '(resource) account_holders > (method) list', + qualified: 'client.accountHolders.list', + params: [ + 'begin?: string;', + 'email?: string;', + 'end?: string;', + 'ending_before?: string;', + 'external_id?: string;', + 'first_name?: string;', + 'last_name?: string;', + 'legal_business_name?: string;', + 'limit?: number;', + 'phone_number?: string;', + 'starting_after?: string;', + ], + response: + "{ token: string; created: string; account_token?: string; beneficial_owner_individuals?: object[]; business_account_token?: string; business_entity?: object; control_person?: object; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: object; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: required_document[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: object; website_url?: string; }", + markdown: + "## list\n\n`client.accountHolders.list(begin?: string, email?: string, end?: string, ending_before?: string, external_id?: string, first_name?: string, last_name?: string, legal_business_name?: string, limit?: number, phone_number?: string, starting_after?: string): { token: string; created: string; account_token?: string; beneficial_owner_individuals?: object[]; business_account_token?: string; business_entity?: object; control_person?: object; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: object; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: required_document[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: object; website_url?: string; }`\n\n**get** `/v1/account_holders`\n\nGet a list of individual or business account holders and their KYC or KYB evaluation status.\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `email?: string`\n Email address of the account holder. The query must be an exact match, case insensitive.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `external_id?: string`\n If applicable, represents the external_id associated with the account_holder.\n\n- `first_name?: string`\n (Individual Account Holders only) The first name of the account holder. The query is case insensitive and supports partial matches.\n\n- `last_name?: string`\n (Individual Account Holders only) The last name of the account holder. The query is case insensitive and supports partial matches.\n\n- `legal_business_name?: string`\n (Business Account Holders only) The legal business name of the account holder. The query is case insensitive and supports partial matches.\n\n- `limit?: number`\n The number of account_holders to limit the response to.\n\n- `phone_number?: string`\n Phone number of the account holder. The query must be an exact match.\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; created: string; account_token?: string; beneficial_owner_individuals?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }[]; business_account_token?: string; business_entity?: { address: object; dba_business_name: string; entity_token: string; government_id: string; legal_business_name: string; phone_numbers: string[]; parent_company?: string; }; control_person?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: { created?: string; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; updated?: string; }; website_url?: string; }`\n\n - `token: string`\n - `created: string`\n - `account_token?: string`\n - `beneficial_owner_individuals?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }[]`\n - `business_account_token?: string`\n - `business_entity?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dba_business_name: string; entity_token: string; government_id: string; legal_business_name: string; phone_numbers: string[]; parent_company?: string; }`\n - `control_person?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }`\n - `email?: string`\n - `exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'`\n - `external_id?: string`\n - `individual?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }`\n - `naics_code?: string`\n - `nature_of_business?: string`\n - `phone_number?: string`\n - `required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]`\n - `status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'`\n - `status_reasons?: string[]`\n - `user_type?: 'BUSINESS' | 'INDIVIDUAL'`\n - `verification_application?: { created?: string; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; updated?: string; }`\n - `website_url?: 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 accountHolder of client.accountHolders.list()) {\n console.log(accountHolder);\n}\n```", + }, + { + name: 'list_documents', + endpoint: '/v1/account_holders/{account_holder_token}/documents', + httpMethod: 'get', + summary: 'Get account holder document uploads', + description: + 'Retrieve the status of account holder document uploads, or retrieve the upload URLs to process your image uploads.\n\nNote that this is not equivalent to checking the status of the KYC evaluation overall (a document may be successfully uploaded but not be sufficient for KYC to pass).\n\nIn the event your upload URLs have expired, calling this endpoint will refresh them.\nSimilarly, in the event a previous account holder document upload has failed, you can use this endpoint to get a new upload URL for the failed image upload.\n\nWhen a new document upload is generated for a failed attempt, the response will show an additional entry in the `required_document_uploads` list\nin a `PENDING` state for the corresponding `image_type`.\n', + stainlessPath: '(resource) account_holders > (method) list_documents', + qualified: 'client.accountHolders.listDocuments', + params: ['account_holder_token: string;'], + response: + '{ data?: { token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: object[]; }[]; }', + markdown: + "## list_documents\n\n`client.accountHolders.listDocuments(account_holder_token: string): { data?: document[]; }`\n\n**get** `/v1/account_holders/{account_holder_token}/documents`\n\nRetrieve the status of account holder document uploads, or retrieve the upload URLs to process your image uploads.\n\nNote that this is not equivalent to checking the status of the KYC evaluation overall (a document may be successfully uploaded but not be sufficient for KYC to pass).\n\nIn the event your upload URLs have expired, calling this endpoint will refresh them.\nSimilarly, in the event a previous account holder document upload has failed, you can use this endpoint to get a new upload URL for the failed image upload.\n\nWhen a new document upload is generated for a failed attempt, the response will show an additional entry in the `required_document_uploads` list\nin a `PENDING` state for the corresponding `image_type`.\n\n\n### Parameters\n\n- `account_holder_token: string`\n\n### Returns\n\n- `{ data?: { token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: object[]; }[]; }`\n\n - `data?: { token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.accountHolders.listDocuments('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + }, + { + name: 'retrieve_document', + endpoint: '/v1/account_holders/{account_holder_token}/documents/{document_token}', + httpMethod: 'get', + summary: 'Get account holder document upload status', + description: + 'Check the status of an account holder document upload, or retrieve the upload URLs to process your image uploads.\n\nNote that this is not equivalent to checking the status of the KYC evaluation overall (a document may be successfully uploaded but not be sufficient for KYC to pass).\n\nIn the event your upload URLs have expired, calling this endpoint will refresh them.\nSimilarly, in the event a document upload has failed, you can use this endpoint to get a new upload URL for the failed image upload.\n\nWhen a new account holder document upload is generated for a failed attempt, the response will show an additional entry in the `required_document_uploads` array\nin a `PENDING` state for the corresponding `image_type`.\n', + stainlessPath: '(resource) account_holders > (method) retrieve_document', + qualified: 'client.accountHolders.retrieveDocument', + params: ['account_holder_token: string;', 'document_token: string;'], + response: + "{ token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }", + markdown: + "## retrieve_document\n\n`client.accountHolders.retrieveDocument(account_holder_token: string, document_token: string): { token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: object[]; }`\n\n**get** `/v1/account_holders/{account_holder_token}/documents/{document_token}`\n\nCheck the status of an account holder document upload, or retrieve the upload URLs to process your image uploads.\n\nNote that this is not equivalent to checking the status of the KYC evaluation overall (a document may be successfully uploaded but not be sufficient for KYC to pass).\n\nIn the event your upload URLs have expired, calling this endpoint will refresh them.\nSimilarly, in the event a document upload has failed, you can use this endpoint to get a new upload URL for the failed image upload.\n\nWhen a new account holder document upload is generated for a failed attempt, the response will show an additional entry in the `required_document_uploads` array\nin a `PENDING` state for the corresponding `image_type`.\n\n\n### Parameters\n\n- `account_holder_token: string`\n\n- `document_token: string`\n\n### Returns\n\n- `{ token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }`\n Describes the document and the required document image uploads\nrequired to re-run KYC\n\n - `token: string`\n - `account_holder_token: string`\n - `document_type: string`\n - `entity_token: string`\n - `required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst document = await client.accountHolders.retrieveDocument('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_holder_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(document);\n```", + }, + { + name: 'simulate_enrollment_document_review', + endpoint: '/v1/simulate/account_holders/enrollment_document_review', + httpMethod: 'post', + summary: "Simulate an account holder document upload's review", + description: 'Simulates a review for an account holder document upload.', + stainlessPath: '(resource) account_holders > (method) simulate_enrollment_document_review', + qualified: 'client.accountHolders.simulateEnrollmentDocumentReview', + params: [ + 'document_upload_token: string;', + "status: 'UPLOADED' | 'ACCEPTED' | 'REJECTED' | 'PARTIAL_APPROVAL';", + 'accepted_entity_status_reasons?: string[];', + 'status_reason?: string;', + ], + response: + "{ token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }", + markdown: + "## simulate_enrollment_document_review\n\n`client.accountHolders.simulateEnrollmentDocumentReview(document_upload_token: string, status: 'UPLOADED' | 'ACCEPTED' | 'REJECTED' | 'PARTIAL_APPROVAL', accepted_entity_status_reasons?: string[], status_reason?: string): { token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: object[]; }`\n\n**post** `/v1/simulate/account_holders/enrollment_document_review`\n\nSimulates a review for an account holder document upload.\n\n### Parameters\n\n- `document_upload_token: string`\n The account holder document upload which to perform the simulation upon.\n\n- `status: 'UPLOADED' | 'ACCEPTED' | 'REJECTED' | 'PARTIAL_APPROVAL'`\n An account holder document's upload status for use within the simulation.\n\n- `accepted_entity_status_reasons?: string[]`\n A list of status reasons associated with a KYB account holder in PENDING_REVIEW\n\n- `status_reason?: string`\n Status reason that will be associated with the simulated account holder status. Only required for a `REJECTED` status or `PARTIAL_APPROVAL` status.\n\n### Returns\n\n- `{ token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }`\n Describes the document and the required document image uploads\nrequired to re-run KYC\n\n - `token: string`\n - `account_holder_token: string`\n - `document_type: string`\n - `entity_token: string`\n - `required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst document = await client.accountHolders.simulateEnrollmentDocumentReview({ document_upload_token: 'b11cd67b-0a52-4180-8365-314f3def5426', status: 'UPLOADED' });\n\nconsole.log(document);\n```", + }, + { + name: 'simulate_enrollment_review', + endpoint: '/v1/simulate/account_holders/enrollment_review', + httpMethod: 'post', + summary: "Simulate an account holder's enrollment review", + description: + ' Simulates an enrollment review for an account holder. This endpoint is only applicable for workflows that may required intervention such as `KYB_BASIC`. ', + stainlessPath: '(resource) account_holders > (method) simulate_enrollment_review', + qualified: 'client.accountHolders.simulateEnrollmentReview', + params: [ + 'account_holder_token?: string;', + "status?: 'ACCEPTED' | 'REJECTED' | 'PENDING_REVIEW';", + 'status_reasons?: string[];', + ], + response: + "{ token?: string; account_token?: string; beneficial_owner_individuals?: { address?: object; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }[]; business_account_token?: string; business_entity?: object; control_person?: { address?: object; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }; created?: string; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: { address?: object; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: object[]; status?: 'ACCEPTED' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: { created: string; status: 'ACCEPTED' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons: string[]; updated: string; ky_passed_at?: string; }; website_url?: string; }", + markdown: + "## simulate_enrollment_review\n\n`client.accountHolders.simulateEnrollmentReview(account_holder_token?: string, status?: 'ACCEPTED' | 'REJECTED' | 'PENDING_REVIEW', status_reasons?: string[]): { token?: string; account_token?: string; beneficial_owner_individuals?: object[]; business_account_token?: string; business_entity?: kyb_business_entity; control_person?: object; created?: string; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: object; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: required_document[]; status?: 'ACCEPTED' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: object; website_url?: string; }`\n\n**post** `/v1/simulate/account_holders/enrollment_review`\n\n Simulates an enrollment review for an account holder. This endpoint is only applicable for workflows that may required intervention such as `KYB_BASIC`. \n\n### Parameters\n\n- `account_holder_token?: string`\n The account holder which to perform the simulation upon.\n\n- `status?: 'ACCEPTED' | 'REJECTED' | 'PENDING_REVIEW'`\n An account holder's status for use within the simulation.\n\n- `status_reasons?: string[]`\n Status reason that will be associated with the simulated account holder status. Only required for a `REJECTED` status.\n\n### Returns\n\n- `{ token?: string; account_token?: string; beneficial_owner_individuals?: { address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }[]; business_account_token?: string; business_entity?: { address: object; government_id: string; legal_business_name: string; phone_numbers: string[]; dba_business_name?: string; parent_company?: string; }; control_person?: { address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }; created?: string; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: { address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]; status?: 'ACCEPTED' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: { created: string; status: 'ACCEPTED' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons: string[]; updated: string; ky_passed_at?: string; }; website_url?: string; }`\n\n - `token?: string`\n - `account_token?: string`\n - `beneficial_owner_individuals?: { address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }[]`\n - `business_account_token?: string`\n - `business_entity?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; government_id: string; legal_business_name: string; phone_numbers: string[]; dba_business_name?: string; parent_company?: string; }`\n - `control_person?: { address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }`\n - `created?: string`\n - `email?: string`\n - `exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'`\n - `external_id?: string`\n - `individual?: { address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }`\n - `naics_code?: string`\n - `nature_of_business?: string`\n - `phone_number?: string`\n - `required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]`\n - `status?: 'ACCEPTED' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'`\n - `status_reasons?: string[]`\n - `user_type?: 'BUSINESS' | 'INDIVIDUAL'`\n - `verification_application?: { created: string; status: 'ACCEPTED' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons: string[]; updated: string; ky_passed_at?: string; }`\n - `website_url?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.accountHolders.simulateEnrollmentReview();\n\nconsole.log(response);\n```", + }, + { + name: 'upload_document', + endpoint: '/v1/account_holders/{account_holder_token}/documents', + httpMethod: 'post', + summary: 'Initiate account holder document upload', + description: + 'Use this endpoint to identify which type of supported government-issued documentation you will upload for further verification.\nIt will return two URLs to upload your document images to - one for the front image and one for the back image.\n\nThis endpoint is only valid for evaluations in a `PENDING_DOCUMENT` state.\n\nSupported file types include `jpg`, `png`, and `pdf`. Each file must be less than 15 MiB. Once both required uploads have been successfully completed, your document will be run through KYC verification.\n\nIf you have registered a webhook, you will receive evaluation updates for any document submission evaluations, as well as for any failed document uploads.\n\nTwo document submission attempts are permitted via this endpoint before a `REJECTED` status is returned and the account creation process is ended. Currently only one type of\naccount holder document is supported per KYC verification.\n', + stainlessPath: '(resource) account_holders > (method) upload_document', + qualified: 'client.accountHolders.uploadDocument', + params: ['account_holder_token: string;', 'document_type: string;', 'entity_token: string;'], + response: + "{ token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }", + markdown: + "## upload_document\n\n`client.accountHolders.uploadDocument(account_holder_token: string, document_type: string, entity_token: string): { token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: object[]; }`\n\n**post** `/v1/account_holders/{account_holder_token}/documents`\n\nUse this endpoint to identify which type of supported government-issued documentation you will upload for further verification.\nIt will return two URLs to upload your document images to - one for the front image and one for the back image.\n\nThis endpoint is only valid for evaluations in a `PENDING_DOCUMENT` state.\n\nSupported file types include `jpg`, `png`, and `pdf`. Each file must be less than 15 MiB. Once both required uploads have been successfully completed, your document will be run through KYC verification.\n\nIf you have registered a webhook, you will receive evaluation updates for any document submission evaluations, as well as for any failed document uploads.\n\nTwo document submission attempts are permitted via this endpoint before a `REJECTED` status is returned and the account creation process is ended. Currently only one type of\naccount holder document is supported per KYC verification.\n\n\n### Parameters\n\n- `account_holder_token: string`\n\n- `document_type: string`\n The type of document to upload\n\n- `entity_token: string`\n Globally unique identifier for the entity.\n\n### Returns\n\n- `{ token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }`\n Describes the document and the required document image uploads\nrequired to re-run KYC\n\n - `token: string`\n - `account_holder_token: string`\n - `document_type: string`\n - `entity_token: string`\n - `required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst document = await client.accountHolders.uploadDocument('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { document_type: 'EIN_LETTER', entity_token: '83cf25ae-c14f-4d10-9fa2-0119f36c7286' });\n\nconsole.log(document);\n```", + }, + { + name: 'create', + endpoint: '/v1/account_holders/{account_holder_token}/entities', + httpMethod: 'post', + summary: 'Create a new beneficial owner individual or replace the existing control person entity', + description: + 'Create a new beneficial owner individual or replace the control person entity on an existing KYB account holder. This endpoint is only applicable for account holders enrolled through a KYB workflow with the Persona KYB provider.\nA new control person can only replace the existing one. A maximum of 4 beneficial owners can be associated with an account holder.', + stainlessPath: '(resource) account_holders.entities > (method) create', + qualified: 'client.accountHolders.entities.create', + params: [ + 'account_holder_token: string;', + 'address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; };', + 'dob: string;', + 'email: string;', + 'first_name: string;', + 'government_id: string;', + 'last_name: string;', + 'phone_number: string;', + "type: 'BENEFICIAL_OWNER_INDIVIDUAL' | 'CONTROL_PERSON';", + ], + response: + "{ token: string; account_holder_token: string; created: string; required_documents: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]; status: 'ACCEPTED' | 'INACTIVE' | 'PENDING_REVIEW' | 'REJECTED'; status_reasons: string[]; }", + markdown: + "## create\n\n`client.accountHolders.entities.create(account_holder_token: string, address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }, dob: string, email: string, first_name: string, government_id: string, last_name: string, phone_number: string, type: 'BENEFICIAL_OWNER_INDIVIDUAL' | 'CONTROL_PERSON'): { token: string; account_holder_token: string; created: string; required_documents: required_document[]; status: 'ACCEPTED' | 'INACTIVE' | 'PENDING_REVIEW' | 'REJECTED'; status_reasons: string[]; }`\n\n**post** `/v1/account_holders/{account_holder_token}/entities`\n\nCreate a new beneficial owner individual or replace the control person entity on an existing KYB account holder. This endpoint is only applicable for account holders enrolled through a KYB workflow with the Persona KYB provider.\nA new control person can only replace the existing one. A maximum of 4 beneficial owners can be associated with an account holder.\n\n### Parameters\n\n- `account_holder_token: string`\n\n- `address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n Individual's current address - PO boxes, UPS drops, and FedEx drops are not acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.\n - `address1: string`\n Valid deliverable address (no PO boxes).\n - `city: string`\n Name of city.\n - `country: string`\n Valid country code. Only USA is currently supported, entered in uppercase ISO 3166-1 alpha-3 three-character format.\n - `postal_code: string`\n Valid postal code. Only USA ZIP codes are currently supported, entered as a five-digit ZIP or nine-digit ZIP+4.\n - `state: string`\n Valid state code. Only USA state codes are currently supported, entered in uppercase ISO 3166-2 two-character format.\n - `address2?: string`\n Unit or apartment number (if applicable).\n\n- `dob: string`\n Individual's date of birth, as an RFC 3339 date.\n\n- `email: string`\n Individual's email address. If utilizing Lithic for chargeback processing, this customer email address may be used to communicate dispute status and resolution.\n\n- `first_name: string`\n Individual's first name, as it appears on government-issued identity documents.\n\n- `government_id: string`\n Government-issued identification number (required for identity verification and compliance with banking regulations). Social Security Numbers (SSN) and Individual Taxpayer Identification Numbers (ITIN) are currently supported, entered as full nine-digits, with or without hyphens\n\n- `last_name: string`\n Individual's last name, as it appears on government-issued identity documents.\n\n- `phone_number: string`\n Individual's phone number, entered in E.164 format.\n\n- `type: 'BENEFICIAL_OWNER_INDIVIDUAL' | 'CONTROL_PERSON'`\n The type of entity to create on the account holder\n\n### Returns\n\n- `{ token: string; account_holder_token: string; created: string; required_documents: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]; status: 'ACCEPTED' | 'INACTIVE' | 'PENDING_REVIEW' | 'REJECTED'; status_reasons: string[]; }`\n Response body for creating a new beneficial owner or replacing the control person entity on an existing KYB account holder.\n\n - `token: string`\n - `account_holder_token: string`\n - `created: string`\n - `required_documents: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]`\n - `status: 'ACCEPTED' | 'INACTIVE' | 'PENDING_REVIEW' | 'REJECTED'`\n - `status_reasons: string[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst entity = await client.accountHolders.entities.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n address: {\n address1: '300 Normal Forest Way',\n city: 'Portland',\n country: 'USA',\n postal_code: '90210',\n state: 'OR',\n},\n dob: '1991-03-08T08:00:00Z',\n email: 'tim@left-earth.com',\n first_name: 'Timmy',\n government_id: '211-23-1412',\n last_name: 'Turner',\n phone_number: '+15555555555',\n type: 'BENEFICIAL_OWNER_INDIVIDUAL',\n});\n\nconsole.log(entity);\n```", + }, + { + name: 'delete', + endpoint: '/v1/account_holders/{account_holder_token}/entities/{entity_token}', + httpMethod: 'delete', + summary: 'Deactivate a beneficial owner individual', + description: + 'Deactivate a beneficial owner individual on an existing KYB account holder. Only beneficial owner individuals can be deactivated.', + stainlessPath: '(resource) account_holders.entities > (method) delete', + qualified: 'client.accountHolders.entities.delete', + params: ['account_holder_token: string;', 'entity_token: string;'], + response: + "{ token: string; account_holder_token: string; address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; first_name: string; last_name: string; phone_number: string; status: 'ACCEPTED' | 'INACTIVE' | 'PENDING_REVIEW' | 'REJECTED'; type: 'BENEFICIAL_OWNER_INDIVIDUAL' | 'CONTROL_PERSON'; }", + markdown: + "## delete\n\n`client.accountHolders.entities.delete(account_holder_token: string, entity_token: string): { token: string; account_holder_token: string; address: object; dob: string; email: string; first_name: string; last_name: string; phone_number: string; status: 'ACCEPTED' | 'INACTIVE' | 'PENDING_REVIEW' | 'REJECTED'; type: 'BENEFICIAL_OWNER_INDIVIDUAL' | 'CONTROL_PERSON'; }`\n\n**delete** `/v1/account_holders/{account_holder_token}/entities/{entity_token}`\n\nDeactivate a beneficial owner individual on an existing KYB account holder. Only beneficial owner individuals can be deactivated.\n\n### Parameters\n\n- `account_holder_token: string`\n\n- `entity_token: string`\n\n### Returns\n\n- `{ token: string; account_holder_token: string; address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; first_name: string; last_name: string; phone_number: string; status: 'ACCEPTED' | 'INACTIVE' | 'PENDING_REVIEW' | 'REJECTED'; type: 'BENEFICIAL_OWNER_INDIVIDUAL' | 'CONTROL_PERSON'; }`\n Information about an entity associated with an account holder\n\n - `token: string`\n - `account_holder_token: string`\n - `address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `dob: string`\n - `email: string`\n - `first_name: string`\n - `last_name: string`\n - `phone_number: string`\n - `status: 'ACCEPTED' | 'INACTIVE' | 'PENDING_REVIEW' | 'REJECTED'`\n - `type: 'BENEFICIAL_OWNER_INDIVIDUAL' | 'CONTROL_PERSON'`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst accountHolderEntity = await client.accountHolders.entities.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_holder_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(accountHolderEntity);\n```", + }, + { + name: 'create', + endpoint: '/v2/auth_rules', + httpMethod: 'post', + summary: 'Create a new rule', + description: 'Creates a new V2 Auth rule in draft mode', + stainlessPath: '(resource) auth_rules.v2 > (method) create', + qualified: 'client.authRules.v2.create', + params: [ + "{ parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; account_tokens?: string[]; business_account_tokens?: string[]; event_stream?: string; name?: string; } | { card_tokens: string[]; parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; event_stream?: string; name?: string; } | { parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; program_level: boolean; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; event_stream?: string; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; name?: string; };", + ], + response: + "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }", + }, + { + name: 'retrieve', + endpoint: '/v2/auth_rules/{auth_rule_token}', + httpMethod: 'get', + summary: 'Fetch a rule', + description: 'Fetches a V2 Auth rule by its token', + stainlessPath: '(resource) auth_rules.v2 > (method) retrieve', + qualified: 'client.authRules.v2.retrieve', + params: ['auth_rule_token: string;'], + response: + "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }", + markdown: + "## retrieve\n\n`client.authRules.v2.retrieve(auth_rule_token: string): { token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: object; draft_version: object; event_stream: event_stream; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n**get** `/v2/auth_rules/{auth_rule_token}`\n\nFetches a V2 Auth rule by its token\n\n### Parameters\n\n- `auth_rule_token: string`\n\n### Returns\n\n- `{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n - `token: string`\n - `account_tokens: string[]`\n - `business_account_tokens: string[]`\n - `card_tokens: string[]`\n - `current_version: { parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; version: number; }`\n - `draft_version: { error: string; parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }`\n - `event_stream: string`\n - `lithic_managed: boolean`\n - `name: string`\n - `program_level: boolean`\n - `state: 'ACTIVE' | 'INACTIVE'`\n - `type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'`\n - `excluded_account_tokens?: string[]`\n - `excluded_business_account_tokens?: string[]`\n - `excluded_card_tokens?: string[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst authRule = await client.authRules.v2.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(authRule);\n```", + }, + { + name: 'update', + endpoint: '/v2/auth_rules/{auth_rule_token}', + httpMethod: 'patch', + summary: 'Update a rule', + description: + "Updates a V2 Auth rule's properties\n\nIf `account_tokens`, `card_tokens`, `program_level`, `excluded_card_tokens`, `excluded_account_tokens`, or `excluded_business_account_tokens` is provided, this will replace existing associations with the provided list of entities.\n", + stainlessPath: '(resource) auth_rules.v2 > (method) update', + qualified: 'client.authRules.v2.update', + params: [ + 'auth_rule_token: string;', + "body: { account_tokens?: string[]; business_account_tokens?: string[]; name?: string; state?: 'INACTIVE'; } | { card_tokens?: string[]; name?: string; state?: 'INACTIVE'; } | { excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; name?: string; program_level?: boolean; state?: 'INACTIVE'; };", + ], + response: + "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }", + }, + { + name: 'list', + endpoint: '/v2/auth_rules', + httpMethod: 'get', + summary: 'List rules', + description: 'Lists V2 Auth rules', + stainlessPath: '(resource) auth_rules.v2 > (method) list', + qualified: 'client.authRules.v2.list', + params: [ + 'account_token?: string;', + 'business_account_token?: string;', + 'card_token?: string;', + 'ending_before?: string;', + 'event_stream?: string;', + 'event_streams?: string[];', + 'page_size?: number;', + "scope?: 'PROGRAM' | 'ACCOUNT' | 'BUSINESS_ACCOUNT' | 'CARD' | 'ANY';", + 'starting_after?: string;', + ], + response: + "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }", + markdown: + "## list\n\n`client.authRules.v2.list(account_token?: string, business_account_token?: string, card_token?: string, ending_before?: string, event_stream?: string, event_streams?: string[], page_size?: number, scope?: 'PROGRAM' | 'ACCOUNT' | 'BUSINESS_ACCOUNT' | 'CARD' | 'ANY', starting_after?: string): { token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: object; draft_version: object; event_stream: event_stream; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n**get** `/v2/auth_rules`\n\nLists V2 Auth rules\n\n### Parameters\n\n- `account_token?: string`\n Only return Auth Rules that are bound to the provided account token.\n\n- `business_account_token?: string`\n Only return Auth Rules that are bound to the provided business account token.\n\n- `card_token?: string`\n Only return Auth Rules that are bound to the provided card token.\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- `event_stream?: string`\n Deprecated: Use event_streams instead. Only return Auth rules that are executed during the provided event stream.\n\n- `event_streams?: string[]`\n Only return Auth rules that are executed during any of the provided event streams. If event_streams and event_stream are specified, the values will be combined.\n\n- `page_size?: number`\n Page size (for pagination).\n\n- `scope?: 'PROGRAM' | 'ACCOUNT' | 'BUSINESS_ACCOUNT' | 'CARD' | 'ANY'`\n Only return Auth Rules that are bound to the provided scope.\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_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n - `token: string`\n - `account_tokens: string[]`\n - `business_account_tokens: string[]`\n - `card_tokens: string[]`\n - `current_version: { parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; version: number; }`\n - `draft_version: { error: string; parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }`\n - `event_stream: string`\n - `lithic_managed: boolean`\n - `name: string`\n - `program_level: boolean`\n - `state: 'ACTIVE' | 'INACTIVE'`\n - `type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'`\n - `excluded_account_tokens?: string[]`\n - `excluded_business_account_tokens?: string[]`\n - `excluded_card_tokens?: 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 authRule of client.authRules.v2.list()) {\n console.log(authRule);\n}\n```", + }, + { + name: 'delete', + endpoint: '/v2/auth_rules/{auth_rule_token}', + httpMethod: 'delete', + summary: 'Delete a rule', + description: 'Deletes a V2 Auth rule', + stainlessPath: '(resource) auth_rules.v2 > (method) delete', + qualified: 'client.authRules.v2.delete', + params: ['auth_rule_token: string;'], + markdown: + "## delete\n\n`client.authRules.v2.delete(auth_rule_token: string): void`\n\n**delete** `/v2/auth_rules/{auth_rule_token}`\n\nDeletes a V2 Auth rule\n\n### Parameters\n\n- `auth_rule_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.authRules.v2.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", + }, + { + name: 'draft', + endpoint: '/v2/auth_rules/{auth_rule_token}/draft', + httpMethod: 'post', + summary: 'Draft a new rule version', + description: + 'Creates a new draft version of a rule that will be ran in shadow mode.\n\nThis can also be utilized to reset the draft parameters, causing a draft version to no longer be ran in shadow mode.\n', + stainlessPath: '(resource) auth_rules.v2 > (method) draft', + qualified: 'client.authRules.v2.draft', + params: [ + 'auth_rule_token: string;', + "parameters?: { conditions: { attribute: conditional_attribute; operation: conditional_operation; value: conditional_value; }[]; } | { period: { duration: number; type: 'CUSTOM'; } | { type: 'DAY'; } | { type: 'WEEK'; day_of_week?: number; } | { type: 'MONTH'; day_of_month?: number; } | { type: 'YEAR'; day_of_month?: number; month?: number; }; scope: 'CARD' | 'ACCOUNT'; filters?: { exclude_countries?: string[]; exclude_mccs?: string[]; include_countries?: string[]; include_mccs?: string[]; include_pan_entry_modes?: string[]; }; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: string; value: string | number | string[] | string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: string; value: string | number | string[] | string; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: string; value: string | number | string[] | string; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: string; value: string | number | string[] | string; }[]; } | { code: string; features: { type: 'AUTHORIZATION'; name?: string; } | { type: 'AUTHENTICATION'; name?: string; } | { type: 'TOKENIZATION'; name?: string; } | { type: 'ACH_RECEIPT'; name?: string; } | { type: 'CARD'; name?: string; } | { type: 'ACCOUNT_HOLDER'; name?: string; } | { type: 'IP_METADATA'; name?: string; } | { period: velocity_limit_period; scope: 'CARD' | 'ACCOUNT'; type: 'SPEND_VELOCITY'; filters?: velocity_limit_filters; name?: string; }[]; };", + ], + response: + "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }", + markdown: + "## draft\n\n`client.authRules.v2.draft(auth_rule_token: string, parameters?: { conditions: auth_rule_condition[]; } | { period: velocity_limit_period; scope: 'CARD' | 'ACCOUNT'; filters?: velocity_limit_filters; limit_amount?: number; limit_count?: number; } | { merchants: object[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: object[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: object[]; } | { action: object | object; conditions: object[]; } | { action: object | object; conditions: object[]; } | { code: string; features: rule_feature[]; }): { token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: object; draft_version: object; event_stream: event_stream; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n**post** `/v2/auth_rules/{auth_rule_token}/draft`\n\nCreates a new draft version of a rule that will be ran in shadow mode.\n\nThis can also be utilized to reset the draft parameters, causing a draft version to no longer be ran in shadow mode.\n\n\n### Parameters\n\n- `auth_rule_token: string`\n\n- `parameters?: { conditions: { attribute: conditional_attribute; operation: conditional_operation; value: conditional_value; }[]; } | { period: { duration: number; type: 'CUSTOM'; } | { type: 'DAY'; } | { type: 'WEEK'; day_of_week?: number; } | { type: 'MONTH'; day_of_month?: number; } | { type: 'YEAR'; day_of_month?: number; month?: number; }; scope: 'CARD' | 'ACCOUNT'; filters?: { exclude_countries?: string[]; exclude_mccs?: string[]; include_countries?: string[]; include_mccs?: string[]; include_pan_entry_modes?: string[]; }; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: string; value: string | number | string[] | string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: string; value: string | number | string[] | string; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: string; value: string | number | string[] | string; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: string; value: string | number | string[] | string; }[]; } | { code: string; features: { type: 'AUTHORIZATION'; name?: string; } | { type: 'AUTHENTICATION'; name?: string; } | { type: 'TOKENIZATION'; name?: string; } | { type: 'ACH_RECEIPT'; name?: string; } | { type: 'CARD'; name?: string; } | { type: 'ACCOUNT_HOLDER'; name?: string; } | { type: 'IP_METADATA'; name?: string; } | { period: velocity_limit_period; scope: 'CARD' | 'ACCOUNT'; type: 'SPEND_VELOCITY'; filters?: velocity_limit_filters; name?: string; }[]; }`\n Parameters for the Auth Rule\n\n### Returns\n\n- `{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n - `token: string`\n - `account_tokens: string[]`\n - `business_account_tokens: string[]`\n - `card_tokens: string[]`\n - `current_version: { parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; version: number; }`\n - `draft_version: { error: string; parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }`\n - `event_stream: string`\n - `lithic_managed: boolean`\n - `name: string`\n - `program_level: boolean`\n - `state: 'ACTIVE' | 'INACTIVE'`\n - `type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'`\n - `excluded_account_tokens?: string[]`\n - `excluded_business_account_tokens?: string[]`\n - `excluded_card_tokens?: string[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst authRule = await client.authRules.v2.draft('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(authRule);\n```", + }, + { + name: 'list_results', + endpoint: '/v2/auth_rules/results', + httpMethod: 'get', + summary: 'List rule evaluation results', + description: + 'Lists Auth Rule evaluation results.\n\n**Limitations:**\n- Results are available for the past 3 months only\n- At least one filter (`event_token` or `auth_rule_token`) must be provided\n- When filtering by `event_token`, pagination is not supported\n', + stainlessPath: '(resource) auth_rules.v2 > (method) list_results', + qualified: 'client.authRules.v2.listResults', + params: [ + 'auth_rule_token?: string;', + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'event_token?: string;', + 'has_actions?: boolean;', + 'page_size?: number;', + 'starting_after?: string;', + ], + response: + "{ token: string; actions: { code: string; type: 'DECLINE'; explanation?: string; } | { type: 'CHALLENGE'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'AUTHORIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'DECLINE' | 'CHALLENGE'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'THREE_DS_AUTHENTICATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'DECLINE'; explanation?: string; reason?: string; } | { type: 'REQUIRE_TFA'; explanation?: string; reason?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'TOKENIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'APPROVE'; explanation?: string; } | { code: string; type: 'RETURN'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'ACH_CREDIT_RECEIPT' | 'ACH_DEBIT_RECEIPT'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; }", + markdown: + "## list_results\n\n`client.authRules.v2.listResults(auth_rule_token?: string, begin?: string, end?: string, ending_before?: string, event_token?: string, has_actions?: boolean, page_size?: number, starting_after?: string): { token: string; actions: object | object[]; auth_rule_token: string; evaluation_time: string; event_stream: 'AUTHORIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: object[]; auth_rule_token: string; evaluation_time: string; event_stream: 'THREE_DS_AUTHENTICATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: object | object[]; auth_rule_token: string; evaluation_time: string; event_stream: 'TOKENIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: object | object[]; auth_rule_token: string; evaluation_time: string; event_stream: 'ACH_CREDIT_RECEIPT' | 'ACH_DEBIT_RECEIPT'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; }`\n\n**get** `/v2/auth_rules/results`\n\nLists Auth Rule evaluation results.\n\n**Limitations:**\n- Results are available for the past 3 months only\n- At least one filter (`event_token` or `auth_rule_token`) must be provided\n- When filtering by `event_token`, pagination is not supported\n\n\n### Parameters\n\n- `auth_rule_token?: string`\n Filter by Auth Rule token\n\n- `begin?: string`\n Date string in RFC 3339 format. Only events evaluated after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only events evaluated before the specified time will be included. UTC time zone.\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- `event_token?: string`\n Filter by event token\n\n- `has_actions?: boolean`\n Filter by whether the rule evaluation produced any actions. When not provided, all results are returned.\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; actions: { code: string; type: 'DECLINE'; explanation?: string; } | { type: 'CHALLENGE'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'AUTHORIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'DECLINE' | 'CHALLENGE'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'THREE_DS_AUTHENTICATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'DECLINE'; explanation?: string; reason?: string; } | { type: 'REQUIRE_TFA'; explanation?: string; reason?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'TOKENIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'APPROVE'; explanation?: string; } | { code: string; type: 'RETURN'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'ACH_CREDIT_RECEIPT' | 'ACH_DEBIT_RECEIPT'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; }`\n Result of an Auth Rule evaluation\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 v2ListResultsResponse of client.authRules.v2.listResults()) {\n console.log(v2ListResultsResponse);\n}\n```", + }, + { + name: 'list_versions', + endpoint: '/v2/auth_rules/{auth_rule_token}/versions', + httpMethod: 'get', + summary: 'List rule versions', + description: 'Returns all versions of an auth rule, sorted by version number descending (newest first).', + stainlessPath: '(resource) auth_rules.v2 > (method) list_versions', + qualified: 'client.authRules.v2.listVersions', + params: ['auth_rule_token: string;'], + response: + "{ data: { created: string; parameters: conditional_block_parameters | velocity_limit_params | merchant_lock_parameters | conditional_3ds_action_parameters | conditional_authorization_action_parameters | conditional_ach_action_parameters | conditional_tokenization_action_parameters | typescript_code_parameters; state: 'ACTIVE' | 'SHADOW' | 'INACTIVE'; version: number; }[]; }", + markdown: + "## list_versions\n\n`client.authRules.v2.listVersions(auth_rule_token: string): { data: auth_rule_version[]; }`\n\n**get** `/v2/auth_rules/{auth_rule_token}/versions`\n\nReturns all versions of an auth rule, sorted by version number descending (newest first).\n\n### Parameters\n\n- `auth_rule_token: string`\n\n### Returns\n\n- `{ data: { created: string; parameters: conditional_block_parameters | velocity_limit_params | merchant_lock_parameters | conditional_3ds_action_parameters | conditional_authorization_action_parameters | conditional_ach_action_parameters | conditional_tokenization_action_parameters | typescript_code_parameters; state: 'ACTIVE' | 'SHADOW' | 'INACTIVE'; version: number; }[]; }`\n\n - `data: { created: string; parameters: { conditions: auth_rule_condition[]; } | { period: velocity_limit_period; scope: 'CARD' | 'ACCOUNT'; filters?: velocity_limit_filters; limit_amount?: number; limit_count?: number; } | { merchants: object[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: object[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: object[]; } | { action: object | object; conditions: object[]; } | { action: object | object; conditions: object[]; } | { code: string; features: rule_feature[]; }; state: 'ACTIVE' | 'SHADOW' | 'INACTIVE'; version: number; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.authRules.v2.listVersions('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + }, + { + name: 'promote', + endpoint: '/v2/auth_rules/{auth_rule_token}/promote', + httpMethod: 'post', + summary: 'Promote a rule version', + description: + 'Promotes the draft version of an Auth rule to the currently active version such that it is enforced in the respective stream.', + stainlessPath: '(resource) auth_rules.v2 > (method) promote', + qualified: 'client.authRules.v2.promote', + params: ['auth_rule_token: string;'], + response: + "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }", + markdown: + "## promote\n\n`client.authRules.v2.promote(auth_rule_token: string): { token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: object; draft_version: object; event_stream: event_stream; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n**post** `/v2/auth_rules/{auth_rule_token}/promote`\n\nPromotes the draft version of an Auth rule to the currently active version such that it is enforced in the respective stream.\n\n### Parameters\n\n- `auth_rule_token: string`\n\n### Returns\n\n- `{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n - `token: string`\n - `account_tokens: string[]`\n - `business_account_tokens: string[]`\n - `card_tokens: string[]`\n - `current_version: { parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; version: number; }`\n - `draft_version: { error: string; parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }`\n - `event_stream: string`\n - `lithic_managed: boolean`\n - `name: string`\n - `program_level: boolean`\n - `state: 'ACTIVE' | 'INACTIVE'`\n - `type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'`\n - `excluded_account_tokens?: string[]`\n - `excluded_business_account_tokens?: string[]`\n - `excluded_card_tokens?: string[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst authRule = await client.authRules.v2.promote('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(authRule);\n```", + }, + { + name: 'retrieve_features', + endpoint: '/v2/auth_rules/{auth_rule_token}/features', + httpMethod: 'get', + summary: 'Calculated Feature values', + description: + 'Fetches the current calculated Feature values for the given Auth Rule\n\nThis only calculates the features for the active version.\n- VelocityLimit Rules calculates the current Velocity Feature data. This requires a `card_token` or `account_token` matching what the rule is Scoped to.\n- ConditionalBlock Rules calculates the CARD_TRANSACTION_COUNT_* attributes on the rule. This requires a `card_token`\n', + stainlessPath: '(resource) auth_rules.v2 > (method) retrieve_features', + qualified: 'client.authRules.v2.retrieveFeatures', + params: ['auth_rule_token: string;', 'account_token?: string;', 'card_token?: string;'], + response: + "{ evaluated: string; features: { filters: object; period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; value: { amount: number; count: number; }; }[]; }", + markdown: + "## retrieve_features\n\n`client.authRules.v2.retrieveFeatures(auth_rule_token: string, account_token?: string, card_token?: string): { evaluated: string; features: object[]; }`\n\n**get** `/v2/auth_rules/{auth_rule_token}/features`\n\nFetches the current calculated Feature values for the given Auth Rule\n\nThis only calculates the features for the active version.\n- VelocityLimit Rules calculates the current Velocity Feature data. This requires a `card_token` or `account_token` matching what the rule is Scoped to.\n- ConditionalBlock Rules calculates the CARD_TRANSACTION_COUNT_* attributes on the rule. This requires a `card_token`\n\n\n### Parameters\n\n- `auth_rule_token: string`\n\n- `account_token?: string`\n\n- `card_token?: string`\n\n### Returns\n\n- `{ evaluated: string; features: { filters: object; period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; value: { amount: number; count: number; }; }[]; }`\n\n - `evaluated: string`\n - `features: { filters: { exclude_countries?: string[]; exclude_mccs?: string[]; include_countries?: string[]; include_mccs?: string[]; include_pan_entry_modes?: string[]; }; period: { duration: number; type: 'CUSTOM'; } | { type: 'DAY'; } | { type: 'WEEK'; day_of_week?: number; } | { type: 'MONTH'; day_of_month?: number; } | { type: 'YEAR'; day_of_month?: number; month?: number; }; scope: 'CARD' | 'ACCOUNT'; value: { amount: number; count: number; }; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.authRules.v2.retrieveFeatures('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + }, + { + name: 'retrieve_report', + endpoint: '/v2/auth_rules/{auth_rule_token}/report', + httpMethod: 'get', + summary: 'Retrieve a performance report', + description: + 'Retrieves a performance report for an Auth rule containing daily statistics and evaluation outcomes.\n\n**Time Range Limitations:**\n- Reports are supported for the past 3 months only\n- Maximum interval length is 1 month\n- Report data is available only through the previous day in UTC (current day data is not available)\n\nThe report provides daily statistics for both current and draft versions of the Auth rule, including approval, decline, and challenge counts along with sample events.\n', + stainlessPath: '(resource) auth_rules.v2 > (method) retrieve_report', + qualified: 'client.authRules.v2.retrieveReport', + params: ['auth_rule_token: string;', 'begin: string;', 'end: string;'], + response: + "{ auth_rule_token: string; begin: string; daily_statistics: { current_version_statistics: object; date: string; draft_version_statistics: object; versions: { action_counts: object; examples: object[]; state: 'ACTIVE' | 'SHADOW' | 'INACTIVE'; version: number; }[]; }[]; end: string; }", + markdown: + "## retrieve_report\n\n`client.authRules.v2.retrieveReport(auth_rule_token: string, begin: string, end: string): { auth_rule_token: string; begin: string; daily_statistics: object[]; end: string; }`\n\n**get** `/v2/auth_rules/{auth_rule_token}/report`\n\nRetrieves a performance report for an Auth rule containing daily statistics and evaluation outcomes.\n\n**Time Range Limitations:**\n- Reports are supported for the past 3 months only\n- Maximum interval length is 1 month\n- Report data is available only through the previous day in UTC (current day data is not available)\n\nThe report provides daily statistics for both current and draft versions of the Auth rule, including approval, decline, and challenge counts along with sample events.\n\n\n### Parameters\n\n- `auth_rule_token: string`\n\n- `begin: string`\n Start date for the report\n\n- `end: string`\n End date for the report\n\n### Returns\n\n- `{ auth_rule_token: string; begin: string; daily_statistics: { current_version_statistics: object; date: string; draft_version_statistics: object; versions: { action_counts: object; examples: object[]; state: 'ACTIVE' | 'SHADOW' | 'INACTIVE'; version: number; }[]; }[]; end: string; }`\n\n - `auth_rule_token: string`\n - `begin: string`\n - `daily_statistics: { current_version_statistics: { action_counts?: object; approved?: number; challenged?: number; declined?: number; examples?: { actions?: object | object | object | object | object | object | object[]; approved?: boolean; decision?: 'APPROVED' | 'DECLINED' | 'CHALLENGED'; event_token?: string; timestamp?: string; }[]; }; date: string; draft_version_statistics: { action_counts?: object; approved?: number; challenged?: number; declined?: number; examples?: { actions?: object | object | object | object | object | object | object[]; approved?: boolean; decision?: 'APPROVED' | 'DECLINED' | 'CHALLENGED'; event_token?: string; timestamp?: string; }[]; }; versions: { action_counts: object; examples: { actions: { code: string; type: 'DECLINE'; } | { type: 'CHALLENGE'; } | { type: 'DECLINE' | 'CHALLENGE'; } | { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; } | { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }[]; event_token: string; timestamp: string; }[]; state: 'ACTIVE' | 'SHADOW' | 'INACTIVE'; version: number; }[]; }[]`\n - `end: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.authRules.v2.retrieveReport('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { begin: '2019-12-27', end: '2019-12-27' });\n\nconsole.log(response);\n```", + }, + { + name: 'create', + endpoint: '/v2/auth_rules/{auth_rule_token}/backtests', + httpMethod: 'post', + summary: 'Request a backtest', + description: + "Initiates a request to asynchronously generate a backtest for an Auth rule. During backtesting, both the active version (if one exists) and the draft version of the Auth Rule are evaluated by replaying historical transaction data against the rule's conditions. This process allows customers to simulate and understand the effects of proposed rule changes before deployment.\nThe generated backtest report provides detailed results showing whether the draft version of the Auth Rule would have approved or declined historical transactions which were processed during the backtest period. These reports help evaluate how changes to rule configurations might affect overall transaction approval rates.\n\nThe generated backtest report will be delivered asynchronously through a webhook with `event_type` = `auth_rules.backtest_report.created`. See the docs on setting up [webhook subscriptions](https://docs.lithic.com/docs/events-api).\nIt is also possible to request backtest reports on-demand through the `/v2/auth_rules/{auth_rule_token}/backtests/{auth_rule_backtest_token}` endpoint.\n\nLithic currently supports backtesting for `CONDITIONAL_BLOCK` / `CONDITIONAL_ACTION` rules. Backtesting for `VELOCITY_LIMIT` rules is generally not supported. In specific cases (i.e. where Lithic has pre-calculated the requested velocity metrics for historical transactions), a backtest may be feasible. However, such cases are uncommon and customers should not anticipate support for velocity backtests under most configurations.\nIf a historical transaction does not feature the required inputs to evaluate the rule, then it will not be included in the final backtest report.\n", + stainlessPath: '(resource) auth_rules.v2.backtests > (method) create', + qualified: 'client.authRules.v2.backtests.create', + params: ['auth_rule_token: string;', 'end?: string;', 'start?: string;'], + response: '{ backtest_token?: string; }', + markdown: + "## create\n\n`client.authRules.v2.backtests.create(auth_rule_token: string, end?: string, start?: string): { backtest_token?: string; }`\n\n**post** `/v2/auth_rules/{auth_rule_token}/backtests`\n\nInitiates a request to asynchronously generate a backtest for an Auth rule. During backtesting, both the active version (if one exists) and the draft version of the Auth Rule are evaluated by replaying historical transaction data against the rule's conditions. This process allows customers to simulate and understand the effects of proposed rule changes before deployment.\nThe generated backtest report provides detailed results showing whether the draft version of the Auth Rule would have approved or declined historical transactions which were processed during the backtest period. These reports help evaluate how changes to rule configurations might affect overall transaction approval rates.\n\nThe generated backtest report will be delivered asynchronously through a webhook with `event_type` = `auth_rules.backtest_report.created`. See the docs on setting up [webhook subscriptions](https://docs.lithic.com/docs/events-api).\nIt is also possible to request backtest reports on-demand through the `/v2/auth_rules/{auth_rule_token}/backtests/{auth_rule_backtest_token}` endpoint.\n\nLithic currently supports backtesting for `CONDITIONAL_BLOCK` / `CONDITIONAL_ACTION` rules. Backtesting for `VELOCITY_LIMIT` rules is generally not supported. In specific cases (i.e. where Lithic has pre-calculated the requested velocity metrics for historical transactions), a backtest may be feasible. However, such cases are uncommon and customers should not anticipate support for velocity backtests under most configurations.\nIf a historical transaction does not feature the required inputs to evaluate the rule, then it will not be included in the final backtest report.\n\n\n### Parameters\n\n- `auth_rule_token: string`\n\n- `end?: string`\n The end time of the backtest.\n\n- `start?: string`\n The start time of the backtest.\n\n### Returns\n\n- `{ backtest_token?: string; }`\n\n - `backtest_token?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst backtest = await client.authRules.v2.backtests.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(backtest);\n```", + }, + { + name: 'retrieve', + endpoint: '/v2/auth_rules/{auth_rule_token}/backtests/{auth_rule_backtest_token}', + httpMethod: 'get', + summary: 'Retrieve backtest results', + description: + 'Returns the backtest results of an Auth rule (if available).\n\nBacktesting is an asynchronous process that requires time to complete. If a customer retrieves the backtest results using this endpoint before the report is fully generated, the response will return null for `results.current_version` and `results.draft_version`. Customers are advised to wait for the backtest creation process to complete (as indicated by the webhook event auth_rules.backtest_report.created) before retrieving results from this endpoint.\n\nBacktesting is an asynchronous process, while the backtest is being processed, results will not be available which will cause `results.current_version` and `results.draft_version` objects to contain `null`.\nThe entries in `results` will also always represent the configuration of the rule at the time requests are made to this endpoint. For example, the results for `current_version` in the served backtest report will be consistent with which version of the rule is currently activated in the respective event stream, regardless of which version of the rule was active in the event stream at the time a backtest is requested.\n', + stainlessPath: '(resource) auth_rules.v2.backtests > (method) retrieve', + qualified: 'client.authRules.v2.backtests.retrieve', + params: ['auth_rule_token: string;', 'auth_rule_backtest_token: string;'], + response: + '{ backtest_token: string; results: { current_version?: object; draft_version?: object; }; simulation_parameters: { end: string; start: string; }; }', + markdown: + "## retrieve\n\n`client.authRules.v2.backtests.retrieve(auth_rule_token: string, auth_rule_backtest_token: string): { backtest_token: string; results: object; simulation_parameters: object; }`\n\n**get** `/v2/auth_rules/{auth_rule_token}/backtests/{auth_rule_backtest_token}`\n\nReturns the backtest results of an Auth rule (if available).\n\nBacktesting is an asynchronous process that requires time to complete. If a customer retrieves the backtest results using this endpoint before the report is fully generated, the response will return null for `results.current_version` and `results.draft_version`. Customers are advised to wait for the backtest creation process to complete (as indicated by the webhook event auth_rules.backtest_report.created) before retrieving results from this endpoint.\n\nBacktesting is an asynchronous process, while the backtest is being processed, results will not be available which will cause `results.current_version` and `results.draft_version` objects to contain `null`.\nThe entries in `results` will also always represent the configuration of the rule at the time requests are made to this endpoint. For example, the results for `current_version` in the served backtest report will be consistent with which version of the rule is currently activated in the respective event stream, regardless of which version of the rule was active in the event stream at the time a backtest is requested.\n\n\n### Parameters\n\n- `auth_rule_token: string`\n\n- `auth_rule_backtest_token: string`\n\n### Returns\n\n- `{ backtest_token: string; results: { current_version?: object; draft_version?: object; }; simulation_parameters: { end: string; start: string; }; }`\n\n - `backtest_token: string`\n - `results: { current_version?: { approved?: number; challenged?: number; declined?: number; examples?: { decision?: 'APPROVED' | 'DECLINED' | 'CHALLENGED'; event_token?: string; timestamp?: string; }[]; version?: number; }; draft_version?: { approved?: number; challenged?: number; declined?: number; examples?: { decision?: 'APPROVED' | 'DECLINED' | 'CHALLENGED'; event_token?: string; timestamp?: string; }[]; version?: number; }; }`\n - `simulation_parameters: { end: string; start: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst backtestResults = await client.authRules.v2.backtests.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { auth_rule_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(backtestResults);\n```", + }, + { + name: 'retrieve_secret', + endpoint: '/v1/auth_stream/secret', + httpMethod: 'get', + summary: 'Retrieve the ASA HMAC secret key', + description: + 'Retrieve the ASA HMAC secret key. If one does not exist for your program yet, calling this endpoint will create one for you. The headers (which you can use to verify webhooks) will begin appearing shortly after calling this endpoint for the first time. See [this page](https://docs.lithic.com/docs/auth-stream-access-asa#asa-webhook-verification) for more detail about verifying ASA webhooks.\n', + stainlessPath: '(resource) auth_stream_enrollment > (method) retrieve_secret', + qualified: 'client.authStreamEnrollment.retrieveSecret', + response: '{ secret?: string; }', + markdown: + "## retrieve_secret\n\n`client.authStreamEnrollment.retrieveSecret(): { secret?: string; }`\n\n**get** `/v1/auth_stream/secret`\n\nRetrieve the ASA HMAC secret key. If one does not exist for your program yet, calling this endpoint will create one for you. The headers (which you can use to verify webhooks) will begin appearing shortly after calling this endpoint for the first time. See [this page](https://docs.lithic.com/docs/auth-stream-access-asa#asa-webhook-verification) for more detail about verifying ASA webhooks.\n\n\n### Returns\n\n- `{ secret?: string; }`\n\n - `secret?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst authStreamSecret = await client.authStreamEnrollment.retrieveSecret();\n\nconsole.log(authStreamSecret);\n```", + }, + { + name: 'rotate_secret', + endpoint: '/v1/auth_stream/secret/rotate', + httpMethod: 'post', + summary: 'Rotate the ASA HMAC secret key', + description: + 'Generate a new ASA HMAC secret key. The old ASA HMAC secret key will be deactivated 24 hours after a successful request to this endpoint. Make a [`GET /auth_stream/secret`](https://docs.lithic.com/reference/getauthstreamsecret) request to retrieve the new secret key.\n', + stainlessPath: '(resource) auth_stream_enrollment > (method) rotate_secret', + qualified: 'client.authStreamEnrollment.rotateSecret', + markdown: + "## rotate_secret\n\n`client.authStreamEnrollment.rotateSecret(): void`\n\n**post** `/v1/auth_stream/secret/rotate`\n\nGenerate a new ASA HMAC secret key. The old ASA HMAC secret key will be deactivated 24 hours after a successful request to this endpoint. Make a [`GET /auth_stream/secret`](https://docs.lithic.com/reference/getauthstreamsecret) request to retrieve the new secret key.\n\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.authStreamEnrollment.rotateSecret()\n```", + }, + { + name: 'retrieve_secret', + endpoint: '/v1/tokenization_decisioning/secret', + httpMethod: 'get', + summary: 'Retrieve the Tokenization Decisioning HMAC secret key', + description: + 'Retrieve the Tokenization Decisioning secret key. If one does not exist your program yet, calling this endpoint will create one for you. The headers of the Tokenization Decisioning request will contain a hmac signature which you can use to verify requests originate from Lithic. See [this page](https://docs.lithic.com/docs/events-api#verifying-webhooks) for more detail about verifying Tokenization Decisioning requests.\n', + stainlessPath: '(resource) tokenization_decisioning > (method) retrieve_secret', + qualified: 'client.tokenizationDecisioning.retrieveSecret', + response: '{ secret?: string; }', + markdown: + "## retrieve_secret\n\n`client.tokenizationDecisioning.retrieveSecret(): { secret?: string; }`\n\n**get** `/v1/tokenization_decisioning/secret`\n\nRetrieve the Tokenization Decisioning secret key. If one does not exist your program yet, calling this endpoint will create one for you. The headers of the Tokenization Decisioning request will contain a hmac signature which you can use to verify requests originate from Lithic. See [this page](https://docs.lithic.com/docs/events-api#verifying-webhooks) for more detail about verifying Tokenization Decisioning requests.\n\n\n### Returns\n\n- `{ secret?: string; }`\n\n - `secret?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst tokenizationSecret = await client.tokenizationDecisioning.retrieveSecret();\n\nconsole.log(tokenizationSecret);\n```", + }, + { + name: 'rotate_secret', + endpoint: '/v1/tokenization_decisioning/secret/rotate', + httpMethod: 'post', + summary: 'Rotate the Tokenization Decisioning HMAC secret key', + description: + 'Generate a new Tokenization Decisioning secret key. The old Tokenization Decisioning secret key will be deactivated 24 hours after a successful request to this endpoint.\n', + stainlessPath: '(resource) tokenization_decisioning > (method) rotate_secret', + qualified: 'client.tokenizationDecisioning.rotateSecret', + response: '{ secret?: string; }', + markdown: + "## rotate_secret\n\n`client.tokenizationDecisioning.rotateSecret(): { secret?: string; }`\n\n**post** `/v1/tokenization_decisioning/secret/rotate`\n\nGenerate a new Tokenization Decisioning secret key. The old Tokenization Decisioning secret key will be deactivated 24 hours after a successful request to this endpoint.\n\n\n### Returns\n\n- `{ secret?: string; }`\n\n - `secret?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.tokenizationDecisioning.rotateSecret();\n\nconsole.log(response);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/tokenizations/{tokenization_token}', + httpMethod: 'get', + summary: 'Get a single card tokenization', + description: 'Get tokenization', + stainlessPath: '(resource) tokenizations > (method) retrieve', + qualified: 'client.tokenizations.retrieve', + params: ['tokenization_token: string;'], + response: + "{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }", + markdown: + "## retrieve\n\n`client.tokenizations.retrieve(tokenization_token: string): { token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: object[]; payment_account_reference_id?: string; }`\n\n**get** `/v1/tokenizations/{tokenization_token}`\n\nGet tokenization\n\n### Parameters\n\n- `tokenization_token: string`\n\n### Returns\n\n- `{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `card_token: string`\n - `created_at: string`\n - `dpan: string`\n - `status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'`\n - `token_requestor_name: string | string`\n - `token_unique_reference: string`\n - `tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'`\n - `updated_at: string`\n - `device_id?: string`\n - `digital_card_art_token?: string`\n - `events?: { token?: string; created_at?: string; result?: string; rule_results?: { auth_rule_token: string; explanation: string; name: string; result: 'APPROVED' | 'DECLINED' | 'REQUIRE_TFA' | 'ERROR'; }[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]`\n - `payment_account_reference_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst tokenization = await client.tokenizations.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(tokenization);\n```", + }, + { + name: 'list', + endpoint: '/v1/tokenizations', + httpMethod: 'get', + summary: "Get a card's tokenizations", + description: 'List card tokenizations', + stainlessPath: '(resource) tokenizations > (method) list', + qualified: 'client.tokenizations.list', + params: [ + 'account_token?: string;', + 'begin?: string;', + 'card_token?: string;', + 'end?: string;', + 'ending_before?: string;', + 'page_size?: number;', + 'starting_after?: string;', + "tokenization_channel?: 'DIGITAL_WALLET' | 'MERCHANT' | 'ALL';", + ], + response: + "{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }", + markdown: + "## list\n\n`client.tokenizations.list(account_token?: string, begin?: string, card_token?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string, tokenization_channel?: 'DIGITAL_WALLET' | 'MERCHANT' | 'ALL'): { token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: object[]; payment_account_reference_id?: string; }`\n\n**get** `/v1/tokenizations`\n\nList card tokenizations\n\n### Parameters\n\n- `account_token?: string`\n Filters for tokenizations associated with a specific account.\n\n- `begin?: string`\n Filter for tokenizations created after this date.\n\n- `card_token?: string`\n Filters for tokenizations associated with a specific card.\n\n- `end?: string`\n Filter for tokenizations created before this date.\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- `tokenization_channel?: 'DIGITAL_WALLET' | 'MERCHANT' | 'ALL'`\n Filter for tokenizations by tokenization channel. If this is not specified, only DIGITAL_WALLET tokenizations will be returned.\n\n### Returns\n\n- `{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `card_token: string`\n - `created_at: string`\n - `dpan: string`\n - `status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'`\n - `token_requestor_name: string | string`\n - `token_unique_reference: string`\n - `tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'`\n - `updated_at: string`\n - `device_id?: string`\n - `digital_card_art_token?: string`\n - `events?: { token?: string; created_at?: string; result?: string; rule_results?: { auth_rule_token: string; explanation: string; name: string; result: 'APPROVED' | 'DECLINED' | 'REQUIRE_TFA' | 'ERROR'; }[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]`\n - `payment_account_reference_id?: 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 tokenization of client.tokenizations.list()) {\n console.log(tokenization);\n}\n```", + }, + { + name: 'activate', + endpoint: '/v1/tokenizations/{tokenization_token}/activate', + httpMethod: 'post', + summary: 'Activate a card tokenization', + description: + 'This endpoint is used to ask the card network to activate a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network activates the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on digital wallet tokenizations with status `INACTIVE`, `PENDING_ACTIVATION`, or `PENDING_2FA`.\nThis will put the tokenization in an active state, and transactions will be allowed.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.', + stainlessPath: '(resource) tokenizations > (method) activate', + qualified: 'client.tokenizations.activate', + params: ['tokenization_token: string;'], + markdown: + "## activate\n\n`client.tokenizations.activate(tokenization_token: string): void`\n\n**post** `/v1/tokenizations/{tokenization_token}/activate`\n\nThis endpoint is used to ask the card network to activate a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network activates the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on digital wallet tokenizations with status `INACTIVE`, `PENDING_ACTIVATION`, or `PENDING_2FA`.\nThis will put the tokenization in an active state, and transactions will be allowed.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n\n### Parameters\n\n- `tokenization_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.tokenizations.activate('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", + }, + { + name: 'deactivate', + endpoint: '/v1/tokenizations/{tokenization_token}/deactivate', + httpMethod: 'post', + summary: 'Deactivate a card tokenization', + description: + 'This endpoint is used to ask the card network to deactivate a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network deactivates the tokenization, the state will be updated and a tokenization.updated event will be sent.\nAuthorizations attempted with a deactivated tokenization will be blocked and will not be forwarded to Lithic from the network. Deactivating the token is a permanent operation. If the target is a digital wallet tokenization, it will be removed from its device.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.', + stainlessPath: '(resource) tokenizations > (method) deactivate', + qualified: 'client.tokenizations.deactivate', + params: ['tokenization_token: string;'], + markdown: + "## deactivate\n\n`client.tokenizations.deactivate(tokenization_token: string): void`\n\n**post** `/v1/tokenizations/{tokenization_token}/deactivate`\n\nThis endpoint is used to ask the card network to deactivate a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network deactivates the tokenization, the state will be updated and a tokenization.updated event will be sent.\nAuthorizations attempted with a deactivated tokenization will be blocked and will not be forwarded to Lithic from the network. Deactivating the token is a permanent operation. If the target is a digital wallet tokenization, it will be removed from its device.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n\n### Parameters\n\n- `tokenization_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.tokenizations.deactivate('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", + }, + { + name: 'pause', + endpoint: '/v1/tokenizations/{tokenization_token}/pause', + httpMethod: 'post', + summary: 'Pause a card tokenization', + description: + 'This endpoint is used to ask the card network to pause a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network pauses the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on tokenizations with status `ACTIVE`.\nA paused token will prevent merchants from sending authorizations, and is a temporary status that can be changed.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.', + stainlessPath: '(resource) tokenizations > (method) pause', + qualified: 'client.tokenizations.pause', + params: ['tokenization_token: string;'], + markdown: + "## pause\n\n`client.tokenizations.pause(tokenization_token: string): void`\n\n**post** `/v1/tokenizations/{tokenization_token}/pause`\n\nThis endpoint is used to ask the card network to pause a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network pauses the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on tokenizations with status `ACTIVE`.\nA paused token will prevent merchants from sending authorizations, and is a temporary status that can be changed.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n\n### Parameters\n\n- `tokenization_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.tokenizations.pause('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", + }, + { + name: 'resend_activation_code', + endpoint: '/v1/tokenizations/{tokenization_token}/resend_activation_code', + httpMethod: 'post', + summary: 'Resend activation code for a card tokenization', + description: + 'This endpoint is used to ask the card network to send another activation code to a cardholder that has already tried tokenizing a card. A successful response indicates that the request was successfully delivered to the card network.\nThe endpoint may only be used on Mastercard digital wallet tokenizations with status `INACTIVE`, `PENDING_ACTIVATION`, or `PENDING_2FA`. The network will send a new activation code to the one of the contact methods provided in the initial tokenization flow. If a user fails to enter the code correctly 3 times, the contact method will not be eligible for resending the activation code, and the cardholder must restart the provision process.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.', + stainlessPath: '(resource) tokenizations > (method) resend_activation_code', + qualified: 'client.tokenizations.resendActivationCode', + params: [ + 'tokenization_token: string;', + "activation_method_type?: 'EMAIL_TO_CARDHOLDER_ADDRESS' | 'TEXT_TO_CARDHOLDER_NUMBER';", + ], + markdown: + "## resend_activation_code\n\n`client.tokenizations.resendActivationCode(tokenization_token: string, activation_method_type?: 'EMAIL_TO_CARDHOLDER_ADDRESS' | 'TEXT_TO_CARDHOLDER_NUMBER'): void`\n\n**post** `/v1/tokenizations/{tokenization_token}/resend_activation_code`\n\nThis endpoint is used to ask the card network to send another activation code to a cardholder that has already tried tokenizing a card. A successful response indicates that the request was successfully delivered to the card network.\nThe endpoint may only be used on Mastercard digital wallet tokenizations with status `INACTIVE`, `PENDING_ACTIVATION`, or `PENDING_2FA`. The network will send a new activation code to the one of the contact methods provided in the initial tokenization flow. If a user fails to enter the code correctly 3 times, the contact method will not be eligible for resending the activation code, and the cardholder must restart the provision process.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n\n### Parameters\n\n- `tokenization_token: string`\n\n- `activation_method_type?: 'EMAIL_TO_CARDHOLDER_ADDRESS' | 'TEXT_TO_CARDHOLDER_NUMBER'`\n The communication method that the user has selected to use to receive the authentication code.\nSupported Values: Sms = \"TEXT_TO_CARDHOLDER_NUMBER\". Email = \"EMAIL_TO_CARDHOLDER_ADDRESS\"\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.tokenizations.resendActivationCode('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", + }, + { + name: 'simulate', + endpoint: '/v1/simulate/tokenizations', + httpMethod: 'post', + summary: "Simulate a card's tokenization", + description: + "This endpoint is used to simulate a card's tokenization in the Digital Wallet and merchant tokenization ecosystem.\n", + stainlessPath: '(resource) tokenizations > (method) simulate', + qualified: 'client.tokenizations.simulate', + params: [ + 'cvv: string;', + 'expiration_date: string;', + 'pan: string;', + "tokenization_source: 'APPLE_PAY' | 'GOOGLE' | 'SAMSUNG_PAY' | 'MERCHANT';", + 'account_score?: number;', + 'device_score?: number;', + 'entity?: string;', + "wallet_recommended_decision?: 'APPROVED' | 'DECLINED' | 'REQUIRE_ADDITIONAL_AUTHENTICATION';", + ], + response: + "{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }", + markdown: + "## simulate\n\n`client.tokenizations.simulate(cvv: string, expiration_date: string, pan: string, tokenization_source: 'APPLE_PAY' | 'GOOGLE' | 'SAMSUNG_PAY' | 'MERCHANT', account_score?: number, device_score?: number, entity?: string, wallet_recommended_decision?: 'APPROVED' | 'DECLINED' | 'REQUIRE_ADDITIONAL_AUTHENTICATION'): { token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: object[]; payment_account_reference_id?: string; }`\n\n**post** `/v1/simulate/tokenizations`\n\nThis endpoint is used to simulate a card's tokenization in the Digital Wallet and merchant tokenization ecosystem.\n\n\n### Parameters\n\n- `cvv: string`\n The three digit cvv for the card.\n\n- `expiration_date: string`\n The expiration date of the card in 'MM/YY' format.\n\n- `pan: string`\n The sixteen digit card number.\n\n- `tokenization_source: 'APPLE_PAY' | 'GOOGLE' | 'SAMSUNG_PAY' | 'MERCHANT'`\n The source of the tokenization request.\n\n- `account_score?: number`\n The account score (1-5) that represents how the Digital Wallet's view on how reputable an end user's account is.\n\n- `device_score?: number`\n The device score (1-5) that represents how the Digital Wallet's view on how reputable an end user's device is.\n\n- `entity?: string`\n Optional field to specify the token requestor name for a merchant token simulation. Ignored when tokenization_source is not MERCHANT.\n\n- `wallet_recommended_decision?: 'APPROVED' | 'DECLINED' | 'REQUIRE_ADDITIONAL_AUTHENTICATION'`\n The decision that the Digital Wallet's recommend\n\n### Returns\n\n- `{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `card_token: string`\n - `created_at: string`\n - `dpan: string`\n - `status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'`\n - `token_requestor_name: string | string`\n - `token_unique_reference: string`\n - `tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'`\n - `updated_at: string`\n - `device_id?: string`\n - `digital_card_art_token?: string`\n - `events?: { token?: string; created_at?: string; result?: string; rule_results?: { auth_rule_token: string; explanation: string; name: string; result: 'APPROVED' | 'DECLINED' | 'REQUIRE_TFA' | 'ERROR'; }[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]`\n - `payment_account_reference_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst tokenization = await client.tokenizations.simulate({\n cvv: '776',\n expiration_date: '08/29',\n pan: '4111111289144142',\n tokenization_source: 'APPLE_PAY',\n});\n\nconsole.log(tokenization);\n```", + }, + { + name: 'unpause', + endpoint: '/v1/tokenizations/{tokenization_token}/unpause', + httpMethod: 'post', + summary: 'Unpause a card tokenization', + description: + 'This endpoint is used to ask the card network to unpause a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network unpauses the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on tokenizations with status `PAUSED`.\nThis will put the tokenization in an active state, and transactions may resume.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.', + stainlessPath: '(resource) tokenizations > (method) unpause', + qualified: 'client.tokenizations.unpause', + params: ['tokenization_token: string;'], + markdown: + "## unpause\n\n`client.tokenizations.unpause(tokenization_token: string): void`\n\n**post** `/v1/tokenizations/{tokenization_token}/unpause`\n\nThis endpoint is used to ask the card network to unpause a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network unpauses the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on tokenizations with status `PAUSED`.\nThis will put the tokenization in an active state, and transactions may resume.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n\n### Parameters\n\n- `tokenization_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.tokenizations.unpause('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", + }, + { + name: 'update_digital_card_art', + endpoint: '/v1/tokenizations/{tokenization_token}/update_digital_card_art', + httpMethod: 'post', + summary: 'Update digital card art for a card tokenization', + description: + "This endpoint is used update the digital card art for a digital wallet tokenization. A successful response indicates that the card network has updated the tokenization's art, and the tokenization's `digital_cart_art_token` field was updated.\nThe endpoint may not be used on tokenizations with status `DEACTIVATED`.\nNote that this updates the art for one specific tokenization, not all tokenizations for a card. New tokenizations for a card will be created with the art referenced in the card object's `digital_card_art_token` field.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.", + stainlessPath: '(resource) tokenizations > (method) update_digital_card_art', + qualified: 'client.tokenizations.updateDigitalCardArt', + params: ['tokenization_token: string;', 'digital_card_art_token?: string;'], + response: + "{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }", + markdown: + "## update_digital_card_art\n\n`client.tokenizations.updateDigitalCardArt(tokenization_token: string, digital_card_art_token?: string): { token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: object[]; payment_account_reference_id?: string; }`\n\n**post** `/v1/tokenizations/{tokenization_token}/update_digital_card_art`\n\nThis endpoint is used update the digital card art for a digital wallet tokenization. A successful response indicates that the card network has updated the tokenization's art, and the tokenization's `digital_cart_art_token` field was updated.\nThe endpoint may not be used on tokenizations with status `DEACTIVATED`.\nNote that this updates the art for one specific tokenization, not all tokenizations for a card. New tokenizations for a card will be created with the art referenced in the card object's `digital_card_art_token` field.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n\n### Parameters\n\n- `tokenization_token: string`\n\n- `digital_card_art_token?: string`\n Specifies the digital card art to be displayed in the user’s digital wallet for a tokenization. This artwork must be approved by the network and configured by Lithic to use. See [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art).\n\n### Returns\n\n- `{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `card_token: string`\n - `created_at: string`\n - `dpan: string`\n - `status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'`\n - `token_requestor_name: string | string`\n - `token_unique_reference: string`\n - `tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'`\n - `updated_at: string`\n - `device_id?: string`\n - `digital_card_art_token?: string`\n - `events?: { token?: string; created_at?: string; result?: string; rule_results?: { auth_rule_token: string; explanation: string; name: string; result: 'APPROVED' | 'DECLINED' | 'REQUIRE_TFA' | 'ERROR'; }[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]`\n - `payment_account_reference_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst tokenization = await client.tokenizations.updateDigitalCardArt('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(tokenization);\n```", + }, + { + name: 'create', + endpoint: '/v1/cards', + httpMethod: 'post', + summary: 'Create card', + description: + 'Create a new virtual or physical card. Parameters `shipping_address` and `product_id` only apply to physical cards.\n', + stainlessPath: '(resource) cards > (method) create', + qualified: 'client.cards.create', + params: [ + "type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET';", + 'account_token?: string;', + 'bulk_order_token?: string;', + 'card_program_token?: string;', + 'carrier?: { qr_code_url?: string; };', + 'digital_card_art_token?: string;', + 'exp_month?: string;', + 'exp_year?: string;', + 'memo?: string;', + 'pin?: string;', + 'product_id?: string;', + 'replacement_account_token?: string;', + 'replacement_comment?: string;', + 'replacement_for?: string;', + 'replacement_substatus?: string;', + 'shipping_address?: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; };', + "shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING';", + 'spend_limit?: number;', + "spend_limit_duration?: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION';", + "state?: 'OPEN' | 'PAUSED';", + 'Idempotency-Key?: string;', + ], + response: + "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", + markdown: + "## create\n\n`client.cards.create(type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET', account_token?: string, bulk_order_token?: string, card_program_token?: string, carrier?: { qr_code_url?: string; }, digital_card_art_token?: string, exp_month?: string, exp_year?: string, memo?: string, pin?: string, product_id?: string, replacement_account_token?: string, replacement_comment?: string, replacement_for?: string, replacement_substatus?: string, shipping_address?: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }, shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING', spend_limit?: number, spend_limit_duration?: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION', state?: 'OPEN' | 'PAUSED', Idempotency-Key?: string): object`\n\n**post** `/v1/cards`\n\nCreate a new virtual or physical card. Parameters `shipping_address` and `product_id` only apply to physical cards.\n\n\n### Parameters\n\n- `type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'`\n Card types:\n* `VIRTUAL` - Card will authorize at any merchant and can be added to a digital wallet like Apple Pay or Google Pay (if the card program is digital wallet-enabled).\n* `PHYSICAL` - Manufactured and sent to the cardholder. We offer white label branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe functionality. Reach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n* `SINGLE_USE` - Card is closed upon first successful authorization.\n* `MERCHANT_LOCKED` - Card is locked to the first merchant that successfully authorizes the card.\n* `UNLOCKED` - *[Deprecated]* Similar behavior to VIRTUAL cards, please use VIRTUAL instead.\n* `DIGITAL_WALLET` - *[Deprecated]* Similar behavior to VIRTUAL cards, please use VIRTUAL instead.\n\n- `account_token?: string`\n Globally unique identifier for the account that the card will be associated with. Required for programs enrolling users using the [/account\\_holders endpoint](https://docs.lithic.com/docs/account-holders-kyc). See [Managing Your Program](doc:managing-your-program) for more information.\n\n\n- `bulk_order_token?: string`\n Globally unique identifier for an existing bulk order to associate this card with. When specified, the card will be added to the bulk order for batch shipment. Only applicable to cards of type PHYSICAL\n\n- `card_program_token?: string`\n For card programs with more than one BIN range. This must be configured with Lithic before use. Identifies the card program/BIN range under which to create the card. If omitted, will utilize the program's default `card_program_token`. In Sandbox, use 00000000-0000-0000-1000-000000000000 and 00000000-0000-0000-2000-000000000000 to test creating cards on specific card programs.\n\n- `carrier?: { qr_code_url?: string; }`\n - `qr_code_url?: string`\n QR code URL to display on the card carrier. The `qr_code_url` field requires your domain to be allowlisted by Lithic before use. Contact Support to configure your QR code domain\n\n- `digital_card_art_token?: string`\n Specifies the digital card art to be displayed in the user’s digital wallet after tokenization. This artwork must be approved by Mastercard and configured by Lithic to use. See [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art).\n\n- `exp_month?: string`\n Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, an expiration date will be generated.\n\n- `exp_year?: string`\n Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an expiration date will be generated.\n\n- `memo?: string`\n Friendly name to identify the card.\n\n- `pin?: string`\n Encrypted PIN block (in base64). Applies to cards of type `PHYSICAL` and `VIRTUAL`. See [Encrypted PIN Block](https://docs.lithic.com/docs/cards#encrypted-pin-block).\n\n- `product_id?: string`\n Only applicable to cards of type `PHYSICAL`. This must be configured with Lithic before use. Specifies the configuration (i.e., physical card art) that the card should be manufactured with.\n\n- `replacement_account_token?: string`\n Restricted field limited to select use cases. Lithic will reach out directly if this field should be used. Globally unique identifier for the replacement card's account. If this field is specified, `replacement_for` must also be specified. If `replacement_for` is specified and this field is omitted, the replacement card's account will be inferred from the card being replaced.\n\n- `replacement_comment?: string`\n Additional context or information related to the card that this card will replace.\n\n- `replacement_for?: string`\n Globally unique identifier for the card that this card will replace. If the card type is `PHYSICAL` it will be replaced by a `PHYSICAL` card. If the card type is `VIRTUAL` it will be replaced by a `VIRTUAL` card.\n\n- `replacement_substatus?: string`\n Card state substatus values for the card that this card will replace:\n* `LOST` - The physical card is no longer in the cardholder's possession due to being lost or never received by the cardholder.\n* `COMPROMISED` - Card information has been exposed, potentially leading to unauthorized access. This may involve physical card theft, cloning, or online data breaches.\n* `DAMAGED` - The physical card is not functioning properly, such as having chip failures or a demagnetized magnetic stripe.\n* `END_USER_REQUEST` - The cardholder requested the closure of the card for reasons unrelated to fraud or damage, such as switching to a different product or closing the account.\n* `ISSUER_REQUEST` - The issuer closed the card for reasons unrelated to fraud or damage, such as account inactivity, product or policy changes, or technology upgrades.\n* `NOT_ACTIVE` - The card hasn’t had any transaction activity for a specified period, applicable to statuses like `PAUSED` or `CLOSED`.\n* `SUSPICIOUS_ACTIVITY` - The card has one or more suspicious transactions or activities that require review. This can involve prompting the cardholder to confirm legitimate use or report confirmed fraud.\n* `INTERNAL_REVIEW` - The card is temporarily paused pending further internal review.\n* `EXPIRED` - The card has expired and has been closed without being reissued.\n* `UNDELIVERABLE` - The card cannot be delivered to the cardholder and has been returned.\n* `OTHER` - The reason for the status does not fall into any of the above categories. A comment should be provided to specify the reason.\n\n- `shipping_address?: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }`\n - `address1: string`\n Valid USPS routable address.\n - `city: string`\n City\n - `country: string`\n Uppercase ISO 3166-1 alpha-3 three character abbreviation.\n - `first_name: string`\n Customer's first name. This will be the first name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `last_name: string`\n Customer's surname (family name). This will be the last name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `postal_code: string`\n Postal code (formerly zipcode). For US addresses, either five-digit postal code or nine-digit postal code (ZIP+4) using the format 12345-1234.\n - `state: string`\n Uppercase ISO 3166-2 two character abbreviation for US and CA. Optional with a limit of 24 characters for other countries.\n - `address2?: string`\n Unit number (if applicable).\n - `email?: string`\n Email address to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n - `line2_text?: string`\n Text to be printed on line two of the physical card. Use of this field requires additional permissions.\n - `phone_number?: string`\n Cardholder's phone number in E.164 format to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n\n- `shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING'`\n Shipping method for the card. Only applies to cards of type PHYSICAL.\nUse of options besides `STANDARD` require additional permissions.\n\n* `STANDARD` - USPS regular mail or similar international option, with no tracking\n* `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking\n* `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking\n* `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with tracking\n* `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking\n* `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar international option, with tracking\n* `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and timeline are inherited from the parent bulk order.\n\n- `spend_limit?: number`\n Amount (in cents) to limit approved authorizations (e.g. 100000 would be a $1,000 limit). Transaction requests above the spend limit will be declined. Note that a spend limit of 0 is effectively no limit, and should only be used to reset or remove a prior limit. Only a limit of 1 or above will result in declined transactions due to checks against the card limit.\n\n- `spend_limit_duration?: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'`\n Spend limit duration values:\n\n* `ANNUALLY` - Card will authorize transactions up to spend limit for the trailing year.\n* `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card.\n* `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month. To support recurring monthly payments, which can occur on different day every month, the time window we consider for monthly velocity starts 6 days after the current calendar date one month prior.\n* `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is under the spend limit.\n\n- `state?: 'OPEN' | 'PAUSED'`\n Card state values:\n* `OPEN` - Card will approve authorizations (if they match card and account parameters).\n* `PAUSED` - Card will decline authorizations, but can be resumed at a later time.\n\n- `Idempotency-Key?: string`\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details with potentially PCI sensitive information for Enterprise customers\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst card = await client.cards.create({ type: 'VIRTUAL' });\n\nconsole.log(card);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/cards/{card_token}', + httpMethod: 'get', + summary: 'Get card', + description: 'Get card configuration such as spend limit and state.', + stainlessPath: '(resource) cards > (method) retrieve', + qualified: 'client.cards.retrieve', + params: ['card_token: string;'], + response: + "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", + markdown: + "## retrieve\n\n`client.cards.retrieve(card_token: string): object`\n\n**get** `/v1/cards/{card_token}`\n\nGet card configuration such as spend limit and state.\n\n### Parameters\n\n- `card_token: string`\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details with potentially PCI sensitive information for Enterprise customers\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst card = await client.cards.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(card);\n```", + }, + { + name: 'update', + endpoint: '/v1/cards/{card_token}', + httpMethod: 'patch', + summary: 'Update card', + description: + 'Update the specified properties of the card. Unsupplied properties will remain unchanged.\n\n*Note: setting a card to a `CLOSED` state is a final action that cannot be undone.*\n', + stainlessPath: '(resource) cards > (method) update', + qualified: 'client.cards.update', + params: [ + 'card_token: string;', + 'comment?: string;', + 'digital_card_art_token?: string;', + 'memo?: string;', + 'network_program_token?: string;', + 'pin?: string;', + "pin_status?: 'OK';", + 'spend_limit?: number;', + "spend_limit_duration?: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION';", + "state?: 'CLOSED' | 'OPEN' | 'PAUSED';", + 'substatus?: string;', + ], + response: + "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", + markdown: + "## update\n\n`client.cards.update(card_token: string, comment?: string, digital_card_art_token?: string, memo?: string, network_program_token?: string, pin?: string, pin_status?: 'OK', spend_limit?: number, spend_limit_duration?: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION', state?: 'CLOSED' | 'OPEN' | 'PAUSED', substatus?: string): object`\n\n**patch** `/v1/cards/{card_token}`\n\nUpdate the specified properties of the card. Unsupplied properties will remain unchanged.\n\n*Note: setting a card to a `CLOSED` state is a final action that cannot be undone.*\n\n\n### Parameters\n\n- `card_token: string`\n\n- `comment?: string`\n Additional context or information related to the card.\n\n- `digital_card_art_token?: string`\n Specifies the digital card art to be displayed in the user’s digital wallet after tokenization. This artwork must be approved by Mastercard and configured by Lithic to use. See [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art).\n\n- `memo?: string`\n Friendly name to identify the card.\n\n- `network_program_token?: string`\n Globally unique identifier for the card's network program. Currently applicable to Visa cards participating in Account Level Management only.\n\n- `pin?: string`\n Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and `VIRTUAL`. Changing PIN also resets PIN status to `OK`. See [Encrypted PIN Block](https://docs.lithic.com/docs/cards#encrypted-pin-block).\n\n- `pin_status?: 'OK'`\n Indicates if a card is blocked due a PIN status issue (e.g. excessive incorrect attempts). Can only be set to `OK` to unblock a card.\n\n- `spend_limit?: number`\n Amount (in cents) to limit approved authorizations (e.g. 100000 would be a $1,000 limit). Transaction requests above the spend limit will be declined. Note that a spend limit of 0 is effectively no limit, and should only be used to reset or remove a prior limit. Only a limit of 1 or above will result in declined transactions due to checks against the card limit.\n\n- `spend_limit_duration?: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'`\n Spend limit duration values:\n\n* `ANNUALLY` - Card will authorize transactions up to spend limit for the trailing year.\n* `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card.\n* `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month. To support recurring monthly payments, which can occur on different day every month, the time window we consider for monthly velocity starts 6 days after the current calendar date one month prior.\n* `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is under the spend limit.\n\n- `state?: 'CLOSED' | 'OPEN' | 'PAUSED'`\n Card state values:\n* `CLOSED` - Card will no longer approve authorizations. Closing a card cannot be undone.\n* `OPEN` - Card will approve authorizations (if they match card and account parameters).\n* `PAUSED` - Card will decline authorizations, but can be resumed at a later time.\n\n- `substatus?: string`\n Card state substatus values:\n* `LOST` - The physical card is no longer in the cardholder's possession due to being lost or never received by the cardholder.\n* `COMPROMISED` - Card information has been exposed, potentially leading to unauthorized access. This may involve physical card theft, cloning, or online data breaches.\n* `DAMAGED` - The physical card is not functioning properly, such as having chip failures or a demagnetized magnetic stripe.\n* `END_USER_REQUEST` - The cardholder requested the closure of the card for reasons unrelated to fraud or damage, such as switching to a different product or closing the account.\n* `ISSUER_REQUEST` - The issuer closed the card for reasons unrelated to fraud or damage, such as account inactivity, product or policy changes, or technology upgrades.\n* `NOT_ACTIVE` - The card hasn’t had any transaction activity for a specified period, applicable to statuses like `PAUSED` or `CLOSED`.\n* `SUSPICIOUS_ACTIVITY` - The card has one or more suspicious transactions or activities that require review. This can involve prompting the cardholder to confirm legitimate use or report confirmed fraud.\n* `INTERNAL_REVIEW` - The card is temporarily paused pending further internal review.\n* `EXPIRED` - The card has expired and has been closed without being reissued.\n* `UNDELIVERABLE` - The card cannot be delivered to the cardholder and has been returned.\n* `OTHER` - The reason for the status does not fall into any of the above categories. A comment should be provided to specify the reason.\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details with potentially PCI sensitive information for Enterprise customers\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst card = await client.cards.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(card);\n```", + }, + { + name: 'list', + endpoint: '/v1/cards', + httpMethod: 'get', + summary: 'List cards', + description: 'List cards.', + stainlessPath: '(resource) cards > (method) list', + qualified: 'client.cards.list', + params: [ + 'account_token?: string;', + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'memo?: string;', + 'page_size?: number;', + 'starting_after?: string;', + "state?: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT';", + ], + response: + "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", + markdown: + "## list\n\n`client.cards.list(account_token?: string, begin?: string, end?: string, ending_before?: string, memo?: string, page_size?: number, starting_after?: string, state?: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'): { token: string; account_token: string; card_program_token: string; created: string; funding: object; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: spend_limit_duration; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n\n**get** `/v1/cards`\n\nList cards.\n\n### Parameters\n\n- `account_token?: string`\n Returns cards associated with the specified account.\n\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `memo?: string`\n Returns cards containing the specified partial or full memo text.\n\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- `state?: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'`\n Returns cards with the specified state.\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details without PCI information\n\n - `token: string`\n - `account_token: string`\n - `card_program_token: string`\n - `created: string`\n - `funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }`\n - `last_four: string`\n - `pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'`\n - `spend_limit: number`\n - `spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'`\n - `state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'`\n - `type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'`\n - `auth_rule_tokens?: string[]`\n - `bulk_order_token?: string`\n - `cardholder_currency?: string`\n - `comment?: string`\n - `digital_card_art_token?: string`\n - `exp_month?: string`\n - `exp_year?: string`\n - `hostname?: string`\n - `memo?: string`\n - `network_program_token?: string`\n - `pending_commands?: string[]`\n - `product_id?: string`\n - `replacement_for?: string`\n - `substatus?: 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 nonPCICard of client.cards.list()) {\n console.log(nonPCICard);\n}\n```", + }, + { + name: 'convert_physical', + endpoint: '/v1/cards/{card_token}/convert_physical', + httpMethod: 'post', + summary: 'Convert virtual to physical card', + description: + "Convert a virtual card into a physical card and manufacture it.\nCustomer must supply relevant fields for physical card creation including `product_id`, `carrier`, `shipping_method`, and `shipping_address`.\nThe card token will be unchanged. The card's type will be altered to `PHYSICAL`.\nThe card will be set to state `PENDING_FULFILLMENT` and fulfilled at next fulfillment cycle.\nVirtual cards created on card programs which do not support physical cards cannot be converted. The card program cannot be changed as part of the conversion. Cards must be in an `OPEN` state to be converted.\nOnly applies to cards of type `VIRTUAL` (or existing cards with deprecated types of `DIGITAL_WALLET` and `UNLOCKED`).", + stainlessPath: '(resource) cards > (method) convert_physical', + qualified: 'client.cards.convertPhysical', + params: [ + 'card_token: string;', + 'shipping_address: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; };', + 'carrier?: { qr_code_url?: string; };', + 'product_id?: string;', + "shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING';", + ], + response: + "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", + markdown: + "## convert_physical\n\n`client.cards.convertPhysical(card_token: string, shipping_address: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }, carrier?: { qr_code_url?: string; }, product_id?: string, shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING'): object`\n\n**post** `/v1/cards/{card_token}/convert_physical`\n\nConvert a virtual card into a physical card and manufacture it.\nCustomer must supply relevant fields for physical card creation including `product_id`, `carrier`, `shipping_method`, and `shipping_address`.\nThe card token will be unchanged. The card's type will be altered to `PHYSICAL`.\nThe card will be set to state `PENDING_FULFILLMENT` and fulfilled at next fulfillment cycle.\nVirtual cards created on card programs which do not support physical cards cannot be converted. The card program cannot be changed as part of the conversion. Cards must be in an `OPEN` state to be converted.\nOnly applies to cards of type `VIRTUAL` (or existing cards with deprecated types of `DIGITAL_WALLET` and `UNLOCKED`).\n\n### Parameters\n\n- `card_token: string`\n\n- `shipping_address: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }`\n The shipping address this card will be sent to.\n - `address1: string`\n Valid USPS routable address.\n - `city: string`\n City\n - `country: string`\n Uppercase ISO 3166-1 alpha-3 three character abbreviation.\n - `first_name: string`\n Customer's first name. This will be the first name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `last_name: string`\n Customer's surname (family name). This will be the last name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `postal_code: string`\n Postal code (formerly zipcode). For US addresses, either five-digit postal code or nine-digit postal code (ZIP+4) using the format 12345-1234.\n - `state: string`\n Uppercase ISO 3166-2 two character abbreviation for US and CA. Optional with a limit of 24 characters for other countries.\n - `address2?: string`\n Unit number (if applicable).\n - `email?: string`\n Email address to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n - `line2_text?: string`\n Text to be printed on line two of the physical card. Use of this field requires additional permissions.\n - `phone_number?: string`\n Cardholder's phone number in E.164 format to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n\n- `carrier?: { qr_code_url?: string; }`\n If omitted, the previous carrier will be used.\n - `qr_code_url?: string`\n QR code URL to display on the card carrier. The `qr_code_url` field requires your domain to be allowlisted by Lithic before use. Contact Support to configure your QR code domain\n\n- `product_id?: string`\n Specifies the configuration (e.g. physical card art) that the card should be manufactured with, and only applies to cards of type `PHYSICAL`. This must be configured with Lithic before use.\n\n\n- `shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING'`\n Shipping method for the card. Only applies to cards of type PHYSICAL.\nUse of options besides `STANDARD` require additional permissions.\n\n* `STANDARD` - USPS regular mail or similar international option, with no tracking\n* `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking\n* `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking\n* `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with tracking\n* `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking\n* `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar international option, with tracking\n* `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and timeline are inherited from the parent bulk order.\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details with potentially PCI sensitive information for Enterprise customers\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst card = await client.cards.convertPhysical('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { shipping_address: {\n address1: '5 Broad Street',\n city: 'NEW YORK',\n country: 'USA',\n first_name: 'Janet',\n last_name: 'Yellen',\n postal_code: '10001',\n state: 'NY',\n} });\n\nconsole.log(card);\n```", + }, + { + name: 'embed', + endpoint: '/v1/embed/card', + httpMethod: 'get', + summary: 'Embedded card UI', + description: + 'Handling full card PANs and CVV codes requires that you comply with the Payment Card Industry Data Security Standards (PCI DSS). Some clients choose to reduce their compliance obligations by leveraging our embedded card UI solution documented below.\n\nIn this setup, PANs and CVV codes are presented to the end-user via a card UI that we provide, optionally styled in the customer\'s branding using a specified css stylesheet. A user\'s browser makes the request directly to api.lithic.com, so card PANs and CVVs never touch the API customer\'s servers while full card data is displayed to their end-users. The response contains an HTML document (see Embedded Card UI or Changelog for upcoming changes in January). This means that the url for the request can be inserted straight into the `src` attribute of an iframe.\n\n```html\n\n```\n\nYou should compute the request payload on the server side. You can render it (or the whole iframe) on the server or make an ajax call from your front end code, but **do not ever embed your API key into front end code, as doing so introduces a serious security vulnerability**.\n', + stainlessPath: '(resource) cards > (method) embed', + qualified: 'client.cards.embed', + params: ['embed_request: string;', 'hmac: string;'], + response: 'string', + markdown: + "## embed\n\n`client.cards.embed(embed_request: string, hmac: string): string`\n\n**get** `/v1/embed/card`\n\nHandling full card PANs and CVV codes requires that you comply with the Payment Card Industry Data Security Standards (PCI DSS). Some clients choose to reduce their compliance obligations by leveraging our embedded card UI solution documented below.\n\nIn this setup, PANs and CVV codes are presented to the end-user via a card UI that we provide, optionally styled in the customer's branding using a specified css stylesheet. A user's browser makes the request directly to api.lithic.com, so card PANs and CVVs never touch the API customer's servers while full card data is displayed to their end-users. The response contains an HTML document (see Embedded Card UI or Changelog for upcoming changes in January). This means that the url for the request can be inserted straight into the `src` attribute of an iframe.\n\n```html\n\n```\n\nYou should compute the request payload on the server side. You can render it (or the whole iframe) on the server or make an ajax call from your front end code, but **do not ever embed your API key into front end code, as doing so introduces a serious security vulnerability**.\n\n\n### Parameters\n\n- `embed_request: string`\n A base64 encoded JSON string of an EmbedRequest to specify which card to load.\n\n- `hmac: string`\n SHA256 HMAC of the embed_request JSON string with base64 digest.\n\n### Returns\n\n- `string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.cards.embed({ embed_request: 'embed_request', hmac: 'hmac' });\n\nconsole.log(response);\n```", + }, + { + name: 'provision', + endpoint: '/v1/cards/{card_token}/provision', + httpMethod: 'post', + summary: 'Provision card (Digital Wallet)', + description: + "Allow your cardholders to directly add payment cards to the device's digital wallet (e.g. Apple Pay) with one touch from your app.\n\nThis requires some additional setup and configuration. Please [Contact Us](https://lithic.com/contact) or your Customer Success representative for more information.\n", + stainlessPath: '(resource) cards > (method) provision', + qualified: 'client.cards.provision', + params: [ + 'card_token: string;', + 'certificate?: string;', + 'client_device_id?: string;', + 'client_wallet_account_id?: string;', + "digital_wallet?: 'APPLE_PAY' | 'GOOGLE_PAY' | 'SAMSUNG_PAY';", + 'nonce?: string;', + 'nonce_signature?: string;', + ], + response: + '{ provisioning_payload?: string | { activationData?: string; encryptedData?: string; ephemeralPublicKey?: string; }; }', + markdown: + "## provision\n\n`client.cards.provision(card_token: string, certificate?: string, client_device_id?: string, client_wallet_account_id?: string, digital_wallet?: 'APPLE_PAY' | 'GOOGLE_PAY' | 'SAMSUNG_PAY', nonce?: string, nonce_signature?: string): { provisioning_payload?: string | provision_response; }`\n\n**post** `/v1/cards/{card_token}/provision`\n\nAllow your cardholders to directly add payment cards to the device's digital wallet (e.g. Apple Pay) with one touch from your app.\n\nThis requires some additional setup and configuration. Please [Contact Us](https://lithic.com/contact) or your Customer Success representative for more information.\n\n\n### Parameters\n\n- `card_token: string`\n\n- `certificate?: string`\n Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only `activationData` in the response. Apple's public leaf certificate. Base64 encoded in PEM format with headers `(-----BEGIN CERTIFICATE-----)` and trailers omitted. Provided by the device's wallet.\n\n- `client_device_id?: string`\n Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is on the Visa network. Stable device identification set by the wallet provider.\n\n- `client_wallet_account_id?: string`\n Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is on the Visa network. Consumer ID that identifies the wallet account holder entity.\n\n- `digital_wallet?: 'APPLE_PAY' | 'GOOGLE_PAY' | 'SAMSUNG_PAY'`\n Name of digital wallet provider.\n\n- `nonce?: string`\n Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only `activationData` in the response. Base64 cryptographic nonce provided by the device's wallet.\n\n- `nonce_signature?: string`\n Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only `activationData` in the response. Base64 cryptographic nonce provided by the device's wallet.\n\n### Returns\n\n- `{ provisioning_payload?: string | { activationData?: string; encryptedData?: string; ephemeralPublicKey?: string; }; }`\n\n - `provisioning_payload?: string | { activationData?: string; encryptedData?: string; ephemeralPublicKey?: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.cards.provision('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + }, + { + name: 'reissue', + endpoint: '/v1/cards/{card_token}/reissue', + httpMethod: 'post', + summary: 'Reissue physical card', + description: + 'Initiate print and shipment of a duplicate physical card (e.g. card is physically damaged). The PAN, expiry, and CVC2 will remain the same and the original card can continue to be used until the new card is activated.\nOnly applies to cards of type `PHYSICAL`. A card can be reissued or renewed a total of 8 times.', + stainlessPath: '(resource) cards > (method) reissue', + qualified: 'client.cards.reissue', + params: [ + 'card_token: string;', + 'carrier?: { qr_code_url?: string; };', + 'product_id?: string;', + 'shipping_address?: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; };', + "shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING';", + ], + response: + "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", + markdown: + "## reissue\n\n`client.cards.reissue(card_token: string, carrier?: { qr_code_url?: string; }, product_id?: string, shipping_address?: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }, shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING'): object`\n\n**post** `/v1/cards/{card_token}/reissue`\n\nInitiate print and shipment of a duplicate physical card (e.g. card is physically damaged). The PAN, expiry, and CVC2 will remain the same and the original card can continue to be used until the new card is activated.\nOnly applies to cards of type `PHYSICAL`. A card can be reissued or renewed a total of 8 times.\n\n### Parameters\n\n- `card_token: string`\n\n- `carrier?: { qr_code_url?: string; }`\n If omitted, the previous carrier will be used.\n - `qr_code_url?: string`\n QR code URL to display on the card carrier. The `qr_code_url` field requires your domain to be allowlisted by Lithic before use. Contact Support to configure your QR code domain\n\n- `product_id?: string`\n Specifies the configuration (e.g. physical card art) that the card should be manufactured with, and only applies to cards of type `PHYSICAL`. This must be configured with Lithic before use.\n\n\n- `shipping_address?: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }`\n If omitted, the previous shipping address will be used.\n - `address1: string`\n Valid USPS routable address.\n - `city: string`\n City\n - `country: string`\n Uppercase ISO 3166-1 alpha-3 three character abbreviation.\n - `first_name: string`\n Customer's first name. This will be the first name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `last_name: string`\n Customer's surname (family name). This will be the last name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `postal_code: string`\n Postal code (formerly zipcode). For US addresses, either five-digit postal code or nine-digit postal code (ZIP+4) using the format 12345-1234.\n - `state: string`\n Uppercase ISO 3166-2 two character abbreviation for US and CA. Optional with a limit of 24 characters for other countries.\n - `address2?: string`\n Unit number (if applicable).\n - `email?: string`\n Email address to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n - `line2_text?: string`\n Text to be printed on line two of the physical card. Use of this field requires additional permissions.\n - `phone_number?: string`\n Cardholder's phone number in E.164 format to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n\n- `shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING'`\n Shipping method for the card. Only applies to cards of type PHYSICAL.\nUse of options besides `STANDARD` require additional permissions.\n\n* `STANDARD` - USPS regular mail or similar international option, with no tracking\n* `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking\n* `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking\n* `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with tracking\n* `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking\n* `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar international option, with tracking\n* `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and timeline are inherited from the parent bulk order.\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details with potentially PCI sensitive information for Enterprise customers\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst card = await client.cards.reissue('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(card);\n```", + }, + { + name: 'renew', + endpoint: '/v1/cards/{card_token}/renew', + httpMethod: 'post', + summary: 'Renew a card', + description: + 'Applies to card types `PHYSICAL` and `VIRTUAL`.\nFor `PHYSICAL`, creates a new card with the same card token and PAN, but updated expiry and CVC2 code. The original card will keep working for card-present transactions until the new card is activated. For card-not-present transactions, the original card details (expiry, CVC2) will also keep working until the new card is activated.\nA `PHYSICAL` card can be reissued or renewed a total of 8 times.\nFor `VIRTUAL`, the card will retain the same card token and PAN and receive an updated expiry and CVC2 code.\n`product_id`, `shipping_method`, `shipping_address`, `carrier` are only relevant for renewing `PHYSICAL` cards.', + stainlessPath: '(resource) cards > (method) renew', + qualified: 'client.cards.renew', + params: [ + 'card_token: string;', + 'shipping_address: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; };', + 'carrier?: { qr_code_url?: string; };', + 'exp_month?: string;', + 'exp_year?: string;', + 'product_id?: string;', + "shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING';", + ], + response: + "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", + markdown: + "## renew\n\n`client.cards.renew(card_token: string, shipping_address: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }, carrier?: { qr_code_url?: string; }, exp_month?: string, exp_year?: string, product_id?: string, shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING'): object`\n\n**post** `/v1/cards/{card_token}/renew`\n\nApplies to card types `PHYSICAL` and `VIRTUAL`.\nFor `PHYSICAL`, creates a new card with the same card token and PAN, but updated expiry and CVC2 code. The original card will keep working for card-present transactions until the new card is activated. For card-not-present transactions, the original card details (expiry, CVC2) will also keep working until the new card is activated.\nA `PHYSICAL` card can be reissued or renewed a total of 8 times.\nFor `VIRTUAL`, the card will retain the same card token and PAN and receive an updated expiry and CVC2 code.\n`product_id`, `shipping_method`, `shipping_address`, `carrier` are only relevant for renewing `PHYSICAL` cards.\n\n### Parameters\n\n- `card_token: string`\n\n- `shipping_address: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }`\n The shipping address this card will be sent to.\n - `address1: string`\n Valid USPS routable address.\n - `city: string`\n City\n - `country: string`\n Uppercase ISO 3166-1 alpha-3 three character abbreviation.\n - `first_name: string`\n Customer's first name. This will be the first name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `last_name: string`\n Customer's surname (family name). This will be the last name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `postal_code: string`\n Postal code (formerly zipcode). For US addresses, either five-digit postal code or nine-digit postal code (ZIP+4) using the format 12345-1234.\n - `state: string`\n Uppercase ISO 3166-2 two character abbreviation for US and CA. Optional with a limit of 24 characters for other countries.\n - `address2?: string`\n Unit number (if applicable).\n - `email?: string`\n Email address to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n - `line2_text?: string`\n Text to be printed on line two of the physical card. Use of this field requires additional permissions.\n - `phone_number?: string`\n Cardholder's phone number in E.164 format to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n\n- `carrier?: { qr_code_url?: string; }`\n If omitted, the previous carrier will be used.\n - `qr_code_url?: string`\n QR code URL to display on the card carrier. The `qr_code_url` field requires your domain to be allowlisted by Lithic before use. Contact Support to configure your QR code domain\n\n- `exp_month?: string`\n Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, an expiration date six years in the future will be generated.\n\n- `exp_year?: string`\n Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an expiration date six years in the future will be generated.\n\n- `product_id?: string`\n Specifies the configuration (e.g. physical card art) that the card should be manufactured with, and only applies to cards of type `PHYSICAL`. This must be configured with Lithic before use.\n\n\n- `shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING'`\n Shipping method for the card. Only applies to cards of type PHYSICAL.\nUse of options besides `STANDARD` require additional permissions.\n\n* `STANDARD` - USPS regular mail or similar international option, with no tracking\n* `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking\n* `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking\n* `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with tracking\n* `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking\n* `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar international option, with tracking\n* `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and timeline are inherited from the parent bulk order.\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details with potentially PCI sensitive information for Enterprise customers\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst card = await client.cards.renew('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { shipping_address: {\n address1: '5 Broad Street',\n city: 'NEW YORK',\n country: 'USA',\n first_name: 'Janet',\n last_name: 'Yellen',\n postal_code: '10001',\n state: 'NY',\n} });\n\nconsole.log(card);\n```", + }, + { + name: 'retrieve_spend_limits', + endpoint: '/v1/cards/{card_token}/spend_limits', + httpMethod: 'get', + summary: "Get card's available spend limit", + description: + "Get a Card's available spend limit, which is based on the spend limit configured on the Card and the amount already spent over the spend limit's duration. For example, if the Card has a monthly spend limit of $1000 configured, and has spent $600 in the last month, the available spend limit returned would be $400.", + stainlessPath: '(resource) cards > (method) retrieve_spend_limits', + qualified: 'client.cards.retrieveSpendLimits', + params: ['card_token: string;'], + response: + '{ available_spend_limit: { annually?: number; forever?: number; monthly?: number; }; spend_limit?: { annually?: number; forever?: number; monthly?: number; }; spend_velocity?: { annually?: number; forever?: number; monthly?: number; }; }', + markdown: + "## retrieve_spend_limits\n\n`client.cards.retrieveSpendLimits(card_token: string): { available_spend_limit: object; spend_limit?: object; spend_velocity?: object; }`\n\n**get** `/v1/cards/{card_token}/spend_limits`\n\nGet a Card's available spend limit, which is based on the spend limit configured on the Card and the amount already spent over the spend limit's duration. For example, if the Card has a monthly spend limit of $1000 configured, and has spent $600 in the last month, the available spend limit returned would be $400.\n\n### Parameters\n\n- `card_token: string`\n\n### Returns\n\n- `{ available_spend_limit: { annually?: number; forever?: number; monthly?: number; }; spend_limit?: { annually?: number; forever?: number; monthly?: number; }; spend_velocity?: { annually?: number; forever?: number; monthly?: number; }; }`\n\n - `available_spend_limit: { annually?: number; forever?: number; monthly?: number; }`\n - `spend_limit?: { annually?: number; forever?: number; monthly?: number; }`\n - `spend_velocity?: { annually?: number; forever?: number; monthly?: number; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst cardSpendLimits = await client.cards.retrieveSpendLimits('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(cardSpendLimits);\n```", + }, + { + name: 'search_by_pan', + endpoint: '/v1/cards/search_by_pan', + httpMethod: 'post', + summary: 'Search for card by PAN', + description: + 'Get card configuration such as spend limit and state. Customers must be PCI compliant to use this endpoint. Please contact [support@lithic.com](mailto:support@lithic.com) for questions.\n*Note: this is a `POST` endpoint because it is more secure to send sensitive data in a request body than in a URL.*', + stainlessPath: '(resource) cards > (method) search_by_pan', + qualified: 'client.cards.searchByPan', + params: ['pan: string;'], + response: + "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", + markdown: + "## search_by_pan\n\n`client.cards.searchByPan(pan: string): object`\n\n**post** `/v1/cards/search_by_pan`\n\nGet card configuration such as spend limit and state. Customers must be PCI compliant to use this endpoint. Please contact [support@lithic.com](mailto:support@lithic.com) for questions.\n*Note: this is a `POST` endpoint because it is more secure to send sensitive data in a request body than in a URL.*\n\n### Parameters\n\n- `pan: string`\n The PAN for the card being retrieved.\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details with potentially PCI sensitive information for Enterprise customers\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst card = await client.cards.searchByPan({ pan: '4111111289144142' });\n\nconsole.log(card);\n```", + }, + { + name: 'web_provision', + endpoint: '/v1/cards/{card_token}/web_provision', + httpMethod: 'post', + summary: 'Web Push Provision card (Digital Wallet)', + description: + "Allow your cardholders to directly add payment cards to the device's digital wallet from a browser on the web.\n\nThis requires some additional setup and configuration. Please [Contact Us](https://lithic.com/contact) or your Customer Success representative for more information.\n", + stainlessPath: '(resource) cards > (method) web_provision', + qualified: 'client.cards.webProvision', + params: [ + 'card_token: string;', + 'client_device_id?: string;', + 'client_wallet_account_id?: string;', + "digital_wallet?: 'APPLE_PAY' | 'GOOGLE_PAY';", + 'server_session_id?: string;', + ], + response: + '{ jws: { header?: { kid?: string; }; payload?: string; protected?: string; signature?: string; }; state: string; } | { google_opc?: string; tsp_opc?: string; }', + markdown: + "## web_provision\n\n`client.cards.webProvision(card_token: string, client_device_id?: string, client_wallet_account_id?: string, digital_wallet?: 'APPLE_PAY' | 'GOOGLE_PAY', server_session_id?: string): { jws: object; state: string; } | { google_opc?: string; tsp_opc?: string; }`\n\n**post** `/v1/cards/{card_token}/web_provision`\n\nAllow your cardholders to directly add payment cards to the device's digital wallet from a browser on the web.\n\nThis requires some additional setup and configuration. Please [Contact Us](https://lithic.com/contact) or your Customer Success representative for more information.\n\n\n### Parameters\n\n- `card_token: string`\n\n- `client_device_id?: string`\n Only applicable if `digital_wallet` is GOOGLE_PAY. Google Pay Web Push Provisioning device identifier required for the tokenization flow\n\n- `client_wallet_account_id?: string`\n Only applicable if `digital_wallet` is GOOGLE_PAY. Google Pay Web Push Provisioning wallet account identifier required for the tokenization flow\n\n- `digital_wallet?: 'APPLE_PAY' | 'GOOGLE_PAY'`\n Name of digital wallet provider.\n\n- `server_session_id?: string`\n Only applicable if `digital_wallet` is GOOGLE_PAY. Google Pay Web Push Provisioning session identifier required for the FPAN flow.\n\n### Returns\n\n- `{ jws: { header?: { kid?: string; }; payload?: string; protected?: string; signature?: string; }; state: string; } | { google_opc?: string; tsp_opc?: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.cards.webProvision('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + }, + { + name: 'list', + endpoint: '/v1/cards/{card_token}/balances', + httpMethod: 'get', + summary: 'Get card balances', + description: 'Get the balances for a given card.', + stainlessPath: '(resource) cards.balances > (method) list', + qualified: 'client.cards.balances.list', + params: ['card_token: string;', 'balance_date?: string;', 'last_transaction_event_token?: string;'], + response: + "{ token: string; available_amount: number; created: string; currency: string; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; updated: string; }", + markdown: + "## list\n\n`client.cards.balances.list(card_token: string, balance_date?: string, last_transaction_event_token?: string): { token: string; available_amount: number; created: string; currency: string; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; updated: string; }`\n\n**get** `/v1/cards/{card_token}/balances`\n\nGet the balances for a given card.\n\n### Parameters\n\n- `card_token: string`\n\n- `balance_date?: string`\n UTC date of the balance to retrieve. Defaults to latest available balance\n\n- `last_transaction_event_token?: string`\n Balance after a given financial event occured.\nFor example, passing the event_token of a $5 CARD_CLEARING financial event will return a balance decreased by $5\n\n\n### Returns\n\n- `{ token: string; available_amount: number; created: string; currency: string; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; updated: string; }`\n Balance of a Financial Account\n\n - `token: string`\n - `available_amount: number`\n - `created: string`\n - `currency: string`\n - `last_transaction_event_token: string`\n - `last_transaction_token: string`\n - `pending_amount: number`\n - `total_amount: number`\n - `type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'`\n - `updated: 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 financialAccountBalance of client.cards.balances.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(financialAccountBalance);\n}\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/cards/{card_token}/financial_transactions/{financial_transaction_token}', + httpMethod: 'get', + summary: 'Get card financial transaction', + description: 'Get the card financial transaction for the provided token.', + stainlessPath: '(resource) cards.financial_transactions > (method) retrieve', + qualified: 'client.cards.financialTransactions.retrieve', + params: ['card_token: string;', 'financial_transaction_token: string;'], + response: + "{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }", + markdown: + "## retrieve\n\n`client.cards.financialTransactions.retrieve(card_token: string, financial_transaction_token: string): { token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: financial_event[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n**get** `/v1/cards/{card_token}/financial_transactions/{financial_transaction_token}`\n\nGet the card financial transaction for the provided token.\n\n### Parameters\n\n- `card_token: string`\n\n- `financial_transaction_token: string`\n\n### Returns\n\n- `{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n - `token: string`\n - `category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'`\n - `created: string`\n - `currency: string`\n - `descriptor: string`\n - `events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialTransaction = await client.cards.financialTransactions.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { card_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(financialTransaction);\n```", + }, + { + name: 'list', + endpoint: '/v1/cards/{card_token}/financial_transactions', + httpMethod: 'get', + summary: 'List card financial transactions', + description: 'List the financial transactions for a given card.', + stainlessPath: '(resource) cards.financial_transactions > (method) list', + qualified: 'client.cards.financialTransactions.list', + params: [ + 'card_token: string;', + 'begin?: string;', + "category?: 'CARD' | 'TRANSFER';", + 'end?: string;', + 'ending_before?: string;', + "result?: 'APPROVED' | 'DECLINED';", + 'starting_after?: string;', + "status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED';", + ], + response: + "{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }", + markdown: + "## list\n\n`client.cards.financialTransactions.list(card_token: string, begin?: string, category?: 'CARD' | 'TRANSFER', end?: string, ending_before?: string, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'): { token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: financial_event[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n**get** `/v1/cards/{card_token}/financial_transactions`\n\nList the financial transactions for a given card.\n\n### Parameters\n\n- `card_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `category?: 'CARD' | 'TRANSFER'`\n Financial Transaction category to be returned.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `result?: 'APPROVED' | 'DECLINED'`\n Financial Transaction result to be returned.\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- `status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'`\n Financial Transaction status to be returned.\n\n### Returns\n\n- `{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n - `token: string`\n - `category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'`\n - `created: string`\n - `currency: string`\n - `descriptor: string`\n - `events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'`\n - `updated: 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 financialTransaction of client.cards.financialTransactions.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(financialTransaction);\n}\n```", + }, + { + name: 'create', + endpoint: '/v1/card_bulk_orders', + httpMethod: 'post', + summary: 'Create bulk order', + description: + 'Create a new bulk order for physical card shipments. Cards can be added to the order via the POST /v1/cards endpoint by specifying the bulk_order_token. Lock the order via PATCH /v1/card_bulk_orders/{bulk_order_token} to prepare for shipment. Please work with your Customer Success Manager and card personalization bureau to ensure bulk shipping is supported for your program.', + stainlessPath: '(resource) card_bulk_orders > (method) create', + qualified: 'client.cardBulkOrders.create', + params: [ + 'customer_product_id: string;', + 'shipping_address: object;', + "shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS';", + ], + response: + "{ token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }", + markdown: + "## create\n\n`client.cardBulkOrders.create(customer_product_id: string, shipping_address: object, shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'): { token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n\n**post** `/v1/card_bulk_orders`\n\nCreate a new bulk order for physical card shipments. Cards can be added to the order via the POST /v1/cards endpoint by specifying the bulk_order_token. Lock the order via PATCH /v1/card_bulk_orders/{bulk_order_token} to prepare for shipment. Please work with your Customer Success Manager and card personalization bureau to ensure bulk shipping is supported for your program.\n\n### Parameters\n\n- `customer_product_id: string`\n Customer-specified product configuration for physical card manufacturing. This must be configured with Lithic before use\n\n- `shipping_address: object`\n Shipping address for all cards in this bulk order\n\n- `shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'`\n Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and BULK_EXPRESS are only available with Perfect Plastic Printing\n\n### Returns\n\n- `{ token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n Represents a bulk order for physical card shipments\n\n - `token: string`\n - `card_tokens: string[]`\n - `created: string`\n - `customer_product_id: string`\n - `shipping_address: object`\n - `shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'`\n - `status: 'OPEN' | 'LOCKED'`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst cardBulkOrder = await client.cardBulkOrders.create({\n customer_product_id: 'custom-card-design-123',\n shipping_address: {\n address1: '123 Main Street',\n city: 'NEW YORK',\n country: 'USA',\n first_name: 'Johnny',\n last_name: 'Appleseed',\n postal_code: '10001',\n state: 'NY',\n},\n shipping_method: 'BULK_EXPEDITED',\n});\n\nconsole.log(cardBulkOrder);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/card_bulk_orders/{bulk_order_token}', + httpMethod: 'get', + summary: 'Get bulk order', + description: 'Retrieve a specific bulk order by token', + stainlessPath: '(resource) card_bulk_orders > (method) retrieve', + qualified: 'client.cardBulkOrders.retrieve', + params: ['bulk_order_token: string;'], + response: + "{ token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }", + markdown: + "## retrieve\n\n`client.cardBulkOrders.retrieve(bulk_order_token: string): { token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n\n**get** `/v1/card_bulk_orders/{bulk_order_token}`\n\nRetrieve a specific bulk order by token\n\n### Parameters\n\n- `bulk_order_token: string`\n\n### Returns\n\n- `{ token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n Represents a bulk order for physical card shipments\n\n - `token: string`\n - `card_tokens: string[]`\n - `created: string`\n - `customer_product_id: string`\n - `shipping_address: object`\n - `shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'`\n - `status: 'OPEN' | 'LOCKED'`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst cardBulkOrder = await client.cardBulkOrders.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(cardBulkOrder);\n```", + }, + { + name: 'update', + endpoint: '/v1/card_bulk_orders/{bulk_order_token}', + httpMethod: 'patch', + summary: 'Update bulk order', + description: + 'Update a bulk order. Primarily used to lock the order, preventing additional cards from being added', + stainlessPath: '(resource) card_bulk_orders > (method) update', + qualified: 'client.cardBulkOrders.update', + params: ['bulk_order_token: string;', "status: 'LOCKED';"], + response: + "{ token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }", + markdown: + "## update\n\n`client.cardBulkOrders.update(bulk_order_token: string, status: 'LOCKED'): { token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n\n**patch** `/v1/card_bulk_orders/{bulk_order_token}`\n\nUpdate a bulk order. Primarily used to lock the order, preventing additional cards from being added\n\n### Parameters\n\n- `bulk_order_token: string`\n\n- `status: 'LOCKED'`\n Status to update the bulk order to. Use LOCKED to finalize the order\n\n### Returns\n\n- `{ token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n Represents a bulk order for physical card shipments\n\n - `token: string`\n - `card_tokens: string[]`\n - `created: string`\n - `customer_product_id: string`\n - `shipping_address: object`\n - `shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'`\n - `status: 'OPEN' | 'LOCKED'`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst cardBulkOrder = await client.cardBulkOrders.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { status: 'LOCKED' });\n\nconsole.log(cardBulkOrder);\n```", + }, + { + name: 'list', + endpoint: '/v1/card_bulk_orders', + httpMethod: 'get', + summary: 'List bulk orders', + description: 'List bulk orders for physical card shipments', + stainlessPath: '(resource) card_bulk_orders > (method) list', + qualified: 'client.cardBulkOrders.list', + params: [ + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'page_size?: number;', + 'starting_after?: string;', + ], + response: + "{ token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }", + markdown: + "## list\n\n`client.cardBulkOrders.list(begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n\n**get** `/v1/card_bulk_orders`\n\nList bulk orders for physical card shipments\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n Represents a bulk order for physical card shipments\n\n - `token: string`\n - `card_tokens: string[]`\n - `created: string`\n - `customer_product_id: string`\n - `shipping_address: object`\n - `shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'`\n - `status: 'OPEN' | 'LOCKED'`\n - `updated: 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 cardBulkOrder of client.cardBulkOrders.list()) {\n console.log(cardBulkOrder);\n}\n```", + }, + { + name: 'list', + endpoint: '/v1/balances', + httpMethod: 'get', + summary: 'List balances', + description: 'Get the balances for a program, business, or a given end-user account', + stainlessPath: '(resource) balances > (method) list', + qualified: 'client.balances.list', + params: [ + 'account_token?: string;', + 'balance_date?: string;', + 'business_account_token?: string;', + "financial_account_type?: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY';", + ], + response: + "{ available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }", + markdown: + "## list\n\n`client.balances.list(account_token?: string, balance_date?: string, business_account_token?: string, financial_account_type?: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'): { available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }`\n\n**get** `/v1/balances`\n\nGet the balances for a program, business, or a given end-user account\n\n### Parameters\n\n- `account_token?: string`\n List balances for all financial accounts of a given account_token.\n\n- `balance_date?: string`\n UTC date and time of the balances to retrieve. Defaults to latest available balances\n\n- `business_account_token?: string`\n List balances for all financial accounts of a given business_account_token.\n\n- `financial_account_type?: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'`\n List balances for a given Financial Account type.\n\n### Returns\n\n- `{ available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }`\n Balance\n\n - `available_amount: number`\n - `created: string`\n - `currency: string`\n - `financial_account_token: string`\n - `financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'`\n - `last_transaction_event_token: string`\n - `last_transaction_token: string`\n - `pending_amount: number`\n - `total_amount: number`\n - `updated: 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 balance of client.balances.list()) {\n console.log(balance);\n}\n```", + }, + { + name: 'create', + endpoint: '/v1/disputes', + httpMethod: 'post', + summary: 'Request chargeback', + description: 'Request a chargeback.', + stainlessPath: '(resource) disputes > (method) create', + qualified: 'client.disputes.create', + params: [ + 'amount: number;', + 'reason: string;', + 'transaction_token: string;', + 'customer_filed_date?: string;', + 'customer_note?: string;', + ], + response: + '{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }', + markdown: + "## create\n\n`client.disputes.create(amount: number, reason: string, transaction_token: string, customer_filed_date?: string, customer_note?: string): { token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n\n**post** `/v1/disputes`\n\nRequest a chargeback.\n\n### Parameters\n\n- `amount: number`\n Amount for chargeback\n\n- `reason: string`\n Reason for chargeback\n\n- `transaction_token: string`\n Transaction for chargeback\n\n- `customer_filed_date?: string`\n Date the customer filed the chargeback request\n\n- `customer_note?: string`\n Customer description\n\n### Returns\n\n- `{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n Dispute.\n\n - `token: string`\n - `amount: number`\n - `arbitration_date: string`\n - `created: string`\n - `customer_filed_date: string`\n - `customer_note: string`\n - `network_claim_ids: string[]`\n - `network_filed_date: string`\n - `network_reason_code: string`\n - `prearbitration_date: string`\n - `primary_claim_id: string`\n - `reason: string`\n - `representment_date: string`\n - `resolution_date: string`\n - `resolution_note: string`\n - `resolution_reason: string`\n - `status: string`\n - `transaction_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst dispute = await client.disputes.create({\n amount: 10000,\n reason: 'FRAUD_CARD_PRESENT',\n transaction_token: '12345624-aa69-4cbc-a946-30d90181b621',\n});\n\nconsole.log(dispute);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/disputes/{dispute_token}', + httpMethod: 'get', + summary: 'Get chargeback request', + description: 'Get chargeback request.', + stainlessPath: '(resource) disputes > (method) retrieve', + qualified: 'client.disputes.retrieve', + params: ['dispute_token: string;'], + response: + '{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }', + markdown: + "## retrieve\n\n`client.disputes.retrieve(dispute_token: string): { token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n\n**get** `/v1/disputes/{dispute_token}`\n\nGet chargeback request.\n\n### Parameters\n\n- `dispute_token: string`\n\n### Returns\n\n- `{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n Dispute.\n\n - `token: string`\n - `amount: number`\n - `arbitration_date: string`\n - `created: string`\n - `customer_filed_date: string`\n - `customer_note: string`\n - `network_claim_ids: string[]`\n - `network_filed_date: string`\n - `network_reason_code: string`\n - `prearbitration_date: string`\n - `primary_claim_id: string`\n - `reason: string`\n - `representment_date: string`\n - `resolution_date: string`\n - `resolution_note: string`\n - `resolution_reason: string`\n - `status: string`\n - `transaction_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst dispute = await client.disputes.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(dispute);\n```", + }, + { + name: 'update', + endpoint: '/v1/disputes/{dispute_token}', + httpMethod: 'patch', + summary: 'Update chargeback request', + description: 'Update chargeback request. Can only be modified if status is `NEW`.', + stainlessPath: '(resource) disputes > (method) update', + qualified: 'client.disputes.update', + params: [ + 'dispute_token: string;', + 'amount?: number;', + 'customer_filed_date?: string;', + 'customer_note?: string;', + 'reason?: string;', + ], + response: + '{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }', + markdown: + "## update\n\n`client.disputes.update(dispute_token: string, amount?: number, customer_filed_date?: string, customer_note?: string, reason?: string): { token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n\n**patch** `/v1/disputes/{dispute_token}`\n\nUpdate chargeback request. Can only be modified if status is `NEW`.\n\n### Parameters\n\n- `dispute_token: string`\n\n- `amount?: number`\n Amount for chargeback\n\n- `customer_filed_date?: string`\n Date the customer filed the chargeback request\n\n- `customer_note?: string`\n Customer description\n\n- `reason?: string`\n Reason for chargeback\n\n### Returns\n\n- `{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n Dispute.\n\n - `token: string`\n - `amount: number`\n - `arbitration_date: string`\n - `created: string`\n - `customer_filed_date: string`\n - `customer_note: string`\n - `network_claim_ids: string[]`\n - `network_filed_date: string`\n - `network_reason_code: string`\n - `prearbitration_date: string`\n - `primary_claim_id: string`\n - `reason: string`\n - `representment_date: string`\n - `resolution_date: string`\n - `resolution_note: string`\n - `resolution_reason: string`\n - `status: string`\n - `transaction_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst dispute = await client.disputes.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(dispute);\n```", + }, + { + name: 'list', + endpoint: '/v1/disputes', + httpMethod: 'get', + summary: 'List chargeback requests', + description: 'List chargeback requests.', + stainlessPath: '(resource) disputes > (method) list', + qualified: 'client.disputes.list', + params: [ + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'page_size?: number;', + 'starting_after?: string;', + 'status?: string;', + 'transaction_tokens?: string[];', + ], + response: + '{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }', + markdown: + "## list\n\n`client.disputes.list(begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string, status?: string, transaction_tokens?: string[]): { token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n\n**get** `/v1/disputes`\n\nList chargeback requests.\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `status?: string`\n Filter by status.\n\n- `transaction_tokens?: string[]`\n Transaction tokens to filter by.\n\n### Returns\n\n- `{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n Dispute.\n\n - `token: string`\n - `amount: number`\n - `arbitration_date: string`\n - `created: string`\n - `customer_filed_date: string`\n - `customer_note: string`\n - `network_claim_ids: string[]`\n - `network_filed_date: string`\n - `network_reason_code: string`\n - `prearbitration_date: string`\n - `primary_claim_id: string`\n - `reason: string`\n - `representment_date: string`\n - `resolution_date: string`\n - `resolution_note: string`\n - `resolution_reason: string`\n - `status: string`\n - `transaction_token: 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 dispute of client.disputes.list()) {\n console.log(dispute);\n}\n```", + }, + { + name: 'delete', + endpoint: '/v1/disputes/{dispute_token}', + httpMethod: 'delete', + summary: 'Withdraw chargeback request', + description: 'Withdraw chargeback request.', + stainlessPath: '(resource) disputes > (method) delete', + qualified: 'client.disputes.delete', + params: ['dispute_token: string;'], + response: + '{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }', + markdown: + "## delete\n\n`client.disputes.delete(dispute_token: string): { token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n\n**delete** `/v1/disputes/{dispute_token}`\n\nWithdraw chargeback request.\n\n### Parameters\n\n- `dispute_token: string`\n\n### Returns\n\n- `{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n Dispute.\n\n - `token: string`\n - `amount: number`\n - `arbitration_date: string`\n - `created: string`\n - `customer_filed_date: string`\n - `customer_note: string`\n - `network_claim_ids: string[]`\n - `network_filed_date: string`\n - `network_reason_code: string`\n - `prearbitration_date: string`\n - `primary_claim_id: string`\n - `reason: string`\n - `representment_date: string`\n - `resolution_date: string`\n - `resolution_note: string`\n - `resolution_reason: string`\n - `status: string`\n - `transaction_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst dispute = await client.disputes.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(dispute);\n```", + }, + { + name: 'delete_evidence', + endpoint: '/v1/disputes/{dispute_token}/evidences/{evidence_token}', + httpMethod: 'delete', + summary: 'Delete evidence', + description: + 'Soft delete evidence for a chargeback request. Evidence will not be reviewed or submitted by Lithic after it is withdrawn.', + stainlessPath: '(resource) disputes > (method) delete_evidence', + qualified: 'client.disputes.deleteEvidence', + params: ['dispute_token: string;', 'evidence_token: string;'], + response: + "{ token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }", + markdown: + "## delete_evidence\n\n`client.disputes.deleteEvidence(dispute_token: string, evidence_token: string): { token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n\n**delete** `/v1/disputes/{dispute_token}/evidences/{evidence_token}`\n\nSoft delete evidence for a chargeback request. Evidence will not be reviewed or submitted by Lithic after it is withdrawn.\n\n### Parameters\n\n- `dispute_token: string`\n\n- `evidence_token: string`\n\n### Returns\n\n- `{ token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n Dispute evidence.\n\n - `token: string`\n - `created: string`\n - `dispute_token: string`\n - `upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'`\n - `download_url?: string`\n - `filename?: string`\n - `upload_url?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst disputeEvidence = await client.disputes.deleteEvidence('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { dispute_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(disputeEvidence);\n```", + }, + { + name: 'initiate_evidence_upload', + endpoint: '/v1/disputes/{dispute_token}/evidences', + httpMethod: 'post', + summary: 'Upload evidence', + description: + 'Use this endpoint to upload evidence for a chargeback request. It will return a URL to upload your documents to. The URL will expire in 30 minutes.\n\nUploaded documents must either be a `jpg`, `png` or `pdf` file, and each must be less than 5 GiB.\n', + stainlessPath: '(resource) disputes > (method) initiate_evidence_upload', + qualified: 'client.disputes.initiateEvidenceUpload', + params: ['dispute_token: string;', 'filename?: string;'], + response: + "{ token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }", + markdown: + "## initiate_evidence_upload\n\n`client.disputes.initiateEvidenceUpload(dispute_token: string, filename?: string): { token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n\n**post** `/v1/disputes/{dispute_token}/evidences`\n\nUse this endpoint to upload evidence for a chargeback request. It will return a URL to upload your documents to. The URL will expire in 30 minutes.\n\nUploaded documents must either be a `jpg`, `png` or `pdf` file, and each must be less than 5 GiB.\n\n\n### Parameters\n\n- `dispute_token: string`\n\n- `filename?: string`\n Filename of the evidence.\n\n### Returns\n\n- `{ token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n Dispute evidence.\n\n - `token: string`\n - `created: string`\n - `dispute_token: string`\n - `upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'`\n - `download_url?: string`\n - `filename?: string`\n - `upload_url?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst disputeEvidence = await client.disputes.initiateEvidenceUpload('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(disputeEvidence);\n```", + }, + { + name: 'list_evidences', + endpoint: '/v1/disputes/{dispute_token}/evidences', + httpMethod: 'get', + summary: 'List evidence', + description: 'List evidence for a chargeback request.', + stainlessPath: '(resource) disputes > (method) list_evidences', + qualified: 'client.disputes.listEvidences', + params: [ + 'dispute_token: string;', + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'page_size?: number;', + 'starting_after?: string;', + ], + response: + "{ token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }", + markdown: + "## list_evidences\n\n`client.disputes.listEvidences(dispute_token: string, begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n\n**get** `/v1/disputes/{dispute_token}/evidences`\n\nList evidence for a chargeback request.\n\n### Parameters\n\n- `dispute_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n Dispute evidence.\n\n - `token: string`\n - `created: string`\n - `dispute_token: string`\n - `upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'`\n - `download_url?: string`\n - `filename?: string`\n - `upload_url?: 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 disputeEvidence of client.disputes.listEvidences('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(disputeEvidence);\n}\n```", + }, + { + name: 'retrieve_evidence', + endpoint: '/v1/disputes/{dispute_token}/evidences/{evidence_token}', + httpMethod: 'get', + summary: 'Get evidence', + description: 'Get evidence for a chargeback request.', + stainlessPath: '(resource) disputes > (method) retrieve_evidence', + qualified: 'client.disputes.retrieveEvidence', + params: ['dispute_token: string;', 'evidence_token: string;'], + response: + "{ token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }", + markdown: + "## retrieve_evidence\n\n`client.disputes.retrieveEvidence(dispute_token: string, evidence_token: string): { token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n\n**get** `/v1/disputes/{dispute_token}/evidences/{evidence_token}`\n\nGet evidence for a chargeback request.\n\n### Parameters\n\n- `dispute_token: string`\n\n- `evidence_token: string`\n\n### Returns\n\n- `{ token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n Dispute evidence.\n\n - `token: string`\n - `created: string`\n - `dispute_token: string`\n - `upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'`\n - `download_url?: string`\n - `filename?: string`\n - `upload_url?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst disputeEvidence = await client.disputes.retrieveEvidence('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { dispute_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(disputeEvidence);\n```", + }, + { + name: 'retrieve', + endpoint: '/v2/disputes/{dispute_token}', + httpMethod: 'get', + summary: 'Retrieve a dispute', + description: 'Retrieves a specific dispute by its token.', + stainlessPath: '(resource) disputes_v2 > (method) retrieve', + qualified: 'client.disputesV2.retrieve', + params: ['dispute_token: string;'], + response: + "{ token: string; account_token: string; card_token: string; case_id: string; created: string; currency: string; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; events: { token: string; created: string; data: object | object | object; type: 'WORKFLOW' | 'FINANCIAL' | 'CARDHOLDER_LIABILITY'; }[]; liability_allocation: { denied_amount: number; original_amount: number; recovered_amount: number; remaining_amount: number; written_off_amount: number; }; merchant: object; network: 'VISA' | 'MASTERCARD'; status: 'OPEN' | 'CLOSED'; transaction_series: { related_transaction_event_token: string; related_transaction_token: string; type: 'DISPUTE'; }; updated: string; }", + markdown: + "## retrieve\n\n`client.disputesV2.retrieve(dispute_token: string): { token: string; account_token: string; card_token: string; case_id: string; created: string; currency: string; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; events: object[]; liability_allocation: object; merchant: merchant; network: 'VISA' | 'MASTERCARD'; status: 'OPEN' | 'CLOSED'; transaction_series: object; updated: string; }`\n\n**get** `/v2/disputes/{dispute_token}`\n\nRetrieves a specific dispute by its token.\n\n### Parameters\n\n- `dispute_token: string`\n\n### Returns\n\n- `{ token: string; account_token: string; card_token: string; case_id: string; created: string; currency: string; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; events: { token: string; created: string; data: { action: 'OPENED' | 'CLOSED' | 'REOPENED'; amount: number; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; reason: string; stage: 'CLAIM'; type: 'WORKFLOW'; } | { amount: number; polarity: 'CREDIT' | 'DEBIT'; stage: 'CHARGEBACK' | 'REPRESENTMENT' | 'PREARBITRATION' | 'ARBITRATION' | 'COLLABORATION'; type: 'FINANCIAL'; } | { action: 'PROVISIONAL_CREDIT_GRANTED' | 'PROVISIONAL_CREDIT_REVERSED' | 'WRITTEN_OFF'; amount: number; reason: string; type: 'CARDHOLDER_LIABILITY'; }; type: 'WORKFLOW' | 'FINANCIAL' | 'CARDHOLDER_LIABILITY'; }[]; liability_allocation: { denied_amount: number; original_amount: number; recovered_amount: number; remaining_amount: number; written_off_amount: number; }; merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }; network: 'VISA' | 'MASTERCARD'; status: 'OPEN' | 'CLOSED'; transaction_series: { related_transaction_event_token: string; related_transaction_token: string; type: 'DISPUTE'; }; updated: string; }`\n The Dispute object tracks the progression of a dispute throughout its lifecycle.\n\n - `token: string`\n - `account_token: string`\n - `card_token: string`\n - `case_id: string`\n - `created: string`\n - `currency: string`\n - `disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'`\n - `events: { token: string; created: string; data: { action: 'OPENED' | 'CLOSED' | 'REOPENED'; amount: number; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; reason: string; stage: 'CLAIM'; type: 'WORKFLOW'; } | { amount: number; polarity: 'CREDIT' | 'DEBIT'; stage: 'CHARGEBACK' | 'REPRESENTMENT' | 'PREARBITRATION' | 'ARBITRATION' | 'COLLABORATION'; type: 'FINANCIAL'; } | { action: 'PROVISIONAL_CREDIT_GRANTED' | 'PROVISIONAL_CREDIT_REVERSED' | 'WRITTEN_OFF'; amount: number; reason: string; type: 'CARDHOLDER_LIABILITY'; }; type: 'WORKFLOW' | 'FINANCIAL' | 'CARDHOLDER_LIABILITY'; }[]`\n - `liability_allocation: { denied_amount: number; original_amount: number; recovered_amount: number; remaining_amount: number; written_off_amount: number; }`\n - `merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }`\n - `network: 'VISA' | 'MASTERCARD'`\n - `status: 'OPEN' | 'CLOSED'`\n - `transaction_series: { related_transaction_event_token: string; related_transaction_token: string; type: 'DISPUTE'; }`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst disputeV2 = await client.disputesV2.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(disputeV2);\n```", + }, + { + name: 'list', + endpoint: '/v2/disputes', + httpMethod: 'get', + summary: 'List disputes', + description: 'Returns a paginated list of disputes.', + stainlessPath: '(resource) disputes_v2 > (method) list', + qualified: 'client.disputesV2.list', + params: [ + 'account_token?: string;', + 'begin?: string;', + 'card_token?: string;', + 'disputed_transaction_token?: string;', + 'end?: string;', + 'ending_before?: string;', + 'page_size?: number;', + 'starting_after?: string;', + ], + response: + "{ token: string; account_token: string; card_token: string; case_id: string; created: string; currency: string; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; events: { token: string; created: string; data: object | object | object; type: 'WORKFLOW' | 'FINANCIAL' | 'CARDHOLDER_LIABILITY'; }[]; liability_allocation: { denied_amount: number; original_amount: number; recovered_amount: number; remaining_amount: number; written_off_amount: number; }; merchant: object; network: 'VISA' | 'MASTERCARD'; status: 'OPEN' | 'CLOSED'; transaction_series: { related_transaction_event_token: string; related_transaction_token: string; type: 'DISPUTE'; }; updated: string; }", + markdown: + "## list\n\n`client.disputesV2.list(account_token?: string, begin?: string, card_token?: string, disputed_transaction_token?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; account_token: string; card_token: string; case_id: string; created: string; currency: string; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; events: object[]; liability_allocation: object; merchant: merchant; network: 'VISA' | 'MASTERCARD'; status: 'OPEN' | 'CLOSED'; transaction_series: object; updated: string; }`\n\n**get** `/v2/disputes`\n\nReturns a paginated list of disputes.\n\n### Parameters\n\n- `account_token?: string`\n Filter by account token.\n\n- `begin?: string`\n RFC 3339 timestamp for filtering by created date, inclusive.\n\n- `card_token?: string`\n Filter by card token.\n\n- `disputed_transaction_token?: string`\n Filter by the token of the transaction being disputed. Corresponds with transaction_series.related_transaction_token in the Dispute.\n\n- `end?: string`\n RFC 3339 timestamp for filtering by created date, inclusive.\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 Number of items to return.\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; card_token: string; case_id: string; created: string; currency: string; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; events: { token: string; created: string; data: { action: 'OPENED' | 'CLOSED' | 'REOPENED'; amount: number; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; reason: string; stage: 'CLAIM'; type: 'WORKFLOW'; } | { amount: number; polarity: 'CREDIT' | 'DEBIT'; stage: 'CHARGEBACK' | 'REPRESENTMENT' | 'PREARBITRATION' | 'ARBITRATION' | 'COLLABORATION'; type: 'FINANCIAL'; } | { action: 'PROVISIONAL_CREDIT_GRANTED' | 'PROVISIONAL_CREDIT_REVERSED' | 'WRITTEN_OFF'; amount: number; reason: string; type: 'CARDHOLDER_LIABILITY'; }; type: 'WORKFLOW' | 'FINANCIAL' | 'CARDHOLDER_LIABILITY'; }[]; liability_allocation: { denied_amount: number; original_amount: number; recovered_amount: number; remaining_amount: number; written_off_amount: number; }; merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }; network: 'VISA' | 'MASTERCARD'; status: 'OPEN' | 'CLOSED'; transaction_series: { related_transaction_event_token: string; related_transaction_token: string; type: 'DISPUTE'; }; updated: string; }`\n The Dispute object tracks the progression of a dispute throughout its lifecycle.\n\n - `token: string`\n - `account_token: string`\n - `card_token: string`\n - `case_id: string`\n - `created: string`\n - `currency: string`\n - `disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'`\n - `events: { token: string; created: string; data: { action: 'OPENED' | 'CLOSED' | 'REOPENED'; amount: number; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; reason: string; stage: 'CLAIM'; type: 'WORKFLOW'; } | { amount: number; polarity: 'CREDIT' | 'DEBIT'; stage: 'CHARGEBACK' | 'REPRESENTMENT' | 'PREARBITRATION' | 'ARBITRATION' | 'COLLABORATION'; type: 'FINANCIAL'; } | { action: 'PROVISIONAL_CREDIT_GRANTED' | 'PROVISIONAL_CREDIT_REVERSED' | 'WRITTEN_OFF'; amount: number; reason: string; type: 'CARDHOLDER_LIABILITY'; }; type: 'WORKFLOW' | 'FINANCIAL' | 'CARDHOLDER_LIABILITY'; }[]`\n - `liability_allocation: { denied_amount: number; original_amount: number; recovered_amount: number; remaining_amount: number; written_off_amount: number; }`\n - `merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }`\n - `network: 'VISA' | 'MASTERCARD'`\n - `status: 'OPEN' | 'CLOSED'`\n - `transaction_series: { related_transaction_event_token: string; related_transaction_token: string; type: 'DISPUTE'; }`\n - `updated: 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 disputeV2 of client.disputesV2.list()) {\n console.log(disputeV2);\n}\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/events/{event_token}', + httpMethod: 'get', + summary: 'Get event', + description: 'Get an event.', + stainlessPath: '(resource) events > (method) retrieve', + qualified: 'client.events.retrieve', + params: ['event_token: string;'], + response: '{ token: string; created: string; event_type: string; payload: object; }', + markdown: + "## retrieve\n\n`client.events.retrieve(event_token: string): { token: string; created: string; event_type: string; payload: object; }`\n\n**get** `/v1/events/{event_token}`\n\nGet an event.\n\n### Parameters\n\n- `event_token: string`\n\n### Returns\n\n- `{ token: string; created: string; event_type: string; payload: object; }`\n A single event that affects the transaction state and lifecycle.\n\n - `token: string`\n - `created: string`\n - `event_type: string`\n - `payload: object`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst event = await client.events.retrieve('event_token');\n\nconsole.log(event);\n```", + }, + { + name: 'list', + endpoint: '/v1/events', + httpMethod: 'get', + summary: 'List events', + description: 'List all events.', + stainlessPath: '(resource) events > (method) list', + qualified: 'client.events.list', + params: [ + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'event_types?: string[];', + 'page_size?: number;', + 'starting_after?: string;', + 'with_content?: boolean;', + ], + response: '{ token: string; created: string; event_type: string; payload: object; }', + markdown: + "## list\n\n`client.events.list(begin?: string, end?: string, ending_before?: string, event_types?: string[], page_size?: number, starting_after?: string, with_content?: boolean): { token: string; created: string; event_type: string; payload: object; }`\n\n**get** `/v1/events`\n\nList all events.\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `event_types?: string[]`\n Event types to filter events by.\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- `with_content?: boolean`\n Whether to include the event payload content in the response.\n\n### Returns\n\n- `{ token: string; created: string; event_type: string; payload: object; }`\n A single event that affects the transaction state and lifecycle.\n\n - `token: string`\n - `created: string`\n - `event_type: string`\n - `payload: object`\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 event of client.events.list()) {\n console.log(event);\n}\n```", + }, + { + name: 'list_attempts', + endpoint: '/v1/events/{event_token}/attempts', + httpMethod: 'get', + summary: 'List message attempts for an event', + description: 'List all the message attempts for a given event.', + stainlessPath: '(resource) events > (method) list_attempts', + qualified: 'client.events.listAttempts', + params: [ + 'event_token: string;', + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'page_size?: number;', + 'starting_after?: string;', + "status?: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS';", + ], + response: + "{ token: string; created: string; event_subscription_token: string; event_token: string; response: string; response_status_code: number; status: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'; url: string; }", + markdown: + "## list_attempts\n\n`client.events.listAttempts(event_token: string, begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string, status?: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'): { token: string; created: string; event_subscription_token: string; event_token: string; response: string; response_status_code: number; status: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'; url: string; }`\n\n**get** `/v1/events/{event_token}/attempts`\n\nList all the message attempts for a given event.\n\n### Parameters\n\n- `event_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `status?: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'`\n\n### Returns\n\n- `{ token: string; created: string; event_subscription_token: string; event_token: string; response: string; response_status_code: number; status: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'; url: string; }`\n A subscription to specific event types.\n\n - `token: string`\n - `created: string`\n - `event_subscription_token: string`\n - `event_token: string`\n - `response: string`\n - `response_status_code: number`\n - `status: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'`\n - `url: 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 messageAttempt of client.events.listAttempts('event_token')) {\n console.log(messageAttempt);\n}\n```", + }, + { + name: 'create', + endpoint: '/v1/event_subscriptions', + httpMethod: 'post', + summary: 'Create event subscription', + description: 'Create a new event subscription.', + stainlessPath: '(resource) events.subscriptions > (method) create', + qualified: 'client.events.subscriptions.create', + params: ['url: string;', 'description?: string;', 'disabled?: boolean;', 'event_types?: string[];'], + response: + '{ token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }', + markdown: + "## create\n\n`client.events.subscriptions.create(url: string, description?: string, disabled?: boolean, event_types?: string[]): { token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n\n**post** `/v1/event_subscriptions`\n\nCreate a new event subscription.\n\n### Parameters\n\n- `url: string`\n URL to which event webhooks will be sent. URL must be a valid HTTPS address.\n\n- `description?: string`\n Event subscription description.\n\n- `disabled?: boolean`\n Whether the event subscription is active (false) or inactive (true).\n\n- `event_types?: string[]`\n Indicates types of events that will be sent to this subscription. If left blank, all types will be sent.\n\n### Returns\n\n- `{ token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n A subscription to specific event types.\n\n - `token: string`\n - `description: string`\n - `disabled: boolean`\n - `url: string`\n - `event_types?: string[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst eventSubscription = await client.events.subscriptions.create({ url: 'https://example.com' });\n\nconsole.log(eventSubscription);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/event_subscriptions/{event_subscription_token}', + httpMethod: 'get', + summary: 'Get event subscription', + description: 'Get an event subscription.', + stainlessPath: '(resource) events.subscriptions > (method) retrieve', + qualified: 'client.events.subscriptions.retrieve', + params: ['event_subscription_token: string;'], + response: + '{ token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }', + markdown: + "## retrieve\n\n`client.events.subscriptions.retrieve(event_subscription_token: string): { token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n\n**get** `/v1/event_subscriptions/{event_subscription_token}`\n\nGet an event subscription.\n\n### Parameters\n\n- `event_subscription_token: string`\n\n### Returns\n\n- `{ token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n A subscription to specific event types.\n\n - `token: string`\n - `description: string`\n - `disabled: boolean`\n - `url: string`\n - `event_types?: string[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst eventSubscription = await client.events.subscriptions.retrieve('event_subscription_token');\n\nconsole.log(eventSubscription);\n```", + }, + { + name: 'update', + endpoint: '/v1/event_subscriptions/{event_subscription_token}', + httpMethod: 'patch', + summary: 'Update event subscription', + description: 'Update an event subscription.', + stainlessPath: '(resource) events.subscriptions > (method) update', + qualified: 'client.events.subscriptions.update', + params: [ + 'event_subscription_token: string;', + 'url: string;', + 'description?: string;', + 'disabled?: boolean;', + 'event_types?: string[];', + ], + response: + '{ token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }', + markdown: + "## update\n\n`client.events.subscriptions.update(event_subscription_token: string, url: string, description?: string, disabled?: boolean, event_types?: string[]): { token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n\n**patch** `/v1/event_subscriptions/{event_subscription_token}`\n\nUpdate an event subscription.\n\n### Parameters\n\n- `event_subscription_token: string`\n\n- `url: string`\n URL to which event webhooks will be sent. URL must be a valid HTTPS address.\n\n- `description?: string`\n Event subscription description.\n\n- `disabled?: boolean`\n Whether the event subscription is active (false) or inactive (true).\n\n- `event_types?: string[]`\n Indicates types of events that will be sent to this subscription. If left blank, all types will be sent.\n\n### Returns\n\n- `{ token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n A subscription to specific event types.\n\n - `token: string`\n - `description: string`\n - `disabled: boolean`\n - `url: string`\n - `event_types?: string[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst eventSubscription = await client.events.subscriptions.update('event_subscription_token', { url: 'https://example.com' });\n\nconsole.log(eventSubscription);\n```", + }, + { + name: 'list', + endpoint: '/v1/event_subscriptions', + httpMethod: 'get', + summary: 'List event subscriptions', + description: 'List all the event subscriptions.', + stainlessPath: '(resource) events.subscriptions > (method) list', + qualified: 'client.events.subscriptions.list', + params: ['ending_before?: string;', 'page_size?: number;', 'starting_after?: string;'], + response: + '{ token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }', + markdown: + "## list\n\n`client.events.subscriptions.list(ending_before?: string, page_size?: number, starting_after?: string): { token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n\n**get** `/v1/event_subscriptions`\n\nList all the event subscriptions.\n\n### Parameters\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; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n A subscription to specific event types.\n\n - `token: string`\n - `description: string`\n - `disabled: boolean`\n - `url: string`\n - `event_types?: 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 eventSubscription of client.events.subscriptions.list()) {\n console.log(eventSubscription);\n}\n```", + }, + { + name: 'delete', + endpoint: '/v1/event_subscriptions/{event_subscription_token}', + httpMethod: 'delete', + summary: 'Delete event subscription', + description: 'Delete an event subscription.', + stainlessPath: '(resource) events.subscriptions > (method) delete', + qualified: 'client.events.subscriptions.delete', + params: ['event_subscription_token: string;'], + markdown: + "## delete\n\n`client.events.subscriptions.delete(event_subscription_token: string): void`\n\n**delete** `/v1/event_subscriptions/{event_subscription_token}`\n\nDelete an event subscription.\n\n### Parameters\n\n- `event_subscription_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.events.subscriptions.delete('event_subscription_token')\n```", + }, + { + name: 'list_attempts', + endpoint: '/v1/event_subscriptions/{event_subscription_token}/attempts', + httpMethod: 'get', + summary: 'List message attempts for an event subscription', + description: 'List all the message attempts for a given event subscription.', + stainlessPath: '(resource) events.subscriptions > (method) list_attempts', + qualified: 'client.events.subscriptions.listAttempts', + params: [ + 'event_subscription_token: string;', + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'page_size?: number;', + 'starting_after?: string;', + "status?: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS';", + ], + response: + "{ token: string; created: string; event_subscription_token: string; event_token: string; response: string; response_status_code: number; status: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'; url: string; }", + markdown: + "## list_attempts\n\n`client.events.subscriptions.listAttempts(event_subscription_token: string, begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string, status?: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'): { token: string; created: string; event_subscription_token: string; event_token: string; response: string; response_status_code: number; status: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'; url: string; }`\n\n**get** `/v1/event_subscriptions/{event_subscription_token}/attempts`\n\nList all the message attempts for a given event subscription.\n\n### Parameters\n\n- `event_subscription_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `status?: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'`\n\n### Returns\n\n- `{ token: string; created: string; event_subscription_token: string; event_token: string; response: string; response_status_code: number; status: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'; url: string; }`\n A subscription to specific event types.\n\n - `token: string`\n - `created: string`\n - `event_subscription_token: string`\n - `event_token: string`\n - `response: string`\n - `response_status_code: number`\n - `status: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'`\n - `url: 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 messageAttempt of client.events.subscriptions.listAttempts('event_subscription_token')) {\n console.log(messageAttempt);\n}\n```", + }, + { + name: 'recover', + endpoint: '/v1/event_subscriptions/{event_subscription_token}/recover', + httpMethod: 'post', + summary: 'Resend failed messages', + description: 'Resend all failed messages since a given time.', + stainlessPath: '(resource) events.subscriptions > (method) recover', + qualified: 'client.events.subscriptions.recover', + params: ['event_subscription_token: string;', 'begin?: string;', 'end?: string;'], + markdown: + "## recover\n\n`client.events.subscriptions.recover(event_subscription_token: string, begin?: string, end?: string): void`\n\n**post** `/v1/event_subscriptions/{event_subscription_token}/recover`\n\nResend all failed messages since a given time.\n\n### Parameters\n\n- `event_subscription_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.events.subscriptions.recover('event_subscription_token')\n```", + }, + { + name: 'replay_missing', + endpoint: '/v1/event_subscriptions/{event_subscription_token}/replay_missing', + httpMethod: 'post', + summary: 'Replay missing messages', + description: + 'Replays messages to the endpoint. Only messages that were created after `begin` will be sent. Messages that were previously sent to the endpoint are not resent.\nMessage will be retried if endpoint responds with a non-2xx status code. See [Retry Schedule](https://docs.lithic.com/docs/events-api#retry-schedule) for details.\n', + stainlessPath: '(resource) events.subscriptions > (method) replay_missing', + qualified: 'client.events.subscriptions.replayMissing', + params: ['event_subscription_token: string;', 'begin?: string;', 'end?: string;'], + markdown: + "## replay_missing\n\n`client.events.subscriptions.replayMissing(event_subscription_token: string, begin?: string, end?: string): void`\n\n**post** `/v1/event_subscriptions/{event_subscription_token}/replay_missing`\n\nReplays messages to the endpoint. Only messages that were created after `begin` will be sent. Messages that were previously sent to the endpoint are not resent.\nMessage will be retried if endpoint responds with a non-2xx status code. See [Retry Schedule](https://docs.lithic.com/docs/events-api#retry-schedule) for details.\n\n\n### Parameters\n\n- `event_subscription_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.events.subscriptions.replayMissing('event_subscription_token')\n```", + }, + { + name: 'retrieve_secret', + endpoint: '/v1/event_subscriptions/{event_subscription_token}/secret', + httpMethod: 'get', + summary: 'Get event subscription secret', + description: 'Get the secret for an event subscription.', + stainlessPath: '(resource) events.subscriptions > (method) retrieve_secret', + qualified: 'client.events.subscriptions.retrieveSecret', + params: ['event_subscription_token: string;'], + response: '{ secret?: string; }', + markdown: + "## retrieve_secret\n\n`client.events.subscriptions.retrieveSecret(event_subscription_token: string): { secret?: string; }`\n\n**get** `/v1/event_subscriptions/{event_subscription_token}/secret`\n\nGet the secret for an event subscription.\n\n### Parameters\n\n- `event_subscription_token: string`\n\n### Returns\n\n- `{ secret?: string; }`\n\n - `secret?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.events.subscriptions.retrieveSecret('event_subscription_token');\n\nconsole.log(response);\n```", + }, + { + name: 'rotate_secret', + endpoint: '/v1/event_subscriptions/{event_subscription_token}/secret/rotate', + httpMethod: 'post', + summary: 'Rotate event subscription secret', + description: + 'Rotate the secret for an event subscription. The previous secret will be valid for the next 24 hours.\n', + stainlessPath: '(resource) events.subscriptions > (method) rotate_secret', + qualified: 'client.events.subscriptions.rotateSecret', + params: ['event_subscription_token: string;'], + markdown: + "## rotate_secret\n\n`client.events.subscriptions.rotateSecret(event_subscription_token: string): void`\n\n**post** `/v1/event_subscriptions/{event_subscription_token}/secret/rotate`\n\nRotate the secret for an event subscription. The previous secret will be valid for the next 24 hours.\n\n\n### Parameters\n\n- `event_subscription_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.events.subscriptions.rotateSecret('event_subscription_token')\n```", + }, + { + name: 'send_simulated_example', + endpoint: '/v1/simulate/event_subscriptions/{event_subscription_token}/send_example', + httpMethod: 'post', + summary: 'Send event type example message', + description: 'Send an example message for event.', + stainlessPath: '(resource) events.subscriptions > (method) send_simulated_example', + qualified: 'client.events.subscriptions.sendSimulatedExample', + params: ['event_subscription_token: string;', 'event_type?: string;'], + markdown: + "## send_simulated_example\n\n`client.events.subscriptions.sendSimulatedExample(event_subscription_token: string, event_type?: string): void`\n\n**post** `/v1/simulate/event_subscriptions/{event_subscription_token}/send_example`\n\nSend an example message for event.\n\n### Parameters\n\n- `event_subscription_token: string`\n\n- `event_type?: string`\n Event type to send example message for.\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.events.subscriptions.sendSimulatedExample('event_subscription_token')\n```", + }, + { + name: 'resend', + endpoint: '/v1/events/{event_token}/event_subscriptions/{event_subscription_token}/resend', + httpMethod: 'post', + summary: 'Resend event', + description: 'Resend an event to an event subscription.', + stainlessPath: '(resource) events.event_subscriptions > (method) resend', + qualified: 'client.events.eventSubscriptions.resend', + params: ['event_token: string;', 'event_subscription_token: string;'], + markdown: + "## resend\n\n`client.events.eventSubscriptions.resend(event_token: string, event_subscription_token: string): void`\n\n**post** `/v1/events/{event_token}/event_subscriptions/{event_subscription_token}/resend`\n\nResend an event to an event subscription.\n\n### Parameters\n\n- `event_token: string`\n\n- `event_subscription_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.events.eventSubscriptions.resend('event_subscription_token', { event_token: 'event_token' })\n```", + }, + { + name: 'create', + endpoint: '/v1/transfer', + httpMethod: 'post', + summary: 'Transfer funds within Lithic', + description: 'Transfer funds between two financial accounts or between a financial account and card', + stainlessPath: '(resource) transfers > (method) create', + qualified: 'client.transfers.create', + params: ['amount: number;', 'from: string;', 'to: string;', 'token?: string;', 'memo?: string;'], + response: + "{ token?: string; category?: 'TRANSFER'; created?: string; currency?: string; descriptor?: string; events?: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; from_balance?: { available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }[]; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; to_balance?: { available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }[]; updated?: string; }", + markdown: + "## create\n\n`client.transfers.create(amount: number, from: string, to: string, token?: string, memo?: string): { token?: string; category?: 'TRANSFER'; created?: string; currency?: string; descriptor?: string; events?: financial_event[]; from_balance?: balance[]; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; to_balance?: balance[]; updated?: string; }`\n\n**post** `/v1/transfer`\n\nTransfer funds between two financial accounts or between a financial account and card\n\n### Parameters\n\n- `amount: number`\n Amount to be transferred in the currency’s smallest unit (e.g., cents for USD). This should always be a positive value.\n\n- `from: string`\n Globally unique identifier for the financial account or card that will send the funds. Accepted type dependent on the program's use case.\n\n- `to: string`\n Globally unique identifier for the financial account or card that will receive the funds. Accepted type dependent on the program's use case.\n\n- `token?: string`\n Customer-provided token that will serve as an idempotency token. This token will become the transaction token.\n\n- `memo?: string`\n Optional descriptor for the transfer.\n\n### Returns\n\n- `{ token?: string; category?: 'TRANSFER'; created?: string; currency?: string; descriptor?: string; events?: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; from_balance?: { available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }[]; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; to_balance?: { available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }[]; updated?: string; }`\n\n - `token?: string`\n - `category?: 'TRANSFER'`\n - `created?: string`\n - `currency?: string`\n - `descriptor?: string`\n - `events?: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]`\n - `from_balance?: { available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }[]`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'`\n - `to_balance?: { available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }[]`\n - `updated?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst transfer = await client.transfers.create({\n amount: 0,\n from: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n to: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(transfer);\n```", + }, + { + name: 'create', + endpoint: '/v1/financial_accounts', + httpMethod: 'post', + summary: 'Create financial account', + description: 'Create a new financial account', + stainlessPath: '(resource) financial_accounts > (method) create', + qualified: 'client.financialAccounts.create', + params: [ + 'nickname: string;', + "type: 'OPERATING';", + 'account_token?: string;', + 'is_for_benefit_of?: boolean;', + 'Idempotency-Key?: string;', + ], + response: + "{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }", + markdown: + "## create\n\n`client.financialAccounts.create(nickname: string, type: 'OPERATING', account_token?: string, is_for_benefit_of?: boolean, Idempotency-Key?: string): { token: string; account_token: string; created: string; credit_configuration: object; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n**post** `/v1/financial_accounts`\n\nCreate a new financial account\n\n### Parameters\n\n- `nickname: string`\n\n- `type: 'OPERATING'`\n\n- `account_token?: string`\n\n- `is_for_benefit_of?: boolean`\n\n- `Idempotency-Key?: string`\n\n### Returns\n\n- `{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `created: string`\n - `credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n - `is_for_benefit_of: boolean`\n - `nickname: string`\n - `status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'`\n - `substatus: string`\n - `type: string`\n - `updated: string`\n - `user_defined_status: string`\n - `account_number?: string`\n - `routing_number?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialAccount = await client.financialAccounts.create({ nickname: 'nickname', type: 'OPERATING' });\n\nconsole.log(financialAccount);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/financial_accounts/{financial_account_token}', + httpMethod: 'get', + summary: 'Get financial account', + description: 'Get a financial account', + stainlessPath: '(resource) financial_accounts > (method) retrieve', + qualified: 'client.financialAccounts.retrieve', + params: ['financial_account_token: string;'], + response: + "{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }", + markdown: + "## retrieve\n\n`client.financialAccounts.retrieve(financial_account_token: string): { token: string; account_token: string; created: string; credit_configuration: object; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}`\n\nGet a financial account\n\n### Parameters\n\n- `financial_account_token: string`\n\n### Returns\n\n- `{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `created: string`\n - `credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n - `is_for_benefit_of: boolean`\n - `nickname: string`\n - `status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'`\n - `substatus: string`\n - `type: string`\n - `updated: string`\n - `user_defined_status: string`\n - `account_number?: string`\n - `routing_number?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialAccount = await client.financialAccounts.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(financialAccount);\n```", + }, + { + name: 'update', + endpoint: '/v1/financial_accounts/{financial_account_token}', + httpMethod: 'patch', + summary: 'Update financial account', + description: 'Update a financial account', + stainlessPath: '(resource) financial_accounts > (method) update', + qualified: 'client.financialAccounts.update', + params: ['financial_account_token: string;', 'nickname?: string;'], + response: + "{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }", + markdown: + "## update\n\n`client.financialAccounts.update(financial_account_token: string, nickname?: string): { token: string; account_token: string; created: string; credit_configuration: object; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n**patch** `/v1/financial_accounts/{financial_account_token}`\n\nUpdate a financial account\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `nickname?: string`\n\n### Returns\n\n- `{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `created: string`\n - `credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n - `is_for_benefit_of: boolean`\n - `nickname: string`\n - `status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'`\n - `substatus: string`\n - `type: string`\n - `updated: string`\n - `user_defined_status: string`\n - `account_number?: string`\n - `routing_number?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialAccount = await client.financialAccounts.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(financialAccount);\n```", + }, + { + name: 'list', + endpoint: '/v1/financial_accounts', + httpMethod: 'get', + summary: 'List financial accounts', + description: 'Retrieve information on your financial accounts including routing and account number.', + stainlessPath: '(resource) financial_accounts > (method) list', + qualified: 'client.financialAccounts.list', + params: [ + 'account_token?: string;', + 'business_account_token?: string;', + "type?: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY' | 'EARLY_DIRECT_DEPOSIT_FLOAT';", + ], + response: + "{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }", + markdown: + "## list\n\n`client.financialAccounts.list(account_token?: string, business_account_token?: string, type?: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY' | 'EARLY_DIRECT_DEPOSIT_FLOAT'): { token: string; account_token: string; created: string; credit_configuration: object; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n**get** `/v1/financial_accounts`\n\nRetrieve information on your financial accounts including routing and account number.\n\n### Parameters\n\n- `account_token?: string`\n List financial accounts for a given account_token or business_account_token\n\n- `business_account_token?: string`\n List financial accounts for a given business_account_token\n\n- `type?: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY' | 'EARLY_DIRECT_DEPOSIT_FLOAT'`\n List financial accounts of a given type\n\n### Returns\n\n- `{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `created: string`\n - `credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n - `is_for_benefit_of: boolean`\n - `nickname: string`\n - `status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'`\n - `substatus: string`\n - `type: string`\n - `updated: string`\n - `user_defined_status: string`\n - `account_number?: string`\n - `routing_number?: 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 financialAccount of client.financialAccounts.list()) {\n console.log(financialAccount);\n}\n```", + }, + { + name: 'register_account_number', + endpoint: '/v1/financial_accounts/{financial_account_token}/register_account_number', + httpMethod: 'post', + summary: 'Register Account Number', + description: 'Register account number', + stainlessPath: '(resource) financial_accounts > (method) register_account_number', + qualified: 'client.financialAccounts.registerAccountNumber', + params: ['financial_account_token: string;', 'account_number: string;'], + markdown: + "## register_account_number\n\n`client.financialAccounts.registerAccountNumber(financial_account_token: string, account_number: string): void`\n\n**post** `/v1/financial_accounts/{financial_account_token}/register_account_number`\n\nRegister account number\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `account_number: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.financialAccounts.registerAccountNumber('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_number: 'account_number' })\n```", + }, + { + name: 'update_status', + endpoint: '/v1/financial_accounts/{financial_account_token}/update_status', + httpMethod: 'post', + summary: 'Update financial account status', + description: 'Update financial account status', + stainlessPath: '(resource) financial_accounts > (method) update_status', + qualified: 'client.financialAccounts.updateStatus', + params: [ + 'financial_account_token: string;', + "status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING';", + 'substatus: string;', + 'user_defined_status?: string;', + ], + response: + "{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }", + markdown: + "## update_status\n\n`client.financialAccounts.updateStatus(financial_account_token: string, status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING', substatus: string, user_defined_status?: string): { token: string; account_token: string; created: string; credit_configuration: object; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n**post** `/v1/financial_accounts/{financial_account_token}/update_status`\n\nUpdate financial account status\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'`\n Status of the financial account\n\n- `substatus: string`\n Substatus for the financial account\n\n- `user_defined_status?: string`\n User-defined status for the financial account\n\n### Returns\n\n- `{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `created: string`\n - `credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n - `is_for_benefit_of: boolean`\n - `nickname: string`\n - `status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'`\n - `substatus: string`\n - `type: string`\n - `updated: string`\n - `user_defined_status: string`\n - `account_number?: string`\n - `routing_number?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialAccount = await client.financialAccounts.updateStatus('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { status: 'OPEN', substatus: 'CHARGED_OFF_FRAUD' });\n\nconsole.log(financialAccount);\n```", + }, + { + name: 'list', + endpoint: '/v1/financial_accounts/{financial_account_token}/balances', + httpMethod: 'get', + summary: 'Get balances', + description: 'Get the balances for a given financial account.', + stainlessPath: '(resource) financial_accounts.balances > (method) list', + qualified: 'client.financialAccounts.balances.list', + params: [ + 'financial_account_token: string;', + 'balance_date?: string;', + 'last_transaction_event_token?: string;', + ], + response: + "{ token: string; available_amount: number; created: string; currency: string; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; updated: string; }", + markdown: + "## list\n\n`client.financialAccounts.balances.list(financial_account_token: string, balance_date?: string, last_transaction_event_token?: string): { token: string; available_amount: number; created: string; currency: string; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; updated: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/balances`\n\nGet the balances for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `balance_date?: string`\n UTC date of the balance to retrieve. Defaults to latest available balance\n\n- `last_transaction_event_token?: string`\n Balance after a given financial event occured.\nFor example, passing the event_token of a $5 CARD_CLEARING financial event will return a balance decreased by $5\n\n\n### Returns\n\n- `{ token: string; available_amount: number; created: string; currency: string; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; updated: string; }`\n Balance of a Financial Account\n\n - `token: string`\n - `available_amount: number`\n - `created: string`\n - `currency: string`\n - `last_transaction_event_token: string`\n - `last_transaction_token: string`\n - `pending_amount: number`\n - `total_amount: number`\n - `type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'`\n - `updated: 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 financialAccountBalance of client.financialAccounts.balances.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(financialAccountBalance);\n}\n```", + }, + { + name: 'retrieve', + endpoint: + '/v1/financial_accounts/{financial_account_token}/financial_transactions/{financial_transaction_token}', + httpMethod: 'get', + summary: 'Get financial transaction', + description: 'Get the financial transaction for the provided token.', + stainlessPath: '(resource) financial_accounts.financial_transactions > (method) retrieve', + qualified: 'client.financialAccounts.financialTransactions.retrieve', + params: ['financial_account_token: string;', 'financial_transaction_token: string;'], + response: + "{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }", + markdown: + "## retrieve\n\n`client.financialAccounts.financialTransactions.retrieve(financial_account_token: string, financial_transaction_token: string): { token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: financial_event[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/financial_transactions/{financial_transaction_token}`\n\nGet the financial transaction for the provided token.\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `financial_transaction_token: string`\n\n### Returns\n\n- `{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n - `token: string`\n - `category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'`\n - `created: string`\n - `currency: string`\n - `descriptor: string`\n - `events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialTransaction = await client.financialAccounts.financialTransactions.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(financialTransaction);\n```", + }, + { + name: 'list', + endpoint: '/v1/financial_accounts/{financial_account_token}/financial_transactions', + httpMethod: 'get', + summary: 'List financial transactions', + description: 'List the financial transactions for a given financial account.', + stainlessPath: '(resource) financial_accounts.financial_transactions > (method) list', + qualified: 'client.financialAccounts.financialTransactions.list', + params: [ + 'financial_account_token: string;', + 'begin?: string;', + "category?: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER';", + 'end?: string;', + 'ending_before?: string;', + "result?: 'APPROVED' | 'DECLINED';", + 'starting_after?: string;', + "status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED';", + ], + response: + "{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }", + markdown: + "## list\n\n`client.financialAccounts.financialTransactions.list(financial_account_token: string, begin?: string, category?: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER', end?: string, ending_before?: string, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'): { token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: financial_event[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/financial_transactions`\n\nList the financial transactions for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `category?: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'`\n Financial Transaction category to be returned.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `result?: 'APPROVED' | 'DECLINED'`\n Financial Transaction result to be returned.\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- `status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'`\n Financial Transaction status to be returned.\n\n### Returns\n\n- `{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n - `token: string`\n - `category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'`\n - `created: string`\n - `currency: string`\n - `descriptor: string`\n - `events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'`\n - `updated: 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 financialTransaction of client.financialAccounts.financialTransactions.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(financialTransaction);\n}\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/financial_accounts/{financial_account_token}/credit_configuration', + httpMethod: 'get', + summary: 'Get account credit configuration', + description: "Get an Account's credit configuration", + stainlessPath: '(resource) financial_accounts.credit_configuration > (method) retrieve', + qualified: 'client.financialAccounts.creditConfiguration.retrieve', + params: ['financial_account_token: string;'], + response: + '{ account_token: string; auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }', + markdown: + "## retrieve\n\n`client.financialAccounts.creditConfiguration.retrieve(financial_account_token: string): { account_token: string; auto_collection_configuration: object; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/credit_configuration`\n\nGet an Account's credit configuration\n\n### Parameters\n\n- `financial_account_token: string`\n\n### Returns\n\n- `{ account_token: string; auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n\n - `account_token: string`\n - `auto_collection_configuration: { auto_collection_enabled: boolean; }`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `external_bank_account_token: string`\n - `tier: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialAccountCreditConfig = await client.financialAccounts.creditConfiguration.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(financialAccountCreditConfig);\n```", + }, + { + name: 'update', + endpoint: '/v1/financial_accounts/{financial_account_token}/credit_configuration', + httpMethod: 'patch', + summary: 'Update account credit configuration', + description: "Update an account's credit configuration", + stainlessPath: '(resource) financial_accounts.credit_configuration > (method) update', + qualified: 'client.financialAccounts.creditConfiguration.update', + params: [ + 'financial_account_token: string;', + 'auto_collection_configuration?: { auto_collection_enabled?: boolean; };', + 'credit_limit?: number;', + 'credit_product_token?: string;', + 'external_bank_account_token?: string;', + 'tier?: string;', + ], + response: + '{ account_token: string; auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }', + markdown: + "## update\n\n`client.financialAccounts.creditConfiguration.update(financial_account_token: string, auto_collection_configuration?: { auto_collection_enabled?: boolean; }, credit_limit?: number, credit_product_token?: string, external_bank_account_token?: string, tier?: string): { account_token: string; auto_collection_configuration: object; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n\n**patch** `/v1/financial_accounts/{financial_account_token}/credit_configuration`\n\nUpdate an account's credit configuration\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `auto_collection_configuration?: { auto_collection_enabled?: boolean; }`\n - `auto_collection_enabled?: boolean`\n If auto collection is enabled for this account\n\n- `credit_limit?: number`\n\n- `credit_product_token?: string`\n Globally unique identifier for the credit product\n\n- `external_bank_account_token?: string`\n\n- `tier?: string`\n Tier to assign to a financial account\n\n### Returns\n\n- `{ account_token: string; auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n\n - `account_token: string`\n - `auto_collection_configuration: { auto_collection_enabled: boolean; }`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `external_bank_account_token: string`\n - `tier: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialAccountCreditConfig = await client.financialAccounts.creditConfiguration.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(financialAccountCreditConfig);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/financial_accounts/{financial_account_token}/statements/{statement_token}', + httpMethod: 'get', + summary: 'Get statement by token', + description: 'Get a specific statement for a given financial account.', + stainlessPath: '(resource) financial_accounts.statements > (method) retrieve', + qualified: 'client.financialAccounts.statements.retrieve', + params: ['financial_account_token: string;', 'statement_token: string;'], + response: + "{ token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; }", + markdown: + "## retrieve\n\n`client.financialAccounts.statements.retrieve(financial_account_token: string, statement_token: string): { token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/statements/{statement_token}`\n\nGet a specific statement for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n- `statement_token: string`\n Globally unique identifier for statements.\n\n### Returns\n\n- `{ token: string; account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }; amount_due: { amount: number; past_due: number; }; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; interest_details?: { actual_interest_charged: number; daily_balance_amounts: object; effective_apr: object; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: object; prime_rate: string; minimum_interest_charged?: number; }; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }; }`\n\n - `token: string`\n - `account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }`\n - `amount_due: { amount: number; past_due: number; }`\n - `available_credit: number`\n - `created: string`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `days_in_billing_cycle: number`\n - `ending_balance: number`\n - `financial_account_token: string`\n - `payment_due_date: string`\n - `period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `starting_balance: number`\n - `statement_end_date: string`\n - `statement_start_date: string`\n - `statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'`\n - `updated: string`\n - `ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `interest_details?: { actual_interest_charged: number; daily_balance_amounts: { balance_transfers: string; cash_advances: string; purchases: string; }; effective_apr: { balance_transfers: string; cash_advances: string; purchases: string; }; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: { balance_transfers: string; cash_advances: string; purchases: string; }; prime_rate: string; minimum_interest_charged?: number; }`\n - `next_payment_due_date?: string`\n - `next_statement_end_date?: string`\n - `payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst statement = await client.financialAccounts.statements.retrieve('statement_token', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(statement);\n```", + }, + { + name: 'list', + endpoint: '/v1/financial_accounts/{financial_account_token}/statements', + httpMethod: 'get', + summary: 'List statements', + description: 'List the statements for a given financial account.', + stainlessPath: '(resource) financial_accounts.statements > (method) list', + qualified: 'client.financialAccounts.statements.list', + params: [ + 'financial_account_token: string;', + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'include_initial_statements?: boolean;', + 'page_size?: number;', + 'starting_after?: string;', + ], + response: + "{ token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; }", + markdown: + "## list\n\n`client.financialAccounts.statements.list(financial_account_token: string, begin?: string, end?: string, ending_before?: string, include_initial_statements?: boolean, page_size?: number, starting_after?: string): { token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/statements`\n\nList the statements for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified date will be included.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified date will be included.\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- `include_initial_statements?: boolean`\n Whether to include the initial statement. It is not included by default.\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_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }; amount_due: { amount: number; past_due: number; }; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; interest_details?: { actual_interest_charged: number; daily_balance_amounts: object; effective_apr: object; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: object; prime_rate: string; minimum_interest_charged?: number; }; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }; }`\n\n - `token: string`\n - `account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }`\n - `amount_due: { amount: number; past_due: number; }`\n - `available_credit: number`\n - `created: string`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `days_in_billing_cycle: number`\n - `ending_balance: number`\n - `financial_account_token: string`\n - `payment_due_date: string`\n - `period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `starting_balance: number`\n - `statement_end_date: string`\n - `statement_start_date: string`\n - `statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'`\n - `updated: string`\n - `ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `interest_details?: { actual_interest_charged: number; daily_balance_amounts: { balance_transfers: string; cash_advances: string; purchases: string; }; effective_apr: { balance_transfers: string; cash_advances: string; purchases: string; }; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: { balance_transfers: string; cash_advances: string; purchases: string; }; prime_rate: string; minimum_interest_charged?: number; }`\n - `next_payment_due_date?: string`\n - `next_statement_end_date?: string`\n - `payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }`\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 statement of client.financialAccounts.statements.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(statement);\n}\n```", + }, + { + name: 'list', + endpoint: '/v1/financial_accounts/{financial_account_token}/statements/{statement_token}/line_items', + httpMethod: 'get', + summary: 'List line items for a statement', + description: 'List the line items for a given statement within a given financial account.', + stainlessPath: '(resource) financial_accounts.statements.line_items > (method) list', + qualified: 'client.financialAccounts.statements.lineItems.list', + params: [ + 'financial_account_token: string;', + 'statement_token: string;', + 'ending_before?: string;', + 'page_size?: number;', + 'starting_after?: string;', + ], + response: + '{ token: string; amount: number; category: string; created: string; currency: string; effective_date: string; event_type: string; financial_account_token: string; financial_transaction_event_token: string; financial_transaction_token: string; card_token?: string; descriptor?: string; event_subtype?: string; loan_tape_date?: string; }', + markdown: + "## list\n\n`client.financialAccounts.statements.lineItems.list(financial_account_token: string, statement_token: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; amount: number; category: string; created: string; currency: string; effective_date: string; event_type: string; financial_account_token: string; financial_transaction_event_token: string; financial_transaction_token: string; card_token?: string; descriptor?: string; event_subtype?: string; loan_tape_date?: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/statements/{statement_token}/line_items`\n\nList the line items for a given statement within a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n- `statement_token: string`\n Globally unique identifier for statements.\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; amount: number; category: string; created: string; currency: string; effective_date: string; event_type: string; financial_account_token: string; financial_transaction_event_token: string; financial_transaction_token: string; card_token?: string; descriptor?: string; event_subtype?: string; loan_tape_date?: string; }`\n\n - `token: string`\n - `amount: number`\n - `category: string`\n - `created: string`\n - `currency: string`\n - `effective_date: string`\n - `event_type: string`\n - `financial_account_token: string`\n - `financial_transaction_event_token: string`\n - `financial_transaction_token: string`\n - `card_token?: string`\n - `descriptor?: string`\n - `event_subtype?: string`\n - `loan_tape_date?: 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 lineItem of client.financialAccounts.statements.lineItems.list('statement_token', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' })) {\n console.log(lineItem);\n}\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/financial_accounts/{financial_account_token}/loan_tapes/{loan_tape_token}', + httpMethod: 'get', + summary: 'Get loan tape by token', + description: 'Get a specific loan tape for a given financial account.', + stainlessPath: '(resource) financial_accounts.loan_tapes > (method) retrieve', + qualified: 'client.financialAccounts.loanTapes.retrieve', + params: ['financial_account_token: string;', 'loan_tape_token: string;'], + response: + '{ token: string; account_standing: object; available_credit: number; balances: object; created: string; credit_limit: number; credit_product_token: string; date: string; day_totals: statement_totals; ending_balance: number; excess_credits: number; financial_account_token: string; interest_details: object; minimum_payment_balance: object; payment_allocation: object; period_totals: statement_totals; previous_statement_balance: object; starting_balance: number; updated: string; version: number; ytd_totals: statement_totals; tier?: string; }', + markdown: + "## retrieve\n\n`client.financialAccounts.loanTapes.retrieve(financial_account_token: string, loan_tape_token: string): { token: string; account_standing: object; available_credit: number; balances: object; created: string; credit_limit: number; credit_product_token: string; date: string; day_totals: statement_totals; ending_balance: number; excess_credits: number; financial_account_token: string; interest_details: object; minimum_payment_balance: object; payment_allocation: object; period_totals: statement_totals; previous_statement_balance: object; starting_balance: number; updated: string; version: number; ytd_totals: statement_totals; tier?: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/loan_tapes/{loan_tape_token}`\n\nGet a specific loan tape for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n- `loan_tape_token: string`\n Globally unique identifier for loan tape.\n\n### Returns\n\n- `{ token: string; account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }; available_credit: number; balances: { due: object; next_statement_due: object; past_due: object; past_statements_due: object; }; created: string; credit_limit: number; credit_product_token: string; date: string; day_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; ending_balance: number; excess_credits: number; financial_account_token: string; interest_details: { actual_interest_charged: number; daily_balance_amounts: object; effective_apr: object; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: object; prime_rate: string; minimum_interest_charged?: number; }; minimum_payment_balance: { amount: number; remaining: number; }; payment_allocation: { fee_details: object; fees: number; interest: number; interest_details: object; principal: number; principal_details: object; }; period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; previous_statement_balance: { amount: number; remaining: number; }; starting_balance: number; updated: string; version: number; ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; tier?: string; }`\n\n - `token: string`\n - `account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }`\n - `available_credit: number`\n - `balances: { due: { fees: number; interest: number; principal: number; }; next_statement_due: { fees: number; interest: number; principal: number; }; past_due: { fees: number; interest: number; principal: number; }; past_statements_due: { fees: number; interest: number; principal: number; }; }`\n - `created: string`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `date: string`\n - `day_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `ending_balance: number`\n - `excess_credits: number`\n - `financial_account_token: string`\n - `interest_details: { actual_interest_charged: number; daily_balance_amounts: { balance_transfers: string; cash_advances: string; purchases: string; }; effective_apr: { balance_transfers: string; cash_advances: string; purchases: string; }; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: { balance_transfers: string; cash_advances: string; purchases: string; }; prime_rate: string; minimum_interest_charged?: number; }`\n - `minimum_payment_balance: { amount: number; remaining: number; }`\n - `payment_allocation: { fee_details: { balance_transfers: string; cash_advances: string; purchases: string; }; fees: number; interest: number; interest_details: { balance_transfers: string; cash_advances: string; purchases: string; }; principal: number; principal_details: { balance_transfers: string; cash_advances: string; purchases: string; }; }`\n - `period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `previous_statement_balance: { amount: number; remaining: number; }`\n - `starting_balance: number`\n - `updated: string`\n - `version: number`\n - `ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `tier?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst loanTape = await client.financialAccounts.loanTapes.retrieve('loan_tape_token', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(loanTape);\n```", + }, + { + name: 'list', + endpoint: '/v1/financial_accounts/{financial_account_token}/loan_tapes', + httpMethod: 'get', + summary: 'List loan tapes', + description: 'List the loan tapes for a given financial account.', + stainlessPath: '(resource) financial_accounts.loan_tapes > (method) list', + qualified: 'client.financialAccounts.loanTapes.list', + params: [ + 'financial_account_token: string;', + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'page_size?: number;', + 'starting_after?: string;', + ], + response: + '{ token: string; account_standing: object; available_credit: number; balances: object; created: string; credit_limit: number; credit_product_token: string; date: string; day_totals: statement_totals; ending_balance: number; excess_credits: number; financial_account_token: string; interest_details: object; minimum_payment_balance: object; payment_allocation: object; period_totals: statement_totals; previous_statement_balance: object; starting_balance: number; updated: string; version: number; ytd_totals: statement_totals; tier?: string; }', + markdown: + "## list\n\n`client.financialAccounts.loanTapes.list(financial_account_token: string, begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; account_standing: object; available_credit: number; balances: object; created: string; credit_limit: number; credit_product_token: string; date: string; day_totals: statement_totals; ending_balance: number; excess_credits: number; financial_account_token: string; interest_details: object; minimum_payment_balance: object; payment_allocation: object; period_totals: statement_totals; previous_statement_balance: object; starting_balance: number; updated: string; version: number; ytd_totals: statement_totals; tier?: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/loan_tapes`\n\nList the loan tapes for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified date will be included.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified date will be included.\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_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }; available_credit: number; balances: { due: object; next_statement_due: object; past_due: object; past_statements_due: object; }; created: string; credit_limit: number; credit_product_token: string; date: string; day_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; ending_balance: number; excess_credits: number; financial_account_token: string; interest_details: { actual_interest_charged: number; daily_balance_amounts: object; effective_apr: object; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: object; prime_rate: string; minimum_interest_charged?: number; }; minimum_payment_balance: { amount: number; remaining: number; }; payment_allocation: { fee_details: object; fees: number; interest: number; interest_details: object; principal: number; principal_details: object; }; period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; previous_statement_balance: { amount: number; remaining: number; }; starting_balance: number; updated: string; version: number; ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; tier?: string; }`\n\n - `token: string`\n - `account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }`\n - `available_credit: number`\n - `balances: { due: { fees: number; interest: number; principal: number; }; next_statement_due: { fees: number; interest: number; principal: number; }; past_due: { fees: number; interest: number; principal: number; }; past_statements_due: { fees: number; interest: number; principal: number; }; }`\n - `created: string`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `date: string`\n - `day_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `ending_balance: number`\n - `excess_credits: number`\n - `financial_account_token: string`\n - `interest_details: { actual_interest_charged: number; daily_balance_amounts: { balance_transfers: string; cash_advances: string; purchases: string; }; effective_apr: { balance_transfers: string; cash_advances: string; purchases: string; }; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: { balance_transfers: string; cash_advances: string; purchases: string; }; prime_rate: string; minimum_interest_charged?: number; }`\n - `minimum_payment_balance: { amount: number; remaining: number; }`\n - `payment_allocation: { fee_details: { balance_transfers: string; cash_advances: string; purchases: string; }; fees: number; interest: number; interest_details: { balance_transfers: string; cash_advances: string; purchases: string; }; principal: number; principal_details: { balance_transfers: string; cash_advances: string; purchases: string; }; }`\n - `period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `previous_statement_balance: { amount: number; remaining: number; }`\n - `starting_balance: number`\n - `updated: string`\n - `version: number`\n - `ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `tier?: 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 loanTape of client.financialAccounts.loanTapes.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(loanTape);\n}\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/financial_accounts/{financial_account_token}/loan_tape_configuration', + httpMethod: 'get', + summary: 'Get loan tape configuration', + description: 'Get the loan tape configuration for a given financial account.', + stainlessPath: '(resource) financial_accounts.loan_tape_configuration > (method) retrieve', + qualified: 'client.financialAccounts.loanTapeConfiguration.retrieve', + params: ['financial_account_token: string;'], + response: + '{ created_at: string; financial_account_token: string; instance_token: string; updated_at: string; credit_product_token?: string; loan_tape_rebuild_configuration?: { rebuild_needed: boolean; last_rebuild?: string; rebuild_from?: string; }; tier_schedule_changed_at?: string; }', + markdown: + "## retrieve\n\n`client.financialAccounts.loanTapeConfiguration.retrieve(financial_account_token: string): { created_at: string; financial_account_token: string; instance_token: string; updated_at: string; credit_product_token?: string; loan_tape_rebuild_configuration?: loan_tape_rebuild_configuration; tier_schedule_changed_at?: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/loan_tape_configuration`\n\nGet the loan tape configuration for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n### Returns\n\n- `{ created_at: string; financial_account_token: string; instance_token: string; updated_at: string; credit_product_token?: string; loan_tape_rebuild_configuration?: { rebuild_needed: boolean; last_rebuild?: string; rebuild_from?: string; }; tier_schedule_changed_at?: string; }`\n Configuration for loan tapes\n\n - `created_at: string`\n - `financial_account_token: string`\n - `instance_token: string`\n - `updated_at: string`\n - `credit_product_token?: string`\n - `loan_tape_rebuild_configuration?: { rebuild_needed: boolean; last_rebuild?: string; rebuild_from?: string; }`\n - `tier_schedule_changed_at?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst loanTapeConfiguration = await client.financialAccounts.loanTapeConfiguration.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(loanTapeConfiguration);\n```", + }, + { + name: 'create', + endpoint: '/v1/financial_accounts/{financial_account_token}/interest_tier_schedule', + httpMethod: 'post', + summary: 'Create interest tier schedule', + description: 'Create a new interest tier schedule entry for a supported financial account', + stainlessPath: '(resource) financial_accounts.interest_tier_schedule > (method) create', + qualified: 'client.financialAccounts.interestTierSchedule.create', + params: [ + 'financial_account_token: string;', + 'credit_product_token: string;', + 'effective_date: string;', + 'penalty_rates?: object;', + 'tier_name?: string;', + 'tier_rates?: object;', + ], + response: + '{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }', + markdown: + "## create\n\n`client.financialAccounts.interestTierSchedule.create(financial_account_token: string, credit_product_token: string, effective_date: string, penalty_rates?: object, tier_name?: string, tier_rates?: object): { credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n\n**post** `/v1/financial_accounts/{financial_account_token}/interest_tier_schedule`\n\nCreate a new interest tier schedule entry for a supported financial account\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `credit_product_token: string`\n Globally unique identifier for a credit product\n\n- `effective_date: string`\n Date the tier should be effective in YYYY-MM-DD format\n\n- `penalty_rates?: object`\n Custom rates per category for penalties\n\n- `tier_name?: string`\n Name of a tier contained in the credit product. Mutually exclusive with tier_rates\n\n- `tier_rates?: object`\n Custom rates per category. Mutually exclusive with tier_name\n\n### Returns\n\n- `{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n Entry in the Tier Schedule of an account\n\n - `credit_product_token: string`\n - `effective_date: string`\n - `penalty_rates?: object`\n - `tier_name?: string`\n - `tier_rates?: object`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst interestTierSchedule = await client.financialAccounts.interestTierSchedule.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { credit_product_token: 'credit_product_token', effective_date: '2019-12-27' });\n\nconsole.log(interestTierSchedule);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/financial_accounts/{financial_account_token}/interest_tier_schedule/{effective_date}', + httpMethod: 'get', + summary: 'Get interest tier schedule', + description: 'Get a specific interest tier schedule by effective date', + stainlessPath: '(resource) financial_accounts.interest_tier_schedule > (method) retrieve', + qualified: 'client.financialAccounts.interestTierSchedule.retrieve', + params: ['financial_account_token: string;', 'effective_date: string;'], + response: + '{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }', + markdown: + "## retrieve\n\n`client.financialAccounts.interestTierSchedule.retrieve(financial_account_token: string, effective_date: string): { credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/interest_tier_schedule/{effective_date}`\n\nGet a specific interest tier schedule by effective date\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `effective_date: string`\n\n### Returns\n\n- `{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n Entry in the Tier Schedule of an account\n\n - `credit_product_token: string`\n - `effective_date: string`\n - `penalty_rates?: object`\n - `tier_name?: string`\n - `tier_rates?: object`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst interestTierSchedule = await client.financialAccounts.interestTierSchedule.retrieve('2019-12-27', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(interestTierSchedule);\n```", + }, + { + name: 'update', + endpoint: '/v1/financial_accounts/{financial_account_token}/interest_tier_schedule/{effective_date}', + httpMethod: 'put', + summary: 'Update interest tier schedule', + description: 'Update an existing interest tier schedule', + stainlessPath: '(resource) financial_accounts.interest_tier_schedule > (method) update', + qualified: 'client.financialAccounts.interestTierSchedule.update', + params: [ + 'financial_account_token: string;', + 'effective_date: string;', + 'penalty_rates?: object;', + 'tier_name?: string;', + 'tier_rates?: object;', + ], + response: + '{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }', + markdown: + "## update\n\n`client.financialAccounts.interestTierSchedule.update(financial_account_token: string, effective_date: string, penalty_rates?: object, tier_name?: string, tier_rates?: object): { credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n\n**put** `/v1/financial_accounts/{financial_account_token}/interest_tier_schedule/{effective_date}`\n\nUpdate an existing interest tier schedule\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `effective_date: string`\n\n- `penalty_rates?: object`\n Custom rates per category for penalties\n\n- `tier_name?: string`\n Name of a tier contained in the credit product. Mutually exclusive with tier_rates\n\n- `tier_rates?: object`\n Custom rates per category. Mutually exclusive with tier_name\n\n### Returns\n\n- `{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n Entry in the Tier Schedule of an account\n\n - `credit_product_token: string`\n - `effective_date: string`\n - `penalty_rates?: object`\n - `tier_name?: string`\n - `tier_rates?: object`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst interestTierSchedule = await client.financialAccounts.interestTierSchedule.update('2019-12-27', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(interestTierSchedule);\n```", + }, + { + name: 'list', + endpoint: '/v1/financial_accounts/{financial_account_token}/interest_tier_schedule', + httpMethod: 'get', + summary: 'List interest tier schedules', + description: + 'List interest tier schedules for a financial account with optional date filtering.\n\nIf no date parameters are provided, returns all tier schedules.\nIf date parameters are provided, uses filtering to return matching schedules (max 100).\n- for_date: Returns exact match (takes precedence over other dates)\n- before_date: Returns schedules with effective_date <= before_date\n- after_date: Returns schedules with effective_date >= after_date\n- Both before_date and after_date: Returns schedules in range', + stainlessPath: '(resource) financial_accounts.interest_tier_schedule > (method) list', + qualified: 'client.financialAccounts.interestTierSchedule.list', + params: [ + 'financial_account_token: string;', + 'after_date?: string;', + 'before_date?: string;', + 'for_date?: string;', + ], + response: + '{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }', + markdown: + "## list\n\n`client.financialAccounts.interestTierSchedule.list(financial_account_token: string, after_date?: string, before_date?: string, for_date?: string): { credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/interest_tier_schedule`\n\nList interest tier schedules for a financial account with optional date filtering.\n\nIf no date parameters are provided, returns all tier schedules.\nIf date parameters are provided, uses filtering to return matching schedules (max 100).\n- for_date: Returns exact match (takes precedence over other dates)\n- before_date: Returns schedules with effective_date <= before_date\n- after_date: Returns schedules with effective_date >= after_date\n- Both before_date and after_date: Returns schedules in range\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `after_date?: string`\n Return schedules with effective_date >= after_date (ISO format YYYY-MM-DD)\n\n- `before_date?: string`\n Return schedules with effective_date <= before_date (ISO format YYYY-MM-DD)\n\n- `for_date?: string`\n Return schedule with effective_date == for_date (ISO format YYYY-MM-DD)\n\n### Returns\n\n- `{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n Entry in the Tier Schedule of an account\n\n - `credit_product_token: string`\n - `effective_date: string`\n - `penalty_rates?: object`\n - `tier_name?: string`\n - `tier_rates?: object`\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 interestTierSchedule of client.financialAccounts.interestTierSchedule.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(interestTierSchedule);\n}\n```", + }, + { + name: 'delete', + endpoint: '/v1/financial_accounts/{financial_account_token}/interest_tier_schedule/{effective_date}', + httpMethod: 'delete', + summary: 'Delete interest tier schedule', + description: + "Delete an interest tier schedule entry.\n\nReturns:\n- 400 Bad Request: Invalid effective_date format OR attempting to delete the earliest\n tier schedule entry for a non-PENDING account\n- 404 Not Found: Tier schedule entry not found for the given effective_date OR ledger account not found\n\nNote: PENDING accounts can delete the earliest tier schedule entry (account hasn't opened yet).\nActive/non-PENDING accounts cannot delete the earliest entry to prevent orphaning the account.\n\nIf the deleted tier schedule has a past effective_date and the account is ACTIVE,\nthe loan tape rebuild configuration will be updated to trigger rebuilds from that date.", + stainlessPath: '(resource) financial_accounts.interest_tier_schedule > (method) delete', + qualified: 'client.financialAccounts.interestTierSchedule.delete', + params: ['financial_account_token: string;', 'effective_date: string;'], + markdown: + "## delete\n\n`client.financialAccounts.interestTierSchedule.delete(financial_account_token: string, effective_date: string): void`\n\n**delete** `/v1/financial_accounts/{financial_account_token}/interest_tier_schedule/{effective_date}`\n\nDelete an interest tier schedule entry.\n\nReturns:\n- 400 Bad Request: Invalid effective_date format OR attempting to delete the earliest\n tier schedule entry for a non-PENDING account\n- 404 Not Found: Tier schedule entry not found for the given effective_date OR ledger account not found\n\nNote: PENDING accounts can delete the earliest tier schedule entry (account hasn't opened yet).\nActive/non-PENDING accounts cannot delete the earliest entry to prevent orphaning the account.\n\nIf the deleted tier schedule has a past effective_date and the account is ACTIVE,\nthe loan tape rebuild configuration will be updated to trigger rebuilds from that date.\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `effective_date: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.financialAccounts.interestTierSchedule.delete('2019-12-27', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' })\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/transactions/{transaction_token}', + httpMethod: 'get', + summary: 'Get card transaction', + description: + 'Get a specific card transaction. All amounts are in the smallest unit of their respective currency (e.g., cents for USD).\n', + stainlessPath: '(resource) transactions > (method) retrieve', + qualified: 'client.transactions.retrieve', + params: ['transaction_token: string;'], + response: + "{ token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: object; authorization_amount: number; authorization_code: string; avs: object; card_token: string; cardholder_authentication: cardholder_authentication; created: string; financial_account_token: string; merchant: merchant; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: object; result: string; service_location: object; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: token_info; updated: string; events?: object[]; }", + markdown: + "## retrieve\n\n`client.transactions.retrieve(transaction_token: string): { token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: object; authorization_amount: number; authorization_code: string; avs: object; card_token: string; cardholder_authentication: cardholder_authentication; created: string; financial_account_token: string; merchant: merchant; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: object; result: string; service_location: object; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: token_info; updated: string; events?: object[]; }`\n\n**get** `/v1/transactions/{transaction_token}`\n\nGet a specific card transaction. All amounts are in the smallest unit of their respective currency (e.g., cents for USD).\n\n\n### Parameters\n\n- `transaction_token: string`\n\n### Returns\n\n- `{ token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: { cardholder: { amount: number; conversion_rate: string; currency: currency; }; hold: { amount: number; currency: currency; }; merchant: { amount: number; currency: currency; }; settlement: { amount: number; currency: currency; }; }; authorization_amount: number; authorization_code: string; avs: { address: string; zipcode: string; }; card_token: string; cardholder_authentication: { authentication_method: 'FRICTIONLESS' | 'CHALLENGE' | 'NONE'; authentication_result: 'ATTEMPTS' | 'DECLINE' | 'NONE' | 'SUCCESS'; decision_made_by: 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'LITHIC_DEFAULT' | 'LITHIC_RULES' | 'NETWORK' | 'UNKNOWN'; liability_shift: '3DS_AUTHENTICATED' | 'TOKEN_AUTHENTICATED' | 'NONE'; three_ds_authentication_token: string; }; created: string; financial_account_token: string; merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: { entry_mode: { card: 'NOT_PRESENT' | 'PREAUTHORIZED' | 'PRESENT' | 'UNKNOWN'; cardholder: string; pan: string; pin_entered: boolean; }; terminal: { attended: boolean; card_retention_capable: boolean; on_premise: boolean; operator: 'ADMINISTRATIVE' | 'CARDHOLDER' | 'CARD_ACCEPTOR' | 'UNKNOWN'; partial_approval_capable: boolean; pin_capability: 'CAPABLE' | 'INOPERATIVE' | 'NOT_CAPABLE' | 'UNSPECIFIED'; type: string; acceptor_terminal_id?: string; }; }; result: string; service_location: { city: string; country: string; postal_code: string; state: string; street_address: string; }; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: { wallet_type: 'APPLE_PAY' | 'GOOGLE_PAY' | 'MASTERPASS' | 'MERCHANT' | 'OTHER' | 'SAMSUNG_PAY'; }; updated: string; events?: { token: string; amount: number; amounts: { cardholder: object; merchant: object; settlement: object; }; created: string; detailed_results: string[]; effective_polarity: 'CREDIT' | 'DEBIT'; network_info: { acquirer: object; amex: object; mastercard: object; visa: object; }; result: string; rule_results: { auth_rule_token: string; explanation: string; name: string; result: string; }[]; type: string; account_type?: 'CHECKING' | 'SAVINGS'; network_specific_data?: { mastercard: object; visa: object; }; }[]; }`\n\n - `token: string`\n - `account_token: string`\n - `acquirer_fee: number`\n - `acquirer_reference_number: string`\n - `amount: number`\n - `amounts: { cardholder: { amount: number; conversion_rate: string; currency: string; }; hold: { amount: number; currency: string; }; merchant: { amount: number; currency: string; }; settlement: { amount: number; currency: string; }; }`\n - `authorization_amount: number`\n - `authorization_code: string`\n - `avs: { address: string; zipcode: string; }`\n - `card_token: string`\n - `cardholder_authentication: { authentication_method: 'FRICTIONLESS' | 'CHALLENGE' | 'NONE'; authentication_result: 'ATTEMPTS' | 'DECLINE' | 'NONE' | 'SUCCESS'; decision_made_by: 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'LITHIC_DEFAULT' | 'LITHIC_RULES' | 'NETWORK' | 'UNKNOWN'; liability_shift: '3DS_AUTHENTICATED' | 'TOKEN_AUTHENTICATED' | 'NONE'; three_ds_authentication_token: string; }`\n - `created: string`\n - `financial_account_token: string`\n - `merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }`\n - `merchant_amount: number`\n - `merchant_authorization_amount: number`\n - `merchant_currency: string`\n - `network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'`\n - `network_risk_score: number`\n - `pos: { entry_mode: { card: 'NOT_PRESENT' | 'PREAUTHORIZED' | 'PRESENT' | 'UNKNOWN'; cardholder: string; pan: string; pin_entered: boolean; }; terminal: { attended: boolean; card_retention_capable: boolean; on_premise: boolean; operator: 'ADMINISTRATIVE' | 'CARDHOLDER' | 'CARD_ACCEPTOR' | 'UNKNOWN'; partial_approval_capable: boolean; pin_capability: 'CAPABLE' | 'INOPERATIVE' | 'NOT_CAPABLE' | 'UNSPECIFIED'; type: string; acceptor_terminal_id?: string; }; }`\n - `result: string`\n - `service_location: { city: string; country: string; postal_code: string; state: string; street_address: string; }`\n - `settled_amount: number`\n - `status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'`\n - `tags: object`\n - `token_info: { wallet_type: 'APPLE_PAY' | 'GOOGLE_PAY' | 'MASTERPASS' | 'MERCHANT' | 'OTHER' | 'SAMSUNG_PAY'; }`\n - `updated: string`\n - `events?: { token: string; amount: number; amounts: { cardholder: { amount: number; conversion_rate: string; currency: string; }; merchant: { amount: number; currency: string; }; settlement: { amount: number; conversion_rate: string; currency: string; }; }; created: string; detailed_results: string[]; effective_polarity: 'CREDIT' | 'DEBIT'; network_info: { acquirer: { acquirer_reference_number: string; retrieval_reference_number: string; }; amex: { original_transaction_id: string; transaction_id: string; }; mastercard: { banknet_reference_number: string; original_banknet_reference_number: string; original_switch_serial_number: string; switch_serial_number: string; }; visa: { original_transaction_id: string; transaction_id: string; }; }; result: string; rule_results: { auth_rule_token: string; explanation: string; name: string; result: string; }[]; type: string; account_type?: 'CHECKING' | 'SAVINGS'; network_specific_data?: { mastercard: { ecommerce_security_level_indicator: string; on_behalf_service_result: { result_1: string; result_2: string; service: string; }[]; transaction_type_identifier: string; }; visa: { business_application_identifier: string; }; }; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst transaction = await client.transactions.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(transaction);\n```", + }, + { + name: 'list', + endpoint: '/v1/transactions', + httpMethod: 'get', + summary: 'List card transactions', + description: + 'List card transactions. All amounts are in the smallest unit of their respective currency (e.g., cents for USD) and inclusive of any acquirer fees.\n', + stainlessPath: '(resource) transactions > (method) list', + qualified: 'client.transactions.list', + params: [ + 'account_token?: string;', + 'begin?: string;', + 'card_token?: string;', + 'end?: string;', + 'ending_before?: string;', + 'page_size?: number;', + "result?: 'APPROVED' | 'DECLINED';", + 'starting_after?: string;', + "status?: 'PENDING' | 'VOIDED' | 'SETTLED' | 'DECLINED' | 'EXPIRED';", + ], + response: + "{ token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: object; authorization_amount: number; authorization_code: string; avs: object; card_token: string; cardholder_authentication: cardholder_authentication; created: string; financial_account_token: string; merchant: merchant; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: object; result: string; service_location: object; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: token_info; updated: string; events?: object[]; }", + markdown: + "## list\n\n`client.transactions.list(account_token?: string, begin?: string, card_token?: string, end?: string, ending_before?: string, page_size?: number, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'PENDING' | 'VOIDED' | 'SETTLED' | 'DECLINED' | 'EXPIRED'): { token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: object; authorization_amount: number; authorization_code: string; avs: object; card_token: string; cardholder_authentication: cardholder_authentication; created: string; financial_account_token: string; merchant: merchant; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: object; result: string; service_location: object; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: token_info; updated: string; events?: object[]; }`\n\n**get** `/v1/transactions`\n\nList card transactions. All amounts are in the smallest unit of their respective currency (e.g., cents for USD) and inclusive of any acquirer fees.\n\n\n### Parameters\n\n- `account_token?: string`\n Filters for transactions associated with a specific account.\n\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `card_token?: string`\n Filters for transactions associated with a specific card.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `result?: 'APPROVED' | 'DECLINED'`\n Filters for transactions using transaction result field. Can filter by `APPROVED`, and `DECLINED`.\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- `status?: 'PENDING' | 'VOIDED' | 'SETTLED' | 'DECLINED' | 'EXPIRED'`\n Filters for transactions using transaction status field.\n\n### Returns\n\n- `{ token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: { cardholder: { amount: number; conversion_rate: string; currency: currency; }; hold: { amount: number; currency: currency; }; merchant: { amount: number; currency: currency; }; settlement: { amount: number; currency: currency; }; }; authorization_amount: number; authorization_code: string; avs: { address: string; zipcode: string; }; card_token: string; cardholder_authentication: { authentication_method: 'FRICTIONLESS' | 'CHALLENGE' | 'NONE'; authentication_result: 'ATTEMPTS' | 'DECLINE' | 'NONE' | 'SUCCESS'; decision_made_by: 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'LITHIC_DEFAULT' | 'LITHIC_RULES' | 'NETWORK' | 'UNKNOWN'; liability_shift: '3DS_AUTHENTICATED' | 'TOKEN_AUTHENTICATED' | 'NONE'; three_ds_authentication_token: string; }; created: string; financial_account_token: string; merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: { entry_mode: { card: 'NOT_PRESENT' | 'PREAUTHORIZED' | 'PRESENT' | 'UNKNOWN'; cardholder: string; pan: string; pin_entered: boolean; }; terminal: { attended: boolean; card_retention_capable: boolean; on_premise: boolean; operator: 'ADMINISTRATIVE' | 'CARDHOLDER' | 'CARD_ACCEPTOR' | 'UNKNOWN'; partial_approval_capable: boolean; pin_capability: 'CAPABLE' | 'INOPERATIVE' | 'NOT_CAPABLE' | 'UNSPECIFIED'; type: string; acceptor_terminal_id?: string; }; }; result: string; service_location: { city: string; country: string; postal_code: string; state: string; street_address: string; }; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: { wallet_type: 'APPLE_PAY' | 'GOOGLE_PAY' | 'MASTERPASS' | 'MERCHANT' | 'OTHER' | 'SAMSUNG_PAY'; }; updated: string; events?: { token: string; amount: number; amounts: { cardholder: object; merchant: object; settlement: object; }; created: string; detailed_results: string[]; effective_polarity: 'CREDIT' | 'DEBIT'; network_info: { acquirer: object; amex: object; mastercard: object; visa: object; }; result: string; rule_results: { auth_rule_token: string; explanation: string; name: string; result: string; }[]; type: string; account_type?: 'CHECKING' | 'SAVINGS'; network_specific_data?: { mastercard: object; visa: object; }; }[]; }`\n\n - `token: string`\n - `account_token: string`\n - `acquirer_fee: number`\n - `acquirer_reference_number: string`\n - `amount: number`\n - `amounts: { cardholder: { amount: number; conversion_rate: string; currency: string; }; hold: { amount: number; currency: string; }; merchant: { amount: number; currency: string; }; settlement: { amount: number; currency: string; }; }`\n - `authorization_amount: number`\n - `authorization_code: string`\n - `avs: { address: string; zipcode: string; }`\n - `card_token: string`\n - `cardholder_authentication: { authentication_method: 'FRICTIONLESS' | 'CHALLENGE' | 'NONE'; authentication_result: 'ATTEMPTS' | 'DECLINE' | 'NONE' | 'SUCCESS'; decision_made_by: 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'LITHIC_DEFAULT' | 'LITHIC_RULES' | 'NETWORK' | 'UNKNOWN'; liability_shift: '3DS_AUTHENTICATED' | 'TOKEN_AUTHENTICATED' | 'NONE'; three_ds_authentication_token: string; }`\n - `created: string`\n - `financial_account_token: string`\n - `merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }`\n - `merchant_amount: number`\n - `merchant_authorization_amount: number`\n - `merchant_currency: string`\n - `network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'`\n - `network_risk_score: number`\n - `pos: { entry_mode: { card: 'NOT_PRESENT' | 'PREAUTHORIZED' | 'PRESENT' | 'UNKNOWN'; cardholder: string; pan: string; pin_entered: boolean; }; terminal: { attended: boolean; card_retention_capable: boolean; on_premise: boolean; operator: 'ADMINISTRATIVE' | 'CARDHOLDER' | 'CARD_ACCEPTOR' | 'UNKNOWN'; partial_approval_capable: boolean; pin_capability: 'CAPABLE' | 'INOPERATIVE' | 'NOT_CAPABLE' | 'UNSPECIFIED'; type: string; acceptor_terminal_id?: string; }; }`\n - `result: string`\n - `service_location: { city: string; country: string; postal_code: string; state: string; street_address: string; }`\n - `settled_amount: number`\n - `status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'`\n - `tags: object`\n - `token_info: { wallet_type: 'APPLE_PAY' | 'GOOGLE_PAY' | 'MASTERPASS' | 'MERCHANT' | 'OTHER' | 'SAMSUNG_PAY'; }`\n - `updated: string`\n - `events?: { token: string; amount: number; amounts: { cardholder: { amount: number; conversion_rate: string; currency: string; }; merchant: { amount: number; currency: string; }; settlement: { amount: number; conversion_rate: string; currency: string; }; }; created: string; detailed_results: string[]; effective_polarity: 'CREDIT' | 'DEBIT'; network_info: { acquirer: { acquirer_reference_number: string; retrieval_reference_number: string; }; amex: { original_transaction_id: string; transaction_id: string; }; mastercard: { banknet_reference_number: string; original_banknet_reference_number: string; original_switch_serial_number: string; switch_serial_number: string; }; visa: { original_transaction_id: string; transaction_id: string; }; }; result: string; rule_results: { auth_rule_token: string; explanation: string; name: string; result: string; }[]; type: string; account_type?: 'CHECKING' | 'SAVINGS'; network_specific_data?: { mastercard: { ecommerce_security_level_indicator: string; on_behalf_service_result: { result_1: string; result_2: string; service: string; }[]; transaction_type_identifier: string; }; visa: { business_application_identifier: 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 transaction of client.transactions.list()) {\n console.log(transaction);\n}\n```", + }, + { + name: 'expire_authorization', + endpoint: '/v1/transactions/{transaction_token}/expire_authorization', + httpMethod: 'post', + summary: 'Expire an authorization', + description: 'Expire authorization', + stainlessPath: '(resource) transactions > (method) expire_authorization', + qualified: 'client.transactions.expireAuthorization', + params: ['transaction_token: string;'], + markdown: + "## expire_authorization\n\n`client.transactions.expireAuthorization(transaction_token: string): void`\n\n**post** `/v1/transactions/{transaction_token}/expire_authorization`\n\nExpire authorization\n\n### Parameters\n\n- `transaction_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.transactions.expireAuthorization('00000000-0000-0000-0000-000000000000')\n```", + }, + { + name: 'simulate_authorization', + endpoint: '/v1/simulate/authorize', + httpMethod: 'post', + summary: 'Simulate authorization', + description: + 'Simulates an authorization request from the card network as if it came from a merchant acquirer.\nIf you are configured for ASA, simulating authorizations requires your ASA client to be set up properly, i.e. be able to respond to the ASA request with a valid JSON. For users that are not configured for ASA, a daily transaction limit of $5000 USD is applied by default. You can update this limit via the [update account](https://docs.lithic.com/reference/patchaccountbytoken) endpoint.\n', + stainlessPath: '(resource) transactions > (method) simulate_authorization', + qualified: 'client.transactions.simulateAuthorization', + params: [ + 'amount: number;', + 'descriptor: string;', + 'pan: string;', + 'mcc?: string;', + 'merchant_acceptor_city?: string;', + 'merchant_acceptor_country?: string;', + 'merchant_acceptor_id?: string;', + 'merchant_acceptor_state?: string;', + 'merchant_amount?: number;', + 'merchant_currency?: string;', + 'partial_approval_capable?: boolean;', + 'pin?: string;', + 'status?: string;', + ], + response: '{ token?: string; debugging_request_id?: string; }', + markdown: + "## simulate_authorization\n\n`client.transactions.simulateAuthorization(amount: number, descriptor: string, pan: string, mcc?: string, merchant_acceptor_city?: string, merchant_acceptor_country?: string, merchant_acceptor_id?: string, merchant_acceptor_state?: string, merchant_amount?: number, merchant_currency?: string, partial_approval_capable?: boolean, pin?: string, status?: string): { token?: string; debugging_request_id?: string; }`\n\n**post** `/v1/simulate/authorize`\n\nSimulates an authorization request from the card network as if it came from a merchant acquirer.\nIf you are configured for ASA, simulating authorizations requires your ASA client to be set up properly, i.e. be able to respond to the ASA request with a valid JSON. For users that are not configured for ASA, a daily transaction limit of $5000 USD is applied by default. You can update this limit via the [update account](https://docs.lithic.com/reference/patchaccountbytoken) endpoint.\n\n\n### Parameters\n\n- `amount: number`\n Amount (in cents) to authorize. For credit authorizations and financial credit authorizations, any value entered will be converted into a negative amount in the simulated transaction. For example, entering 100 in this field will result in a -100 amount in the transaction. For balance inquiries, this field must be set to 0.\n\n- `descriptor: string`\n Merchant descriptor.\n\n- `pan: string`\n Sixteen digit card number.\n\n- `mcc?: string`\n Merchant category code for the transaction to be simulated. A four-digit number listed in ISO 18245.\nSupported merchant category codes can be found [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).\n\n\n- `merchant_acceptor_city?: string`\n Merchant acceptor city\n\n- `merchant_acceptor_country?: string`\n Merchant acceptor country code (ISO 3166-1 alpha-3)\n\n- `merchant_acceptor_id?: string`\n Unique identifier to identify the payment card acceptor.\n\n- `merchant_acceptor_state?: string`\n Merchant acceptor state/province (ISO 3166-2 subdivision code)\n\n- `merchant_amount?: number`\n Amount of the transaction to be simulated in currency specified in merchant_currency, including any acquirer fees.\n\n- `merchant_currency?: string`\n 3-character alphabetic ISO 4217 currency code. Note: Simulator only accepts USD, GBP, EUR and defaults to GBP if another ISO 4217 code is provided\n\n- `partial_approval_capable?: boolean`\n Set to true if the terminal is capable of partial approval otherwise false.\nPartial approval is when part of a transaction is approved and another\npayment must be used for the remainder.\n\n\n- `pin?: string`\n Simulate entering a PIN. If omitted, PIN check will not be performed.\n\n- `status?: string`\n Type of event to simulate.\n* `AUTHORIZATION` is a dual message purchase authorization, meaning a subsequent clearing step is required to settle the transaction.\n* `BALANCE_INQUIRY` is a $0 authorization requesting the balance held on the card, and is most often observed when a cardholder requests to view a card's balance at an ATM.\n* `CREDIT_AUTHORIZATION` is a dual message request from a merchant to authorize a refund, meaning a subsequent clearing step is required to settle the transaction.\n* `FINANCIAL_AUTHORIZATION` is a single message request from a merchant to debit funds immediately (such as an ATM withdrawal), and no subsequent clearing is required to settle the transaction.\n* `FINANCIAL_CREDIT_AUTHORIZATION` is a single message request from a merchant to credit funds immediately, and no subsequent clearing is required to settle the transaction.\n\n### Returns\n\n- `{ token?: string; debugging_request_id?: string; }`\n\n - `token?: string`\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.simulateAuthorization({\n amount: 3831,\n descriptor: 'COFFEE SHOP',\n pan: '4111111289144142',\n});\n\nconsole.log(response);\n```", + }, + { + name: 'simulate_authorization_advice', + endpoint: '/v1/simulate/authorization_advice', + httpMethod: 'post', + summary: 'Simulate authorization advice', + description: + 'Simulates an authorization advice from the card network as if it came from a merchant acquirer. An authorization advice changes the pending amount of the transaction.\n', + stainlessPath: '(resource) transactions > (method) simulate_authorization_advice', + qualified: 'client.transactions.simulateAuthorizationAdvice', + params: ['token: string;', 'amount: number;'], + response: '{ token?: string; debugging_request_id?: string; }', + markdown: + "## simulate_authorization_advice\n\n`client.transactions.simulateAuthorizationAdvice(token: string, amount: number): { token?: string; debugging_request_id?: string; }`\n\n**post** `/v1/simulate/authorization_advice`\n\nSimulates an authorization advice from the card network as if it came from a merchant acquirer. An authorization advice changes the pending amount of the transaction.\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 authorize. This amount will override the transaction's amount that was originally set by /v1/simulate/authorize.\n\n### Returns\n\n- `{ token?: string; debugging_request_id?: string; }`\n\n - `token?: string`\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.simulateAuthorizationAdvice({ token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac', amount: 3831 });\n\nconsole.log(response);\n```", + }, + { + name: 'simulate_clearing', + endpoint: '/v1/simulate/clearing', + httpMethod: 'post', + summary: 'Simulate clearing', + description: + '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', + stainlessPath: '(resource) transactions > (method) simulate_clearing', + qualified: 'client.transactions.simulateClearing', + params: ['token: string;', 'amount?: number;'], + response: '{ debugging_request_id?: string; }', + markdown: + "## 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```", + }, + { + name: 'simulate_credit_authorization', + endpoint: '/v1/simulate/credit_authorization_advice', + httpMethod: 'post', + summary: 'Simulate credit authorization advice', + description: + 'Simulates a credit authorization advice from the card network.\nThis message indicates that the network approved a credit authorization on your behalf.\n', + stainlessPath: '(resource) transactions > (method) simulate_credit_authorization', + qualified: 'client.transactions.simulateCreditAuthorization', + params: [ + 'amount: number;', + 'descriptor: string;', + 'pan: string;', + 'mcc?: string;', + 'merchant_acceptor_city?: string;', + 'merchant_acceptor_country?: string;', + 'merchant_acceptor_id?: string;', + 'merchant_acceptor_state?: string;', + ], + response: '{ token?: string; debugging_request_id?: string; }', + markdown: + "## simulate_credit_authorization\n\n`client.transactions.simulateCreditAuthorization(amount: number, descriptor: string, pan: string, mcc?: string, merchant_acceptor_city?: string, merchant_acceptor_country?: string, merchant_acceptor_id?: string, merchant_acceptor_state?: string): { token?: string; debugging_request_id?: string; }`\n\n**post** `/v1/simulate/credit_authorization_advice`\n\nSimulates a credit authorization advice from the card network.\nThis message indicates that the network approved a credit authorization on your behalf.\n\n\n### Parameters\n\n- `amount: number`\n Amount (in cents). Any value entered will be converted into a negative amount in the simulated transaction. For example, entering 100 in this field will appear as a -100 amount in the transaction.\n\n- `descriptor: string`\n Merchant descriptor.\n\n- `pan: string`\n Sixteen digit card number.\n\n- `mcc?: string`\n Merchant category code for the transaction to be simulated. A four-digit number listed in ISO 18245.\nSupported merchant category codes can be found [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).\n\n\n- `merchant_acceptor_city?: string`\n Merchant acceptor city\n\n- `merchant_acceptor_country?: string`\n Merchant acceptor country code (ISO 3166-1 alpha-3)\n\n- `merchant_acceptor_id?: string`\n Unique identifier to identify the payment card acceptor.\n\n- `merchant_acceptor_state?: string`\n Merchant acceptor state/province (ISO 3166-2 subdivision code)\n\n### Returns\n\n- `{ token?: string; debugging_request_id?: string; }`\n\n - `token?: string`\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.simulateCreditAuthorization({\n amount: 3831,\n descriptor: 'COFFEE SHOP',\n pan: '4111111289144142',\n});\n\nconsole.log(response);\n```", + }, + { + name: 'simulate_credit_authorization_advice', + endpoint: '/v1/simulate/credit_authorization_advice', + httpMethod: 'post', + summary: 'Simulate credit authorization advice', + description: + 'Simulates a credit authorization advice from the card network.\nThis message indicates that the network approved a credit authorization on your behalf.\n', + stainlessPath: '(resource) transactions > (method) simulate_credit_authorization_advice', + qualified: 'client.transactions.simulateCreditAuthorizationAdvice', + params: [ + 'amount: number;', + 'descriptor: string;', + 'pan: string;', + 'mcc?: string;', + 'merchant_acceptor_city?: string;', + 'merchant_acceptor_country?: string;', + 'merchant_acceptor_id?: string;', + 'merchant_acceptor_state?: string;', + ], + response: '{ token?: string; debugging_request_id?: string; }', + markdown: + "## simulate_credit_authorization_advice\n\n`client.transactions.simulateCreditAuthorizationAdvice(amount: number, descriptor: string, pan: string, mcc?: string, merchant_acceptor_city?: string, merchant_acceptor_country?: string, merchant_acceptor_id?: string, merchant_acceptor_state?: string): { token?: string; debugging_request_id?: string; }`\n\n**post** `/v1/simulate/credit_authorization_advice`\n\nSimulates a credit authorization advice from the card network.\nThis message indicates that the network approved a credit authorization on your behalf.\n\n\n### Parameters\n\n- `amount: number`\n Amount (in cents). Any value entered will be converted into a negative amount in the simulated transaction. For example, entering 100 in this field will appear as a -100 amount in the transaction.\n\n- `descriptor: string`\n Merchant descriptor.\n\n- `pan: string`\n Sixteen digit card number.\n\n- `mcc?: string`\n Merchant category code for the transaction to be simulated. A four-digit number listed in ISO 18245.\nSupported merchant category codes can be found [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).\n\n\n- `merchant_acceptor_city?: string`\n Merchant acceptor city\n\n- `merchant_acceptor_country?: string`\n Merchant acceptor country code (ISO 3166-1 alpha-3)\n\n- `merchant_acceptor_id?: string`\n Unique identifier to identify the payment card acceptor.\n\n- `merchant_acceptor_state?: string`\n Merchant acceptor state/province (ISO 3166-2 subdivision code)\n\n### Returns\n\n- `{ token?: string; debugging_request_id?: string; }`\n\n - `token?: string`\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.simulateCreditAuthorizationAdvice({\n amount: 3831,\n descriptor: 'COFFEE SHOP',\n pan: '4111111289144142',\n});\n\nconsole.log(response);\n```", + }, + { + name: 'simulate_return', + endpoint: '/v1/simulate/return', + httpMethod: 'post', + summary: 'Simulate return', + description: + 'Returns, or refunds, an amount back to a card. Returns simulated via this endpoint clear immediately, without prior authorization, and result in a `SETTLED` transaction status.\n', + stainlessPath: '(resource) transactions > (method) simulate_return', + qualified: 'client.transactions.simulateReturn', + params: ['amount: number;', 'descriptor: string;', 'pan: string;'], + response: '{ token?: string; debugging_request_id?: string; }', + markdown: + "## simulate_return\n\n`client.transactions.simulateReturn(amount: number, descriptor: string, pan: string): { token?: string; debugging_request_id?: string; }`\n\n**post** `/v1/simulate/return`\n\nReturns, or refunds, an amount back to a card. Returns simulated via this endpoint clear immediately, without prior authorization, and result in a `SETTLED` transaction status.\n\n\n### Parameters\n\n- `amount: number`\n Amount (in cents) to authorize.\n\n- `descriptor: string`\n Merchant descriptor.\n\n- `pan: string`\n Sixteen digit card number.\n\n### Returns\n\n- `{ token?: string; debugging_request_id?: string; }`\n\n - `token?: string`\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.simulateReturn({\n amount: 3831,\n descriptor: 'COFFEE SHOP',\n pan: '4111111289144142',\n});\n\nconsole.log(response);\n```", + }, + { + name: 'simulate_return_reversal', + endpoint: '/v1/simulate/return_reversal', + httpMethod: 'post', + summary: 'Simulate return reversal', + description: + 'Reverses a return, i.e. a credit transaction with a `SETTLED` status. Returns can be financial credit authorizations, or credit authorizations that have cleared.\n', + stainlessPath: '(resource) transactions > (method) simulate_return_reversal', + qualified: 'client.transactions.simulateReturnReversal', + params: ['token: string;'], + response: '{ debugging_request_id?: string; }', + markdown: + "## simulate_return_reversal\n\n`client.transactions.simulateReturnReversal(token: string): { debugging_request_id?: string; }`\n\n**post** `/v1/simulate/return_reversal`\n\nReverses a return, i.e. a credit transaction with a `SETTLED` status. Returns can be financial credit authorizations, or credit authorizations that have cleared.\n\n\n### Parameters\n\n- `token: string`\n The transaction token returned from the /v1/simulate/authorize response.\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.simulateReturnReversal({ token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac' });\n\nconsole.log(response);\n```", + }, + { + name: 'simulate_void', + endpoint: '/v1/simulate/void', + httpMethod: 'post', + summary: 'Simulate void', + description: + 'Voids a pending authorization. If `amount` is not set, the full amount will be voided. Can be used on partially voided transactions but not partially cleared transactions. _Simulating an authorization expiry on credit authorizations or credit authorization advice is not currently supported but will be added soon._\n', + stainlessPath: '(resource) transactions > (method) simulate_void', + qualified: 'client.transactions.simulateVoid', + params: [ + 'token: string;', + 'amount?: number;', + "type?: 'AUTHORIZATION_EXPIRY' | 'AUTHORIZATION_REVERSAL';", + ], + response: '{ debugging_request_id?: string; }', + markdown: + "## simulate_void\n\n`client.transactions.simulateVoid(token: string, amount?: number, type?: 'AUTHORIZATION_EXPIRY' | 'AUTHORIZATION_REVERSAL'): { debugging_request_id?: string; }`\n\n**post** `/v1/simulate/void`\n\nVoids a pending authorization. If `amount` is not set, the full amount will be voided. Can be used on partially voided transactions but not partially cleared transactions. _Simulating an authorization expiry on credit authorizations or credit authorization advice is not currently supported but will be added soon._\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 void. Typically this will match the amount in the original authorization, but can be less. Applies to authorization reversals only. An authorization expiry will always apply to the full pending amount.\n\n- `type?: 'AUTHORIZATION_EXPIRY' | 'AUTHORIZATION_REVERSAL'`\n Type of event to simulate. Defaults to `AUTHORIZATION_REVERSAL`.\n\n* `AUTHORIZATION_EXPIRY` indicates authorization has expired and been reversed by Lithic.\n* `AUTHORIZATION_REVERSAL` indicates authorization was reversed by the merchant.\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.simulateVoid({ token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac' });\n\nconsole.log(response);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/transactions/{transaction_token}/enhanced_commercial_data', + httpMethod: 'get', + summary: 'List enhanced commercial data', + description: + 'Get all L2/L3 enhanced commercial data associated with a transaction. Not available in sandbox.', + stainlessPath: '(resource) transactions.enhanced_commercial_data > (method) retrieve', + qualified: 'client.transactions.enhancedCommercialData.retrieve', + params: ['transaction_token: string;'], + response: + '{ data: { token: string; common: object; event_token: string; fleet: object[]; transaction_token: string; }[]; }', + markdown: + "## retrieve\n\n`client.transactions.enhancedCommercialData.retrieve(transaction_token: string): { data: enhanced_data[]; }`\n\n**get** `/v1/transactions/{transaction_token}/enhanced_commercial_data`\n\nGet all L2/L3 enhanced commercial data associated with a transaction. Not available in sandbox.\n\n### Parameters\n\n- `transaction_token: string`\n\n### Returns\n\n- `{ data: { token: string; common: object; event_token: string; fleet: object[]; transaction_token: string; }[]; }`\n\n - `data: { token: string; common: { line_items: { amount?: string; description?: string; product_code?: string; quantity?: string; }[]; tax: { amount?: number; exempt?: 'TAX_INCLUDED' | 'TAX_NOT_INCLUDED' | 'NOT_SUPPORTED'; merchant_tax_id?: string; }; customer_reference_number?: string; merchant_reference_number?: string; order_date?: string; }; event_token: string; fleet: { amount_totals: { discount?: number; gross_sale?: number; net_sale?: number; }; fuel: { quantity?: string; type?: string; unit_of_measure?: 'GALLONS' | 'LITERS' | 'POUNDS' | 'KILOGRAMS' | 'IMPERIAL_GALLONS' | 'NOT_APPLICABLE' | 'UNKNOWN'; unit_price?: number; }; driver_number?: string; odometer?: number; service_type?: 'UNKNOWN' | 'UNDEFINED' | 'SELF_SERVICE' | 'FULL_SERVICE' | 'NON_FUEL_ONLY'; vehicle_number?: string; }[]; transaction_token: string; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst enhancedCommercialData = await client.transactions.enhancedCommercialData.retrieve('00000000-0000-0000-0000-000000000000');\n\nconsole.log(enhancedCommercialData);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/transactions/events/{event_token}/enhanced_commercial_data', + httpMethod: 'get', + summary: 'Get enhanced commercial data', + description: + 'Get L2/L3 enhanced commercial data associated with a transaction event. Not available in sandbox.', + stainlessPath: '(resource) transactions.events.enhanced_commercial_data > (method) retrieve', + qualified: 'client.transactions.events.enhancedCommercialData.retrieve', + params: ['event_token: string;'], + response: + "{ token: string; common: { line_items: { amount?: string; description?: string; product_code?: string; quantity?: string; }[]; tax: { amount?: number; exempt?: 'TAX_INCLUDED' | 'TAX_NOT_INCLUDED' | 'NOT_SUPPORTED'; merchant_tax_id?: string; }; customer_reference_number?: string; merchant_reference_number?: string; order_date?: string; }; event_token: string; fleet: { amount_totals: { discount?: number; gross_sale?: number; net_sale?: number; }; fuel: { quantity?: string; type?: string; unit_of_measure?: 'GALLONS' | 'LITERS' | 'POUNDS' | 'KILOGRAMS' | 'IMPERIAL_GALLONS' | 'NOT_APPLICABLE' | 'UNKNOWN'; unit_price?: number; }; driver_number?: string; odometer?: number; service_type?: 'UNKNOWN' | 'UNDEFINED' | 'SELF_SERVICE' | 'FULL_SERVICE' | 'NON_FUEL_ONLY'; vehicle_number?: string; }[]; transaction_token: string; }", + markdown: + "## retrieve\n\n`client.transactions.events.enhancedCommercialData.retrieve(event_token: string): { token: string; common: object; event_token: string; fleet: object[]; transaction_token: string; }`\n\n**get** `/v1/transactions/events/{event_token}/enhanced_commercial_data`\n\nGet L2/L3 enhanced commercial data associated with a transaction event. Not available in sandbox.\n\n### Parameters\n\n- `event_token: string`\n\n### Returns\n\n- `{ token: string; common: { line_items: { amount?: string; description?: string; product_code?: string; quantity?: string; }[]; tax: { amount?: number; exempt?: 'TAX_INCLUDED' | 'TAX_NOT_INCLUDED' | 'NOT_SUPPORTED'; merchant_tax_id?: string; }; customer_reference_number?: string; merchant_reference_number?: string; order_date?: string; }; event_token: string; fleet: { amount_totals: { discount?: number; gross_sale?: number; net_sale?: number; }; fuel: { quantity?: string; type?: string; unit_of_measure?: 'GALLONS' | 'LITERS' | 'POUNDS' | 'KILOGRAMS' | 'IMPERIAL_GALLONS' | 'NOT_APPLICABLE' | 'UNKNOWN'; unit_price?: number; }; driver_number?: string; odometer?: number; service_type?: 'UNKNOWN' | 'UNDEFINED' | 'SELF_SERVICE' | 'FULL_SERVICE' | 'NON_FUEL_ONLY'; vehicle_number?: string; }[]; transaction_token: string; }`\n\n - `token: string`\n - `common: { line_items: { amount?: string; description?: string; product_code?: string; quantity?: string; }[]; tax: { amount?: number; exempt?: 'TAX_INCLUDED' | 'TAX_NOT_INCLUDED' | 'NOT_SUPPORTED'; merchant_tax_id?: string; }; customer_reference_number?: string; merchant_reference_number?: string; order_date?: string; }`\n - `event_token: string`\n - `fleet: { amount_totals: { discount?: number; gross_sale?: number; net_sale?: number; }; fuel: { quantity?: string; type?: string; unit_of_measure?: 'GALLONS' | 'LITERS' | 'POUNDS' | 'KILOGRAMS' | 'IMPERIAL_GALLONS' | 'NOT_APPLICABLE' | 'UNKNOWN'; unit_price?: number; }; driver_number?: string; odometer?: number; service_type?: 'UNKNOWN' | 'UNDEFINED' | 'SELF_SERVICE' | 'FULL_SERVICE' | 'NON_FUEL_ONLY'; vehicle_number?: string; }[]`\n - `transaction_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst enhancedData = await client.transactions.events.enhancedCommercialData.retrieve('00000000-0000-0000-0000-000000000000');\n\nconsole.log(enhancedData);\n```", + }, + { + name: 'create', + endpoint: '/v1/responder_endpoints', + httpMethod: 'post', + summary: 'Enroll a responder endpoint', + description: 'Enroll a responder endpoint', + stainlessPath: '(resource) responder_endpoints > (method) create', + qualified: 'client.responderEndpoints.create', + params: [ + "type?: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING';", + 'url?: string;', + ], + response: '{ enrolled?: boolean; }', + markdown: + "## create\n\n`client.responderEndpoints.create(type?: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING', url?: string): { enrolled?: boolean; }`\n\n**post** `/v1/responder_endpoints`\n\nEnroll a responder endpoint\n\n### Parameters\n\n- `type?: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING'`\n The type of the endpoint.\n\n- `url?: string`\n The URL for the responder endpoint (must be http(s)).\n\n### Returns\n\n- `{ enrolled?: boolean; }`\n\n - `enrolled?: boolean`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst responderEndpoint = await client.responderEndpoints.create();\n\nconsole.log(responderEndpoint);\n```", + }, + { + name: 'delete', + endpoint: '/v1/responder_endpoints', + httpMethod: 'delete', + summary: 'Disenroll a responder endpoint', + description: 'Disenroll a responder endpoint', + stainlessPath: '(resource) responder_endpoints > (method) delete', + qualified: 'client.responderEndpoints.delete', + params: ["type: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING';"], + markdown: + "## delete\n\n`client.responderEndpoints.delete(type: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING'): void`\n\n**delete** `/v1/responder_endpoints`\n\nDisenroll a responder endpoint\n\n### Parameters\n\n- `type: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING'`\n The type of the endpoint.\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.responderEndpoints.delete({ type: 'AUTH_STREAM_ACCESS' })\n```", + }, + { + name: 'check_status', + endpoint: '/v1/responder_endpoints', + httpMethod: 'get', + summary: 'Check the status of a responder endpoint', + description: 'Check the status of a responder endpoint', + stainlessPath: '(resource) responder_endpoints > (method) check_status', + qualified: 'client.responderEndpoints.checkStatus', + params: ["type: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING';"], + response: '{ enrolled?: boolean; url?: string; }', + markdown: + "## check_status\n\n`client.responderEndpoints.checkStatus(type: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING'): { enrolled?: boolean; url?: string; }`\n\n**get** `/v1/responder_endpoints`\n\nCheck the status of a responder endpoint\n\n### Parameters\n\n- `type: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING'`\n The type of the endpoint.\n\n### Returns\n\n- `{ enrolled?: boolean; url?: string; }`\n\n - `enrolled?: boolean`\n - `url?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst responderEndpointStatus = await client.responderEndpoints.checkStatus({ type: 'AUTH_STREAM_ACCESS' });\n\nconsole.log(responderEndpointStatus);\n```", + }, + { + name: 'create', + endpoint: '/v1/external_bank_accounts', + httpMethod: 'post', + summary: 'Create external bank account', + description: 'Creates an external bank account within a program or Lithic account.', + stainlessPath: '(resource) external_bank_accounts > (method) create', + qualified: 'client.externalBankAccounts.create', + params: [ + "{ account_number: string; country: string; currency: string; financial_account_token: string; owner: string; owner_type: 'INDIVIDUAL' | 'BUSINESS'; routing_number: string; type: 'CHECKING' | 'SAVINGS'; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PRENOTE' | 'EXTERNALLY_VERIFIED' | 'UNVERIFIED'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; name?: string; user_defined_id?: string; verification_enforcement?: boolean; } | { account_number: string; country: string; currency: string; owner: string; owner_type: 'INDIVIDUAL' | 'BUSINESS'; routing_number: string; type: 'CHECKING' | 'SAVINGS'; verification_method: 'EXTERNALLY_VERIFIED'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; name?: string; user_defined_id?: string; } | { account_number: string; country: string; currency: string; owner: string; owner_type: 'INDIVIDUAL' | 'BUSINESS'; routing_number: string; type: 'CHECKING' | 'SAVINGS'; verification_method: 'UNVERIFIED'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; name?: string; user_defined_id?: string; };", + ], + response: + "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", + }, + { + name: 'retrieve', + endpoint: '/v1/external_bank_accounts/{external_bank_account_token}', + httpMethod: 'get', + summary: 'Get external bank account by token', + description: 'Get the external bank account by token.', + stainlessPath: '(resource) external_bank_accounts > (method) retrieve', + qualified: 'client.externalBankAccounts.retrieve', + params: ['external_bank_account_token: string;'], + response: + "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", + markdown: + "## retrieve\n\n`client.externalBankAccounts.retrieve(external_bank_account_token: string): { token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: external_bank_account_address; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n**get** `/v1/external_bank_accounts/{external_bank_account_token}`\n\nGet the external bank account by token.\n\n### Parameters\n\n- `external_bank_account_token: string`\n\n### Returns\n\n- `{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n - `token: string`\n - `country: string`\n - `created: string`\n - `currency: string`\n - `last_four: string`\n - `owner: string`\n - `owner_type: 'BUSINESS' | 'INDIVIDUAL'`\n - `routing_number: string`\n - `state: 'ENABLED' | 'CLOSED' | 'PAUSED'`\n - `type: 'CHECKING' | 'SAVINGS'`\n - `verification_attempts: number`\n - `verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'`\n - `verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'`\n - `account_token?: string`\n - `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `company_id?: string`\n - `dob?: string`\n - `doing_business_as?: string`\n - `financial_account_token?: string`\n - `name?: string`\n - `user_defined_id?: string`\n - `verification_failed_reason?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalBankAccount = await client.externalBankAccounts.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(externalBankAccount);\n```", + }, + { + name: 'update', + endpoint: '/v1/external_bank_accounts/{external_bank_account_token}', + httpMethod: 'patch', + summary: 'Update external bank account', + description: 'Update the external bank account by token.', + stainlessPath: '(resource) external_bank_accounts > (method) update', + qualified: 'client.externalBankAccounts.update', + params: [ + 'external_bank_account_token: string;', + 'address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; };', + 'company_id?: string;', + 'dob?: string;', + 'doing_business_as?: string;', + 'name?: string;', + 'owner?: string;', + "owner_type?: 'INDIVIDUAL' | 'BUSINESS';", + "type?: 'CHECKING' | 'SAVINGS';", + 'user_defined_id?: string;', + ], + response: + "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", + markdown: + "## update\n\n`client.externalBankAccounts.update(external_bank_account_token: string, address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }, company_id?: string, dob?: string, doing_business_as?: string, name?: string, owner?: string, owner_type?: 'INDIVIDUAL' | 'BUSINESS', type?: 'CHECKING' | 'SAVINGS', user_defined_id?: string): { token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: external_bank_account_address; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n**patch** `/v1/external_bank_accounts/{external_bank_account_token}`\n\nUpdate the external bank account by token.\n\n### Parameters\n\n- `external_bank_account_token: string`\n\n- `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n Address\n - `address1: string`\n - `city: string`\n - `country: string`\n - `postal_code: string`\n - `state: string`\n - `address2?: string`\n\n- `company_id?: string`\n Optional field that helps identify bank accounts in receipts\n\n- `dob?: string`\n Date of Birth of the Individual that owns the external bank account\n\n- `doing_business_as?: string`\n Doing Business As\n\n- `name?: string`\n The nickname for this External Bank Account\n\n- `owner?: string`\n Legal Name of the business or individual who owns the external account. This will appear in statements\n\n- `owner_type?: 'INDIVIDUAL' | 'BUSINESS'`\n Owner Type\n\n- `type?: 'CHECKING' | 'SAVINGS'`\n\n- `user_defined_id?: string`\n User Defined ID\n\n### Returns\n\n- `{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n - `token: string`\n - `country: string`\n - `created: string`\n - `currency: string`\n - `last_four: string`\n - `owner: string`\n - `owner_type: 'BUSINESS' | 'INDIVIDUAL'`\n - `routing_number: string`\n - `state: 'ENABLED' | 'CLOSED' | 'PAUSED'`\n - `type: 'CHECKING' | 'SAVINGS'`\n - `verification_attempts: number`\n - `verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'`\n - `verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'`\n - `account_token?: string`\n - `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `company_id?: string`\n - `dob?: string`\n - `doing_business_as?: string`\n - `financial_account_token?: string`\n - `name?: string`\n - `user_defined_id?: string`\n - `verification_failed_reason?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalBankAccount = await client.externalBankAccounts.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(externalBankAccount);\n```", + }, + { + name: 'list', + endpoint: '/v1/external_bank_accounts', + httpMethod: 'get', + summary: 'List external bank accounts', + description: 'List all the external bank accounts for the provided search criteria.', + stainlessPath: '(resource) external_bank_accounts > (method) list', + qualified: 'client.externalBankAccounts.list', + params: [ + 'account_token?: string;', + "account_types?: 'CHECKING' | 'SAVINGS'[];", + 'countries?: string[];', + 'ending_before?: string;', + "owner_types?: 'INDIVIDUAL' | 'BUSINESS'[];", + 'page_size?: number;', + 'starting_after?: string;', + "states?: 'ENABLED' | 'CLOSED' | 'PAUSED'[];", + "verification_states?: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'[];", + ], + response: + "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", + markdown: + "## list\n\n`client.externalBankAccounts.list(account_token?: string, account_types?: 'CHECKING' | 'SAVINGS'[], countries?: string[], ending_before?: string, owner_types?: 'INDIVIDUAL' | 'BUSINESS'[], page_size?: number, starting_after?: string, states?: 'ENABLED' | 'CLOSED' | 'PAUSED'[], verification_states?: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'[]): { token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: external_bank_account_address; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n**get** `/v1/external_bank_accounts`\n\nList all the external bank accounts for the provided search criteria.\n\n### Parameters\n\n- `account_token?: string`\n\n- `account_types?: 'CHECKING' | 'SAVINGS'[]`\n\n- `countries?: 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- `owner_types?: 'INDIVIDUAL' | 'BUSINESS'[]`\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- `states?: 'ENABLED' | 'CLOSED' | 'PAUSED'[]`\n\n- `verification_states?: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'[]`\n\n### Returns\n\n- `{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n - `token: string`\n - `country: string`\n - `created: string`\n - `currency: string`\n - `last_four: string`\n - `owner: string`\n - `owner_type: 'BUSINESS' | 'INDIVIDUAL'`\n - `routing_number: string`\n - `state: 'ENABLED' | 'CLOSED' | 'PAUSED'`\n - `type: 'CHECKING' | 'SAVINGS'`\n - `verification_attempts: number`\n - `verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'`\n - `verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'`\n - `account_token?: string`\n - `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `company_id?: string`\n - `dob?: string`\n - `doing_business_as?: string`\n - `financial_account_token?: string`\n - `name?: string`\n - `user_defined_id?: string`\n - `verification_failed_reason?: 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 externalBankAccountListResponse of client.externalBankAccounts.list()) {\n console.log(externalBankAccountListResponse);\n}\n```", + }, + { + name: 'retry_micro_deposits', + endpoint: '/v1/external_bank_accounts/{external_bank_account_token}/retry_micro_deposits', + httpMethod: 'post', + summary: 'Retry external bank account via micro deposit', + description: 'Retry external bank account micro deposit verification.', + stainlessPath: '(resource) external_bank_accounts > (method) retry_micro_deposits', + qualified: 'client.externalBankAccounts.retryMicroDeposits', + params: ['external_bank_account_token: string;', 'financial_account_token?: string;'], + response: + "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", + markdown: + "## retry_micro_deposits\n\n`client.externalBankAccounts.retryMicroDeposits(external_bank_account_token: string, financial_account_token?: string): { token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: external_bank_account_address; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n**post** `/v1/external_bank_accounts/{external_bank_account_token}/retry_micro_deposits`\n\nRetry external bank account micro deposit verification.\n\n### Parameters\n\n- `external_bank_account_token: string`\n\n- `financial_account_token?: string`\n\n### Returns\n\n- `{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n - `token: string`\n - `country: string`\n - `created: string`\n - `currency: string`\n - `last_four: string`\n - `owner: string`\n - `owner_type: 'BUSINESS' | 'INDIVIDUAL'`\n - `routing_number: string`\n - `state: 'ENABLED' | 'CLOSED' | 'PAUSED'`\n - `type: 'CHECKING' | 'SAVINGS'`\n - `verification_attempts: number`\n - `verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'`\n - `verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'`\n - `account_token?: string`\n - `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `company_id?: string`\n - `dob?: string`\n - `doing_business_as?: string`\n - `financial_account_token?: string`\n - `name?: string`\n - `user_defined_id?: string`\n - `verification_failed_reason?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.externalBankAccounts.retryMicroDeposits('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + }, + { + name: 'retry_prenote', + endpoint: '/v1/external_bank_accounts/{external_bank_account_token}/retry_prenote', + httpMethod: 'post', + summary: 'Retry external bank account via prenote', + description: 'Retry external bank account prenote verification.', + stainlessPath: '(resource) external_bank_accounts > (method) retry_prenote', + qualified: 'client.externalBankAccounts.retryPrenote', + params: ['external_bank_account_token: string;', 'financial_account_token?: string;'], + response: + "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'INDIVIDUAL' | 'BUSINESS'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PRENOTE' | 'EXTERNALLY_VERIFIED' | 'UNVERIFIED'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", + markdown: + "## retry_prenote\n\n`client.externalBankAccounts.retryPrenote(external_bank_account_token: string, financial_account_token?: string): { token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: owner_type; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: verification_method; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: external_bank_account_address; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n**post** `/v1/external_bank_accounts/{external_bank_account_token}/retry_prenote`\n\nRetry external bank account prenote verification.\n\n### Parameters\n\n- `external_bank_account_token: string`\n\n- `financial_account_token?: string`\n\n### Returns\n\n- `{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'INDIVIDUAL' | 'BUSINESS'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PRENOTE' | 'EXTERNALLY_VERIFIED' | 'UNVERIFIED'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n - `token: string`\n - `country: string`\n - `created: string`\n - `currency: string`\n - `last_four: string`\n - `owner: string`\n - `owner_type: 'INDIVIDUAL' | 'BUSINESS'`\n - `routing_number: string`\n - `state: 'ENABLED' | 'CLOSED' | 'PAUSED'`\n - `type: 'CHECKING' | 'SAVINGS'`\n - `verification_attempts: number`\n - `verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PRENOTE' | 'EXTERNALLY_VERIFIED' | 'UNVERIFIED'`\n - `verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'`\n - `account_token?: string`\n - `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `company_id?: string`\n - `dob?: string`\n - `doing_business_as?: string`\n - `financial_account_token?: string`\n - `name?: string`\n - `user_defined_id?: string`\n - `verification_failed_reason?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalBankAccount = await client.externalBankAccounts.retryPrenote('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(externalBankAccount);\n```", + }, + { + name: 'unpause', + endpoint: '/v1/external_bank_accounts/{external_bank_account_token}/unpause', + httpMethod: 'post', + summary: 'Unpause external bank account', + description: 'Unpause an external bank account\n', + stainlessPath: '(resource) external_bank_accounts > (method) unpause', + qualified: 'client.externalBankAccounts.unpause', + params: ['external_bank_account_token: string;'], + response: + "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'INDIVIDUAL' | 'BUSINESS'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PRENOTE' | 'EXTERNALLY_VERIFIED' | 'UNVERIFIED'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", + markdown: + "## unpause\n\n`client.externalBankAccounts.unpause(external_bank_account_token: string): { token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: owner_type; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: verification_method; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: external_bank_account_address; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n**post** `/v1/external_bank_accounts/{external_bank_account_token}/unpause`\n\nUnpause an external bank account\n\n\n### Parameters\n\n- `external_bank_account_token: string`\n\n### Returns\n\n- `{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'INDIVIDUAL' | 'BUSINESS'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PRENOTE' | 'EXTERNALLY_VERIFIED' | 'UNVERIFIED'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n - `token: string`\n - `country: string`\n - `created: string`\n - `currency: string`\n - `last_four: string`\n - `owner: string`\n - `owner_type: 'INDIVIDUAL' | 'BUSINESS'`\n - `routing_number: string`\n - `state: 'ENABLED' | 'CLOSED' | 'PAUSED'`\n - `type: 'CHECKING' | 'SAVINGS'`\n - `verification_attempts: number`\n - `verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PRENOTE' | 'EXTERNALLY_VERIFIED' | 'UNVERIFIED'`\n - `verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'`\n - `account_token?: string`\n - `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `company_id?: string`\n - `dob?: string`\n - `doing_business_as?: string`\n - `financial_account_token?: string`\n - `name?: string`\n - `user_defined_id?: string`\n - `verification_failed_reason?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalBankAccount = await client.externalBankAccounts.unpause('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(externalBankAccount);\n```", + }, + { + name: 'create', + endpoint: '/v1/external_bank_accounts/{external_bank_account_token}/micro_deposits', + httpMethod: 'post', + summary: 'Verify external bank account via micro deposit amounts', + description: 'Verify the external bank account by providing the micro deposit amounts.', + stainlessPath: '(resource) external_bank_accounts.micro_deposits > (method) create', + qualified: 'client.externalBankAccounts.microDeposits.create', + params: ['external_bank_account_token: string;', 'micro_deposits: number[];'], + response: + "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", + markdown: + "## create\n\n`client.externalBankAccounts.microDeposits.create(external_bank_account_token: string, micro_deposits: number[]): { token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: external_bank_account_address; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n**post** `/v1/external_bank_accounts/{external_bank_account_token}/micro_deposits`\n\nVerify the external bank account by providing the micro deposit amounts.\n\n### Parameters\n\n- `external_bank_account_token: string`\n\n- `micro_deposits: number[]`\n\n### Returns\n\n- `{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n - `token: string`\n - `country: string`\n - `created: string`\n - `currency: string`\n - `last_four: string`\n - `owner: string`\n - `owner_type: 'BUSINESS' | 'INDIVIDUAL'`\n - `routing_number: string`\n - `state: 'ENABLED' | 'CLOSED' | 'PAUSED'`\n - `type: 'CHECKING' | 'SAVINGS'`\n - `verification_attempts: number`\n - `verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'`\n - `verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'`\n - `account_token?: string`\n - `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `company_id?: string`\n - `dob?: string`\n - `doing_business_as?: string`\n - `financial_account_token?: string`\n - `name?: string`\n - `user_defined_id?: string`\n - `verification_failed_reason?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst microDeposit = await client.externalBankAccounts.microDeposits.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { micro_deposits: [0, 0] });\n\nconsole.log(microDeposit);\n```", + }, + { + name: 'create', + endpoint: '/v1/payments', + httpMethod: 'post', + summary: 'Create payment', + description: 'Initiates a payment between a financial account and an external bank account.', + stainlessPath: '(resource) payments > (method) create', + qualified: 'client.payments.create', + params: [ + 'amount: number;', + 'external_bank_account_token: string;', + 'financial_account_token: string;', + "method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY';", + "method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB'; ach_hold_period?: number; addenda?: string; override_company_name?: string; };", + "type: 'COLLECTION' | 'PAYMENT';", + 'token?: string;', + 'hold?: { token: string; };', + 'memo?: string;', + 'user_defined_id?: string;', + ], + response: + "{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }", + markdown: + "## create\n\n`client.payments.create(amount: number, external_bank_account_token: string, financial_account_token: string, method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY', method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB'; ach_hold_period?: number; addenda?: string; override_company_name?: string; }, type: 'COLLECTION' | 'PAYMENT', token?: string, hold?: { token: string; }, memo?: string, user_defined_id?: string): object`\n\n**post** `/v1/payments`\n\nInitiates a payment between a financial account and an external bank account.\n\n### Parameters\n\n- `amount: number`\n\n- `external_bank_account_token: string`\n\n- `financial_account_token: string`\n\n- `method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY'`\n\n- `method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB'; ach_hold_period?: number; addenda?: string; override_company_name?: string; }`\n - `sec_code: 'CCD' | 'PPD' | 'WEB'`\n - `ach_hold_period?: number`\n Number of days to hold the ACH payment\n - `addenda?: string`\n - `override_company_name?: string`\n Value to override the configured company name with. Can only be used if allowed to override\n\n- `type: 'COLLECTION' | 'PAYMENT'`\n\n- `token?: string`\n Customer-provided token that will serve as an idempotency token. This token will become the transaction token.\n\n- `hold?: { token: string; }`\n Optional hold to settle when this payment is initiated.\n - `token: string`\n Token of the hold to settle when this payment is initiated.\n\n- `memo?: string`\n\n- `user_defined_id?: string`\n\n### Returns\n\n- `{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: wire_party_details; debtor?: wire_party_details; message_id?: string; remittance_information?: string; }; pending_amount: number; related_account_tokens: { account_token: string; business_account_token: string; }; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n Payment transaction\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst payment = await client.payments.create({\n amount: 1,\n external_bank_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n method: 'ACH_NEXT_DAY',\n method_attributes: { sec_code: 'CCD' },\n type: 'COLLECTION',\n});\n\nconsole.log(payment);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/payments/{payment_token}', + httpMethod: 'get', + summary: 'Get payment by token', + description: 'Get the payment by token.', + stainlessPath: '(resource) payments > (method) retrieve', + qualified: 'client.payments.retrieve', + params: ['payment_token: string;'], + response: + "{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }", + markdown: + "## retrieve\n\n`client.payments.retrieve(payment_token: string): { token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n\n**get** `/v1/payments/{payment_token}`\n\nGet the payment by token.\n\n### Parameters\n\n- `payment_token: string`\n\n### Returns\n\n- `{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: object; debtor?: object; message_id?: string; remittance_information?: string; }; pending_amount: number; related_account_tokens: { account_token: string; business_account_token: string; }; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n Payment transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `descriptor: string`\n - `direction: 'CREDIT' | 'DEBIT'`\n - `events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]`\n - `family: 'PAYMENT'`\n - `financial_account_token: string`\n - `method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'`\n - `method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: { account_number?: string; agent_id?: string; agent_name?: string; name?: string; }; debtor?: { account_number?: string; agent_id?: string; agent_name?: string; name?: string; }; message_id?: string; remittance_information?: string; }`\n - `pending_amount: number`\n - `related_account_tokens: { account_token: string; business_account_token: string; }`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `currency?: string`\n - `expected_release_date?: string`\n - `external_bank_account_token?: string`\n - `type?: string`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst payment = await client.payments.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(payment);\n```", + }, + { + name: 'list', + endpoint: '/v1/payments', + httpMethod: 'get', + summary: 'List payments', + description: 'List all the payments for the provided search criteria.', + stainlessPath: '(resource) payments > (method) list', + qualified: 'client.payments.list', + params: [ + 'account_token?: string;', + 'begin?: string;', + 'business_account_token?: string;', + "category?: 'ACH';", + 'end?: string;', + 'ending_before?: string;', + 'financial_account_token?: string;', + 'page_size?: number;', + "result?: 'APPROVED' | 'DECLINED';", + 'starting_after?: string;', + "status?: 'DECLINED' | 'PENDING' | 'RETURNED' | 'SETTLED';", + ], + response: + "{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }", + markdown: + "## list\n\n`client.payments.list(account_token?: string, begin?: string, business_account_token?: string, category?: 'ACH', end?: string, ending_before?: string, financial_account_token?: string, page_size?: number, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'DECLINED' | 'PENDING' | 'RETURNED' | 'SETTLED'): { token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n\n**get** `/v1/payments`\n\nList all the payments for the provided search criteria.\n\n### Parameters\n\n- `account_token?: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `business_account_token?: string`\n\n- `category?: 'ACH'`\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `financial_account_token?: string`\n\n- `page_size?: number`\n Page size (for pagination).\n\n- `result?: 'APPROVED' | 'DECLINED'`\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- `status?: 'DECLINED' | 'PENDING' | 'RETURNED' | 'SETTLED'`\n\n### Returns\n\n- `{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: object; debtor?: object; message_id?: string; remittance_information?: string; }; pending_amount: number; related_account_tokens: { account_token: string; business_account_token: string; }; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n Payment transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `descriptor: string`\n - `direction: 'CREDIT' | 'DEBIT'`\n - `events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]`\n - `family: 'PAYMENT'`\n - `financial_account_token: string`\n - `method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'`\n - `method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: { account_number?: string; agent_id?: string; agent_name?: string; name?: string; }; debtor?: { account_number?: string; agent_id?: string; agent_name?: string; name?: string; }; message_id?: string; remittance_information?: string; }`\n - `pending_amount: number`\n - `related_account_tokens: { account_token: string; business_account_token: string; }`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `currency?: string`\n - `expected_release_date?: string`\n - `external_bank_account_token?: string`\n - `type?: string`\n - `user_defined_id?: 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 payment of client.payments.list()) {\n console.log(payment);\n}\n```", + }, + { + name: 'retry', + endpoint: '/v1/payments/{payment_token}/retry', + httpMethod: 'post', + summary: 'Retry payment', + description: 'Retry an origination which has been returned.', + stainlessPath: '(resource) payments > (method) retry', + qualified: 'client.payments.retry', + params: ['payment_token: string;'], + response: + "{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }", + markdown: + "## retry\n\n`client.payments.retry(payment_token: string): object`\n\n**post** `/v1/payments/{payment_token}/retry`\n\nRetry an origination which has been returned.\n\n### Parameters\n\n- `payment_token: string`\n\n### Returns\n\n- `{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: wire_party_details; debtor?: wire_party_details; message_id?: string; remittance_information?: string; }; pending_amount: number; related_account_tokens: { account_token: string; business_account_token: string; }; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n Payment transaction\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.payments.retry('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + }, + { + name: 'return', + endpoint: '/v1/payments/{payment_token}/return', + httpMethod: 'post', + summary: 'Return payment', + description: + 'Return an ACH payment with a specified return reason code. Returns must be initiated\nwithin the time window specified by NACHA rules for each return code (typically 2 banking\ndays for most codes, 60 calendar days for unauthorized debits). For a complete list of\nreturn codes and their meanings, see the [ACH Return Reasons documentation](https://docs.lithic.com/docs/ach-overview#ach-return-reasons).\n\nNote:\n * This endpoint does not modify the state of the financial account associated with the payment. If you would like to change the account state, use the [Update financial account status](https://docs.lithic.com/reference/updatefinancialaccountstatus) endpoint.\n * By default this endpoint is not enabled for your account. Please contact your implementations manager to enable this feature.\n', + stainlessPath: '(resource) payments > (method) return', + qualified: 'client.payments.return', + params: [ + 'payment_token: string;', + 'financial_account_token: string;', + 'return_reason_code: string;', + 'addenda?: string;', + 'date_of_death?: string;', + 'memo?: string;', + ], + response: + "{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }", + markdown: + "## return\n\n`client.payments.return(payment_token: string, financial_account_token: string, return_reason_code: string, addenda?: string, date_of_death?: string, memo?: string): { token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n\n**post** `/v1/payments/{payment_token}/return`\n\nReturn an ACH payment with a specified return reason code. Returns must be initiated\nwithin the time window specified by NACHA rules for each return code (typically 2 banking\ndays for most codes, 60 calendar days for unauthorized debits). For a complete list of\nreturn codes and their meanings, see the [ACH Return Reasons documentation](https://docs.lithic.com/docs/ach-overview#ach-return-reasons).\n\nNote:\n * This endpoint does not modify the state of the financial account associated with the payment. If you would like to change the account state, use the [Update financial account status](https://docs.lithic.com/reference/updatefinancialaccountstatus) endpoint.\n * By default this endpoint is not enabled for your account. Please contact your implementations manager to enable this feature.\n\n\n### Parameters\n\n- `payment_token: string`\n\n- `financial_account_token: string`\n Globally unique identifier for the financial account\n\n- `return_reason_code: string`\n ACH return reason code indicating the reason for returning the payment. Supported codes include R01-R53 and R80-R85. For a complete list of return codes and their meanings, see [ACH Return Reasons](https://docs.lithic.com/docs/ach-overview#ach-return-reasons)\n\n- `addenda?: string`\n Optional additional information about the return. Limited to 44 characters\n\n- `date_of_death?: string`\n Date of death in YYYY-MM-DD format. Required when using return codes **R14** (representative payee deceased) or **R15** (beneficiary or account holder deceased)\n\n- `memo?: string`\n Optional memo for the return. Limited to 10 characters\n\n### Returns\n\n- `{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: object; debtor?: object; message_id?: string; remittance_information?: string; }; pending_amount: number; related_account_tokens: { account_token: string; business_account_token: string; }; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n Payment transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `descriptor: string`\n - `direction: 'CREDIT' | 'DEBIT'`\n - `events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]`\n - `family: 'PAYMENT'`\n - `financial_account_token: string`\n - `method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'`\n - `method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: { account_number?: string; agent_id?: string; agent_name?: string; name?: string; }; debtor?: { account_number?: string; agent_id?: string; agent_name?: string; name?: string; }; message_id?: string; remittance_information?: string; }`\n - `pending_amount: number`\n - `related_account_tokens: { account_token: string; business_account_token: string; }`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `currency?: string`\n - `expected_release_date?: string`\n - `external_bank_account_token?: string`\n - `type?: string`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst payment = await client.payments.return('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', return_reason_code: 'R01' });\n\nconsole.log(payment);\n```", + }, + { + name: 'simulate_action', + endpoint: '/v1/simulate/payments/{payment_token}/action', + httpMethod: 'post', + summary: 'Simulate payment lifecycle event', + description: 'Simulate payment lifecycle event', + stainlessPath: '(resource) payments > (method) simulate_action', + qualified: 'client.payments.simulateAction', + params: [ + 'payment_token: string;', + 'event_type: string;', + 'date_of_death?: string;', + 'decline_reason?: string;', + 'return_addenda?: string;', + 'return_reason_code?: string;', + ], + response: + "{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }", + markdown: + "## simulate_action\n\n`client.payments.simulateAction(payment_token: string, event_type: string, date_of_death?: string, decline_reason?: string, return_addenda?: string, return_reason_code?: string): { debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n**post** `/v1/simulate/payments/{payment_token}/action`\n\nSimulate payment lifecycle event\n\n### Parameters\n\n- `payment_token: string`\n\n- `event_type: string`\n Event Type\n\n- `date_of_death?: string`\n Date of Death for ACH Return\n\n- `decline_reason?: string`\n Decline reason\n\n- `return_addenda?: string`\n Return Addenda\n\n- `return_reason_code?: string`\n Return Reason Code\n\n### Returns\n\n- `{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n - `debugging_request_id: string`\n - `result: 'APPROVED' | 'DECLINED'`\n - `transaction_event_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.payments.simulateAction('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { event_type: 'ACH_ORIGINATION_REVIEWED' });\n\nconsole.log(response);\n```", + }, + { + name: 'simulate_receipt', + endpoint: '/v1/simulate/payments/receipt', + httpMethod: 'post', + summary: 'Simulate receipt', + description: 'Simulates a receipt of a Payment.', + stainlessPath: '(resource) payments > (method) simulate_receipt', + qualified: 'client.payments.simulateReceipt', + params: [ + 'token: string;', + 'amount: number;', + 'financial_account_token: string;', + "receipt_type: 'RECEIPT_CREDIT' | 'RECEIPT_DEBIT';", + 'memo?: string;', + ], + response: + "{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }", + markdown: + "## simulate_receipt\n\n`client.payments.simulateReceipt(token: string, amount: number, financial_account_token: string, receipt_type: 'RECEIPT_CREDIT' | 'RECEIPT_DEBIT', memo?: string): { debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n**post** `/v1/simulate/payments/receipt`\n\nSimulates a receipt of a Payment.\n\n### Parameters\n\n- `token: string`\n Customer-generated payment token used to uniquely identify the simulated payment\n\n- `amount: number`\n Amount\n\n- `financial_account_token: string`\n Financial Account Token\n\n- `receipt_type: 'RECEIPT_CREDIT' | 'RECEIPT_DEBIT'`\n Receipt Type\n\n- `memo?: string`\n Memo\n\n### Returns\n\n- `{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n - `debugging_request_id: string`\n - `result: 'APPROVED' | 'DECLINED'`\n - `transaction_event_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.payments.simulateReceipt({\n token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n amount: 0,\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n receipt_type: 'RECEIPT_CREDIT',\n});\n\nconsole.log(response);\n```", + }, + { + name: 'simulate_release', + endpoint: '/v1/simulate/payments/release', + httpMethod: 'post', + summary: 'Simulate release payment', + description: 'Simulates a release of a Payment.', + stainlessPath: '(resource) payments > (method) simulate_release', + qualified: 'client.payments.simulateRelease', + params: ['payment_token: string;'], + response: + "{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }", + markdown: + "## simulate_release\n\n`client.payments.simulateRelease(payment_token: string): { debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n**post** `/v1/simulate/payments/release`\n\nSimulates a release of a Payment.\n\n### Parameters\n\n- `payment_token: string`\n Payment Token\n\n### Returns\n\n- `{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n - `debugging_request_id: string`\n - `result: 'APPROVED' | 'DECLINED'`\n - `transaction_event_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.payments.simulateRelease({ payment_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(response);\n```", + }, + { + name: 'simulate_return', + endpoint: '/v1/simulate/payments/return', + httpMethod: 'post', + summary: 'Simulate return payment', + description: 'Simulates a return of a Payment.', + stainlessPath: '(resource) payments > (method) simulate_return', + qualified: 'client.payments.simulateReturn', + params: ['payment_token: string;', 'return_reason_code?: string;'], + response: + "{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }", + markdown: + "## simulate_return\n\n`client.payments.simulateReturn(payment_token: string, return_reason_code?: string): { debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n**post** `/v1/simulate/payments/return`\n\nSimulates a return of a Payment.\n\n### Parameters\n\n- `payment_token: string`\n Payment Token\n\n- `return_reason_code?: string`\n Return Reason Code\n\n### Returns\n\n- `{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n - `debugging_request_id: string`\n - `result: 'APPROVED' | 'DECLINED'`\n - `transaction_event_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.payments.simulateReturn({ payment_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(response);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/three_ds_authentication/{three_ds_authentication_token}', + httpMethod: 'get', + summary: 'Get 3DS authentication', + description: 'Get 3DS Authentication by token', + stainlessPath: '(resource) three_ds.authentication > (method) retrieve', + qualified: 'client.threeDS.authentication.retrieve', + params: ['three_ds_authentication_token: string;'], + response: + "{ token: string; account_type: 'CREDIT' | 'DEBIT' | 'NOT_APPLICABLE'; authentication_result: 'DECLINE' | 'SUCCESS' | 'PENDING_CHALLENGE' | 'PENDING_DECISION'; card_expiry_check: 'MATCH' | 'MISMATCH' | 'NOT_PRESENT'; card_token: string; cardholder: object; channel: 'APP_BASED' | 'BROWSER' | 'THREE_DS_REQUESTOR_INITIATED'; created: string; merchant: object; message_category: 'NON_PAYMENT_AUTHENTICATION' | 'PAYMENT_AUTHENTICATION'; three_ds_requestor_challenge_indicator: string; additional_data?: object; app?: object; authentication_request_type?: string; browser?: object; challenge_metadata?: object; challenge_orchestrated_by?: 'LITHIC' | 'CUSTOMER' | 'NO_CHALLENGE'; decision_made_by?: 'LITHIC_RULES' | 'LITHIC_DEFAULT' | 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'NETWORK' | 'UNKNOWN'; three_ri_request_type?: string; transaction?: object; }", + markdown: + "## retrieve\n\n`client.threeDS.authentication.retrieve(three_ds_authentication_token: string): { token: string; account_type: 'CREDIT' | 'DEBIT' | 'NOT_APPLICABLE'; authentication_result: 'DECLINE' | 'SUCCESS' | 'PENDING_CHALLENGE' | 'PENDING_DECISION'; card_expiry_check: 'MATCH' | 'MISMATCH' | 'NOT_PRESENT'; card_token: string; cardholder: object; channel: 'APP_BASED' | 'BROWSER' | 'THREE_DS_REQUESTOR_INITIATED'; created: string; merchant: object; message_category: 'NON_PAYMENT_AUTHENTICATION' | 'PAYMENT_AUTHENTICATION'; three_ds_requestor_challenge_indicator: string; additional_data?: object; app?: object; authentication_request_type?: string; browser?: object; challenge_metadata?: object; challenge_orchestrated_by?: 'LITHIC' | 'CUSTOMER' | 'NO_CHALLENGE'; decision_made_by?: 'LITHIC_RULES' | 'LITHIC_DEFAULT' | 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'NETWORK' | 'UNKNOWN'; three_ri_request_type?: string; transaction?: object; }`\n\n**get** `/v1/three_ds_authentication/{three_ds_authentication_token}`\n\nGet 3DS Authentication by token\n\n### Parameters\n\n- `three_ds_authentication_token: string`\n\n### Returns\n\n- `{ token: string; account_type: 'CREDIT' | 'DEBIT' | 'NOT_APPLICABLE'; authentication_result: 'DECLINE' | 'SUCCESS' | 'PENDING_CHALLENGE' | 'PENDING_DECISION'; card_expiry_check: 'MATCH' | 'MISMATCH' | 'NOT_PRESENT'; card_token: string; cardholder: { address_match?: boolean; address_on_file_match?: 'MATCH' | 'MATCH_ADDRESS_ONLY' | 'MATCH_ZIP_ONLY' | 'MISMATCH' | 'NOT_PRESENT'; billing_address?: { address1?: string; address2?: string; address3?: string; city?: string; country?: string; postal_code?: string; }; email?: string; name?: string; phone_number_home?: string; phone_number_mobile?: string; phone_number_work?: string; shipping_address?: { address1?: string; address2?: string; address3?: string; city?: string; country?: string; postal_code?: string; }; }; channel: 'APP_BASED' | 'BROWSER' | 'THREE_DS_REQUESTOR_INITIATED'; created: string; merchant: { risk_indicator: { delivery_email_address?: string; delivery_time_frame?: 'ELECTRONIC_DELIVERY' | 'OVERNIGHT_SHIPPING' | 'SAME_DAY_SHIPPING' | 'TWO_DAY_OR_MORE_SHIPPING'; gift_card_amount?: number; gift_card_count?: number; gift_card_currency?: string; order_availability?: 'FUTURE_AVAILABILITY' | 'MERCHANDISE_AVAILABLE'; pre_order_available_date?: string; reorder_items?: 'FIRST_TIME_ORDERED' | 'REORDERED'; shipping_method?: string; }; id?: string; country?: string; mcc?: string; name?: string; }; message_category: 'NON_PAYMENT_AUTHENTICATION' | 'PAYMENT_AUTHENTICATION'; three_ds_requestor_challenge_indicator: string; additional_data?: { network_decision?: 'LOW_RISK' | 'NOT_LOW_RISK'; network_risk_score?: number; }; app?: { device?: string; device_info?: string; ip?: string; latitude?: number; locale?: string; longitude?: number; os?: string; platform?: string; screen_height?: number; screen_width?: number; time_zone?: string; }; authentication_request_type?: string; browser?: { accept_header?: string; ip?: string; java_enabled?: boolean; javascript_enabled?: boolean; language?: string; time_zone?: string; user_agent?: string; }; challenge_metadata?: { method_type: 'SMS_OTP' | 'OUT_OF_BAND'; status: string; phone_number?: string; }; challenge_orchestrated_by?: 'LITHIC' | 'CUSTOMER' | 'NO_CHALLENGE'; decision_made_by?: 'LITHIC_RULES' | 'LITHIC_DEFAULT' | 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'NETWORK' | 'UNKNOWN'; three_ri_request_type?: string; transaction?: { amount: number; cardholder_amount: number; currency: string; currency_exponent: number; date_time: string; type: string; }; }`\n Represents a 3DS authentication\n\n - `token: string`\n - `account_type: 'CREDIT' | 'DEBIT' | 'NOT_APPLICABLE'`\n - `authentication_result: 'DECLINE' | 'SUCCESS' | 'PENDING_CHALLENGE' | 'PENDING_DECISION'`\n - `card_expiry_check: 'MATCH' | 'MISMATCH' | 'NOT_PRESENT'`\n - `card_token: string`\n - `cardholder: { address_match?: boolean; address_on_file_match?: 'MATCH' | 'MATCH_ADDRESS_ONLY' | 'MATCH_ZIP_ONLY' | 'MISMATCH' | 'NOT_PRESENT'; billing_address?: { address1?: string; address2?: string; address3?: string; city?: string; country?: string; postal_code?: string; }; email?: string; name?: string; phone_number_home?: string; phone_number_mobile?: string; phone_number_work?: string; shipping_address?: { address1?: string; address2?: string; address3?: string; city?: string; country?: string; postal_code?: string; }; }`\n - `channel: 'APP_BASED' | 'BROWSER' | 'THREE_DS_REQUESTOR_INITIATED'`\n - `created: string`\n - `merchant: { risk_indicator: { delivery_email_address?: string; delivery_time_frame?: 'ELECTRONIC_DELIVERY' | 'OVERNIGHT_SHIPPING' | 'SAME_DAY_SHIPPING' | 'TWO_DAY_OR_MORE_SHIPPING'; gift_card_amount?: number; gift_card_count?: number; gift_card_currency?: string; order_availability?: 'FUTURE_AVAILABILITY' | 'MERCHANDISE_AVAILABLE'; pre_order_available_date?: string; reorder_items?: 'FIRST_TIME_ORDERED' | 'REORDERED'; shipping_method?: string; }; id?: string; country?: string; mcc?: string; name?: string; }`\n - `message_category: 'NON_PAYMENT_AUTHENTICATION' | 'PAYMENT_AUTHENTICATION'`\n - `three_ds_requestor_challenge_indicator: string`\n - `additional_data?: { network_decision?: 'LOW_RISK' | 'NOT_LOW_RISK'; network_risk_score?: number; }`\n - `app?: { device?: string; device_info?: string; ip?: string; latitude?: number; locale?: string; longitude?: number; os?: string; platform?: string; screen_height?: number; screen_width?: number; time_zone?: string; }`\n - `authentication_request_type?: string`\n - `browser?: { accept_header?: string; ip?: string; java_enabled?: boolean; javascript_enabled?: boolean; language?: string; time_zone?: string; user_agent?: string; }`\n - `challenge_metadata?: { method_type: 'SMS_OTP' | 'OUT_OF_BAND'; status: string; phone_number?: string; }`\n - `challenge_orchestrated_by?: 'LITHIC' | 'CUSTOMER' | 'NO_CHALLENGE'`\n - `decision_made_by?: 'LITHIC_RULES' | 'LITHIC_DEFAULT' | 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'NETWORK' | 'UNKNOWN'`\n - `three_ri_request_type?: string`\n - `transaction?: { amount: number; cardholder_amount: number; currency: string; currency_exponent: number; date_time: string; type: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst threeDSAuthentication = await client.threeDS.authentication.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(threeDSAuthentication);\n```", + }, + { + name: 'simulate', + endpoint: '/v1/three_ds_authentication/simulate', + httpMethod: 'post', + summary: 'Simulate 3DS authentication', + description: + "Simulates a 3DS authentication request from the payment network as if it came from an ACS. If you're configured for 3DS Customer Decisioning, simulating authentications requires your customer decisioning endpoint to be set up properly (respond with a valid JSON). If the authentication decision is to challenge, ensure that the account holder associated with the card transaction has a valid phone number configured to receive the OTP code via SMS. ", + stainlessPath: '(resource) three_ds.authentication > (method) simulate', + qualified: 'client.threeDS.authentication.simulate', + params: [ + 'merchant: { id: string; country: string; mcc: string; name: string; };', + 'pan: string;', + 'transaction: { amount: number; currency: string; };', + "card_expiry_check?: 'MATCH' | 'MISMATCH' | 'NOT_PRESENT';", + ], + response: '{ token?: string; }', + markdown: + "## simulate\n\n`client.threeDS.authentication.simulate(merchant: { id: string; country: string; mcc: string; name: string; }, pan: string, transaction: { amount: number; currency: string; }, card_expiry_check?: 'MATCH' | 'MISMATCH' | 'NOT_PRESENT'): { token?: string; }`\n\n**post** `/v1/three_ds_authentication/simulate`\n\nSimulates a 3DS authentication request from the payment network as if it came from an ACS. If you're configured for 3DS Customer Decisioning, simulating authentications requires your customer decisioning endpoint to be set up properly (respond with a valid JSON). If the authentication decision is to challenge, ensure that the account holder associated with the card transaction has a valid phone number configured to receive the OTP code via SMS. \n\n### Parameters\n\n- `merchant: { id: string; country: string; mcc: string; name: string; }`\n Merchant information for the simulated transaction\n - `id: string`\n Unique identifier to identify the payment card acceptor. Corresponds to `merchant_acceptor_id` in authorization.\n - `country: string`\n Country of the address provided by the cardholder in ISO 3166-1 alpha-3 format (e.g. USA)\n - `mcc: string`\n Merchant category code for the transaction to be simulated. A four-digit number listed in ISO 18245. Supported merchant category codes can be found [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).\n - `name: string`\n Merchant descriptor, corresponds to `descriptor` in authorization. If CHALLENGE keyword is included, Lithic will trigger a challenge.\n\n- `pan: string`\n Sixteen digit card number.\n\n- `transaction: { amount: number; currency: string; }`\n Transaction details for the simulation\n - `amount: number`\n Amount (in cents) to authenticate.\n - `currency: string`\n 3-character alphabetic ISO 4217 currency code.\n\n- `card_expiry_check?: 'MATCH' | 'MISMATCH' | 'NOT_PRESENT'`\n When set will use the following values as part of the Simulated Authentication. When not set defaults to MATCH\n\n### Returns\n\n- `{ token?: string; }`\n\n - `token?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.threeDS.authentication.simulate({\n merchant: {\n id: 'OODKZAPJVN4YS7O',\n country: 'USA',\n mcc: '5812',\n name: 'COFFEE SHOP',\n},\n pan: '4111111289144142',\n transaction: { amount: 0, currency: 'GBP' },\n});\n\nconsole.log(response);\n```", + }, + { + name: 'simulate_otp_entry', + endpoint: '/v1/three_ds_decisioning/simulate/enter_otp', + httpMethod: 'post', + summary: 'Simulate entering OTP into 3DS Challenge UI', + description: + 'Endpoint for simulating entering OTP into 3DS Challenge UI. A call to [/v1/three_ds_authentication/simulate](https://docs.lithic.com/reference/postsimulateauthentication) that resulted in triggered SMS-OTP challenge must precede. Only a single attempt is supported; upon entering OTP, the challenge is either approved or declined.', + stainlessPath: '(resource) three_ds.authentication > (method) simulate_otp_entry', + qualified: 'client.threeDS.authentication.simulateOtpEntry', + params: ['token: string;', 'otp: string;'], + markdown: + "## simulate_otp_entry\n\n`client.threeDS.authentication.simulateOtpEntry(token: string, otp: string): void`\n\n**post** `/v1/three_ds_decisioning/simulate/enter_otp`\n\nEndpoint for simulating entering OTP into 3DS Challenge UI. A call to [/v1/three_ds_authentication/simulate](https://docs.lithic.com/reference/postsimulateauthentication) that resulted in triggered SMS-OTP challenge must precede. Only a single attempt is supported; upon entering OTP, the challenge is either approved or declined.\n\n### Parameters\n\n- `token: string`\n A unique token returned as part of a /v1/three_ds_authentication/simulate call that resulted in PENDING_CHALLENGE authentication result.\n\n- `otp: string`\n The OTP entered by the cardholder\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.threeDS.authentication.simulateOtpEntry({ token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac', otp: '123456' })\n```", + }, + { + name: 'challenge_response', + endpoint: '/v1/three_ds_decisioning/challenge_response', + httpMethod: 'post', + summary: 'Respond to a Challenge Request', + description: + "Card program's response to a 3DS Challenge Request.\nChallenge Request is emitted as a webhook [three_ds_authentication.challenge](https://docs.lithic.com/reference/post_three-ds-authentication-challenge) and your Card Program needs to be configured with Out of Band (OOB) Challenges in order to receive it (see https://docs.lithic.com/docs/3ds-challenge-flow for more information).", + stainlessPath: '(resource) three_ds.decisioning > (method) challenge_response', + qualified: 'client.threeDS.decisioning.challengeResponse', + params: ['token: string;', "challenge_response: 'APPROVE' | 'DECLINE_BY_CUSTOMER';"], + markdown: + "## challenge_response\n\n`client.threeDS.decisioning.challengeResponse(token: string, challenge_response: 'APPROVE' | 'DECLINE_BY_CUSTOMER'): void`\n\n**post** `/v1/three_ds_decisioning/challenge_response`\n\nCard program's response to a 3DS Challenge Request.\nChallenge Request is emitted as a webhook [three_ds_authentication.challenge](https://docs.lithic.com/reference/post_three-ds-authentication-challenge) and your Card Program needs to be configured with Out of Band (OOB) Challenges in order to receive it (see https://docs.lithic.com/docs/3ds-challenge-flow for more information).\n\n### Parameters\n\n- `token: string`\n Globally unique identifier for 3DS Authentication that resulted in PENDING_CHALLENGE authentication result.\n\n- `challenge_response: 'APPROVE' | 'DECLINE_BY_CUSTOMER'`\n Whether the Cardholder has approved or declined the issued Challenge\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.threeDS.decisioning.challengeResponse({ token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', challenge_response: 'APPROVE' })\n```", + }, + { + name: 'retrieve_secret', + endpoint: '/v1/three_ds_decisioning/secret', + httpMethod: 'get', + summary: 'Retrieve the 3DS Decisioning HMAC secret key', + description: + 'Retrieve the 3DS Decisioning HMAC secret key. If one does not exist for your program yet, calling this endpoint will create one for you. The headers (which you can use to verify 3DS Decisioning requests) will begin appearing shortly after calling this endpoint for the first time. See [this page](https://docs.lithic.com/docs/3ds-decisioning#3ds-decisioning-hmac-secrets) for more detail about verifying 3DS Decisioning requests.\n', + stainlessPath: '(resource) three_ds.decisioning > (method) retrieve_secret', + qualified: 'client.threeDS.decisioning.retrieveSecret', + response: '{ secret?: string; }', + markdown: + "## retrieve_secret\n\n`client.threeDS.decisioning.retrieveSecret(): { secret?: string; }`\n\n**get** `/v1/three_ds_decisioning/secret`\n\nRetrieve the 3DS Decisioning HMAC secret key. If one does not exist for your program yet, calling this endpoint will create one for you. The headers (which you can use to verify 3DS Decisioning requests) will begin appearing shortly after calling this endpoint for the first time. See [this page](https://docs.lithic.com/docs/3ds-decisioning#3ds-decisioning-hmac-secrets) for more detail about verifying 3DS Decisioning requests.\n\n\n### Returns\n\n- `{ secret?: string; }`\n\n - `secret?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.threeDS.decisioning.retrieveSecret();\n\nconsole.log(response);\n```", + }, + { + name: 'rotate_secret', + endpoint: '/v1/three_ds_decisioning/secret/rotate', + httpMethod: 'post', + summary: 'Rotate the 3DS Decisioning HMAC secret key', + description: + 'Generate a new 3DS Decisioning HMAC secret key. The old secret key will be deactivated 24 hours after a successful request to this endpoint. Make a [`GET /three_ds_decisioning/secret`](https://docs.lithic.com/reference/getthreedsdecisioningsecret) request to retrieve the new secret key.\n', + stainlessPath: '(resource) three_ds.decisioning > (method) rotate_secret', + qualified: 'client.threeDS.decisioning.rotateSecret', + markdown: + "## rotate_secret\n\n`client.threeDS.decisioning.rotateSecret(): void`\n\n**post** `/v1/three_ds_decisioning/secret/rotate`\n\nGenerate a new 3DS Decisioning HMAC secret key. The old secret key will be deactivated 24 hours after a successful request to this endpoint. Make a [`GET /three_ds_decisioning/secret`](https://docs.lithic.com/reference/getthreedsdecisioningsecret) request to retrieve the new secret key.\n\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.threeDS.decisioning.rotateSecret()\n```", + }, + { + name: 'list_details', + endpoint: '/v1/reports/settlement/details/{report_date}', + httpMethod: 'get', + summary: 'List settlement details', + description: 'List details.', + stainlessPath: '(resource) reports.settlement > (method) list_details', + qualified: 'client.reports.settlement.listDetails', + params: [ + 'report_date: string;', + 'ending_before?: string;', + 'page_size?: number;', + 'starting_after?: string;', + ], + response: + "{ token: string; account_token: string; card_program_token: string; card_token: string; created: string; currency: string; disputes_gross_amount: number; event_tokens: string[]; institution: string; interchange_fee_extended_precision: number; interchange_gross_amount: number; network: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; other_fees_details: { ISA?: number; }; other_fees_gross_amount: number; report_date: string; settlement_date: string; transaction_token: string; transactions_gross_amount: number; type: string; updated: string; fee_description?: string; }", + markdown: + "## list_details\n\n`client.reports.settlement.listDetails(report_date: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; account_token: string; card_program_token: string; card_token: string; created: string; currency: string; disputes_gross_amount: number; event_tokens: string[]; institution: string; interchange_fee_extended_precision: number; interchange_gross_amount: number; network: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; other_fees_details: object; other_fees_gross_amount: number; report_date: string; settlement_date: string; transaction_token: string; transactions_gross_amount: number; type: string; updated: string; fee_description?: string; }`\n\n**get** `/v1/reports/settlement/details/{report_date}`\n\nList details.\n\n### Parameters\n\n- `report_date: 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 Number of records per page.\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; card_program_token: string; card_token: string; created: string; currency: string; disputes_gross_amount: number; event_tokens: string[]; institution: string; interchange_fee_extended_precision: number; interchange_gross_amount: number; network: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; other_fees_details: { ISA?: number; }; other_fees_gross_amount: number; report_date: string; settlement_date: string; transaction_token: string; transactions_gross_amount: number; type: string; updated: string; fee_description?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `card_program_token: string`\n - `card_token: string`\n - `created: string`\n - `currency: string`\n - `disputes_gross_amount: number`\n - `event_tokens: string[]`\n - `institution: string`\n - `interchange_fee_extended_precision: number`\n - `interchange_gross_amount: number`\n - `network: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'`\n - `other_fees_details: { ISA?: number; }`\n - `other_fees_gross_amount: number`\n - `report_date: string`\n - `settlement_date: string`\n - `transaction_token: string`\n - `transactions_gross_amount: number`\n - `type: string`\n - `updated: string`\n - `fee_description?: 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 settlementDetail of client.reports.settlement.listDetails('2023-09-01')) {\n console.log(settlementDetail);\n}\n```", + }, + { + name: 'summary', + endpoint: '/v1/reports/settlement/summary/{report_date}', + httpMethod: 'get', + summary: 'Get settlement summary', + description: 'Get the settlement report for a specified report date. Not available in sandbox.', + stainlessPath: '(resource) reports.settlement > (method) summary', + qualified: 'client.reports.settlement.summary', + params: ['report_date: string;'], + response: + "{ created: string; currency: string; details: { currency?: string; disputes_gross_amount?: number; institution?: string; interchange_gross_amount?: number; network?: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; other_fees_gross_amount?: number; settled_net_amount?: number; transactions_gross_amount?: number; }[]; disputes_gross_amount: number; interchange_gross_amount: number; is_complete: boolean; other_fees_gross_amount: number; report_date: string; settled_net_amount: number; transactions_gross_amount: number; updated: string; }", + markdown: + "## summary\n\n`client.reports.settlement.summary(report_date: string): { created: string; currency: string; details: settlement_summary_details[]; disputes_gross_amount: number; interchange_gross_amount: number; is_complete: boolean; other_fees_gross_amount: number; report_date: string; settled_net_amount: number; transactions_gross_amount: number; updated: string; }`\n\n**get** `/v1/reports/settlement/summary/{report_date}`\n\nGet the settlement report for a specified report date. Not available in sandbox.\n\n### Parameters\n\n- `report_date: string`\n\n### Returns\n\n- `{ created: string; currency: string; details: { currency?: string; disputes_gross_amount?: number; institution?: string; interchange_gross_amount?: number; network?: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; other_fees_gross_amount?: number; settled_net_amount?: number; transactions_gross_amount?: number; }[]; disputes_gross_amount: number; interchange_gross_amount: number; is_complete: boolean; other_fees_gross_amount: number; report_date: string; settled_net_amount: number; transactions_gross_amount: number; updated: string; }`\n\n - `created: string`\n - `currency: string`\n - `details: { currency?: string; disputes_gross_amount?: number; institution?: string; interchange_gross_amount?: number; network?: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; other_fees_gross_amount?: number; settled_net_amount?: number; transactions_gross_amount?: number; }[]`\n - `disputes_gross_amount: number`\n - `interchange_gross_amount: number`\n - `is_complete: boolean`\n - `other_fees_gross_amount: number`\n - `report_date: string`\n - `settled_net_amount: number`\n - `transactions_gross_amount: number`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst settlementReport = await client.reports.settlement.summary('2023-09-01');\n\nconsole.log(settlementReport);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/reports/settlement/network_totals/{token}', + httpMethod: 'get', + summary: 'Get network total', + description: 'Retrieve a specific network total record by token. Not available in sandbox.', + stainlessPath: '(resource) reports.settlement.network_totals > (method) retrieve', + qualified: 'client.reports.settlement.networkTotals.retrieve', + params: ['token: string;'], + response: + "{ token: string; amounts: { gross_settlement: number; interchange_fees: number; net_settlement: number; visa_charges?: number; }; created: string; currency: string; institution_id: string; is_complete: boolean; network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; report_date: string; settlement_institution_id: string; settlement_service: string; updated: string; cycle?: number; }", + markdown: + "## retrieve\n\n`client.reports.settlement.networkTotals.retrieve(token: string): { token: string; amounts: object; created: string; currency: string; institution_id: string; is_complete: boolean; network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; report_date: string; settlement_institution_id: string; settlement_service: string; updated: string; cycle?: number; }`\n\n**get** `/v1/reports/settlement/network_totals/{token}`\n\nRetrieve a specific network total record by token. Not available in sandbox.\n\n### Parameters\n\n- `token: string`\n\n### Returns\n\n- `{ token: string; amounts: { gross_settlement: number; interchange_fees: number; net_settlement: number; visa_charges?: number; }; created: string; currency: string; institution_id: string; is_complete: boolean; network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; report_date: string; settlement_institution_id: string; settlement_service: string; updated: string; cycle?: number; }`\n\n - `token: string`\n - `amounts: { gross_settlement: number; interchange_fees: number; net_settlement: number; visa_charges?: number; }`\n - `created: string`\n - `currency: string`\n - `institution_id: string`\n - `is_complete: boolean`\n - `network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'`\n - `report_date: string`\n - `settlement_institution_id: string`\n - `settlement_service: string`\n - `updated: string`\n - `cycle?: number`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst networkTotal = await client.reports.settlement.networkTotals.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(networkTotal);\n```", + }, + { + name: 'list', + endpoint: '/v1/reports/settlement/network_totals', + httpMethod: 'get', + summary: 'List network totals', + description: 'List network total records with optional filters. Not available in sandbox.', + stainlessPath: '(resource) reports.settlement.network_totals > (method) list', + qualified: 'client.reports.settlement.networkTotals.list', + params: [ + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'institution_id?: string;', + "network?: 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK';", + 'page_size?: number;', + 'report_date?: string;', + 'report_date_begin?: string;', + 'report_date_end?: string;', + 'settlement_institution_id?: string;', + 'starting_after?: string;', + ], + response: + "{ token: string; amounts: { gross_settlement: number; interchange_fees: number; net_settlement: number; visa_charges?: number; }; created: string; currency: string; institution_id: string; is_complete: boolean; network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; report_date: string; settlement_institution_id: string; settlement_service: string; updated: string; cycle?: number; }", + markdown: + "## list\n\n`client.reports.settlement.networkTotals.list(begin?: string, end?: string, ending_before?: string, institution_id?: string, network?: 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK', page_size?: number, report_date?: string, report_date_begin?: string, report_date_end?: string, settlement_institution_id?: string, starting_after?: string): { token: string; amounts: object; created: string; currency: string; institution_id: string; is_complete: boolean; network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; report_date: string; settlement_institution_id: string; settlement_service: string; updated: string; cycle?: number; }`\n\n**get** `/v1/reports/settlement/network_totals`\n\nList network total records with optional filters. Not available in sandbox.\n\n### Parameters\n\n- `begin?: string`\n Datetime in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Datetime in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `institution_id?: string`\n Institution ID to filter on.\n\n- `network?: 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'`\n Network to filter on.\n\n- `page_size?: number`\n Number of records per page.\n\n- `report_date?: string`\n Singular report date to filter on (YYYY-MM-DD). Cannot be populated in conjunction with report_date_begin or report_date_end.\n\n- `report_date_begin?: string`\n Earliest report date to filter on, inclusive (YYYY-MM-DD).\n\n- `report_date_end?: string`\n Latest report date to filter on, inclusive (YYYY-MM-DD).\n\n- `settlement_institution_id?: string`\n Settlement institution ID to filter on.\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; amounts: { gross_settlement: number; interchange_fees: number; net_settlement: number; visa_charges?: number; }; created: string; currency: string; institution_id: string; is_complete: boolean; network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; report_date: string; settlement_institution_id: string; settlement_service: string; updated: string; cycle?: number; }`\n\n - `token: string`\n - `amounts: { gross_settlement: number; interchange_fees: number; net_settlement: number; visa_charges?: number; }`\n - `created: string`\n - `currency: string`\n - `institution_id: string`\n - `is_complete: boolean`\n - `network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'`\n - `report_date: string`\n - `settlement_institution_id: string`\n - `settlement_service: string`\n - `updated: string`\n - `cycle?: number`\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 networkTotal of client.reports.settlement.networkTotals.list()) {\n console.log(networkTotal);\n}\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/card_programs/{card_program_token}', + httpMethod: 'get', + summary: 'Get card program', + description: 'Get card program.', + stainlessPath: '(resource) card_programs > (method) retrieve', + qualified: 'client.cardPrograms.retrieve', + params: ['card_program_token: string;'], + response: + '{ token: string; account_level_management_enabled: boolean; created: string; name: string; pan_range_end: string; pan_range_start: string; cardholder_currency?: string; settlement_currencies?: string[]; }', + markdown: + "## retrieve\n\n`client.cardPrograms.retrieve(card_program_token: string): { token: string; account_level_management_enabled: boolean; created: string; name: string; pan_range_end: string; pan_range_start: string; cardholder_currency?: string; settlement_currencies?: string[]; }`\n\n**get** `/v1/card_programs/{card_program_token}`\n\nGet card program.\n\n### Parameters\n\n- `card_program_token: string`\n\n### Returns\n\n- `{ token: string; account_level_management_enabled: boolean; created: string; name: string; pan_range_end: string; pan_range_start: string; cardholder_currency?: string; settlement_currencies?: string[]; }`\n\n - `token: string`\n - `account_level_management_enabled: boolean`\n - `created: string`\n - `name: string`\n - `pan_range_end: string`\n - `pan_range_start: string`\n - `cardholder_currency?: string`\n - `settlement_currencies?: string[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst cardProgram = await client.cardPrograms.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(cardProgram);\n```", + }, + { + name: 'list', + endpoint: '/v1/card_programs', + httpMethod: 'get', + summary: 'List card programs', + description: 'List card programs.', + stainlessPath: '(resource) card_programs > (method) list', + qualified: 'client.cardPrograms.list', + params: ['ending_before?: string;', 'page_size?: number;', 'starting_after?: string;'], + response: + '{ token: string; account_level_management_enabled: boolean; created: string; name: string; pan_range_end: string; pan_range_start: string; cardholder_currency?: string; settlement_currencies?: string[]; }', + markdown: + "## list\n\n`client.cardPrograms.list(ending_before?: string, page_size?: number, starting_after?: string): { token: string; account_level_management_enabled: boolean; created: string; name: string; pan_range_end: string; pan_range_start: string; cardholder_currency?: string; settlement_currencies?: string[]; }`\n\n**get** `/v1/card_programs`\n\nList card programs.\n\n### Parameters\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_level_management_enabled: boolean; created: string; name: string; pan_range_end: string; pan_range_start: string; cardholder_currency?: string; settlement_currencies?: string[]; }`\n\n - `token: string`\n - `account_level_management_enabled: boolean`\n - `created: string`\n - `name: string`\n - `pan_range_end: string`\n - `pan_range_start: string`\n - `cardholder_currency?: string`\n - `settlement_currencies?: 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 cardProgram of client.cardPrograms.list()) {\n console.log(cardProgram);\n}\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/digital_card_art/{digital_card_art_token}', + httpMethod: 'get', + summary: 'Get digital card art by token', + description: 'Get digital card art by token.', + stainlessPath: '(resource) digital_card_art > (method) retrieve', + qualified: 'client.digitalCardArt.retrieve', + params: ['digital_card_art_token: string;'], + response: + "{ token: string; card_program_token: string; created: string; description: string; is_enabled: boolean; network: 'MASTERCARD' | 'VISA'; is_card_program_default?: boolean; }", + markdown: + "## retrieve\n\n`client.digitalCardArt.retrieve(digital_card_art_token: string): { token: string; card_program_token: string; created: string; description: string; is_enabled: boolean; network: 'MASTERCARD' | 'VISA'; is_card_program_default?: boolean; }`\n\n**get** `/v1/digital_card_art/{digital_card_art_token}`\n\nGet digital card art by token.\n\n### Parameters\n\n- `digital_card_art_token: string`\n\n### Returns\n\n- `{ token: string; card_program_token: string; created: string; description: string; is_enabled: boolean; network: 'MASTERCARD' | 'VISA'; is_card_program_default?: boolean; }`\n\n - `token: string`\n - `card_program_token: string`\n - `created: string`\n - `description: string`\n - `is_enabled: boolean`\n - `network: 'MASTERCARD' | 'VISA'`\n - `is_card_program_default?: boolean`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst digitalCardArt = await client.digitalCardArt.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(digitalCardArt);\n```", + }, + { + name: 'list', + endpoint: '/v1/digital_card_art', + httpMethod: 'get', + summary: 'List digital card art', + description: 'List digital card art.', + stainlessPath: '(resource) digital_card_art > (method) list', + qualified: 'client.digitalCardArt.list', + params: ['ending_before?: string;', 'page_size?: number;', 'starting_after?: string;'], + response: + "{ token: string; card_program_token: string; created: string; description: string; is_enabled: boolean; network: 'MASTERCARD' | 'VISA'; is_card_program_default?: boolean; }", + markdown: + "## list\n\n`client.digitalCardArt.list(ending_before?: string, page_size?: number, starting_after?: string): { token: string; card_program_token: string; created: string; description: string; is_enabled: boolean; network: 'MASTERCARD' | 'VISA'; is_card_program_default?: boolean; }`\n\n**get** `/v1/digital_card_art`\n\nList digital card art.\n\n### Parameters\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; card_program_token: string; created: string; description: string; is_enabled: boolean; network: 'MASTERCARD' | 'VISA'; is_card_program_default?: boolean; }`\n\n - `token: string`\n - `card_program_token: string`\n - `created: string`\n - `description: string`\n - `is_enabled: boolean`\n - `network: 'MASTERCARD' | 'VISA'`\n - `is_card_program_default?: boolean`\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 digitalCardArt of client.digitalCardArt.list()) {\n console.log(digitalCardArt);\n}\n```", + }, + { + name: 'create', + endpoint: '/v1/book_transfers', + httpMethod: 'post', + summary: 'Create book transfer', + description: 'Book transfer funds between two financial accounts or between a financial account and card', + stainlessPath: '(resource) book_transfers > (method) create', + qualified: 'client.bookTransfers.create', + params: [ + 'amount: number;', + 'category: string;', + 'from_financial_account_token: string;', + 'subtype: string;', + 'to_financial_account_token: string;', + 'type: string;', + 'token?: string;', + 'external_id?: string;', + 'hold_token?: string;', + 'memo?: string;', + "on_closed_account?: 'FAIL' | 'USE_SUSPENSE';", + ], + response: + "{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }", + markdown: + "## create\n\n`client.bookTransfers.create(amount: number, category: string, from_financial_account_token: string, subtype: string, to_financial_account_token: string, type: string, token?: string, external_id?: string, hold_token?: string, memo?: string, on_closed_account?: 'FAIL' | 'USE_SUSPENSE'): { token: string; category: string; created: string; currency: string; events: object[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: external_resource; transaction_series?: object; }`\n\n**post** `/v1/book_transfers`\n\nBook transfer funds between two financial accounts or between a financial account and card\n\n### Parameters\n\n- `amount: number`\n Amount to be transferred in the currency's smallest unit (e.g., cents for USD). This should always be a positive value.\n\n- `category: string`\n\n- `from_financial_account_token: string`\n Globally unique identifier for the financial account or card that will send the funds. Accepted type dependent on the program's use case.\n\n- `subtype: string`\n The program specific subtype code for the specified category/type.\n\n- `to_financial_account_token: string`\n Globally unique identifier for the financial account or card that will receive the funds. Accepted type dependent on the program's use case.\n\n- `type: string`\n Type of the book transfer\n\n- `token?: string`\n Customer-provided token that will serve as an idempotency token. This token will become the transaction token.\n\n- `external_id?: string`\n External ID defined by the customer\n\n- `hold_token?: string`\n Token of an existing hold to settle when this transfer is initiated\n\n- `memo?: string`\n Optional descriptor for the transfer.\n\n- `on_closed_account?: 'FAIL' | 'USE_SUSPENSE'`\n What to do if the financial account is closed when posting an operation\n\n### Returns\n\n- `{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }`\n Book transfer transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `currency: string`\n - `events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]`\n - `family: 'TRANSFER'`\n - `from_financial_account_token: string`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `to_financial_account_token: string`\n - `updated: string`\n - `external_id?: string`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst bookTransferResponse = await client.bookTransfers.create({\n amount: 1,\n category: 'ADJUSTMENT',\n from_financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n subtype: 'subtype',\n to_financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n type: 'ATM_BALANCE_INQUIRY',\n});\n\nconsole.log(bookTransferResponse);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/book_transfers/{book_transfer_token}', + httpMethod: 'get', + summary: 'Get book transfer by token', + description: 'Get book transfer by token', + stainlessPath: '(resource) book_transfers > (method) retrieve', + qualified: 'client.bookTransfers.retrieve', + params: ['book_transfer_token: string;'], + response: + "{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }", + markdown: + "## retrieve\n\n`client.bookTransfers.retrieve(book_transfer_token: string): { token: string; category: string; created: string; currency: string; events: object[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: external_resource; transaction_series?: object; }`\n\n**get** `/v1/book_transfers/{book_transfer_token}`\n\nGet book transfer by token\n\n### Parameters\n\n- `book_transfer_token: string`\n\n### Returns\n\n- `{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }`\n Book transfer transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `currency: string`\n - `events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]`\n - `family: 'TRANSFER'`\n - `from_financial_account_token: string`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `to_financial_account_token: string`\n - `updated: string`\n - `external_id?: string`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst bookTransferResponse = await client.bookTransfers.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(bookTransferResponse);\n```", + }, + { + name: 'list', + endpoint: '/v1/book_transfers', + httpMethod: 'get', + summary: 'List book transfers', + description: 'List book transfers', + stainlessPath: '(resource) book_transfers > (method) list', + qualified: 'client.bookTransfers.list', + params: [ + 'account_token?: string;', + 'begin?: string;', + 'business_account_token?: string;', + 'category?: string;', + 'end?: string;', + 'ending_before?: string;', + 'financial_account_token?: string;', + 'page_size?: number;', + "result?: 'APPROVED' | 'DECLINED';", + 'starting_after?: string;', + "status?: 'DECLINED' | 'SETTLED';", + ], + response: + "{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }", + markdown: + "## list\n\n`client.bookTransfers.list(account_token?: string, begin?: string, business_account_token?: string, category?: string, end?: string, ending_before?: string, financial_account_token?: string, page_size?: number, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'DECLINED' | 'SETTLED'): { token: string; category: string; created: string; currency: string; events: object[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: external_resource; transaction_series?: object; }`\n\n**get** `/v1/book_transfers`\n\nList book transfers\n\n### Parameters\n\n- `account_token?: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `business_account_token?: string`\n\n- `category?: string`\n Book Transfer category to be returned.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `financial_account_token?: string`\n Globally unique identifier for the financial account or card that will send the funds. Accepted type dependent on the program's use case.\n\n- `page_size?: number`\n Page size (for pagination).\n\n- `result?: 'APPROVED' | 'DECLINED'`\n Book transfer result to be returned.\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- `status?: 'DECLINED' | 'SETTLED'`\n Book transfer status to be returned.\n\n### Returns\n\n- `{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }`\n Book transfer transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `currency: string`\n - `events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]`\n - `family: 'TRANSFER'`\n - `from_financial_account_token: string`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `to_financial_account_token: string`\n - `updated: string`\n - `external_id?: string`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: 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 bookTransferResponse of client.bookTransfers.list()) {\n console.log(bookTransferResponse);\n}\n```", + }, + { + name: 'retry', + endpoint: '/v1/book_transfers/{book_transfer_token}/retry', + httpMethod: 'post', + summary: 'Retry book transfer', + description: 'Retry a book transfer that has been declined', + stainlessPath: '(resource) book_transfers > (method) retry', + qualified: 'client.bookTransfers.retry', + params: ['book_transfer_token: string;', 'retry_token: string;'], + response: + "{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }", + markdown: + "## retry\n\n`client.bookTransfers.retry(book_transfer_token: string, retry_token: string): { token: string; category: string; created: string; currency: string; events: object[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: external_resource; transaction_series?: object; }`\n\n**post** `/v1/book_transfers/{book_transfer_token}/retry`\n\nRetry a book transfer that has been declined\n\n### Parameters\n\n- `book_transfer_token: string`\n\n- `retry_token: string`\n Customer-provided token that will serve as an idempotency token. This token will become the transaction token.\n\n### Returns\n\n- `{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }`\n Book transfer transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `currency: string`\n - `events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]`\n - `family: 'TRANSFER'`\n - `from_financial_account_token: string`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `to_financial_account_token: string`\n - `updated: string`\n - `external_id?: string`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst bookTransferResponse = await client.bookTransfers.retry('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { retry_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(bookTransferResponse);\n```", + }, + { + name: 'reverse', + endpoint: '/v1/book_transfers/{book_transfer_token}/reverse', + httpMethod: 'post', + summary: 'Reverse book transfer', + description: 'Reverse a book transfer', + stainlessPath: '(resource) book_transfers > (method) reverse', + qualified: 'client.bookTransfers.reverse', + params: ['book_transfer_token: string;', 'memo?: string;'], + response: + "{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }", + markdown: + "## reverse\n\n`client.bookTransfers.reverse(book_transfer_token: string, memo?: string): { token: string; category: string; created: string; currency: string; events: object[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: external_resource; transaction_series?: object; }`\n\n**post** `/v1/book_transfers/{book_transfer_token}/reverse`\n\nReverse a book transfer\n\n### Parameters\n\n- `book_transfer_token: string`\n\n- `memo?: string`\n Optional descriptor for the reversal.\n\n### Returns\n\n- `{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }`\n Book transfer transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `currency: string`\n - `events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]`\n - `family: 'TRANSFER'`\n - `from_financial_account_token: string`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `to_financial_account_token: string`\n - `updated: string`\n - `external_id?: string`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst bookTransferResponse = await client.bookTransfers.reverse('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(bookTransferResponse);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/credit_products/{credit_product_token}/extended_credit', + httpMethod: 'get', + summary: 'Get extended credit', + description: 'Get the extended credit for a given credit product under a program', + stainlessPath: '(resource) credit_products.extended_credit > (method) retrieve', + qualified: 'client.creditProducts.extendedCredit.retrieve', + params: ['credit_product_token: string;'], + response: '{ credit_extended: number; }', + markdown: + "## retrieve\n\n`client.creditProducts.extendedCredit.retrieve(credit_product_token: string): { credit_extended: number; }`\n\n**get** `/v1/credit_products/{credit_product_token}/extended_credit`\n\nGet the extended credit for a given credit product under a program\n\n### Parameters\n\n- `credit_product_token: string`\n\n### Returns\n\n- `{ credit_extended: number; }`\n\n - `credit_extended: number`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst extendedCredit = await client.creditProducts.extendedCredit.retrieve('credit_product_token');\n\nconsole.log(extendedCredit);\n```", + }, + { + name: 'create', + endpoint: '/v1/credit_products/{credit_product_token}/prime_rates', + httpMethod: 'post', + summary: 'Post Credit Product Prime Rate', + description: 'Post Credit Product Prime Rate', + stainlessPath: '(resource) credit_products.prime_rates > (method) create', + qualified: 'client.creditProducts.primeRates.create', + params: ['credit_product_token: string;', 'effective_date: string;', 'rate: string;'], + markdown: + "## create\n\n`client.creditProducts.primeRates.create(credit_product_token: string, effective_date: string, rate: string): void`\n\n**post** `/v1/credit_products/{credit_product_token}/prime_rates`\n\nPost Credit Product Prime Rate\n\n### Parameters\n\n- `credit_product_token: string`\n Globally unique identifier for credit products.\n\n- `effective_date: string`\n Date the rate goes into effect\n\n- `rate: string`\n The rate in decimal format\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.creditProducts.primeRates.create('credit_product_token', { effective_date: '2019-12-27', rate: 'rate' })\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/credit_products/{credit_product_token}/prime_rates', + httpMethod: 'get', + summary: 'Get Credit Product Prime Rates', + description: 'Get Credit Product Prime Rates', + stainlessPath: '(resource) credit_products.prime_rates > (method) retrieve', + qualified: 'client.creditProducts.primeRates.retrieve', + params: ['credit_product_token: string;', 'ending_before?: string;', 'starting_after?: string;'], + response: '{ data: { effective_date: string; rate: string; }[]; has_more: boolean; }', + markdown: + "## retrieve\n\n`client.creditProducts.primeRates.retrieve(credit_product_token: string, ending_before?: string, starting_after?: string): { data: object[]; has_more: boolean; }`\n\n**get** `/v1/credit_products/{credit_product_token}/prime_rates`\n\nGet Credit Product Prime Rates\n\n### Parameters\n\n- `credit_product_token: string`\n Globally unique identifier for credit products.\n\n- `ending_before?: string`\n The effective date that the prime rates ends before\n\n- `starting_after?: string`\n The effective date that the prime rate starts after\n\n### Returns\n\n- `{ data: { effective_date: string; rate: string; }[]; has_more: boolean; }`\n\n - `data: { effective_date: string; rate: string; }[]`\n - `has_more: boolean`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst primeRate = await client.creditProducts.primeRates.retrieve('credit_product_token');\n\nconsole.log(primeRate);\n```", + }, + { + name: 'create', + endpoint: '/v1/external_payments', + httpMethod: 'post', + summary: 'Create external payment', + description: 'Create external payment', + stainlessPath: '(resource) external_payments > (method) create', + qualified: 'client.externalPayments.create', + params: [ + 'amount: number;', + 'category: string;', + 'effective_date: string;', + 'financial_account_token: string;', + "payment_type: 'DEPOSIT' | 'WITHDRAWAL';", + 'token?: string;', + 'memo?: string;', + "progress_to?: 'SETTLED' | 'RELEASED';", + 'user_defined_id?: string;', + ], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }", + markdown: + "## create\n\n`client.externalPayments.create(amount: number, category: string, effective_date: string, financial_account_token: string, payment_type: 'DEPOSIT' | 'WITHDRAWAL', token?: string, memo?: string, progress_to?: 'SETTLED' | 'RELEASED', user_defined_id?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**post** `/v1/external_payments`\n\nCreate external payment\n\n### Parameters\n\n- `amount: number`\n\n- `category: string`\n\n- `effective_date: string`\n\n- `financial_account_token: string`\n\n- `payment_type: 'DEPOSIT' | 'WITHDRAWAL'`\n\n- `token?: string`\n Customer-provided token that will serve as an idempotency token. This token will become the transaction token.\n\n- `memo?: string`\n\n- `progress_to?: 'SETTLED' | 'RELEASED'`\n\n- `user_defined_id?: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalPayment = await client.externalPayments.create({\n amount: 0,\n category: 'EXTERNAL_WIRE',\n effective_date: '2019-12-27',\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n payment_type: 'DEPOSIT',\n});\n\nconsole.log(externalPayment);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/external_payments/{external_payment_token}', + httpMethod: 'get', + summary: 'Get external payment', + description: 'Get external payment', + stainlessPath: '(resource) external_payments > (method) retrieve', + qualified: 'client.externalPayments.retrieve', + params: ['external_payment_token: string;'], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }", + markdown: + "## retrieve\n\n`client.externalPayments.retrieve(external_payment_token: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**get** `/v1/external_payments/{external_payment_token}`\n\nGet external payment\n\n### Parameters\n\n- `external_payment_token: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalPayment = await client.externalPayments.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(externalPayment);\n```", + }, + { + name: 'list', + endpoint: '/v1/external_payments', + httpMethod: 'get', + summary: 'List external payments', + description: 'List external payments', + stainlessPath: '(resource) external_payments > (method) list', + qualified: 'client.externalPayments.list', + params: [ + 'begin?: string;', + 'business_account_token?: string;', + 'category?: string;', + 'end?: string;', + 'ending_before?: string;', + 'financial_account_token?: string;', + 'page_size?: number;', + "result?: 'APPROVED' | 'DECLINED';", + 'starting_after?: string;', + "status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED';", + ], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }", + markdown: + "## list\n\n`client.externalPayments.list(begin?: string, business_account_token?: string, category?: string, end?: string, ending_before?: string, financial_account_token?: string, page_size?: number, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**get** `/v1/external_payments`\n\nList external payments\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `business_account_token?: string`\n\n- `category?: string`\n External Payment category to be returned.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `financial_account_token?: string`\n Globally unique identifier for the financial account or card that will send the funds. Accepted type dependent on the program's use case.\n\n- `page_size?: number`\n Page size (for pagination).\n\n- `result?: 'APPROVED' | 'DECLINED'`\n External Payment result to be returned.\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- `status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n Book transfer status to be returned.\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: 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 externalPayment of client.externalPayments.list()) {\n console.log(externalPayment);\n}\n```", + }, + { + name: 'cancel', + endpoint: '/v1/external_payments/{external_payment_token}/cancel', + httpMethod: 'post', + summary: 'Cancel external payment', + description: 'Cancel external payment', + stainlessPath: '(resource) external_payments > (method) cancel', + qualified: 'client.externalPayments.cancel', + params: ['external_payment_token: string;', 'effective_date: string;', 'memo?: string;'], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }", + markdown: + "## cancel\n\n`client.externalPayments.cancel(external_payment_token: string, effective_date: string, memo?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**post** `/v1/external_payments/{external_payment_token}/cancel`\n\nCancel external payment\n\n### Parameters\n\n- `external_payment_token: string`\n\n- `effective_date: string`\n\n- `memo?: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalPayment = await client.externalPayments.cancel('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { effective_date: '2019-12-27' });\n\nconsole.log(externalPayment);\n```", + }, + { + name: 'release', + endpoint: '/v1/external_payments/{external_payment_token}/release', + httpMethod: 'post', + summary: 'Release external payment', + description: 'Release external payment', + stainlessPath: '(resource) external_payments > (method) release', + qualified: 'client.externalPayments.release', + params: ['external_payment_token: string;', 'effective_date: string;', 'memo?: string;'], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }", + markdown: + "## release\n\n`client.externalPayments.release(external_payment_token: string, effective_date: string, memo?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**post** `/v1/external_payments/{external_payment_token}/release`\n\nRelease external payment\n\n### Parameters\n\n- `external_payment_token: string`\n\n- `effective_date: string`\n\n- `memo?: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalPayment = await client.externalPayments.release('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { effective_date: '2019-12-27' });\n\nconsole.log(externalPayment);\n```", + }, + { + name: 'reverse', + endpoint: '/v1/external_payments/{external_payment_token}/reverse', + httpMethod: 'post', + summary: 'Reverse external payment', + description: 'Reverse external payment', + stainlessPath: '(resource) external_payments > (method) reverse', + qualified: 'client.externalPayments.reverse', + params: ['external_payment_token: string;', 'effective_date: string;', 'memo?: string;'], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }", + markdown: + "## reverse\n\n`client.externalPayments.reverse(external_payment_token: string, effective_date: string, memo?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**post** `/v1/external_payments/{external_payment_token}/reverse`\n\nReverse external payment\n\n### Parameters\n\n- `external_payment_token: string`\n\n- `effective_date: string`\n\n- `memo?: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalPayment = await client.externalPayments.reverse('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { effective_date: '2019-12-27' });\n\nconsole.log(externalPayment);\n```", + }, + { + name: 'settle', + endpoint: '/v1/external_payments/{external_payment_token}/settle', + httpMethod: 'post', + summary: 'Settle external payment', + description: 'Settle external payment', + stainlessPath: '(resource) external_payments > (method) settle', + qualified: 'client.externalPayments.settle', + params: [ + 'external_payment_token: string;', + 'effective_date: string;', + 'memo?: string;', + "progress_to?: 'SETTLED' | 'RELEASED';", + ], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }", + markdown: + "## settle\n\n`client.externalPayments.settle(external_payment_token: string, effective_date: string, memo?: string, progress_to?: 'SETTLED' | 'RELEASED'): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**post** `/v1/external_payments/{external_payment_token}/settle`\n\nSettle external payment\n\n### Parameters\n\n- `external_payment_token: string`\n\n- `effective_date: string`\n\n- `memo?: string`\n\n- `progress_to?: 'SETTLED' | 'RELEASED'`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalPayment = await client.externalPayments.settle('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { effective_date: '2019-12-27' });\n\nconsole.log(externalPayment);\n```", + }, + { + name: 'create', + endpoint: '/v1/management_operations', + httpMethod: 'post', + summary: 'Create management operation', + description: 'Create management operation', + stainlessPath: '(resource) management_operations > (method) create', + qualified: 'client.managementOperations.create', + params: [ + 'amount: number;', + 'category: string;', + "direction: 'CREDIT' | 'DEBIT';", + 'effective_date: string;', + 'event_type: string;', + 'financial_account_token: string;', + 'token?: string;', + 'memo?: string;', + "on_closed_account?: 'FAIL' | 'USE_SUSPENSE';", + 'subtype?: string;', + 'user_defined_id?: string;', + ], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }", + markdown: + "## create\n\n`client.managementOperations.create(amount: number, category: string, direction: 'CREDIT' | 'DEBIT', effective_date: string, event_type: string, financial_account_token: string, token?: string, memo?: string, on_closed_account?: 'FAIL' | 'USE_SUSPENSE', subtype?: string, user_defined_id?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: object[]; external_resource?: external_resource; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: object; user_defined_id?: string; }`\n\n**post** `/v1/management_operations`\n\nCreate management operation\n\n### Parameters\n\n- `amount: number`\n\n- `category: string`\n\n- `direction: 'CREDIT' | 'DEBIT'`\n\n- `effective_date: string`\n\n- `event_type: string`\n\n- `financial_account_token: string`\n\n- `token?: string`\n Customer-provided token that will serve as an idempotency token. This token will become the transaction token.\n\n- `memo?: string`\n\n- `on_closed_account?: 'FAIL' | 'USE_SUSPENSE'`\n What to do if the financial account is closed when posting an operation\n\n- `subtype?: string`\n\n- `user_defined_id?: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `direction?: 'CREDIT' | 'DEBIT'`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `family?: 'MANAGEMENT_OPERATION'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst managementOperationTransaction = await client.managementOperations.create({\n amount: 1,\n category: 'MANAGEMENT_FEE',\n direction: 'CREDIT',\n effective_date: '2019-12-27',\n event_type: 'LOSS_WRITE_OFF',\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(managementOperationTransaction);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/management_operations/{management_operation_token}', + httpMethod: 'get', + summary: 'Get management operation', + description: 'Get management operation', + stainlessPath: '(resource) management_operations > (method) retrieve', + qualified: 'client.managementOperations.retrieve', + params: ['management_operation_token: string;'], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }", + markdown: + "## retrieve\n\n`client.managementOperations.retrieve(management_operation_token: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: object[]; external_resource?: external_resource; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: object; user_defined_id?: string; }`\n\n**get** `/v1/management_operations/{management_operation_token}`\n\nGet management operation\n\n### Parameters\n\n- `management_operation_token: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `direction?: 'CREDIT' | 'DEBIT'`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `family?: 'MANAGEMENT_OPERATION'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst managementOperationTransaction = await client.managementOperations.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(managementOperationTransaction);\n```", + }, + { + name: 'list', + endpoint: '/v1/management_operations', + httpMethod: 'get', + summary: 'List management operations', + description: 'List management operations', + stainlessPath: '(resource) management_operations > (method) list', + qualified: 'client.managementOperations.list', + params: [ + 'begin?: string;', + 'business_account_token?: string;', + 'category?: string;', + 'end?: string;', + 'ending_before?: string;', + 'financial_account_token?: string;', + 'page_size?: number;', + 'starting_after?: string;', + "status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED';", + ], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }", + markdown: + "## list\n\n`client.managementOperations.list(begin?: string, business_account_token?: string, category?: string, end?: string, ending_before?: string, financial_account_token?: string, page_size?: number, starting_after?: string, status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: object[]; external_resource?: external_resource; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: object; user_defined_id?: string; }`\n\n**get** `/v1/management_operations`\n\nList management operations\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `business_account_token?: string`\n\n- `category?: string`\n Management operation category to be returned.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `financial_account_token?: string`\n Globally unique identifier for the financial account. Accepted type dependent on the program's use case.\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- `status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n Management operation status to be returned.\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `direction?: 'CREDIT' | 'DEBIT'`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `family?: 'MANAGEMENT_OPERATION'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n - `user_defined_id?: 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 managementOperationTransaction of client.managementOperations.list()) {\n console.log(managementOperationTransaction);\n}\n```", + }, + { + name: 'reverse', + endpoint: '/v1/management_operations/{management_operation_token}/reverse', + httpMethod: 'post', + summary: 'Reverse management operation', + description: 'Reverse a management operation', + stainlessPath: '(resource) management_operations > (method) reverse', + qualified: 'client.managementOperations.reverse', + params: ['management_operation_token: string;', 'effective_date: string;', 'memo?: string;'], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }", + markdown: + "## reverse\n\n`client.managementOperations.reverse(management_operation_token: string, effective_date: string, memo?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: object[]; external_resource?: external_resource; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: object; user_defined_id?: string; }`\n\n**post** `/v1/management_operations/{management_operation_token}/reverse`\n\nReverse a management operation\n\n### Parameters\n\n- `management_operation_token: string`\n\n- `effective_date: string`\n\n- `memo?: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `direction?: 'CREDIT' | 'DEBIT'`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `family?: 'MANAGEMENT_OPERATION'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst managementOperationTransaction = await client.managementOperations.reverse('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { effective_date: '2019-12-27' });\n\nconsole.log(managementOperationTransaction);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/funding_events/{funding_event_token}', + httpMethod: 'get', + summary: 'Get funding event by ID', + description: 'Get funding event for program by id', + stainlessPath: '(resource) funding_events > (method) retrieve', + qualified: 'client.fundingEvents.retrieve', + params: ['funding_event_token: string;'], + response: + "{ token: string; collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'; collection_tokens: string[]; created: string; high_watermark: string; network_settlement_summary: { network_settlement_date: string; settled_gross_amount: number; }[]; previous_high_watermark: string; updated: string; }", + markdown: + "## retrieve\n\n`client.fundingEvents.retrieve(funding_event_token: string): { token: string; collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'; collection_tokens: string[]; created: string; high_watermark: string; network_settlement_summary: object[]; previous_high_watermark: string; updated: string; }`\n\n**get** `/v1/funding_events/{funding_event_token}`\n\nGet funding event for program by id\n\n### Parameters\n\n- `funding_event_token: string`\n\n### Returns\n\n- `{ token: string; collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'; collection_tokens: string[]; created: string; high_watermark: string; network_settlement_summary: { network_settlement_date: string; settled_gross_amount: number; }[]; previous_high_watermark: string; updated: string; }`\n\n - `token: string`\n - `collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'`\n - `collection_tokens: string[]`\n - `created: string`\n - `high_watermark: string`\n - `network_settlement_summary: { network_settlement_date: string; settled_gross_amount: number; }[]`\n - `previous_high_watermark: string`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst fundingEvent = await client.fundingEvents.retrieve('funding_event_token');\n\nconsole.log(fundingEvent);\n```", + }, + { + name: 'list', + endpoint: '/v1/funding_events', + httpMethod: 'get', + summary: 'List funding events', + description: 'Get all funding events for program', + stainlessPath: '(resource) funding_events > (method) list', + qualified: 'client.fundingEvents.list', + params: ['ending_before?: string;', 'page_size?: number;', 'starting_after?: string;'], + response: + "{ token: string; collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'; collection_tokens: string[]; created: string; high_watermark: string; network_settlement_summary: { network_settlement_date: string; settled_gross_amount: number; }[]; previous_high_watermark: string; updated: string; }", + markdown: + "## list\n\n`client.fundingEvents.list(ending_before?: string, page_size?: number, starting_after?: string): { token: string; collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'; collection_tokens: string[]; created: string; high_watermark: string; network_settlement_summary: object[]; previous_high_watermark: string; updated: string; }`\n\n**get** `/v1/funding_events`\n\nGet all funding events for program\n\n### Parameters\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; collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'; collection_tokens: string[]; created: string; high_watermark: string; network_settlement_summary: { network_settlement_date: string; settled_gross_amount: number; }[]; previous_high_watermark: string; updated: string; }`\n\n - `token: string`\n - `collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'`\n - `collection_tokens: string[]`\n - `created: string`\n - `high_watermark: string`\n - `network_settlement_summary: { network_settlement_date: string; settled_gross_amount: number; }[]`\n - `previous_high_watermark: string`\n - `updated: 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 fundingEvent of client.fundingEvents.list()) {\n console.log(fundingEvent);\n}\n```", + }, + { + name: 'retrieve_details', + endpoint: '/v1/funding_events/{funding_event_token}/details', + httpMethod: 'get', + summary: 'Get funding event details', + description: 'Get funding event details by id', + stainlessPath: '(resource) funding_events > (method) retrieve_details', + qualified: 'client.fundingEvents.retrieveDetails', + params: ['funding_event_token: string;'], + response: '{ token: string; settlement_details_url: string; settlement_summary_url: string; }', + markdown: + "## retrieve_details\n\n`client.fundingEvents.retrieveDetails(funding_event_token: string): { token: string; settlement_details_url: string; settlement_summary_url: string; }`\n\n**get** `/v1/funding_events/{funding_event_token}/details`\n\nGet funding event details by id\n\n### Parameters\n\n- `funding_event_token: string`\n\n### Returns\n\n- `{ token: string; settlement_details_url: string; settlement_summary_url: string; }`\n\n - `token: string`\n - `settlement_details_url: string`\n - `settlement_summary_url: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.fundingEvents.retrieveDetails('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/fraud/transactions/{transaction_token}', + httpMethod: 'get', + summary: 'Get a fraud report for a transaction', + description: + 'Retrieve a fraud report for a specific transaction identified by its unique transaction token.\n', + stainlessPath: '(resource) fraud.transactions > (method) retrieve', + qualified: 'client.fraud.transactions.retrieve', + params: ['transaction_token: string;'], + response: + "{ fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT' | 'NO_REPORTED_FRAUD'; transaction_token: string; comment?: string; created_at?: string; fraud_type?: string; updated_at?: string; }", + markdown: + "## retrieve\n\n`client.fraud.transactions.retrieve(transaction_token: string): { fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT' | 'NO_REPORTED_FRAUD'; transaction_token: string; comment?: string; created_at?: string; fraud_type?: string; updated_at?: string; }`\n\n**get** `/v1/fraud/transactions/{transaction_token}`\n\nRetrieve a fraud report for a specific transaction identified by its unique transaction token.\n\n\n### Parameters\n\n- `transaction_token: string`\n\n### Returns\n\n- `{ fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT' | 'NO_REPORTED_FRAUD'; transaction_token: string; comment?: string; created_at?: string; fraud_type?: string; updated_at?: string; }`\n\n - `fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT' | 'NO_REPORTED_FRAUD'`\n - `transaction_token: string`\n - `comment?: string`\n - `created_at?: string`\n - `fraud_type?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst transaction = await client.fraud.transactions.retrieve('00000000-0000-0000-0000-000000000000');\n\nconsole.log(transaction);\n```", + }, + { + name: 'report', + endpoint: '/v1/fraud/transactions/{transaction_token}', + httpMethod: 'post', + summary: 'Create or update a fraud report for a transaction', + description: + 'Report fraud for a specific transaction token by providing details such as fraud type, fraud status, and any additional comments.\n', + stainlessPath: '(resource) fraud.transactions > (method) report', + qualified: 'client.fraud.transactions.report', + params: [ + 'transaction_token: string;', + "fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT';", + 'comment?: string;', + 'fraud_type?: string;', + ], + response: + "{ fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT' | 'NO_REPORTED_FRAUD'; transaction_token: string; comment?: string; created_at?: string; fraud_type?: string; updated_at?: string; }", + markdown: + "## report\n\n`client.fraud.transactions.report(transaction_token: string, fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT', comment?: string, fraud_type?: string): { fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT' | 'NO_REPORTED_FRAUD'; transaction_token: string; comment?: string; created_at?: string; fraud_type?: string; updated_at?: string; }`\n\n**post** `/v1/fraud/transactions/{transaction_token}`\n\nReport fraud for a specific transaction token by providing details such as fraud type, fraud status, and any additional comments.\n\n\n### Parameters\n\n- `transaction_token: string`\n\n- `fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT'`\n The fraud status of the transaction, string (enum) supporting the following values:\n\n - `SUSPECTED_FRAUD`: The transaction is suspected to be fraudulent, but this hasn’t been confirmed.\n - `FRAUDULENT`: The transaction is confirmed to be fraudulent. A transaction may immediately be moved into this state, or be graduated into this state from the `SUSPECTED_FRAUD` state.\n - `NOT_FRAUDULENT`: The transaction is (explicitly) marked as not fraudulent. A transaction may immediately be moved into this state, or be graduated into this state from the `SUSPECTED_FRAUD` state.\n\n- `comment?: string`\n Optional field providing additional information or context about why the transaction is considered fraudulent.\n\n- `fraud_type?: string`\n Specifies the type or category of fraud that the transaction is suspected or confirmed to involve, string (enum) supporting the following values:\n\n - `FIRST_PARTY_FRAUD`: First-party fraud occurs when a legitimate account or cardholder intentionally misuses financial services for personal gain. This includes actions such as disputing legitimate transactions to obtain a refund, abusing return policies, or defaulting on credit obligations without intent to repay.\n - `ACCOUNT_TAKEOVER`: Account takeover fraud occurs when a fraudster gains unauthorized access to an existing account, modifies account settings, and carries out fraudulent transactions.\n - `CARD_COMPROMISED`: Card compromised fraud occurs when a fraudster gains access to card details without taking over the account, such as through physical card theft, cloning, or online data breaches.\n - `IDENTITY_THEFT`: Identity theft fraud occurs when a fraudster uses stolen personal information, such as Social Security numbers or addresses, to open accounts, apply for loans, or conduct financial transactions in someone's name.\n - `CARDHOLDER_MANIPULATION`: This type of fraud occurs when a fraudster manipulates or coerces a legitimate cardholder into unauthorized transactions, often through social engineering tactics.\n\n### Returns\n\n- `{ fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT' | 'NO_REPORTED_FRAUD'; transaction_token: string; comment?: string; created_at?: string; fraud_type?: string; updated_at?: string; }`\n\n - `fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT' | 'NO_REPORTED_FRAUD'`\n - `transaction_token: string`\n - `comment?: string`\n - `created_at?: string`\n - `fraud_type?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.fraud.transactions.report('00000000-0000-0000-0000-000000000000', { fraud_status: 'SUSPECTED_FRAUD' });\n\nconsole.log(response);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/network_programs/{network_program_token}', + httpMethod: 'get', + summary: 'Get network program', + description: 'Get network program.', + stainlessPath: '(resource) network_programs > (method) retrieve', + qualified: 'client.networkPrograms.retrieve', + params: ['network_program_token: string;'], + response: + '{ token: string; default_product_code: string; name: string; registered_program_identification_number: string; }', + markdown: + "## retrieve\n\n`client.networkPrograms.retrieve(network_program_token: string): { token: string; default_product_code: string; name: string; registered_program_identification_number: string; }`\n\n**get** `/v1/network_programs/{network_program_token}`\n\nGet network program.\n\n### Parameters\n\n- `network_program_token: string`\n\n### Returns\n\n- `{ token: string; default_product_code: string; name: string; registered_program_identification_number: string; }`\n\n - `token: string`\n - `default_product_code: string`\n - `name: string`\n - `registered_program_identification_number: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst networkProgram = await client.networkPrograms.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(networkProgram);\n```", + }, + { + name: 'list', + endpoint: '/v1/network_programs', + httpMethod: 'get', + summary: 'List network programs', + description: 'List network programs.', + stainlessPath: '(resource) network_programs > (method) list', + qualified: 'client.networkPrograms.list', + params: ['begin?: string;', 'end?: string;', 'page_size?: number;'], + response: + '{ token: string; default_product_code: string; name: string; registered_program_identification_number: string; }', + markdown: + "## list\n\n`client.networkPrograms.list(begin?: string, end?: string, page_size?: number): { token: string; default_product_code: string; name: string; registered_program_identification_number: string; }`\n\n**get** `/v1/network_programs`\n\nList network programs.\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\n\n- `page_size?: number`\n Page size (for pagination).\n\n### Returns\n\n- `{ token: string; default_product_code: string; name: string; registered_program_identification_number: string; }`\n\n - `token: string`\n - `default_product_code: string`\n - `name: string`\n - `registered_program_identification_number: 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 networkProgram of client.networkPrograms.list()) {\n console.log(networkProgram);\n}\n```", + }, + { + name: 'create', + endpoint: '/v1/financial_accounts/{financial_account_token}/holds', + httpMethod: 'post', + summary: 'Create hold', + description: + 'Create a hold on a financial account. Holds reserve funds by moving them\nfrom available to pending balance. They can be resolved via settlement\n(linked to a payment or book transfer), voiding, or expiration.\n', + stainlessPath: '(resource) holds > (method) create', + qualified: 'client.holds.create', + params: [ + 'financial_account_token: string;', + 'amount: number;', + 'token?: string;', + 'expiration_datetime?: string;', + 'memo?: string;', + 'user_defined_id?: string;', + ], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }", + markdown: + "## create\n\n`client.holds.create(financial_account_token: string, amount: number, token?: string, expiration_datetime?: string, memo?: string, user_defined_id?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: hold_event[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n\n**post** `/v1/financial_accounts/{financial_account_token}/holds`\n\nCreate a hold on a financial account. Holds reserve funds by moving them\nfrom available to pending balance. They can be resolved via settlement\n(linked to a payment or book transfer), voiding, or expiration.\n\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `amount: number`\n Amount to hold in cents\n\n- `token?: string`\n Customer-provided token for idempotency. Becomes the hold token.\n\n- `expiration_datetime?: string`\n When the hold should auto-expire\n\n- `memo?: string`\n Reason for the hold\n\n- `user_defined_id?: string`\n User-provided identifier for the hold\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n A hold transaction representing reserved funds on a financial account. Holds move funds from available to pending balance in anticipation of future payments. They can be resolved via settlement (linked to payment), manual release, or expiration.\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]`\n - `expiration_datetime?: string`\n - `family?: 'HOLD'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst hold = await client.holds.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { amount: 1 });\n\nconsole.log(hold);\n```", + }, + { + name: 'retrieve', + endpoint: '/v1/holds/{hold_token}', + httpMethod: 'get', + summary: 'Get hold', + description: 'Get hold by token.', + stainlessPath: '(resource) holds > (method) retrieve', + qualified: 'client.holds.retrieve', + params: ['hold_token: string;'], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }", + markdown: + "## retrieve\n\n`client.holds.retrieve(hold_token: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: hold_event[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n\n**get** `/v1/holds/{hold_token}`\n\nGet hold by token.\n\n### Parameters\n\n- `hold_token: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n A hold transaction representing reserved funds on a financial account. Holds move funds from available to pending balance in anticipation of future payments. They can be resolved via settlement (linked to payment), manual release, or expiration.\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]`\n - `expiration_datetime?: string`\n - `family?: 'HOLD'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst hold = await client.holds.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(hold);\n```", + }, + { + name: 'list', + endpoint: '/v1/financial_accounts/{financial_account_token}/holds', + httpMethod: 'get', + summary: 'List holds', + description: 'List holds for a financial account.', + stainlessPath: '(resource) holds > (method) list', + qualified: 'client.holds.list', + params: [ + 'financial_account_token: string;', + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'page_size?: number;', + 'starting_after?: string;', + "status?: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED';", + ], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }", + markdown: + "## list\n\n`client.holds.list(financial_account_token: string, begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string, status?: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED'): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: hold_event[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/holds`\n\nList holds for a financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `status?: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED'`\n Hold status to filter by.\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n A hold transaction representing reserved funds on a financial account. Holds move funds from available to pending balance in anticipation of future payments. They can be resolved via settlement (linked to payment), manual release, or expiration.\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]`\n - `expiration_datetime?: string`\n - `family?: 'HOLD'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `user_defined_id?: 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 hold of client.holds.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(hold);\n}\n```", + }, + { + name: 'void', + endpoint: '/v1/holds/{hold_token}/void', + httpMethod: 'post', + summary: 'Void hold', + description: + 'Void an active hold. This returns the held funds from pending back to\navailable balance. Only holds in PENDING status can be voided.\n', + stainlessPath: '(resource) holds > (method) void', + qualified: 'client.holds.void', + params: ['hold_token: string;', 'memo?: string;'], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }", + markdown: + "## void\n\n`client.holds.void(hold_token: string, memo?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: hold_event[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n\n**post** `/v1/holds/{hold_token}/void`\n\nVoid an active hold. This returns the held funds from pending back to\navailable balance. Only holds in PENDING status can be voided.\n\n\n### Parameters\n\n- `hold_token: string`\n\n- `memo?: string`\n Reason for voiding the hold\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n A hold transaction representing reserved funds on a financial account. Holds move funds from available to pending balance in anticipation of future payments. They can be resolved via settlement (linked to payment), manual release, or expiration.\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]`\n - `expiration_datetime?: string`\n - `family?: 'HOLD'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst hold = await client.holds.void('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(hold);\n```", + }, + { + name: 'list', + endpoint: '/v1/account_activity', + httpMethod: 'get', + summary: 'List Account Activity', + description: 'Retrieve a list of transactions across all public accounts.', + stainlessPath: '(resource) account_activity > (method) list', + qualified: 'client.accountActivity.list', + params: [ + 'account_token?: string;', + 'begin?: string;', + 'business_account_token?: string;', + 'category?: string;', + 'end?: string;', + 'ending_before?: string;', + 'financial_account_token?: string;', + 'page_size?: number;', + "result?: 'APPROVED' | 'DECLINED';", + 'starting_after?: string;', + "status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'REVERSED' | 'SETTLED' | 'VOIDED';", + ], + response: + "{ token: string; category: string; created: string; currency: string; descriptor: string; events: financial_event[]; family: 'INTERNAL'; financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; } | object | object | object | object | object | object", + markdown: + "## list\n\n`client.accountActivity.list(account_token?: string, begin?: string, business_account_token?: string, category?: string, end?: string, ending_before?: string, financial_account_token?: string, page_size?: number, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'REVERSED' | 'SETTLED' | 'VOIDED'): { token: string; category: string; created: string; currency: string; descriptor: string; events: financial_event[]; family: 'INTERNAL'; financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; } | object | object | object | object | object | object`\n\n**get** `/v1/account_activity`\n\nRetrieve a list of transactions across all public accounts.\n\n### Parameters\n\n- `account_token?: string`\n Filter by account token\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `business_account_token?: string`\n Filter by business account token\n\n- `category?: string`\n Filter by transaction category\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `financial_account_token?: string`\n Filter by financial account token\n\n- `page_size?: number`\n Page size (for pagination).\n\n- `result?: 'APPROVED' | 'DECLINED'`\n Filter by transaction result\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- `status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'REVERSED' | 'SETTLED' | 'VOIDED'`\n Filter by transaction status\n\n### Returns\n\n- `{ token: string; category: string; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; family: 'INTERNAL'; financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; } | { token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: object; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; } | { token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: { cardholder: object; hold: object; merchant: object; settlement: object; }; authorization_amount: number; authorization_code: string; avs: { address: string; zipcode: string; }; card_token: string; cardholder_authentication: object; created: string; financial_account_token: string; merchant: object; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: { entry_mode: object; terminal: object; }; result: string; service_location: { city: string; country: string; postal_code: string; state: string; street_address: string; }; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: object; updated: string; events?: { token: string; amount: number; amounts: object; created: string; detailed_results: string[]; effective_polarity: 'CREDIT' | 'DEBIT'; network_info: object; result: string; rule_results: object[]; type: string; account_type?: 'CHECKING' | 'SAVINGS'; network_specific_data?: object; }[]; } | { token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: wire_party_details; debtor?: wire_party_details; message_id?: string; remittance_information?: string; }; pending_amount: number; related_account_tokens: { account_token: string; business_account_token: string; }; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; } | { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; } | { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: object; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; } | { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: object[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n Response containing multiple transaction types. The `family` field determines which transaction type is returned: INTERNAL returns FinancialTransaction, TRANSFER returns BookTransferTransaction, CARD returns CardTransaction, PAYMENT returns PaymentTransaction, EXTERNAL_PAYMENT returns ExternalPaymentResponse, MANAGEMENT_OPERATION returns ManagementOperationTransaction, and HOLD returns HoldTransaction\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 accountActivityListResponse of client.accountActivity.list()) {\n console.log(accountActivityListResponse);\n}\n```", + }, + { + name: 'retrieve_transaction', + endpoint: '/v1/account_activity/{transaction_token}', + httpMethod: 'get', + summary: 'Get Single Transaction from Account Activity', + description: 'Retrieve a single transaction', + stainlessPath: '(resource) account_activity > (method) retrieve_transaction', + qualified: 'client.accountActivity.retrieveTransaction', + params: ['transaction_token: string;'], + response: + "{ token: string; category: string; created: string; currency: string; descriptor: string; events: financial_event[]; family: 'INTERNAL'; financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; } | object | object | object | object | object | object", + markdown: + "## retrieve_transaction\n\n`client.accountActivity.retrieveTransaction(transaction_token: string): { token: string; category: string; created: string; currency: string; descriptor: string; events: financial_event[]; family: 'INTERNAL'; financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; } | object | object | object | object | object | object`\n\n**get** `/v1/account_activity/{transaction_token}`\n\nRetrieve a single transaction\n\n### Parameters\n\n- `transaction_token: string`\n\n### Returns\n\n- `{ token: string; category: string; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; family: 'INTERNAL'; financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; } | { token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: object; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; } | { token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: { cardholder: object; hold: object; merchant: object; settlement: object; }; authorization_amount: number; authorization_code: string; avs: { address: string; zipcode: string; }; card_token: string; cardholder_authentication: object; created: string; financial_account_token: string; merchant: object; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: { entry_mode: object; terminal: object; }; result: string; service_location: { city: string; country: string; postal_code: string; state: string; street_address: string; }; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: object; updated: string; events?: { token: string; amount: number; amounts: object; created: string; detailed_results: string[]; effective_polarity: 'CREDIT' | 'DEBIT'; network_info: object; result: string; rule_results: object[]; type: string; account_type?: 'CHECKING' | 'SAVINGS'; network_specific_data?: object; }[]; } | { token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: wire_party_details; debtor?: wire_party_details; message_id?: string; remittance_information?: string; }; pending_amount: number; related_account_tokens: { account_token: string; business_account_token: string; }; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; } | { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; } | { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: object; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; } | { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: object[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n Response containing multiple transaction types. The `family` field determines which transaction type is returned: INTERNAL returns FinancialTransaction, TRANSFER returns BookTransferTransaction, CARD returns CardTransaction, PAYMENT returns PaymentTransaction, EXTERNAL_PAYMENT returns ExternalPaymentResponse, MANAGEMENT_OPERATION returns ManagementOperationTransaction, and HOLD returns HoldTransaction\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.accountActivity.retrieveTransaction('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + }, + { + name: 'list', + endpoint: '/v1/transfer_limits', + httpMethod: 'get', + summary: 'Get transfer limits', + description: 'Get transfer limits for a specified date', + stainlessPath: '(resource) transfer_limits > (method) list', + qualified: 'client.transferLimits.list', + params: ['date?: string;'], + response: + '{ company_id: string; daily_limit: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }; date: string; is_fbo: boolean; monthly_limit: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }; program_limit_per_transaction: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }; }', + markdown: + "## list\n\n`client.transferLimits.list(date?: string): { company_id: string; daily_limit: { credit: object; debit: object; }; date: string; is_fbo: boolean; monthly_limit: { credit: object; debit: object; }; program_limit_per_transaction: { credit: object; debit: object; }; }`\n\n**get** `/v1/transfer_limits`\n\nGet transfer limits for a specified date\n\n### Parameters\n\n- `date?: string`\n Date for which to retrieve transfer limits (ISO 8601 format)\n\n### Returns\n\n- `{ company_id: string; daily_limit: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }; date: string; is_fbo: boolean; monthly_limit: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }; program_limit_per_transaction: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }; }`\n\n - `company_id: string`\n - `daily_limit: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }`\n - `date: string`\n - `is_fbo: boolean`\n - `monthly_limit: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }`\n - `program_limit_per_transaction: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }`\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 transferLimit of client.transferLimits.list()) {\n console.log(transferLimit);\n}\n```", + }, +]; + +const INDEX_OPTIONS = { + fields: [ + 'name', + 'endpoint', + 'summary', + 'description', + 'qualified', + 'stainlessPath', + 'content', + 'sectionContext', + ], + storeFields: ['kind', '_original'], + searchOptions: { + prefix: true, + fuzzy: 0.2, + boost: { + name: 3, + endpoint: 2, + summary: 2, + qualified: 2, + content: 1, + } as Record, + }, +}; + +/** + * Self-contained local search engine backed by MiniSearch. + * Method data is embedded at SDK build time; prose documents + * can be loaded from an optional docs directory at runtime. + */ +export class LocalDocsSearch { + private methodIndex: MiniSearch; + private proseIndex: MiniSearch; + + private constructor() { + this.methodIndex = new MiniSearch(INDEX_OPTIONS); + this.proseIndex = new MiniSearch(INDEX_OPTIONS); + } + + static async create(opts?: { docsDir?: string }): Promise { + const instance = new LocalDocsSearch(); + instance.indexMethods(EMBEDDED_METHODS); + if (opts?.docsDir) { + await instance.loadDocsDirectory(opts.docsDir); + } + return instance; + } + + // Note: Language is accepted for interface consistency with remote search, but currently has no + // effect since this local search only supports TypeScript docs. + search(props: { + query: string; + language?: string; + detail?: string; + maxResults?: number; + maxLength?: number; + }): SearchResult { + const { query, detail = 'default', maxResults = 5, maxLength = 100_000 } = props; + + const useMarkdown = detail === 'verbose' || detail === 'high'; + + // Search both indices and merge results by score + const methodHits = this.methodIndex + .search(query) + .map((hit) => ({ ...hit, _kind: 'http_method' as const })); + const proseHits = this.proseIndex.search(query).map((hit) => ({ ...hit, _kind: 'prose' as const })); + const merged = [...methodHits, ...proseHits].sort((a, b) => b.score - a.score); + const top = merged.slice(0, maxResults); + + const fullResults: (string | Record)[] = []; + + for (const hit of top) { + const original = (hit as Record)['_original']; + if (hit._kind === 'http_method') { + const m = original as MethodEntry; + if (useMarkdown && m.markdown) { + fullResults.push(m.markdown); + } else { + fullResults.push({ + method: m.qualified, + summary: m.summary, + description: m.description, + endpoint: `${m.httpMethod.toUpperCase()} ${m.endpoint}`, + ...(m.params ? { params: m.params } : {}), + ...(m.response ? { response: m.response } : {}), + }); + } + } else { + const c = original as ProseChunk; + fullResults.push({ + content: c.content, + ...(c.source ? { source: c.source } : {}), + }); + } + } + + let totalLength = 0; + const results: (string | Record)[] = []; + for (const result of fullResults) { + const len = typeof result === 'string' ? result.length : JSON.stringify(result).length; + totalLength += len; + if (totalLength > maxLength) break; + results.push(result); + } + + if (results.length < fullResults.length) { + results.unshift(`Truncated; showing ${results.length} of ${fullResults.length} results.`); + } + + return { results }; + } + + private indexMethods(methods: MethodEntry[]): void { + const docs: MiniSearchDocument[] = methods.map((m, i) => ({ + id: `method-${i}`, + kind: 'http_method' as const, + name: m.name, + endpoint: m.endpoint, + summary: m.summary, + description: m.description, + qualified: m.qualified, + stainlessPath: m.stainlessPath, + _original: m as unknown as Record, + })); + if (docs.length > 0) { + this.methodIndex.addAll(docs); + } + } + + private async loadDocsDirectory(docsDir: string): Promise { + let entries; + try { + entries = await fs.readdir(docsDir, { withFileTypes: true }); + } catch (err) { + getLogger().warn({ err, docsDir }, 'Could not read docs directory'); + return; + } + + const files = entries + .filter((e) => e.isFile()) + .filter((e) => e.name.endsWith('.md') || e.name.endsWith('.markdown') || e.name.endsWith('.json')); + + for (const file of files) { + try { + const filePath = path.join(docsDir, file.name); + const content = await fs.readFile(filePath, 'utf-8'); + + if (file.name.endsWith('.json')) { + const texts = extractTexts(JSON.parse(content)); + if (texts.length > 0) { + this.indexProse(texts.join('\n\n'), file.name); + } + } else { + this.indexProse(content, file.name); + } + } catch (err) { + getLogger().warn({ err, file: file.name }, 'Failed to index docs file'); + } + } + } + + private indexProse(markdown: string, source: string): void { + const chunks = chunkMarkdown(markdown); + const baseId = this.proseIndex.documentCount; + + const docs: MiniSearchDocument[] = chunks.map((chunk, i) => ({ + id: `prose-${baseId + i}`, + kind: 'prose' as const, + content: chunk.content, + ...(chunk.sectionContext != null ? { sectionContext: chunk.sectionContext } : {}), + _original: { ...chunk, source } as unknown as Record, + })); + + if (docs.length > 0) { + this.proseIndex.addAll(docs); + } + } +} + +/** Lightweight markdown chunker — splits on headers, chunks by word count. */ +function chunkMarkdown(markdown: string): { content: string; tag: string; sectionContext?: string }[] { + // Strip YAML frontmatter + const stripped = markdown.replace(/^---\n[\s\S]*?\n---\n?/, ''); + const lines = stripped.split('\n'); + + const chunks: { content: string; tag: string; sectionContext?: string }[] = []; + const headers: string[] = []; + let current: string[] = []; + + const flush = () => { + const text = current.join('\n').trim(); + if (!text) return; + const sectionContext = headers.length > 0 ? headers.join(' > ') : undefined; + // Split into ~200-word chunks + const words = text.split(/\s+/); + for (let i = 0; i < words.length; i += 200) { + const slice = words.slice(i, i + 200).join(' '); + if (slice) { + chunks.push({ content: slice, tag: 'p', ...(sectionContext != null ? { sectionContext } : {}) }); + } + } + current = []; + }; + + for (const line of lines) { + const headerMatch = line.match(/^(#{1,6})\s+(.+)/); + if (headerMatch) { + flush(); + const level = headerMatch[1]!.length; + const text = headerMatch[2]!.trim(); + while (headers.length >= level) headers.pop(); + headers.push(text); + } else { + current.push(line); + } + } + flush(); + + return chunks; +} + +/** Recursively extracts string values from a JSON structure. */ +function extractTexts(data: unknown, depth = 0): string[] { + if (depth > 10) return []; + if (typeof data === 'string') return data.trim() ? [data] : []; + if (Array.isArray(data)) return data.flatMap((item) => extractTexts(item, depth + 1)); + if (typeof data === 'object' && data !== null) { + return Object.values(data).flatMap((v) => extractTexts(v, depth + 1)); + } + return []; +} diff --git a/packages/mcp-server/src/options.ts b/packages/mcp-server/src/options.ts index d68058dc..f1518764 100644 --- a/packages/mcp-server/src/options.ts +++ b/packages/mcp-server/src/options.ts @@ -18,6 +18,8 @@ export type McpOptions = { includeCodeTool?: boolean | undefined; includeDocsTools?: boolean | undefined; stainlessApiKey?: string | undefined; + docsSearchMode?: 'stainless-api' | 'local' | undefined; + docsDir?: string | undefined; codeAllowHttpGets?: boolean | undefined; codeAllowedMethods?: string[] | undefined; codeBlockedMethods?: string[] | undefined; @@ -58,6 +60,18 @@ export function parseCLIOptions(): CLIOptions { description: 'Path to custom instructions for the MCP server', }) .option('debug', { type: 'boolean', description: 'Enable debug logging' }) + .option('docs-dir', { + type: 'string', + description: + 'Path to a directory of local documentation files (markdown/JSON) to include in local docs search.', + }) + .option('docs-search-mode', { + type: 'string', + choices: ['stainless-api', 'local'], + default: 'stainless-api', + description: + "Where to search documentation; 'stainless-api' uses the Stainless-hosted search API whereas 'local' uses an in-memory search index built from embedded SDK method data and optional local docs files.", + }) .option('log-format', { type: 'string', choices: ['json', 'pretty'], @@ -118,6 +132,8 @@ export function parseCLIOptions(): CLIOptions { ...(includeDocsTools !== undefined && { includeDocsTools }), debug: !!argv.debug, stainlessApiKey: argv.stainlessApiKey, + docsSearchMode: argv.docsSearchMode as 'stainless-api' | 'local' | undefined, + docsDir: argv.docsDir, codeAllowHttpGets: argv.codeAllowHttpGets, codeAllowedMethods: argv.codeAllowedMethods, codeBlockedMethods: argv.codeBlockedMethods, @@ -163,5 +179,7 @@ export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): M ...(codeTool !== undefined && { includeCodeTool: codeTool }), ...(docsTools !== undefined && { includeDocsTools: docsTools }), codeExecutionMode: defaultOptions.codeExecutionMode, + docsSearchMode: defaultOptions.docsSearchMode, + docsDir: defaultOptions.docsDir, }; } diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index 9bc40981..3e3950e5 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -11,6 +11,8 @@ import { ClientOptions } from 'lithic'; import Lithic from 'lithic'; import { codeTool } from './code-tool'; import docsSearchTool from './docs-search-tool'; +import { setLocalSearch } from './docs-search-tool'; +import { LocalDocsSearch } from './local-docs-search'; import { getInstructions } from './instructions'; import { McpOptions } from './options'; import { blockedMethodsForCodeTool } from './methods'; @@ -63,6 +65,12 @@ export async function initMcpServer(params: { error: logAtLevel('error'), }; + if (params.mcpOptions?.docsSearchMode === 'local') { + const docsDir = params.mcpOptions?.docsDir; + const localSearch = await LocalDocsSearch.create(docsDir ? { docsDir } : undefined); + setLocalSearch(localSearch); + } + let _client: Lithic | undefined; let _clientError: Error | undefined; let _logLevel: 'debug' | 'info' | 'warn' | 'error' | 'off' | undefined; From 699d85e576bdb3d6c25f868c5b6bba2e3772598b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 22:01:52 +0000 Subject: [PATCH 08/17] chore(ci): escape input path in publish-npm workflow --- .github/workflows/publish-npm.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 88c82c86..5950b3e3 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -34,12 +34,14 @@ jobs: - name: Publish to NPM run: | - if [ -n "${{ github.event.inputs.path }}" ]; then - PATHS_RELEASED='[\"${{ github.event.inputs.path }}\"]' + if [ -n "$INPUT_PATH" ]; then + PATHS_RELEASED="[\"$INPUT_PATH\"]" else PATHS_RELEASED='[\".\", \"packages/mcp-server\"]' fi yarn tsn scripts/publish-packages.ts "{ \"paths_released\": \"$PATHS_RELEASED\" }" + env: + INPUT_PATH: ${{ github.event.inputs.path }} - name: Upload MCP Server DXT GitHub release asset run: | From 9f3f1cbbb34756d4d92ef000e9554a7580a775d8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 17:13:40 +0000 Subject: [PATCH 09/17] chore(mcp-server): add support for session id, forward client info --- packages/mcp-server/src/docs-search-tool.ts | 15 ++++++++------- packages/mcp-server/src/http.ts | 16 ++++++++++++++++ packages/mcp-server/src/server.ts | 4 ++++ packages/mcp-server/src/types.ts | 2 ++ 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/packages/mcp-server/src/docs-search-tool.ts b/packages/mcp-server/src/docs-search-tool.ts index b521738d..d5a5dab6 100644 --- a/packages/mcp-server/src/docs-search-tool.ts +++ b/packages/mcp-server/src/docs-search-tool.ts @@ -76,17 +76,18 @@ async function searchLocal(args: Record): Promise { }).results; } -async function searchRemote( - args: Record, - stainlessApiKey: string | undefined, -): Promise { +async function searchRemote(args: Record, reqContext: McpRequestContext): Promise { const body = args as any; const query = new URLSearchParams(body).toString(); const startTime = Date.now(); const result = await fetch(`${docsSearchURL}?${query}`, { headers: { - ...(stainlessApiKey && { Authorization: stainlessApiKey }), + ...(reqContext.stainlessApiKey && { Authorization: reqContext.stainlessApiKey }), + ...(reqContext.mcpSessionId && { 'x-stainless-mcp-session-id': reqContext.mcpSessionId }), + ...(reqContext.mcpClientInfo && { + 'x-stainless-mcp-client-info': JSON.stringify(reqContext.mcpClientInfo), + }), }, }); @@ -105,7 +106,7 @@ async function searchRemote( 'Got error response from docs search tool', ); - if (result.status === 404 && !stainlessApiKey) { + if (result.status === 404 && !reqContext.stainlessApiKey) { throw new Error( 'Could not find docs for this project. You may need to provide a Stainless API key via the STAINLESS_API_KEY environment variable, the --stainless-api-key flag, or the x-stainless-api-key HTTP header.', ); @@ -140,7 +141,7 @@ export const handler = async ({ return asTextContentResult(await searchLocal(body)); } - return asTextContentResult(await searchRemote(body, reqContext.stainlessApiKey)); + return asTextContentResult(await searchRemote(body, reqContext)); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/http.ts b/packages/mcp-server/src/http.ts index 39f35908..39d193a4 100644 --- a/packages/mcp-server/src/http.ts +++ b/packages/mcp-server/src/http.ts @@ -78,6 +78,11 @@ const newServer = async ({ }, stainlessApiKey: stainlessApiKey, upstreamClientEnvs, + mcpSessionId: (req as any).mcpSessionId, + mcpClientInfo: + typeof req.body?.params?.clientInfo?.name === 'string' ? + { name: req.body.params.clientInfo.name, version: String(req.body.params.clientInfo.version ?? '') } + : undefined, }); return server; @@ -135,6 +140,17 @@ export const streamableHTTPApp = ({ const app = express(); app.set('query parser', 'extended'); app.use(express.json()); + app.use((req: express.Request, res: express.Response, next: express.NextFunction) => { + const existing = req.headers['mcp-session-id']; + const sessionId = (Array.isArray(existing) ? existing[0] : existing) || crypto.randomUUID(); + (req as any).mcpSessionId = sessionId; + const origWriteHead = res.writeHead.bind(res); + res.writeHead = function (statusCode: number, ...rest: any[]) { + res.setHeader('mcp-session-id', sessionId); + return origWriteHead(statusCode, ...rest); + } as typeof res.writeHead; + next(); + }); app.use( pinoHttp({ logger: getLogger(), diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index 3e3950e5..fd781e91 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -47,6 +47,8 @@ export async function initMcpServer(params: { mcpOptions?: McpOptions; stainlessApiKey?: string | undefined; upstreamClientEnvs?: Record | undefined; + mcpSessionId?: string | undefined; + mcpClientInfo?: { name: string; version: string } | undefined; }) { const server = params.server instanceof McpServer ? params.server.server : params.server; @@ -136,6 +138,8 @@ export async function initMcpServer(params: { client, stainlessApiKey: params.stainlessApiKey ?? params.mcpOptions?.stainlessApiKey, upstreamClientEnvs: params.upstreamClientEnvs, + mcpSessionId: params.mcpSessionId, + mcpClientInfo: params.mcpClientInfo, }, args, }); diff --git a/packages/mcp-server/src/types.ts b/packages/mcp-server/src/types.ts index 9879117c..21994833 100644 --- a/packages/mcp-server/src/types.ts +++ b/packages/mcp-server/src/types.ts @@ -46,6 +46,8 @@ export type McpRequestContext = { client: Lithic; stainlessApiKey?: string | undefined; upstreamClientEnvs?: Record | undefined; + mcpSessionId?: string | undefined; + mcpClientInfo?: { name: string; version: string } | undefined; }; export type HandlerFunction = ({ From 231f6a037beea43f90512f3eb6bee560a0233a45 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 17:35:27 +0000 Subject: [PATCH 10/17] chore(internal): improve local docs search for MCP servers --- packages/mcp-server/src/docs-search-tool.ts | 13 +--- packages/mcp-server/src/local-docs-search.ts | 73 +++++++++++++++++--- 2 files changed, 64 insertions(+), 22 deletions(-) diff --git a/packages/mcp-server/src/docs-search-tool.ts b/packages/mcp-server/src/docs-search-tool.ts index d5a5dab6..7d0e54fa 100644 --- a/packages/mcp-server/src/docs-search-tool.ts +++ b/packages/mcp-server/src/docs-search-tool.ts @@ -50,8 +50,6 @@ export function setLocalSearch(search: LocalDocsSearch): void { _localSearch = search; } -const SUPPORTED_LANGUAGES = new Set(['http', 'typescript', 'javascript']); - async function searchLocal(args: Record): Promise { if (!_localSearch) { throw new Error('Local search not initialized'); @@ -59,20 +57,13 @@ async function searchLocal(args: Record): Promise { const query = (args['query'] as string) ?? ''; const language = (args['language'] as string) ?? 'typescript'; - const detail = (args['detail'] as string) ?? 'verbose'; - - if (!SUPPORTED_LANGUAGES.has(language)) { - throw new Error( - `Local docs search only supports HTTP, TypeScript, and JavaScript. Got language="${language}". ` + - `Use --docs-search-mode stainless-api for other languages, or set language to "http", "typescript", or "javascript".`, - ); - } + const detail = (args['detail'] as string) ?? 'default'; return _localSearch.search({ query, language, detail, - maxResults: 10, + maxResults: 5, }).results; } diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index 4810a0a2..fbc7c310 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -5,6 +5,11 @@ import * as fs from 'node:fs/promises'; import * as path from 'node:path'; import { getLogger } from './logger'; +type PerLanguageData = { + method?: string; + example?: string; +}; + type MethodEntry = { name: string; endpoint: string; @@ -16,6 +21,7 @@ type MethodEntry = { params?: string[]; response?: string; markdown?: string; + perLanguage?: Record; }; type ProseChunk = { @@ -3289,6 +3295,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [ }, ]; +const EMBEDDED_READMES: { language: string; content: string }[] = []; + const INDEX_OPTIONS = { fields: [ 'name', @@ -3303,13 +3311,15 @@ const INDEX_OPTIONS = { storeFields: ['kind', '_original'], searchOptions: { prefix: true, - fuzzy: 0.2, + fuzzy: 0.1, boost: { - name: 3, - endpoint: 2, + name: 5, + stainlessPath: 3, + endpoint: 3, + qualified: 3, summary: 2, - qualified: 2, content: 1, + description: 1, } as Record, }, }; @@ -3331,14 +3341,15 @@ export class LocalDocsSearch { static async create(opts?: { docsDir?: string }): Promise { const instance = new LocalDocsSearch(); instance.indexMethods(EMBEDDED_METHODS); + for (const readme of EMBEDDED_READMES) { + instance.indexProse(readme.content, `readme:${readme.language}`); + } if (opts?.docsDir) { await instance.loadDocsDirectory(opts.docsDir); } return instance; } - // Note: Language is accepted for interface consistency with remote search, but currently has no - // effect since this local search only supports TypeScript docs. search(props: { query: string; language?: string; @@ -3346,15 +3357,29 @@ export class LocalDocsSearch { maxResults?: number; maxLength?: number; }): SearchResult { - const { query, detail = 'default', maxResults = 5, maxLength = 100_000 } = props; + const { query, language = 'typescript', detail = 'default', maxResults = 5, maxLength = 100_000 } = props; const useMarkdown = detail === 'verbose' || detail === 'high'; - // Search both indices and merge results by score + // Search both indices and merge results by score. + // Filter prose hits so language-tagged content (READMEs and docs with + // frontmatter) only matches the requested language. const methodHits = this.methodIndex .search(query) .map((hit) => ({ ...hit, _kind: 'http_method' as const })); - const proseHits = this.proseIndex.search(query).map((hit) => ({ ...hit, _kind: 'prose' as const })); + const proseHits = this.proseIndex + .search(query) + .filter((hit) => { + const source = ((hit as Record)['_original'] as ProseChunk | undefined)?.source; + if (!source) return true; + // Check for language-tagged sources: "readme:" or "lang::" + let taggedLang: string | undefined; + if (source.startsWith('readme:')) taggedLang = source.slice('readme:'.length); + else if (source.startsWith('lang:')) taggedLang = source.split(':')[1]; + if (!taggedLang) return true; + return taggedLang === language || (language === 'javascript' && taggedLang === 'typescript'); + }) + .map((hit) => ({ ...hit, _kind: 'prose' as const })); const merged = [...methodHits, ...proseHits].sort((a, b) => b.score - a.score); const top = merged.slice(0, maxResults); @@ -3367,11 +3392,16 @@ export class LocalDocsSearch { if (useMarkdown && m.markdown) { fullResults.push(m.markdown); } else { + // Use per-language data when available, falling back to the + // top-level fields (which are TypeScript-specific in the + // legacy codepath). + const langData = m.perLanguage?.[language]; fullResults.push({ - method: m.qualified, + method: langData?.method ?? m.qualified, summary: m.summary, description: m.description, endpoint: `${m.httpMethod.toUpperCase()} ${m.endpoint}`, + ...(langData?.example ? { example: langData.example } : {}), ...(m.params ? { params: m.params } : {}), ...(m.response ? { response: m.response } : {}), }); @@ -3442,7 +3472,19 @@ export class LocalDocsSearch { this.indexProse(texts.join('\n\n'), file.name); } } else { - this.indexProse(content, file.name); + // Parse optional YAML frontmatter for language tagging. + // Files with a "language" field in frontmatter will only + // surface in searches for that language. + // + // Example: + // --- + // language: python + // --- + // # Error handling in Python + // ... + const frontmatter = parseFrontmatter(content); + const source = frontmatter.language ? `lang:${frontmatter.language}:${file.name}` : file.name; + this.indexProse(content, source); } } catch (err) { getLogger().warn({ err, file: file.name }, 'Failed to index docs file'); @@ -3520,3 +3562,12 @@ function extractTexts(data: unknown, depth = 0): string[] { } return []; } + +/** Parses YAML frontmatter from a markdown string, extracting the language field if present. */ +function parseFrontmatter(markdown: string): { language?: string } { + const match = markdown.match(/^---\n([\s\S]*?)\n---/); + if (!match) return {}; + const body = match[1] ?? ''; + const langMatch = body.match(/^language:\s*(.+)$/m); + return langMatch ? { language: langMatch[1]!.trim() } : {}; +} From f3658af5dfea2fa5b42c9471054945481153ef99 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 16:25:29 +0000 Subject: [PATCH 11/17] chore(internal): improve local docs search for MCP servers --- packages/mcp-server/src/local-docs-search.ts | 8702 ++++++++++++++++-- 1 file changed, 7811 insertions(+), 891 deletions(-) diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index fbc7c310..623baa13 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -61,6 +61,96 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: '{ message?: string; }', markdown: "## api_status\n\n`client.apiStatus(): { message?: string; }`\n\n**get** `/v1/status`\n\nStatus of api\n\n### Returns\n\n- `{ message?: string; }`\n\n - `message?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst apiStatus = await client.apiStatus();\n\nconsole.log(apiStatus);\n```", + perLanguage: { + go: { + method: 'client.APIStatus', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tapiStatus, err := client.APIStatus(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", apiStatus.Message)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v1/status \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'apiStatus', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ApiStatus;\nimport com.lithic.api.models.ClientApiStatusParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ApiStatus apiStatus = client.apiStatus();\n }\n}', + }, + kotlin: { + method: 'apiStatus', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ApiStatus\nimport com.lithic.api.models.ClientApiStatusParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val apiStatus: ApiStatus = client.apiStatus()\n}', + }, + python: { + method: 'api_status', + example: + 'from lithic import Lithic\n\nclient = Lithic()\napi_status = client.api_status()\nprint(api_status.message)', + }, + ruby: { + method: 'api_status', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\napi_status = lithic.api_status\n\nputs(api_status)', + }, + typescript: { + method: 'client.apiStatus', + example: + "import Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst apiStatus = await client.apiStatus();\n\nconsole.log(apiStatus.message);", + }, + }, + }, + { + name: 'list', + endpoint: '/v1/accounts', + httpMethod: 'get', + summary: 'List accounts', + description: 'List account configurations.\n', + stainlessPath: '(resource) accounts > (method) list', + qualified: 'client.accounts.list', + params: [ + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'page_size?: number;', + 'starting_after?: string;', + ], + response: + "{ token: string; created: string; spend_limit: { daily: number; lifetime: number; monthly: number; }; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; }", + markdown: + "## list\n\n`client.accounts.list(begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; created: string; spend_limit: object; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: object; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: object; }`\n\n**get** `/v1/accounts`\n\nList account configurations.\n\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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; created: string; spend_limit: { daily: number; lifetime: number; monthly: number; }; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; }`\n\n - `token: string`\n - `created: string`\n - `spend_limit: { daily: number; lifetime: number; monthly: number; }`\n - `state: 'ACTIVE' | 'PAUSED' | 'CLOSED'`\n - `account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }`\n - `auth_rule_tokens?: string[]`\n - `cardholder_currency?: string`\n - `comment?: string`\n - `substatus?: string`\n - `verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: 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 account of client.accounts.list()) {\n console.log(account);\n}\n```", + perLanguage: { + go: { + method: 'client.Accounts.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Accounts.List(context.TODO(), lithic.AccountListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v1/accounts \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'accounts().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AccountListPage;\nimport com.lithic.api.models.AccountListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AccountListPage page = client.accounts().list();\n }\n}', + }, + kotlin: { + method: 'accounts().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AccountListPage\nimport com.lithic.api.models.AccountListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: AccountListPage = client.accounts().list()\n}', + }, + python: { + method: 'accounts.list', + example: + '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.accounts.list()\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'accounts.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.accounts.list\n\nputs(page)', + }, + typescript: { + method: 'client.accounts.list', + example: + "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 account of client.accounts.list()) {\n console.log(account.token);\n}", + }, + }, }, { name: 'retrieve', @@ -75,6 +165,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; created: string; spend_limit: { daily: number; lifetime: number; monthly: number; }; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; }", markdown: "## retrieve\n\n`client.accounts.retrieve(account_token: string): { token: string; created: string; spend_limit: object; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: object; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: object; }`\n\n**get** `/v1/accounts/{account_token}`\n\nGet account configuration such as spend limits.\n\n### Parameters\n\n- `account_token: string`\n\n### Returns\n\n- `{ token: string; created: string; spend_limit: { daily: number; lifetime: number; monthly: number; }; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; }`\n\n - `token: string`\n - `created: string`\n - `spend_limit: { daily: number; lifetime: number; monthly: number; }`\n - `state: 'ACTIVE' | 'PAUSED' | 'CLOSED'`\n - `account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }`\n - `auth_rule_tokens?: string[]`\n - `cardholder_currency?: string`\n - `comment?: string`\n - `substatus?: string`\n - `verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst account = await client.accounts.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(account);\n```", + perLanguage: { + go: { + method: 'client.Accounts.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\taccount, err := client.Accounts.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", account.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/accounts/$ACCOUNT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'accounts().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Account;\nimport com.lithic.api.models.AccountRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n Account account = client.accounts().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'accounts().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Account\nimport com.lithic.api.models.AccountRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val account: Account = client.accounts().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'accounts.retrieve', + example: + '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)\naccount = client.accounts.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(account.token)', + }, + ruby: { + method: 'accounts.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\naccount = lithic.accounts.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(account)', + }, + typescript: { + method: 'client.accounts.retrieve', + example: + "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\nconst account = await client.accounts.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(account.token);", + }, + }, }, { name: 'update', @@ -99,26 +225,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; created: string; spend_limit: { daily: number; lifetime: number; monthly: number; }; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; }", markdown: "## update\n\n`client.accounts.update(account_token: string, comment?: string, daily_spend_limit?: number, lifetime_spend_limit?: number, monthly_spend_limit?: number, state?: 'ACTIVE' | 'PAUSED' | 'CLOSED', substatus?: string, verification_address?: { address1?: string; address2?: string; city?: string; country?: string; postal_code?: string; state?: string; }): { token: string; created: string; spend_limit: object; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: object; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: object; }`\n\n**patch** `/v1/accounts/{account_token}`\n\nUpdate account configuration such as state or spend limits. Can only be run on accounts that are part of the program managed by this API key.\nAccounts that are in the `PAUSED` state will not be able to transact or create new cards.\n\n\n### Parameters\n\n- `account_token: string`\n\n- `comment?: string`\n Additional context or information related to the account.\n\n- `daily_spend_limit?: number`\n Amount (in cents) for the account's daily spend limit (e.g. 100000 would be a $1,000 limit).\nBy default the daily spend limit is set to $1,250.\n\n\n- `lifetime_spend_limit?: number`\n Amount (in cents) for the account's lifetime spend limit (e.g. 100000 would be a $1,000 limit). Once this limit is reached, no transactions will be accepted on any card created for this account until the limit is updated.\nNote that a spend limit of 0 is effectively no limit, and should only be used to reset or remove a prior limit. Only a limit of 1 or above will result in declined transactions due to checks against the account limit. This behavior differs from the daily spend limit and the monthly spend limit.\n\n\n- `monthly_spend_limit?: number`\n Amount (in cents) for the account's monthly spend limit (e.g. 100000 would be a $1,000 limit).\nBy default the monthly spend limit is set to $5,000.\n\n\n- `state?: 'ACTIVE' | 'PAUSED' | 'CLOSED'`\n Account states.\n\n- `substatus?: string`\n Account state substatus values:\n* `FRAUD_IDENTIFIED` - The account has been recognized as being created or used with stolen or fabricated identity information, encompassing both true identity theft and synthetic identities.\n* `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as unauthorized access or fraudulent transactions, necessitating further investigation.\n* `RISK_VIOLATION` - The account has been involved in deliberate misuse by the legitimate account holder. Examples include disputing valid transactions without cause, falsely claiming non-receipt of goods, or engaging in intentional bust-out schemes to exploit account services.\n* `END_USER_REQUEST` - The account holder has voluntarily requested the closure of the account for personal reasons. This encompasses situations such as bankruptcy, other financial considerations, or the account holder's death.\n* `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to business strategy, risk management, inactivity, product changes, regulatory concerns, or violations of terms and conditions.\n* `NOT_ACTIVE` - The account has not had any transactions or payment activity within a specified period. This status applies to accounts that are paused or closed due to inactivity.\n* `INTERNAL_REVIEW` - The account is temporarily paused pending further internal review. In future implementations, this status may prevent clients from activating the account via APIs until the review is completed.\n* `OTHER` - The reason for the account's current status does not fall into any of the above categories. A comment should be provided to specify the particular reason.\n\n- `verification_address?: { address1?: string; address2?: string; city?: string; country?: string; postal_code?: string; state?: string; }`\n Address used during Address Verification Service (AVS) checks during transactions if enabled via Auth Rules. This field is deprecated as AVS checks are no longer supported by Auth Rules. The field will be removed from the schema in a future release.\n - `address1?: string`\n - `address2?: string`\n - `city?: string`\n - `country?: string`\n - `postal_code?: string`\n - `state?: string`\n\n### Returns\n\n- `{ token: string; created: string; spend_limit: { daily: number; lifetime: number; monthly: number; }; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; }`\n\n - `token: string`\n - `created: string`\n - `spend_limit: { daily: number; lifetime: number; monthly: number; }`\n - `state: 'ACTIVE' | 'PAUSED' | 'CLOSED'`\n - `account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }`\n - `auth_rule_tokens?: string[]`\n - `cardholder_currency?: string`\n - `comment?: string`\n - `substatus?: string`\n - `verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst account = await client.accounts.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(account);\n```", - }, - { - name: 'list', - endpoint: '/v1/accounts', - httpMethod: 'get', - summary: 'List accounts', - description: 'List account configurations.\n', - stainlessPath: '(resource) accounts > (method) list', - qualified: 'client.accounts.list', - params: [ - 'begin?: string;', - 'end?: string;', - 'ending_before?: string;', - 'page_size?: number;', - 'starting_after?: string;', - ], - response: - "{ token: string; created: string; spend_limit: { daily: number; lifetime: number; monthly: number; }; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; }", - markdown: - "## list\n\n`client.accounts.list(begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; created: string; spend_limit: object; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: object; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: object; }`\n\n**get** `/v1/accounts`\n\nList account configurations.\n\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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; created: string; spend_limit: { daily: number; lifetime: number; monthly: number; }; state: 'ACTIVE' | 'PAUSED' | 'CLOSED'; account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }; auth_rule_tokens?: string[]; cardholder_currency?: string; comment?: string; substatus?: string; verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; }`\n\n - `token: string`\n - `created: string`\n - `spend_limit: { daily: number; lifetime: number; monthly: number; }`\n - `state: 'ACTIVE' | 'PAUSED' | 'CLOSED'`\n - `account_holder?: { token: string; business_account_token: string; email: string; phone_number: string; }`\n - `auth_rule_tokens?: string[]`\n - `cardholder_currency?: string`\n - `comment?: string`\n - `substatus?: string`\n - `verification_address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: 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 account of client.accounts.list()) {\n console.log(account);\n}\n```", + perLanguage: { + go: { + method: 'client.Accounts.Update', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\taccount, err := client.Accounts.Update(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.AccountUpdateParams{\n\t\t\tDailySpendLimit: lithic.F(int64(1000)),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", account.Token)\n}\n', + }, + http: { + example: + "curl https://api.lithic.com/v1/accounts/$ACCOUNT_TOKEN \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", + }, + java: { + method: 'accounts().update', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Account;\nimport com.lithic.api.models.AccountUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n Account account = client.accounts().update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'accounts().update', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Account\nimport com.lithic.api.models.AccountUpdateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val account: Account = client.accounts().update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'accounts.update', + example: + '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)\naccount = client.accounts.update(\n account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n daily_spend_limit=1000,\n)\nprint(account.token)', + }, + ruby: { + method: 'accounts.update', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\naccount = lithic.accounts.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(account)', + }, + typescript: { + method: 'client.accounts.update', + example: + "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\nconst account = await client.accounts.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n daily_spend_limit: 1000,\n});\n\nconsole.log(account.token);", + }, + }, }, { name: 'retrieve_spend_limits', @@ -134,6 +276,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ available_spend_limit: { daily?: number; lifetime?: number; monthly?: number; }; spend_limit?: { daily?: number; lifetime?: number; monthly?: number; }; spend_velocity?: { daily?: number; lifetime?: number; monthly?: number; }; }', markdown: "## retrieve_spend_limits\n\n`client.accounts.retrieveSpendLimits(account_token: string): { available_spend_limit: object; spend_limit?: object; spend_velocity?: object; }`\n\n**get** `/v1/accounts/{account_token}/spend_limits`\n\nGet an Account's available spend limits, which is based on the spend limit configured on the Account and the amount already spent over the spend limit's duration. For example, if the Account has a daily spend limit of $1000 configured, and has spent $600 in the last 24 hours, the available spend limit returned would be $400.\n\n### Parameters\n\n- `account_token: string`\n\n### Returns\n\n- `{ available_spend_limit: { daily?: number; lifetime?: number; monthly?: number; }; spend_limit?: { daily?: number; lifetime?: number; monthly?: number; }; spend_velocity?: { daily?: number; lifetime?: number; monthly?: number; }; }`\n\n - `available_spend_limit: { daily?: number; lifetime?: number; monthly?: number; }`\n - `spend_limit?: { daily?: number; lifetime?: number; monthly?: number; }`\n - `spend_velocity?: { daily?: number; lifetime?: number; monthly?: number; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst accountSpendLimits = await client.accounts.retrieveSpendLimits('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(accountSpendLimits);\n```", + perLanguage: { + go: { + method: 'client.Accounts.GetSpendLimits', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\taccountSpendLimits, err := client.Accounts.GetSpendLimits(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", accountSpendLimits.AvailableSpendLimit)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/accounts/$ACCOUNT_TOKEN/spend_limits \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'accounts().retrieveSpendLimits', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AccountRetrieveSpendLimitsParams;\nimport com.lithic.api.models.AccountSpendLimits;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AccountSpendLimits accountSpendLimits = client.accounts().retrieveSpendLimits("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'accounts().retrieveSpendLimits', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AccountRetrieveSpendLimitsParams\nimport com.lithic.api.models.AccountSpendLimits\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val accountSpendLimits: AccountSpendLimits = client.accounts().retrieveSpendLimits("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'accounts.retrieve_spend_limits', + example: + '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)\naccount_spend_limits = client.accounts.retrieve_spend_limits(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(account_spend_limits.available_spend_limit)', + }, + ruby: { + method: 'accounts.retrieve_spend_limits', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\naccount_spend_limits = lithic.accounts.retrieve_spend_limits("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(account_spend_limits)', + }, + typescript: { + method: 'client.accounts.retrieveSpendLimits', + example: + "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\nconst accountSpendLimits = await client.accounts.retrieveSpendLimits(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(accountSpendLimits.available_spend_limit);", + }, + }, }, { name: 'create', @@ -149,20 +327,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ ], response: "{ token: string; account_token: string; status: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons: string[]; created?: string; external_id?: string; required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]; }", - }, - { - name: 'retrieve', - endpoint: '/v1/account_holders/{account_holder_token}', - httpMethod: 'get', - summary: 'Get an individual or business account holder', - description: 'Get an Individual or Business Account Holder and/or their KYC or KYB evaluation status.', - stainlessPath: '(resource) account_holders > (method) retrieve', - qualified: 'client.accountHolders.retrieve', - params: ['account_holder_token: string;'], - response: - "{ token: string; created: string; account_token?: string; beneficial_owner_individuals?: object[]; business_account_token?: string; business_entity?: object; control_person?: object; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: object; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: required_document[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: object; website_url?: string; }", - markdown: - "## retrieve\n\n`client.accountHolders.retrieve(account_holder_token: string): { token: string; created: string; account_token?: string; beneficial_owner_individuals?: object[]; business_account_token?: string; business_entity?: object; control_person?: object; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: object; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: required_document[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: object; website_url?: string; }`\n\n**get** `/v1/account_holders/{account_holder_token}`\n\nGet an Individual or Business Account Holder and/or their KYC or KYB evaluation status.\n\n### Parameters\n\n- `account_holder_token: string`\n\n### Returns\n\n- `{ token: string; created: string; account_token?: string; beneficial_owner_individuals?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }[]; business_account_token?: string; business_entity?: { address: object; dba_business_name: string; entity_token: string; government_id: string; legal_business_name: string; phone_numbers: string[]; parent_company?: string; }; control_person?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: { created?: string; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; updated?: string; }; website_url?: string; }`\n\n - `token: string`\n - `created: string`\n - `account_token?: string`\n - `beneficial_owner_individuals?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }[]`\n - `business_account_token?: string`\n - `business_entity?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dba_business_name: string; entity_token: string; government_id: string; legal_business_name: string; phone_numbers: string[]; parent_company?: string; }`\n - `control_person?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }`\n - `email?: string`\n - `exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'`\n - `external_id?: string`\n - `individual?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }`\n - `naics_code?: string`\n - `nature_of_business?: string`\n - `phone_number?: string`\n - `required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]`\n - `status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'`\n - `status_reasons?: string[]`\n - `user_type?: 'BUSINESS' | 'INDIVIDUAL'`\n - `verification_application?: { created?: string; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; updated?: string; }`\n - `website_url?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst accountHolder = await client.accountHolders.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(accountHolder);\n```", + perLanguage: { + go: { + method: 'client.AccountHolders.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n\t"github.com/lithic-com/lithic-go/shared"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\taccountHolder, err := client.AccountHolders.New(context.TODO(), lithic.AccountHolderNewParams{\n\t\tBody: lithic.KYBParam{\n\t\t\tBeneficialOwnerIndividuals: lithic.F([]lithic.KYBBeneficialOwnerIndividualParam{{\n\t\t\t\tAddress: lithic.F(shared.AddressParam{\n\t\t\t\t\tAddress1: lithic.F("300 Normal Forest Way"),\n\t\t\t\t\tCity: lithic.F("Portland"),\n\t\t\t\t\tCountry: lithic.F("USA"),\n\t\t\t\t\tPostalCode: lithic.F("90210"),\n\t\t\t\t\tState: lithic.F("OR"),\n\t\t\t\t}),\n\t\t\t\tDob: lithic.F("1991-03-08T08:00:00Z"),\n\t\t\t\tEmail: lithic.F("tim@left-earth.com"),\n\t\t\t\tFirstName: lithic.F("Timmy"),\n\t\t\t\tGovernmentID: lithic.F("211-23-1412"),\n\t\t\t\tLastName: lithic.F("Turner"),\n\t\t\t}}),\n\t\t\tBusinessEntity: lithic.F(lithic.KYBBusinessEntityParam{\n\t\t\t\tAddress: lithic.F(shared.AddressParam{\n\t\t\t\t\tAddress1: lithic.F("123 Old Forest Way"),\n\t\t\t\t\tCity: lithic.F("Omaha"),\n\t\t\t\t\tCountry: lithic.F("USA"),\n\t\t\t\t\tPostalCode: lithic.F("61022"),\n\t\t\t\t\tState: lithic.F("NE"),\n\t\t\t\t}),\n\t\t\t\tGovernmentID: lithic.F("12-3456789"),\n\t\t\t\tLegalBusinessName: lithic.F("Busy Business, Inc."),\n\t\t\t\tPhoneNumbers: lithic.F([]string{"+15555555555"}),\n\t\t\t}),\n\t\t\tControlPerson: lithic.F(lithic.KYBControlPersonParam{\n\t\t\t\tAddress: lithic.F(shared.AddressParam{\n\t\t\t\t\tAddress1: lithic.F("451 New Forest Way"),\n\t\t\t\t\tCity: lithic.F("Springfield"),\n\t\t\t\t\tCountry: lithic.F("USA"),\n\t\t\t\t\tPostalCode: lithic.F("68022"),\n\t\t\t\t\tState: lithic.F("IL"),\n\t\t\t\t}),\n\t\t\t\tDob: lithic.F("1991-03-08T08:00:00Z"),\n\t\t\t\tEmail: lithic.F("tom@middle-pluto.com"),\n\t\t\t\tFirstName: lithic.F("Tom"),\n\t\t\t\tGovernmentID: lithic.F("111-23-1412"),\n\t\t\t\tLastName: lithic.F("Timothy"),\n\t\t\t}),\n\t\t\tNatureOfBusiness: lithic.F("Software company selling solutions to the restaurant industry"),\n\t\t\tTosTimestamp: lithic.F("2022-03-08T08:00:00Z"),\n\t\t\tWorkflow: lithic.F(lithic.KYBWorkflowKYBByo),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", accountHolder.ExternalID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/account_holders \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n --max-time 300 \\\n -d \'{\n "beneficial_owner_individuals": [\n {\n "address": {\n "address1": "123 Old Forest Way",\n "city": "Omaha",\n "country": "USA",\n "postal_code": "68022",\n "state": "NE"\n },\n "dob": "1991-03-08 08:00:00",\n "email": "tom@middle-earth.com",\n "first_name": "Tom",\n "government_id": "111-23-1412",\n "last_name": "Bombadil"\n }\n ],\n "business_entity": {\n "address": {\n "address1": "123 Old Forest Way",\n "city": "Omaha",\n "country": "USA",\n "postal_code": "68022",\n "state": "NE"\n },\n "government_id": "114-123-1513",\n "legal_business_name": "Acme, Inc.",\n "phone_numbers": [\n "+15555555555"\n ]\n },\n "control_person": {\n "address": {\n "address1": "123 Old Forest Way",\n "city": "Omaha",\n "country": "USA",\n "postal_code": "68022",\n "state": "NE"\n },\n "dob": "1991-03-08 08:00:00",\n "email": "tom@middle-earth.com",\n "first_name": "Tom",\n "government_id": "111-23-1412",\n "last_name": "Bombadil"\n },\n "nature_of_business": "Software company selling solutions to the restaurant industry",\n "tos_timestamp": "2018-05-29T21:16:05Z",\n "workflow": "KYB_BASIC",\n "kyb_passed_timestamp": "2018-05-29T21:16:05Z",\n "naics_code": "541512",\n "website_url": "www.mybusiness.com"\n }\'', + }, + java: { + method: 'accountHolders().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AccountHolderCreateParams;\nimport com.lithic.api.models.AccountHolderCreateResponse;\nimport com.lithic.api.models.Address;\nimport com.lithic.api.models.Kyb;\nimport com.lithic.api.models.Kyc;\nimport com.lithic.api.models.KycExempt;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n Kyb params = Kyb.builder()\n .addBeneficialOwnerIndividual(Kyb.KybIndividual.builder()\n .address(Address.builder()\n .address1("300 Normal Forest Way")\n .city("Portland")\n .country("USA")\n .postalCode("90210")\n .state("OR")\n .build())\n .dob("1991-03-08T08:00:00Z")\n .email("tim@left-earth.com")\n .firstName("Timmy")\n .governmentId("211-23-1412")\n .lastName("Turner")\n .build())\n .businessEntity(Kyb.BusinessEntity.builder()\n .address(Address.builder()\n .address1("123 Old Forest Way")\n .city("Omaha")\n .country("USA")\n .postalCode("61022")\n .state("NE")\n .build())\n .governmentId("12-3456789")\n .legalBusinessName("Busy Business, Inc.")\n .addPhoneNumber("+15555555555")\n .build())\n .controlPerson(Kyb.KybIndividual.builder()\n .address(Address.builder()\n .address1("451 New Forest Way")\n .city("Springfield")\n .country("USA")\n .postalCode("68022")\n .state("IL")\n .build())\n .dob("1991-03-08T08:00:00Z")\n .email("tom@middle-pluto.com")\n .firstName("Tom")\n .governmentId("111-23-1412")\n .lastName("Timothy")\n .build())\n .natureOfBusiness("Software company selling solutions to the restaurant industry")\n .tosTimestamp("2022-03-08T08:00:00Z")\n .workflow(Kyb.Workflow.KYB_BYO)\n .build();\n AccountHolderCreateResponse accountHolder = client.accountHolders().create(params);\n }\n}', + }, + kotlin: { + method: 'accountHolders().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AccountHolderCreateParams\nimport com.lithic.api.models.AccountHolderCreateResponse\nimport com.lithic.api.models.Address\nimport com.lithic.api.models.Kyb\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: Kyb = Kyb.builder()\n .addBeneficialOwnerIndividual(Kyb.KybIndividual.builder()\n .address(Address.builder()\n .address1("300 Normal Forest Way")\n .city("Portland")\n .country("USA")\n .postalCode("90210")\n .state("OR")\n .build())\n .dob("1991-03-08T08:00:00Z")\n .email("tim@left-earth.com")\n .firstName("Timmy")\n .governmentId("211-23-1412")\n .lastName("Turner")\n .build())\n .businessEntity(Kyb.BusinessEntity.builder()\n .address(Address.builder()\n .address1("123 Old Forest Way")\n .city("Omaha")\n .country("USA")\n .postalCode("61022")\n .state("NE")\n .build())\n .governmentId("12-3456789")\n .legalBusinessName("Busy Business, Inc.")\n .addPhoneNumber("+15555555555")\n .build())\n .controlPerson(Kyb.KybIndividual.builder()\n .address(Address.builder()\n .address1("451 New Forest Way")\n .city("Springfield")\n .country("USA")\n .postalCode("68022")\n .state("IL")\n .build())\n .dob("1991-03-08T08:00:00Z")\n .email("tom@middle-pluto.com")\n .firstName("Tom")\n .governmentId("111-23-1412")\n .lastName("Timothy")\n .build())\n .natureOfBusiness("Software company selling solutions to the restaurant industry")\n .tosTimestamp("2022-03-08T08:00:00Z")\n .workflow(Kyb.Workflow.KYB_BYO)\n .build()\n val accountHolder: AccountHolderCreateResponse = client.accountHolders().create(params)\n}', + }, + python: { + method: 'account_holders.create', + example: + '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)\naccount_holder = client.account_holders.create(\n beneficial_owner_individuals=[{\n "address": {\n "address1": "300 Normal Forest Way",\n "city": "Portland",\n "country": "USA",\n "postal_code": "90210",\n "state": "OR",\n },\n "dob": "1991-03-08T08:00:00Z",\n "email": "tim@left-earth.com",\n "first_name": "Timmy",\n "government_id": "211-23-1412",\n "last_name": "Turner",\n "phone_number": "+15555555555",\n }],\n business_entity={\n "address": {\n "address1": "123 Old Forest Way",\n "city": "Omaha",\n "country": "USA",\n "postal_code": "61022",\n "state": "NE",\n },\n "dba_business_name": "Example Business Solutions",\n "government_id": "12-3456789",\n "legal_business_name": "Busy Business, Inc.",\n "phone_numbers": ["+15555555555"],\n },\n control_person={\n "address": {\n "address1": "451 New Forest Way",\n "city": "Springfield",\n "country": "USA",\n "postal_code": "68022",\n "state": "IL",\n },\n "dob": "1991-03-08T08:00:00Z",\n "email": "tom@middle-pluto.com",\n "first_name": "Tom",\n "government_id": "111-23-1412",\n "last_name": "Timothy",\n "phone_number": "+15555555555",\n },\n nature_of_business="Software company selling solutions to the restaurant industry",\n tos_timestamp="2022-03-08T08:00:00Z",\n workflow="KYB_BYO",\n kyb_passed_timestamp="2022-03-08T08:00:00Z",\n naics_code="541512",\n website_url="https://www.mybusiness.com",\n)\nprint(account_holder.external_id)', + }, + ruby: { + method: 'account_holders.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\naccount_holder = lithic.account_holders.create(\n body: {\n beneficial_owner_individuals: [\n {\n address: {address1: "300 Normal Forest Way", city: "Portland", country: "USA", postal_code: "90210", state: "OR"},\n dob: "1991-03-08T08:00:00Z",\n email: "tim@left-earth.com",\n first_name: "Timmy",\n government_id: "211-23-1412",\n last_name: "Turner"\n }\n ],\n business_entity: {\n address: {address1: "123 Old Forest Way", city: "Omaha", country: "USA", postal_code: "61022", state: "NE"},\n government_id: "12-3456789",\n legal_business_name: "Busy Business, Inc.",\n phone_numbers: ["+15555555555"]\n },\n control_person: {\n address: {address1: "451 New Forest Way", city: "Springfield", country: "USA", postal_code: "68022", state: "IL"},\n dob: "1991-03-08T08:00:00Z",\n email: "tom@middle-pluto.com",\n first_name: "Tom",\n government_id: "111-23-1412",\n last_name: "Timothy"\n },\n nature_of_business: "Software company selling solutions to the restaurant industry",\n tos_timestamp: "2022-03-08T08:00:00Z",\n workflow: :KYB_BYO\n }\n)\n\nputs(account_holder)', + }, + typescript: { + method: 'client.accountHolders.create', + example: + "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\nconst accountHolder = await client.accountHolders.create({\n beneficial_owner_individuals: [\n {\n address: {\n address1: '300 Normal Forest Way',\n city: 'Portland',\n country: 'USA',\n postal_code: '90210',\n state: 'OR',\n },\n dob: '1991-03-08T08:00:00Z',\n email: 'tim@left-earth.com',\n first_name: 'Timmy',\n government_id: '211-23-1412',\n last_name: 'Turner',\n phone_number: '+15555555555',\n },\n ],\n business_entity: {\n address: {\n address1: '123 Old Forest Way',\n city: 'Omaha',\n country: 'USA',\n postal_code: '61022',\n state: 'NE',\n },\n dba_business_name: 'Example Business Solutions',\n government_id: '12-3456789',\n legal_business_name: 'Busy Business, Inc.',\n phone_numbers: ['+15555555555'],\n },\n control_person: {\n address: {\n address1: '451 New Forest Way',\n city: 'Springfield',\n country: 'USA',\n postal_code: '68022',\n state: 'IL',\n },\n dob: '1991-03-08T08:00:00Z',\n email: 'tom@middle-pluto.com',\n first_name: 'Tom',\n government_id: '111-23-1412',\n last_name: 'Timothy',\n phone_number: '+15555555555',\n },\n nature_of_business: 'Software company selling solutions to the restaurant industry',\n tos_timestamp: '2022-03-08T08:00:00Z',\n workflow: 'KYB_BYO',\n kyb_passed_timestamp: '2022-03-08T08:00:00Z',\n naics_code: '541512',\n website_url: 'https://www.mybusiness.com',\n});\n\nconsole.log(accountHolder.external_id);", + }, + }, }, { name: 'update', @@ -179,33 +379,143 @@ const EMBEDDED_METHODS: MethodEntry[] = [ ], response: "{ token?: string; account_token?: string; beneficial_owner_individuals?: object[]; business_account_token?: string; business_entity?: kyb_business_entity; control_person?: object; created?: string; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: object; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: required_document[]; status?: 'ACCEPTED' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: object; website_url?: string; } | { token?: string; address?: object; business_account_token?: string; email?: string; first_name?: string; last_name?: string; legal_business_name?: string; phone_number?: string; }", + perLanguage: { + go: { + method: 'client.AccountHolders.Update', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\taccountHolder, err := client.AccountHolders.Update(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.AccountHolderUpdateParams{\n\t\t\tBody: lithic.AccountHolderUpdateParamsBodyKYBPatchRequest{},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", accountHolder)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/account_holders/$ACCOUNT_HOLDER_TOKEN \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "naics_code": "541512",\n "nature_of_business": "Software company selling solutions to the restaurant industry",\n "website_url": "www.mybusiness.com"\n }\'', + }, + java: { + method: 'accountHolders().update', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AccountHolderUpdateParams;\nimport com.lithic.api.models.AccountHolderUpdateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AccountHolderUpdateParams params = AccountHolderUpdateParams.builder()\n .accountHolderToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .body(AccountHolderUpdateParams.Body.KybPatchRequest.builder().build())\n .build();\n AccountHolderUpdateResponse accountHolder = client.accountHolders().update(params);\n }\n}', + }, + kotlin: { + method: 'accountHolders().update', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AccountHolderUpdateParams\nimport com.lithic.api.models.AccountHolderUpdateResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: AccountHolderUpdateParams = AccountHolderUpdateParams.builder()\n .accountHolderToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .body(AccountHolderUpdateParams.Body.KybPatchRequest.builder().build())\n .build()\n val accountHolder: AccountHolderUpdateResponse = client.accountHolders().update(params)\n}', + }, + python: { + method: 'account_holders.update', + example: + '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)\naccount_holder = client.account_holders.update(\n account_holder_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n business_entity={\n "entity_token": "83cf25ae-c14f-4d10-9fa2-0119f36c7286",\n "address": {\n "postal_code": "61023"\n },\n },\n control_person={\n "entity_token": "fd771a07-c5c2-42f3-a53c-a6c79c6c0d07",\n "address": {\n "postal_code": "68023"\n },\n },\n naics_code="541512",\n website_url="https://www.mynewbusiness.com",\n)\nprint(account_holder)', + }, + ruby: { + method: 'account_holders.update', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\naccount_holder = lithic.account_holders.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", body: {})\n\nputs(account_holder)', + }, + typescript: { + method: 'client.accountHolders.update', + example: + "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\nconst accountHolder = await client.accountHolders.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n business_entity: {\n entity_token: '83cf25ae-c14f-4d10-9fa2-0119f36c7286',\n address: { postal_code: '61023' },\n },\n control_person: {\n entity_token: 'fd771a07-c5c2-42f3-a53c-a6c79c6c0d07',\n address: { postal_code: '68023' },\n },\n naics_code: '541512',\n website_url: 'https://www.mynewbusiness.com',\n});\n\nconsole.log(accountHolder);", + }, + }, }, { - name: 'list', - endpoint: '/v1/account_holders', + name: 'retrieve', + endpoint: '/v1/account_holders/{account_holder_token}', httpMethod: 'get', - summary: 'Get a list of individual or business account holders', - description: - 'Get a list of individual or business account holders and their KYC or KYB evaluation status.', - stainlessPath: '(resource) account_holders > (method) list', - qualified: 'client.accountHolders.list', - params: [ - 'begin?: string;', - 'email?: string;', - 'end?: string;', - 'ending_before?: string;', - 'external_id?: string;', - 'first_name?: string;', - 'last_name?: string;', - 'legal_business_name?: string;', - 'limit?: number;', - 'phone_number?: string;', - 'starting_after?: string;', - ], + summary: 'Get an individual or business account holder', + description: 'Get an Individual or Business Account Holder and/or their KYC or KYB evaluation status.', + stainlessPath: '(resource) account_holders > (method) retrieve', + qualified: 'client.accountHolders.retrieve', + params: ['account_holder_token: string;'], response: "{ token: string; created: string; account_token?: string; beneficial_owner_individuals?: object[]; business_account_token?: string; business_entity?: object; control_person?: object; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: object; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: required_document[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: object; website_url?: string; }", markdown: - "## list\n\n`client.accountHolders.list(begin?: string, email?: string, end?: string, ending_before?: string, external_id?: string, first_name?: string, last_name?: string, legal_business_name?: string, limit?: number, phone_number?: string, starting_after?: string): { token: string; created: string; account_token?: string; beneficial_owner_individuals?: object[]; business_account_token?: string; business_entity?: object; control_person?: object; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: object; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: required_document[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: object; website_url?: string; }`\n\n**get** `/v1/account_holders`\n\nGet a list of individual or business account holders and their KYC or KYB evaluation status.\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `email?: string`\n Email address of the account holder. The query must be an exact match, case insensitive.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `external_id?: string`\n If applicable, represents the external_id associated with the account_holder.\n\n- `first_name?: string`\n (Individual Account Holders only) The first name of the account holder. The query is case insensitive and supports partial matches.\n\n- `last_name?: string`\n (Individual Account Holders only) The last name of the account holder. The query is case insensitive and supports partial matches.\n\n- `legal_business_name?: string`\n (Business Account Holders only) The legal business name of the account holder. The query is case insensitive and supports partial matches.\n\n- `limit?: number`\n The number of account_holders to limit the response to.\n\n- `phone_number?: string`\n Phone number of the account holder. The query must be an exact match.\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; created: string; account_token?: string; beneficial_owner_individuals?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }[]; business_account_token?: string; business_entity?: { address: object; dba_business_name: string; entity_token: string; government_id: string; legal_business_name: string; phone_numbers: string[]; parent_company?: string; }; control_person?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: { created?: string; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; updated?: string; }; website_url?: string; }`\n\n - `token: string`\n - `created: string`\n - `account_token?: string`\n - `beneficial_owner_individuals?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }[]`\n - `business_account_token?: string`\n - `business_entity?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dba_business_name: string; entity_token: string; government_id: string; legal_business_name: string; phone_numbers: string[]; parent_company?: string; }`\n - `control_person?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }`\n - `email?: string`\n - `exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'`\n - `external_id?: string`\n - `individual?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }`\n - `naics_code?: string`\n - `nature_of_business?: string`\n - `phone_number?: string`\n - `required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]`\n - `status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'`\n - `status_reasons?: string[]`\n - `user_type?: 'BUSINESS' | 'INDIVIDUAL'`\n - `verification_application?: { created?: string; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; updated?: string; }`\n - `website_url?: 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 accountHolder of client.accountHolders.list()) {\n console.log(accountHolder);\n}\n```", + "## retrieve\n\n`client.accountHolders.retrieve(account_holder_token: string): { token: string; created: string; account_token?: string; beneficial_owner_individuals?: object[]; business_account_token?: string; business_entity?: object; control_person?: object; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: object; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: required_document[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: object; website_url?: string; }`\n\n**get** `/v1/account_holders/{account_holder_token}`\n\nGet an Individual or Business Account Holder and/or their KYC or KYB evaluation status.\n\n### Parameters\n\n- `account_holder_token: string`\n\n### Returns\n\n- `{ token: string; created: string; account_token?: string; beneficial_owner_individuals?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }[]; business_account_token?: string; business_entity?: { address: object; dba_business_name: string; entity_token: string; government_id: string; legal_business_name: string; phone_numbers: string[]; parent_company?: string; }; control_person?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: { created?: string; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; updated?: string; }; website_url?: string; }`\n\n - `token: string`\n - `created: string`\n - `account_token?: string`\n - `beneficial_owner_individuals?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }[]`\n - `business_account_token?: string`\n - `business_entity?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dba_business_name: string; entity_token: string; government_id: string; legal_business_name: string; phone_numbers: string[]; parent_company?: string; }`\n - `control_person?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }`\n - `email?: string`\n - `exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'`\n - `external_id?: string`\n - `individual?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }`\n - `naics_code?: string`\n - `nature_of_business?: string`\n - `phone_number?: string`\n - `required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]`\n - `status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'`\n - `status_reasons?: string[]`\n - `user_type?: 'BUSINESS' | 'INDIVIDUAL'`\n - `verification_application?: { created?: string; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; updated?: string; }`\n - `website_url?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst accountHolder = await client.accountHolders.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(accountHolder);\n```", + perLanguage: { + go: { + method: 'client.AccountHolders.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\taccountHolder, err := client.AccountHolders.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", accountHolder.BeneficialOwnerIndividuals)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/account_holders/$ACCOUNT_HOLDER_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'accountHolders().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AccountHolder;\nimport com.lithic.api.models.AccountHolderRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AccountHolder accountHolder = client.accountHolders().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'accountHolders().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AccountHolder\nimport com.lithic.api.models.AccountHolderRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val accountHolder: AccountHolder = client.accountHolders().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'account_holders.retrieve', + example: + '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)\naccount_holder = client.account_holders.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(account_holder.beneficial_owner_individuals)', + }, + ruby: { + method: 'account_holders.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\naccount_holder = lithic.account_holders.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(account_holder)', + }, + typescript: { + method: 'client.accountHolders.retrieve', + example: + "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\nconst accountHolder = await client.accountHolders.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(accountHolder.beneficial_owner_individuals);", + }, + }, + }, + { + name: 'upload_document', + endpoint: '/v1/account_holders/{account_holder_token}/documents', + httpMethod: 'post', + summary: 'Initiate account holder document upload', + description: + 'Use this endpoint to identify which type of supported government-issued documentation you will upload for further verification.\nIt will return two URLs to upload your document images to - one for the front image and one for the back image.\n\nThis endpoint is only valid for evaluations in a `PENDING_DOCUMENT` state.\n\nSupported file types include `jpg`, `png`, and `pdf`. Each file must be less than 15 MiB. Once both required uploads have been successfully completed, your document will be run through KYC verification.\n\nIf you have registered a webhook, you will receive evaluation updates for any document submission evaluations, as well as for any failed document uploads.\n\nTwo document submission attempts are permitted via this endpoint before a `REJECTED` status is returned and the account creation process is ended. Currently only one type of\naccount holder document is supported per KYC verification.\n', + stainlessPath: '(resource) account_holders > (method) upload_document', + qualified: 'client.accountHolders.uploadDocument', + params: ['account_holder_token: string;', 'document_type: string;', 'entity_token: string;'], + response: + "{ token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }", + markdown: + "## upload_document\n\n`client.accountHolders.uploadDocument(account_holder_token: string, document_type: string, entity_token: string): { token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: object[]; }`\n\n**post** `/v1/account_holders/{account_holder_token}/documents`\n\nUse this endpoint to identify which type of supported government-issued documentation you will upload for further verification.\nIt will return two URLs to upload your document images to - one for the front image and one for the back image.\n\nThis endpoint is only valid for evaluations in a `PENDING_DOCUMENT` state.\n\nSupported file types include `jpg`, `png`, and `pdf`. Each file must be less than 15 MiB. Once both required uploads have been successfully completed, your document will be run through KYC verification.\n\nIf you have registered a webhook, you will receive evaluation updates for any document submission evaluations, as well as for any failed document uploads.\n\nTwo document submission attempts are permitted via this endpoint before a `REJECTED` status is returned and the account creation process is ended. Currently only one type of\naccount holder document is supported per KYC verification.\n\n\n### Parameters\n\n- `account_holder_token: string`\n\n- `document_type: string`\n The type of document to upload\n\n- `entity_token: string`\n Globally unique identifier for the entity.\n\n### Returns\n\n- `{ token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }`\n Describes the document and the required document image uploads\nrequired to re-run KYC\n\n - `token: string`\n - `account_holder_token: string`\n - `document_type: string`\n - `entity_token: string`\n - `required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst document = await client.accountHolders.uploadDocument('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { document_type: 'EIN_LETTER', entity_token: '83cf25ae-c14f-4d10-9fa2-0119f36c7286' });\n\nconsole.log(document);\n```", + perLanguage: { + go: { + method: 'client.AccountHolders.UploadDocument', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tdocument, err := client.AccountHolders.UploadDocument(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.AccountHolderUploadDocumentParams{\n\t\t\tDocumentType: lithic.F(lithic.AccountHolderUploadDocumentParamsDocumentTypeEinLetter),\n\t\t\tEntityToken: lithic.F("83cf25ae-c14f-4d10-9fa2-0119f36c7286"),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", document.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/account_holders/$ACCOUNT_HOLDER_TOKEN/documents \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "document_type": "EIN_LETTER",\n "entity_token": "83cf25ae-c14f-4d10-9fa2-0119f36c7286"\n }\'', + }, + java: { + method: 'accountHolders().uploadDocument', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AccountHolderUploadDocumentParams;\nimport com.lithic.api.models.Document;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AccountHolderUploadDocumentParams params = AccountHolderUploadDocumentParams.builder()\n .accountHolderToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .documentType(AccountHolderUploadDocumentParams.DocumentType.EIN_LETTER)\n .entityToken("83cf25ae-c14f-4d10-9fa2-0119f36c7286")\n .build();\n Document document = client.accountHolders().uploadDocument(params);\n }\n}', + }, + kotlin: { + method: 'accountHolders().uploadDocument', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AccountHolderUploadDocumentParams\nimport com.lithic.api.models.Document\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: AccountHolderUploadDocumentParams = AccountHolderUploadDocumentParams.builder()\n .accountHolderToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .documentType(AccountHolderUploadDocumentParams.DocumentType.EIN_LETTER)\n .entityToken("83cf25ae-c14f-4d10-9fa2-0119f36c7286")\n .build()\n val document: Document = client.accountHolders().uploadDocument(params)\n}', + }, + python: { + method: 'account_holders.upload_document', + example: + '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)\ndocument = client.account_holders.upload_document(\n account_holder_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n document_type="EIN_LETTER",\n entity_token="83cf25ae-c14f-4d10-9fa2-0119f36c7286",\n)\nprint(document.token)', + }, + ruby: { + method: 'account_holders.upload_document', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ndocument = lithic.account_holders.upload_document(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n document_type: :EIN_LETTER,\n entity_token: "83cf25ae-c14f-4d10-9fa2-0119f36c7286"\n)\n\nputs(document)', + }, + typescript: { + method: 'client.accountHolders.uploadDocument', + example: + "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\nconst document = await client.accountHolders.uploadDocument(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { document_type: 'EIN_LETTER', entity_token: '83cf25ae-c14f-4d10-9fa2-0119f36c7286' },\n);\n\nconsole.log(document.token);", + }, + }, }, { name: 'list_documents', @@ -221,6 +531,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ data?: { token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: object[]; }[]; }', markdown: "## list_documents\n\n`client.accountHolders.listDocuments(account_holder_token: string): { data?: document[]; }`\n\n**get** `/v1/account_holders/{account_holder_token}/documents`\n\nRetrieve the status of account holder document uploads, or retrieve the upload URLs to process your image uploads.\n\nNote that this is not equivalent to checking the status of the KYC evaluation overall (a document may be successfully uploaded but not be sufficient for KYC to pass).\n\nIn the event your upload URLs have expired, calling this endpoint will refresh them.\nSimilarly, in the event a previous account holder document upload has failed, you can use this endpoint to get a new upload URL for the failed image upload.\n\nWhen a new document upload is generated for a failed attempt, the response will show an additional entry in the `required_document_uploads` list\nin a `PENDING` state for the corresponding `image_type`.\n\n\n### Parameters\n\n- `account_holder_token: string`\n\n### Returns\n\n- `{ data?: { token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: object[]; }[]; }`\n\n - `data?: { token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.accountHolders.listDocuments('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.AccountHolders.ListDocuments', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.AccountHolders.ListDocuments(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/account_holders/$ACCOUNT_HOLDER_TOKEN/documents \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'accountHolders().listDocuments', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AccountHolderListDocumentsParams;\nimport com.lithic.api.models.AccountHolderListDocumentsResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AccountHolderListDocumentsResponse response = client.accountHolders().listDocuments("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'accountHolders().listDocuments', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AccountHolderListDocumentsParams\nimport com.lithic.api.models.AccountHolderListDocumentsResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val response: AccountHolderListDocumentsResponse = client.accountHolders().listDocuments("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'account_holders.list_documents', + example: + '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)\nresponse = client.account_holders.list_documents(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data)', + }, + ruby: { + method: 'account_holders.list_documents', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.account_holders.list_documents("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(response)', + }, + typescript: { + method: 'client.accountHolders.listDocuments', + example: + "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\nconst response = await client.accountHolders.listDocuments('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.data);", + }, + }, }, { name: 'retrieve_document', @@ -236,25 +582,104 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }", markdown: "## retrieve_document\n\n`client.accountHolders.retrieveDocument(account_holder_token: string, document_token: string): { token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: object[]; }`\n\n**get** `/v1/account_holders/{account_holder_token}/documents/{document_token}`\n\nCheck the status of an account holder document upload, or retrieve the upload URLs to process your image uploads.\n\nNote that this is not equivalent to checking the status of the KYC evaluation overall (a document may be successfully uploaded but not be sufficient for KYC to pass).\n\nIn the event your upload URLs have expired, calling this endpoint will refresh them.\nSimilarly, in the event a document upload has failed, you can use this endpoint to get a new upload URL for the failed image upload.\n\nWhen a new account holder document upload is generated for a failed attempt, the response will show an additional entry in the `required_document_uploads` array\nin a `PENDING` state for the corresponding `image_type`.\n\n\n### Parameters\n\n- `account_holder_token: string`\n\n- `document_token: string`\n\n### Returns\n\n- `{ token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }`\n Describes the document and the required document image uploads\nrequired to re-run KYC\n\n - `token: string`\n - `account_holder_token: string`\n - `document_type: string`\n - `entity_token: string`\n - `required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst document = await client.accountHolders.retrieveDocument('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_holder_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(document);\n```", + perLanguage: { + go: { + method: 'client.AccountHolders.GetDocument', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tdocument, err := client.AccountHolders.GetDocument(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", document.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/account_holders/$ACCOUNT_HOLDER_TOKEN/documents/$DOCUMENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'accountHolders().retrieveDocument', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AccountHolderRetrieveDocumentParams;\nimport com.lithic.api.models.Document;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AccountHolderRetrieveDocumentParams params = AccountHolderRetrieveDocumentParams.builder()\n .accountHolderToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .documentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n Document document = client.accountHolders().retrieveDocument(params);\n }\n}', + }, + kotlin: { + method: 'accountHolders().retrieveDocument', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AccountHolderRetrieveDocumentParams\nimport com.lithic.api.models.Document\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: AccountHolderRetrieveDocumentParams = AccountHolderRetrieveDocumentParams.builder()\n .accountHolderToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .documentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build()\n val document: Document = client.accountHolders().retrieveDocument(params)\n}', + }, + python: { + method: 'account_holders.retrieve_document', + example: + '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)\ndocument = client.account_holders.retrieve_document(\n document_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n account_holder_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(document.token)', + }, + ruby: { + method: 'account_holders.retrieve_document', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ndocument = lithic.account_holders.retrieve_document(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n account_holder_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n)\n\nputs(document)', + }, + typescript: { + method: 'client.accountHolders.retrieveDocument', + example: + "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\nconst document = await client.accountHolders.retrieveDocument(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { account_holder_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n);\n\nconsole.log(document.token);", + }, + }, }, { - name: 'simulate_enrollment_document_review', - endpoint: '/v1/simulate/account_holders/enrollment_document_review', - httpMethod: 'post', - summary: "Simulate an account holder document upload's review", - description: 'Simulates a review for an account holder document upload.', - stainlessPath: '(resource) account_holders > (method) simulate_enrollment_document_review', - qualified: 'client.accountHolders.simulateEnrollmentDocumentReview', + name: 'list', + endpoint: '/v1/account_holders', + httpMethod: 'get', + summary: 'Get a list of individual or business account holders', + description: + 'Get a list of individual or business account holders and their KYC or KYB evaluation status.', + stainlessPath: '(resource) account_holders > (method) list', + qualified: 'client.accountHolders.list', params: [ - 'document_upload_token: string;', - "status: 'UPLOADED' | 'ACCEPTED' | 'REJECTED' | 'PARTIAL_APPROVAL';", - 'accepted_entity_status_reasons?: string[];', - 'status_reason?: string;', + 'begin?: string;', + 'email?: string;', + 'end?: string;', + 'ending_before?: string;', + 'external_id?: string;', + 'first_name?: string;', + 'last_name?: string;', + 'legal_business_name?: string;', + 'limit?: number;', + 'phone_number?: string;', + 'starting_after?: string;', ], response: - "{ token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }", + "{ token: string; created: string; account_token?: string; beneficial_owner_individuals?: object[]; business_account_token?: string; business_entity?: object; control_person?: object; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: object; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: required_document[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: object; website_url?: string; }", markdown: - "## simulate_enrollment_document_review\n\n`client.accountHolders.simulateEnrollmentDocumentReview(document_upload_token: string, status: 'UPLOADED' | 'ACCEPTED' | 'REJECTED' | 'PARTIAL_APPROVAL', accepted_entity_status_reasons?: string[], status_reason?: string): { token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: object[]; }`\n\n**post** `/v1/simulate/account_holders/enrollment_document_review`\n\nSimulates a review for an account holder document upload.\n\n### Parameters\n\n- `document_upload_token: string`\n The account holder document upload which to perform the simulation upon.\n\n- `status: 'UPLOADED' | 'ACCEPTED' | 'REJECTED' | 'PARTIAL_APPROVAL'`\n An account holder document's upload status for use within the simulation.\n\n- `accepted_entity_status_reasons?: string[]`\n A list of status reasons associated with a KYB account holder in PENDING_REVIEW\n\n- `status_reason?: string`\n Status reason that will be associated with the simulated account holder status. Only required for a `REJECTED` status or `PARTIAL_APPROVAL` status.\n\n### Returns\n\n- `{ token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }`\n Describes the document and the required document image uploads\nrequired to re-run KYC\n\n - `token: string`\n - `account_holder_token: string`\n - `document_type: string`\n - `entity_token: string`\n - `required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst document = await client.accountHolders.simulateEnrollmentDocumentReview({ document_upload_token: 'b11cd67b-0a52-4180-8365-314f3def5426', status: 'UPLOADED' });\n\nconsole.log(document);\n```", + "## list\n\n`client.accountHolders.list(begin?: string, email?: string, end?: string, ending_before?: string, external_id?: string, first_name?: string, last_name?: string, legal_business_name?: string, limit?: number, phone_number?: string, starting_after?: string): { token: string; created: string; account_token?: string; beneficial_owner_individuals?: object[]; business_account_token?: string; business_entity?: object; control_person?: object; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: object; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: required_document[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: object; website_url?: string; }`\n\n**get** `/v1/account_holders`\n\nGet a list of individual or business account holders and their KYC or KYB evaluation status.\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `email?: string`\n Email address of the account holder. The query must be an exact match, case insensitive.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `external_id?: string`\n If applicable, represents the external_id associated with the account_holder.\n\n- `first_name?: string`\n (Individual Account Holders only) The first name of the account holder. The query is case insensitive and supports partial matches.\n\n- `last_name?: string`\n (Individual Account Holders only) The last name of the account holder. The query is case insensitive and supports partial matches.\n\n- `legal_business_name?: string`\n (Business Account Holders only) The legal business name of the account holder. The query is case insensitive and supports partial matches.\n\n- `limit?: number`\n The number of account_holders to limit the response to.\n\n- `phone_number?: string`\n Phone number of the account holder. The query must be an exact match.\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; created: string; account_token?: string; beneficial_owner_individuals?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }[]; business_account_token?: string; business_entity?: { address: object; dba_business_name: string; entity_token: string; government_id: string; legal_business_name: string; phone_numbers: string[]; parent_company?: string; }; control_person?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: { address: object; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: { created?: string; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; updated?: string; }; website_url?: string; }`\n\n - `token: string`\n - `created: string`\n - `account_token?: string`\n - `beneficial_owner_individuals?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }[]`\n - `business_account_token?: string`\n - `business_entity?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dba_business_name: string; entity_token: string; government_id: string; legal_business_name: string; phone_numbers: string[]; parent_company?: string; }`\n - `control_person?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }`\n - `email?: string`\n - `exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'`\n - `external_id?: string`\n - `individual?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; entity_token: string; first_name: string; last_name: string; phone_number: string; }`\n - `naics_code?: string`\n - `nature_of_business?: string`\n - `phone_number?: string`\n - `required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]`\n - `status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'`\n - `status_reasons?: string[]`\n - `user_type?: 'BUSINESS' | 'INDIVIDUAL'`\n - `verification_application?: { created?: string; status?: 'ACCEPTED' | 'PENDING_REVIEW' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; updated?: string; }`\n - `website_url?: 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 accountHolder of client.accountHolders.list()) {\n console.log(accountHolder);\n}\n```", + perLanguage: { + go: { + method: 'client.AccountHolders.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.AccountHolders.List(context.TODO(), lithic.AccountHolderListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v1/account_holders \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'accountHolders().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AccountHolderListPage;\nimport com.lithic.api.models.AccountHolderListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AccountHolderListPage page = client.accountHolders().list();\n }\n}', + }, + kotlin: { + method: 'accountHolders().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AccountHolderListPage\nimport com.lithic.api.models.AccountHolderListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: AccountHolderListPage = client.accountHolders().list()\n}', + }, + python: { + method: 'account_holders.list', + example: + '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.account_holders.list()\npage = page.data[0]\nprint(page.beneficial_owner_individuals)', + }, + ruby: { + method: 'account_holders.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.account_holders.list\n\nputs(page)', + }, + typescript: { + method: 'client.accountHolders.list', + example: + "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 accountHolder of client.accountHolders.list()) {\n console.log(accountHolder.beneficial_owner_individuals);\n}", + }, + }, }, { name: 'simulate_enrollment_review', @@ -274,21 +699,97 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token?: string; account_token?: string; beneficial_owner_individuals?: { address?: object; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }[]; business_account_token?: string; business_entity?: object; control_person?: { address?: object; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }; created?: string; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: { address?: object; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: object[]; status?: 'ACCEPTED' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: { created: string; status: 'ACCEPTED' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons: string[]; updated: string; ky_passed_at?: string; }; website_url?: string; }", markdown: "## simulate_enrollment_review\n\n`client.accountHolders.simulateEnrollmentReview(account_holder_token?: string, status?: 'ACCEPTED' | 'REJECTED' | 'PENDING_REVIEW', status_reasons?: string[]): { token?: string; account_token?: string; beneficial_owner_individuals?: object[]; business_account_token?: string; business_entity?: kyb_business_entity; control_person?: object; created?: string; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: object; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: required_document[]; status?: 'ACCEPTED' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: object; website_url?: string; }`\n\n**post** `/v1/simulate/account_holders/enrollment_review`\n\n Simulates an enrollment review for an account holder. This endpoint is only applicable for workflows that may required intervention such as `KYB_BASIC`. \n\n### Parameters\n\n- `account_holder_token?: string`\n The account holder which to perform the simulation upon.\n\n- `status?: 'ACCEPTED' | 'REJECTED' | 'PENDING_REVIEW'`\n An account holder's status for use within the simulation.\n\n- `status_reasons?: string[]`\n Status reason that will be associated with the simulated account holder status. Only required for a `REJECTED` status.\n\n### Returns\n\n- `{ token?: string; account_token?: string; beneficial_owner_individuals?: { address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }[]; business_account_token?: string; business_entity?: { address: object; government_id: string; legal_business_name: string; phone_numbers: string[]; dba_business_name?: string; parent_company?: string; }; control_person?: { address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }; created?: string; email?: string; exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; external_id?: string; individual?: { address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }; naics_code?: string; nature_of_business?: string; phone_number?: string; required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]; status?: 'ACCEPTED' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons?: string[]; user_type?: 'BUSINESS' | 'INDIVIDUAL'; verification_application?: { created: string; status: 'ACCEPTED' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons: string[]; updated: string; ky_passed_at?: string; }; website_url?: string; }`\n\n - `token?: string`\n - `account_token?: string`\n - `beneficial_owner_individuals?: { address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }[]`\n - `business_account_token?: string`\n - `business_entity?: { address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; government_id: string; legal_business_name: string; phone_numbers: string[]; dba_business_name?: string; parent_company?: string; }`\n - `control_person?: { address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }`\n - `created?: string`\n - `email?: string`\n - `exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'`\n - `external_id?: string`\n - `individual?: { address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob?: string; email?: string; first_name?: string; government_id?: string; last_name?: string; phone_number?: string; }`\n - `naics_code?: string`\n - `nature_of_business?: string`\n - `phone_number?: string`\n - `required_documents?: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]`\n - `status?: 'ACCEPTED' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'`\n - `status_reasons?: string[]`\n - `user_type?: 'BUSINESS' | 'INDIVIDUAL'`\n - `verification_application?: { created: string; status: 'ACCEPTED' | 'PENDING_DOCUMENT' | 'PENDING_RESUBMIT' | 'REJECTED'; status_reasons: string[]; updated: string; ky_passed_at?: string; }`\n - `website_url?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.accountHolders.simulateEnrollmentReview();\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.AccountHolders.SimulateEnrollmentReview', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.AccountHolders.SimulateEnrollmentReview(context.TODO(), lithic.AccountHolderSimulateEnrollmentReviewParams{\n\t\tAccountHolderToken: lithic.F("1415964d-4400-4d79-9fb3-eee0faaee4e4"),\n\t\tStatus: lithic.F(lithic.AccountHolderSimulateEnrollmentReviewParamsStatusAccepted),\n\t\tStatusReasons: lithic.F([]lithic.AccountHolderSimulateEnrollmentReviewParamsStatusReason{}),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.BeneficialOwnerIndividuals)\n}\n', + }, + http: { + example: + "curl https://api.lithic.com/v1/simulate/account_holders/enrollment_review \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", + }, + java: { + method: 'accountHolders().simulateEnrollmentReview', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AccountHolderSimulateEnrollmentReviewParams;\nimport com.lithic.api.models.AccountHolderSimulateEnrollmentReviewResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AccountHolderSimulateEnrollmentReviewResponse response = client.accountHolders().simulateEnrollmentReview();\n }\n}', + }, + kotlin: { + method: 'accountHolders().simulateEnrollmentReview', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AccountHolderSimulateEnrollmentReviewParams\nimport com.lithic.api.models.AccountHolderSimulateEnrollmentReviewResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val response: AccountHolderSimulateEnrollmentReviewResponse = client.accountHolders().simulateEnrollmentReview()\n}', + }, + python: { + method: 'account_holders.simulate_enrollment_review', + example: + '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)\nresponse = client.account_holders.simulate_enrollment_review(\n account_holder_token="1415964d-4400-4d79-9fb3-eee0faaee4e4",\n status="ACCEPTED",\n status_reasons=[],\n)\nprint(response.beneficial_owner_individuals)', + }, + ruby: { + method: 'account_holders.simulate_enrollment_review', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.account_holders.simulate_enrollment_review\n\nputs(response)', + }, + typescript: { + method: 'client.accountHolders.simulateEnrollmentReview', + example: + "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\nconst response = await client.accountHolders.simulateEnrollmentReview({\n account_holder_token: '1415964d-4400-4d79-9fb3-eee0faaee4e4',\n status: 'ACCEPTED',\n status_reasons: [],\n});\n\nconsole.log(response.beneficial_owner_individuals);", + }, + }, }, { - name: 'upload_document', - endpoint: '/v1/account_holders/{account_holder_token}/documents', + name: 'simulate_enrollment_document_review', + endpoint: '/v1/simulate/account_holders/enrollment_document_review', httpMethod: 'post', - summary: 'Initiate account holder document upload', - description: - 'Use this endpoint to identify which type of supported government-issued documentation you will upload for further verification.\nIt will return two URLs to upload your document images to - one for the front image and one for the back image.\n\nThis endpoint is only valid for evaluations in a `PENDING_DOCUMENT` state.\n\nSupported file types include `jpg`, `png`, and `pdf`. Each file must be less than 15 MiB. Once both required uploads have been successfully completed, your document will be run through KYC verification.\n\nIf you have registered a webhook, you will receive evaluation updates for any document submission evaluations, as well as for any failed document uploads.\n\nTwo document submission attempts are permitted via this endpoint before a `REJECTED` status is returned and the account creation process is ended. Currently only one type of\naccount holder document is supported per KYC verification.\n', - stainlessPath: '(resource) account_holders > (method) upload_document', - qualified: 'client.accountHolders.uploadDocument', - params: ['account_holder_token: string;', 'document_type: string;', 'entity_token: string;'], + summary: "Simulate an account holder document upload's review", + description: 'Simulates a review for an account holder document upload.', + stainlessPath: '(resource) account_holders > (method) simulate_enrollment_document_review', + qualified: 'client.accountHolders.simulateEnrollmentDocumentReview', + params: [ + 'document_upload_token: string;', + "status: 'UPLOADED' | 'ACCEPTED' | 'REJECTED' | 'PARTIAL_APPROVAL';", + 'accepted_entity_status_reasons?: string[];', + 'status_reason?: string;', + ], response: "{ token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }", markdown: - "## upload_document\n\n`client.accountHolders.uploadDocument(account_holder_token: string, document_type: string, entity_token: string): { token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: object[]; }`\n\n**post** `/v1/account_holders/{account_holder_token}/documents`\n\nUse this endpoint to identify which type of supported government-issued documentation you will upload for further verification.\nIt will return two URLs to upload your document images to - one for the front image and one for the back image.\n\nThis endpoint is only valid for evaluations in a `PENDING_DOCUMENT` state.\n\nSupported file types include `jpg`, `png`, and `pdf`. Each file must be less than 15 MiB. Once both required uploads have been successfully completed, your document will be run through KYC verification.\n\nIf you have registered a webhook, you will receive evaluation updates for any document submission evaluations, as well as for any failed document uploads.\n\nTwo document submission attempts are permitted via this endpoint before a `REJECTED` status is returned and the account creation process is ended. Currently only one type of\naccount holder document is supported per KYC verification.\n\n\n### Parameters\n\n- `account_holder_token: string`\n\n- `document_type: string`\n The type of document to upload\n\n- `entity_token: string`\n Globally unique identifier for the entity.\n\n### Returns\n\n- `{ token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }`\n Describes the document and the required document image uploads\nrequired to re-run KYC\n\n - `token: string`\n - `account_holder_token: string`\n - `document_type: string`\n - `entity_token: string`\n - `required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst document = await client.accountHolders.uploadDocument('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { document_type: 'EIN_LETTER', entity_token: '83cf25ae-c14f-4d10-9fa2-0119f36c7286' });\n\nconsole.log(document);\n```", + "## simulate_enrollment_document_review\n\n`client.accountHolders.simulateEnrollmentDocumentReview(document_upload_token: string, status: 'UPLOADED' | 'ACCEPTED' | 'REJECTED' | 'PARTIAL_APPROVAL', accepted_entity_status_reasons?: string[], status_reason?: string): { token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: object[]; }`\n\n**post** `/v1/simulate/account_holders/enrollment_document_review`\n\nSimulates a review for an account holder document upload.\n\n### Parameters\n\n- `document_upload_token: string`\n The account holder document upload which to perform the simulation upon.\n\n- `status: 'UPLOADED' | 'ACCEPTED' | 'REJECTED' | 'PARTIAL_APPROVAL'`\n An account holder document's upload status for use within the simulation.\n\n- `accepted_entity_status_reasons?: string[]`\n A list of status reasons associated with a KYB account holder in PENDING_REVIEW\n\n- `status_reason?: string`\n Status reason that will be associated with the simulated account holder status. Only required for a `REJECTED` status or `PARTIAL_APPROVAL` status.\n\n### Returns\n\n- `{ token: string; account_holder_token: string; document_type: string; entity_token: string; required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]; }`\n Describes the document and the required document image uploads\nrequired to re-run KYC\n\n - `token: string`\n - `account_holder_token: string`\n - `document_type: string`\n - `entity_token: string`\n - `required_document_uploads: { token: string; accepted_entity_status_reasons: string[]; created: string; image_type: 'FRONT' | 'BACK'; rejected_entity_status_reasons: string[]; status: 'ACCEPTED' | 'REJECTED' | 'PENDING_UPLOAD' | 'UPLOADED' | 'PARTIAL_APPROVAL'; status_reasons: string[]; updated: string; upload_url: string; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst document = await client.accountHolders.simulateEnrollmentDocumentReview({ document_upload_token: 'b11cd67b-0a52-4180-8365-314f3def5426', status: 'UPLOADED' });\n\nconsole.log(document);\n```", + perLanguage: { + go: { + method: 'client.AccountHolders.SimulateEnrollmentDocumentReview', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tdocument, err := client.AccountHolders.SimulateEnrollmentDocumentReview(context.TODO(), lithic.AccountHolderSimulateEnrollmentDocumentReviewParams{\n\t\tDocumentUploadToken: lithic.F("b11cd67b-0a52-4180-8365-314f3def5426"),\n\t\tStatus: lithic.F(lithic.AccountHolderSimulateEnrollmentDocumentReviewParamsStatusUploaded),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", document.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/simulate/account_holders/enrollment_document_review \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "document_upload_token": "b11cd67b-0a52-4180-8365-314f3def5426",\n "status": "UPLOADED"\n }\'', + }, + java: { + method: 'accountHolders().simulateEnrollmentDocumentReview', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AccountHolderSimulateEnrollmentDocumentReviewParams;\nimport com.lithic.api.models.Document;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AccountHolderSimulateEnrollmentDocumentReviewParams params = AccountHolderSimulateEnrollmentDocumentReviewParams.builder()\n .documentUploadToken("b11cd67b-0a52-4180-8365-314f3def5426")\n .status(AccountHolderSimulateEnrollmentDocumentReviewParams.Status.UPLOADED)\n .build();\n Document document = client.accountHolders().simulateEnrollmentDocumentReview(params);\n }\n}', + }, + kotlin: { + method: 'accountHolders().simulateEnrollmentDocumentReview', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AccountHolderSimulateEnrollmentDocumentReviewParams\nimport com.lithic.api.models.Document\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: AccountHolderSimulateEnrollmentDocumentReviewParams = AccountHolderSimulateEnrollmentDocumentReviewParams.builder()\n .documentUploadToken("b11cd67b-0a52-4180-8365-314f3def5426")\n .status(AccountHolderSimulateEnrollmentDocumentReviewParams.Status.UPLOADED)\n .build()\n val document: Document = client.accountHolders().simulateEnrollmentDocumentReview(params)\n}', + }, + python: { + method: 'account_holders.simulate_enrollment_document_review', + example: + '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)\ndocument = client.account_holders.simulate_enrollment_document_review(\n document_upload_token="b11cd67b-0a52-4180-8365-314f3def5426",\n status="UPLOADED",\n)\nprint(document.token)', + }, + ruby: { + method: 'account_holders.simulate_enrollment_document_review', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ndocument = lithic.account_holders.simulate_enrollment_document_review(\n document_upload_token: "b11cd67b-0a52-4180-8365-314f3def5426",\n status: :UPLOADED\n)\n\nputs(document)', + }, + typescript: { + method: 'client.accountHolders.simulateEnrollmentDocumentReview', + example: + "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\nconst document = await client.accountHolders.simulateEnrollmentDocumentReview({\n document_upload_token: 'b11cd67b-0a52-4180-8365-314f3def5426',\n status: 'UPLOADED',\n});\n\nconsole.log(document.token);", + }, + }, }, { name: 'create', @@ -314,6 +815,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_holder_token: string; created: string; required_documents: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]; status: 'ACCEPTED' | 'INACTIVE' | 'PENDING_REVIEW' | 'REJECTED'; status_reasons: string[]; }", markdown: "## create\n\n`client.accountHolders.entities.create(account_holder_token: string, address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }, dob: string, email: string, first_name: string, government_id: string, last_name: string, phone_number: string, type: 'BENEFICIAL_OWNER_INDIVIDUAL' | 'CONTROL_PERSON'): { token: string; account_holder_token: string; created: string; required_documents: required_document[]; status: 'ACCEPTED' | 'INACTIVE' | 'PENDING_REVIEW' | 'REJECTED'; status_reasons: string[]; }`\n\n**post** `/v1/account_holders/{account_holder_token}/entities`\n\nCreate a new beneficial owner individual or replace the control person entity on an existing KYB account holder. This endpoint is only applicable for account holders enrolled through a KYB workflow with the Persona KYB provider.\nA new control person can only replace the existing one. A maximum of 4 beneficial owners can be associated with an account holder.\n\n### Parameters\n\n- `account_holder_token: string`\n\n- `address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n Individual's current address - PO boxes, UPS drops, and FedEx drops are not acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.\n - `address1: string`\n Valid deliverable address (no PO boxes).\n - `city: string`\n Name of city.\n - `country: string`\n Valid country code. Only USA is currently supported, entered in uppercase ISO 3166-1 alpha-3 three-character format.\n - `postal_code: string`\n Valid postal code. Only USA ZIP codes are currently supported, entered as a five-digit ZIP or nine-digit ZIP+4.\n - `state: string`\n Valid state code. Only USA state codes are currently supported, entered in uppercase ISO 3166-2 two-character format.\n - `address2?: string`\n Unit or apartment number (if applicable).\n\n- `dob: string`\n Individual's date of birth, as an RFC 3339 date.\n\n- `email: string`\n Individual's email address. If utilizing Lithic for chargeback processing, this customer email address may be used to communicate dispute status and resolution.\n\n- `first_name: string`\n Individual's first name, as it appears on government-issued identity documents.\n\n- `government_id: string`\n Government-issued identification number (required for identity verification and compliance with banking regulations). Social Security Numbers (SSN) and Individual Taxpayer Identification Numbers (ITIN) are currently supported, entered as full nine-digits, with or without hyphens\n\n- `last_name: string`\n Individual's last name, as it appears on government-issued identity documents.\n\n- `phone_number: string`\n Individual's phone number, entered in E.164 format.\n\n- `type: 'BENEFICIAL_OWNER_INDIVIDUAL' | 'CONTROL_PERSON'`\n The type of entity to create on the account holder\n\n### Returns\n\n- `{ token: string; account_holder_token: string; created: string; required_documents: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]; status: 'ACCEPTED' | 'INACTIVE' | 'PENDING_REVIEW' | 'REJECTED'; status_reasons: string[]; }`\n Response body for creating a new beneficial owner or replacing the control person entity on an existing KYB account holder.\n\n - `token: string`\n - `account_holder_token: string`\n - `created: string`\n - `required_documents: { entity_token: string; status_reasons: string[]; valid_documents: string[]; }[]`\n - `status: 'ACCEPTED' | 'INACTIVE' | 'PENDING_REVIEW' | 'REJECTED'`\n - `status_reasons: string[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst entity = await client.accountHolders.entities.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n address: {\n address1: '300 Normal Forest Way',\n city: 'Portland',\n country: 'USA',\n postal_code: '90210',\n state: 'OR',\n},\n dob: '1991-03-08T08:00:00Z',\n email: 'tim@left-earth.com',\n first_name: 'Timmy',\n government_id: '211-23-1412',\n last_name: 'Turner',\n phone_number: '+15555555555',\n type: 'BENEFICIAL_OWNER_INDIVIDUAL',\n});\n\nconsole.log(entity);\n```", + perLanguage: { + go: { + method: 'client.AccountHolders.Entities.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tentity, err := client.AccountHolders.Entities.New(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.AccountHolderEntityNewParams{\n\t\t\tAddress: lithic.F(lithic.AccountHolderEntityNewParamsAddress{\n\t\t\t\tAddress1: lithic.F("300 Normal Forest Way"),\n\t\t\t\tCity: lithic.F("Portland"),\n\t\t\t\tCountry: lithic.F("USA"),\n\t\t\t\tPostalCode: lithic.F("90210"),\n\t\t\t\tState: lithic.F("OR"),\n\t\t\t}),\n\t\t\tDob: lithic.F("1991-03-08T08:00:00Z"),\n\t\t\tEmail: lithic.F("tim@left-earth.com"),\n\t\t\tFirstName: lithic.F("Timmy"),\n\t\t\tGovernmentID: lithic.F("211-23-1412"),\n\t\t\tLastName: lithic.F("Turner"),\n\t\t\tPhoneNumber: lithic.F("+15555555555"),\n\t\t\tType: lithic.F(lithic.AccountHolderEntityNewParamsTypeBeneficialOwnerIndividual),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", entity.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/account_holders/$ACCOUNT_HOLDER_TOKEN/entities \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "address": {\n "address1": "300 Normal Forest Way",\n "city": "Portland",\n "country": "USA",\n "postal_code": "90210",\n "state": "OR"\n },\n "dob": "1991-03-08T08:00:00Z",\n "email": "tim@left-earth.com",\n "first_name": "Timmy",\n "government_id": "211-23-1412",\n "last_name": "Turner",\n "phone_number": "+15555555555",\n "type": "BENEFICIAL_OWNER_INDIVIDUAL"\n }\'', + }, + java: { + method: 'accountHolders().entities().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AccountHolderEntityCreateParams;\nimport com.lithic.api.models.EntityCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AccountHolderEntityCreateParams params = AccountHolderEntityCreateParams.builder()\n .accountHolderToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .address(AccountHolderEntityCreateParams.Address.builder()\n .address1("300 Normal Forest Way")\n .city("Portland")\n .country("USA")\n .postalCode("90210")\n .state("OR")\n .build())\n .dob("1991-03-08T08:00:00Z")\n .email("tim@left-earth.com")\n .firstName("Timmy")\n .governmentId("211-23-1412")\n .lastName("Turner")\n .phoneNumber("+15555555555")\n .type(AccountHolderEntityCreateParams.EntityType.BENEFICIAL_OWNER_INDIVIDUAL)\n .build();\n EntityCreateResponse entity = client.accountHolders().entities().create(params);\n }\n}', + }, + kotlin: { + method: 'accountHolders().entities().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AccountHolderEntityCreateParams\nimport com.lithic.api.models.EntityCreateResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: AccountHolderEntityCreateParams = AccountHolderEntityCreateParams.builder()\n .accountHolderToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .address(AccountHolderEntityCreateParams.Address.builder()\n .address1("300 Normal Forest Way")\n .city("Portland")\n .country("USA")\n .postalCode("90210")\n .state("OR")\n .build())\n .dob("1991-03-08T08:00:00Z")\n .email("tim@left-earth.com")\n .firstName("Timmy")\n .governmentId("211-23-1412")\n .lastName("Turner")\n .phoneNumber("+15555555555")\n .type(AccountHolderEntityCreateParams.EntityType.BENEFICIAL_OWNER_INDIVIDUAL)\n .build()\n val entity: EntityCreateResponse = client.accountHolders().entities().create(params)\n}', + }, + python: { + method: 'account_holders.entities.create', + example: + '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)\nentity = client.account_holders.entities.create(\n account_holder_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n address={\n "address1": "300 Normal Forest Way",\n "city": "Portland",\n "country": "USA",\n "postal_code": "90210",\n "state": "OR",\n },\n dob="1991-03-08T08:00:00Z",\n email="tim@left-earth.com",\n first_name="Timmy",\n government_id="211-23-1412",\n last_name="Turner",\n phone_number="+15555555555",\n type="BENEFICIAL_OWNER_INDIVIDUAL",\n)\nprint(entity.token)', + }, + ruby: { + method: 'account_holders.entities.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nentity = lithic.account_holders.entities.create(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n address: {address1: "300 Normal Forest Way", city: "Portland", country: "USA", postal_code: "90210", state: "OR"},\n dob: "1991-03-08T08:00:00Z",\n email: "tim@left-earth.com",\n first_name: "Timmy",\n government_id: "211-23-1412",\n last_name: "Turner",\n phone_number: "+15555555555",\n type: :BENEFICIAL_OWNER_INDIVIDUAL\n)\n\nputs(entity)', + }, + typescript: { + method: 'client.accountHolders.entities.create', + example: + "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\nconst entity = await client.accountHolders.entities.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n address: {\n address1: '300 Normal Forest Way',\n city: 'Portland',\n country: 'USA',\n postal_code: '90210',\n state: 'OR',\n },\n dob: '1991-03-08T08:00:00Z',\n email: 'tim@left-earth.com',\n first_name: 'Timmy',\n government_id: '211-23-1412',\n last_name: 'Turner',\n phone_number: '+15555555555',\n type: 'BENEFICIAL_OWNER_INDIVIDUAL',\n});\n\nconsole.log(entity.token);", + }, + }, }, { name: 'delete', @@ -329,6 +866,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_holder_token: string; address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; first_name: string; last_name: string; phone_number: string; status: 'ACCEPTED' | 'INACTIVE' | 'PENDING_REVIEW' | 'REJECTED'; type: 'BENEFICIAL_OWNER_INDIVIDUAL' | 'CONTROL_PERSON'; }", markdown: "## delete\n\n`client.accountHolders.entities.delete(account_holder_token: string, entity_token: string): { token: string; account_holder_token: string; address: object; dob: string; email: string; first_name: string; last_name: string; phone_number: string; status: 'ACCEPTED' | 'INACTIVE' | 'PENDING_REVIEW' | 'REJECTED'; type: 'BENEFICIAL_OWNER_INDIVIDUAL' | 'CONTROL_PERSON'; }`\n\n**delete** `/v1/account_holders/{account_holder_token}/entities/{entity_token}`\n\nDeactivate a beneficial owner individual on an existing KYB account holder. Only beneficial owner individuals can be deactivated.\n\n### Parameters\n\n- `account_holder_token: string`\n\n- `entity_token: string`\n\n### Returns\n\n- `{ token: string; account_holder_token: string; address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; dob: string; email: string; first_name: string; last_name: string; phone_number: string; status: 'ACCEPTED' | 'INACTIVE' | 'PENDING_REVIEW' | 'REJECTED'; type: 'BENEFICIAL_OWNER_INDIVIDUAL' | 'CONTROL_PERSON'; }`\n Information about an entity associated with an account holder\n\n - `token: string`\n - `account_holder_token: string`\n - `address: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `dob: string`\n - `email: string`\n - `first_name: string`\n - `last_name: string`\n - `phone_number: string`\n - `status: 'ACCEPTED' | 'INACTIVE' | 'PENDING_REVIEW' | 'REJECTED'`\n - `type: 'BENEFICIAL_OWNER_INDIVIDUAL' | 'CONTROL_PERSON'`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst accountHolderEntity = await client.accountHolders.entities.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_holder_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(accountHolderEntity);\n```", + perLanguage: { + go: { + method: 'client.AccountHolders.Entities.Delete', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\taccountHolderEntity, err := client.AccountHolders.Entities.Delete(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", accountHolderEntity.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/account_holders/$ACCOUNT_HOLDER_TOKEN/entities/$ENTITY_TOKEN \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'accountHolders().entities().delete', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AccountHolderEntity;\nimport com.lithic.api.models.AccountHolderEntityDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AccountHolderEntityDeleteParams params = AccountHolderEntityDeleteParams.builder()\n .accountHolderToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .entityToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n AccountHolderEntity accountHolderEntity = client.accountHolders().entities().delete(params);\n }\n}', + }, + kotlin: { + method: 'accountHolders().entities().delete', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AccountHolderEntity\nimport com.lithic.api.models.AccountHolderEntityDeleteParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: AccountHolderEntityDeleteParams = AccountHolderEntityDeleteParams.builder()\n .accountHolderToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .entityToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build()\n val accountHolderEntity: AccountHolderEntity = client.accountHolders().entities().delete(params)\n}', + }, + python: { + method: 'account_holders.entities.delete', + example: + '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)\naccount_holder_entity = client.account_holders.entities.delete(\n entity_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n account_holder_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(account_holder_entity.token)', + }, + ruby: { + method: 'account_holders.entities.delete', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\naccount_holder_entity = lithic.account_holders.entities.delete(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n account_holder_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n)\n\nputs(account_holder_entity)', + }, + typescript: { + method: 'client.accountHolders.entities.delete', + example: + "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\nconst accountHolderEntity = await client.accountHolders.entities.delete(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { account_holder_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n);\n\nconsole.log(accountHolderEntity.token);", + }, + }, }, { name: 'create', @@ -343,6 +916,101 @@ const EMBEDDED_METHODS: MethodEntry[] = [ ], response: "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }", + perLanguage: { + go: { + method: 'client.AuthRules.V2.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n\t"github.com/lithic-com/lithic-go/shared"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tauthRule, err := client.AuthRules.V2.New(context.TODO(), lithic.AuthRuleV2NewParams{\n\t\tBody: lithic.AuthRuleV2NewParamsBodyAccountLevelRule{\n\t\t\tParameters: lithic.F[lithic.AuthRuleV2NewParamsBodyAccountLevelRuleParametersUnion](lithic.ConditionalBlockParameters{\n\t\t\t\tConditions: lithic.F([]lithic.AuthRuleConditionParam{{\n\t\t\t\t\tAttribute: lithic.F(lithic.ConditionalAttributeMcc),\n\t\t\t\t\tOperation: lithic.F(lithic.ConditionalOperationIsOneOf),\n\t\t\t\t\tValue: lithic.F[lithic.ConditionalValueUnionParam](shared.UnionString("string")),\n\t\t\t\t}}),\n\t\t\t}),\n\t\t\tType: lithic.F(lithic.AuthRuleV2NewParamsBodyAccountLevelRuleTypeConditionalBlock),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", authRule.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v2/auth_rules \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "parameters": {\n "conditions": [\n {\n "attribute": "MCC",\n "operation": "IS_ONE_OF",\n "value": "string"\n }\n ]\n },\n "type": "CONDITIONAL_BLOCK"\n }\'', + }, + java: { + method: 'authRules().v2().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AuthRule;\nimport com.lithic.api.models.AuthRuleCondition;\nimport com.lithic.api.models.AuthRuleV2CreateParams;\nimport com.lithic.api.models.ConditionalAttribute;\nimport com.lithic.api.models.ConditionalBlockParameters;\nimport com.lithic.api.models.ConditionalOperation;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AuthRuleV2CreateParams.Body.AccountLevelRule params = AuthRuleV2CreateParams.Body.AccountLevelRule.builder()\n .parameters(ConditionalBlockParameters.builder()\n .addCondition(AuthRuleCondition.builder()\n .attribute(ConditionalAttribute.MCC)\n .operation(ConditionalOperation.IS_ONE_OF)\n .value("string")\n .build())\n .build())\n .type(AuthRuleV2CreateParams.Body.AccountLevelRule.AuthRuleType.CONDITIONAL_BLOCK)\n .build();\n AuthRule authRule = client.authRules().v2().create(params);\n }\n}', + }, + kotlin: { + method: 'authRules().v2().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AuthRule\nimport com.lithic.api.models.AuthRuleCondition\nimport com.lithic.api.models.AuthRuleV2CreateParams\nimport com.lithic.api.models.ConditionalAttribute\nimport com.lithic.api.models.ConditionalBlockParameters\nimport com.lithic.api.models.ConditionalOperation\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: AuthRuleV2CreateParams.Body.AccountLevelRule = AuthRuleV2CreateParams.Body.AccountLevelRule.builder()\n .parameters(ConditionalBlockParameters.builder()\n .addCondition(AuthRuleCondition.builder()\n .attribute(ConditionalAttribute.MCC)\n .operation(ConditionalOperation.IS_ONE_OF)\n .value("string")\n .build())\n .build())\n .type(AuthRuleV2CreateParams.Body.AccountLevelRule.AuthRuleType.CONDITIONAL_BLOCK)\n .build()\n val authRule: AuthRule = client.authRules().v2().create(params)\n}', + }, + python: { + method: 'auth_rules.v2.create', + example: + '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)\nauth_rule = client.auth_rules.v2.create(\n parameters={\n "conditions": [{\n "attribute": "MCC",\n "operation": "IS_ONE_OF",\n "value": "string",\n }]\n },\n type="CONDITIONAL_BLOCK",\n)\nprint(auth_rule.token)', + }, + ruby: { + method: 'auth_rules.v2.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nauth_rule = lithic.auth_rules.v2.create(\n body: {\n parameters: {conditions: [{attribute: :MCC, operation: :IS_ONE_OF, value: "string"}]},\n type: :CONDITIONAL_BLOCK\n }\n)\n\nputs(auth_rule)', + }, + typescript: { + method: 'client.authRules.v2.create', + example: + "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\nconst authRule = await client.authRules.v2.create({\n parameters: {\n conditions: [\n {\n attribute: 'MCC',\n operation: 'IS_ONE_OF',\n value: 'string',\n },\n ],\n },\n type: 'CONDITIONAL_BLOCK',\n});\n\nconsole.log(authRule.token);", + }, + }, + }, + { + name: 'list', + endpoint: '/v2/auth_rules', + httpMethod: 'get', + summary: 'List rules', + description: 'Lists V2 Auth rules', + stainlessPath: '(resource) auth_rules.v2 > (method) list', + qualified: 'client.authRules.v2.list', + params: [ + 'account_token?: string;', + 'business_account_token?: string;', + 'card_token?: string;', + 'ending_before?: string;', + 'event_stream?: string;', + 'event_streams?: string[];', + 'page_size?: number;', + "scope?: 'PROGRAM' | 'ACCOUNT' | 'BUSINESS_ACCOUNT' | 'CARD' | 'ANY';", + 'starting_after?: string;', + ], + response: + "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }", + markdown: + "## list\n\n`client.authRules.v2.list(account_token?: string, business_account_token?: string, card_token?: string, ending_before?: string, event_stream?: string, event_streams?: string[], page_size?: number, scope?: 'PROGRAM' | 'ACCOUNT' | 'BUSINESS_ACCOUNT' | 'CARD' | 'ANY', starting_after?: string): { token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: object; draft_version: object; event_stream: event_stream; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n**get** `/v2/auth_rules`\n\nLists V2 Auth rules\n\n### Parameters\n\n- `account_token?: string`\n Only return Auth Rules that are bound to the provided account token.\n\n- `business_account_token?: string`\n Only return Auth Rules that are bound to the provided business account token.\n\n- `card_token?: string`\n Only return Auth Rules that are bound to the provided card token.\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- `event_stream?: string`\n Deprecated: Use event_streams instead. Only return Auth rules that are executed during the provided event stream.\n\n- `event_streams?: string[]`\n Only return Auth rules that are executed during any of the provided event streams. If event_streams and event_stream are specified, the values will be combined.\n\n- `page_size?: number`\n Page size (for pagination).\n\n- `scope?: 'PROGRAM' | 'ACCOUNT' | 'BUSINESS_ACCOUNT' | 'CARD' | 'ANY'`\n Only return Auth Rules that are bound to the provided scope.\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_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n - `token: string`\n - `account_tokens: string[]`\n - `business_account_tokens: string[]`\n - `card_tokens: string[]`\n - `current_version: { parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; version: number; }`\n - `draft_version: { error: string; parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }`\n - `event_stream: string`\n - `lithic_managed: boolean`\n - `name: string`\n - `program_level: boolean`\n - `state: 'ACTIVE' | 'INACTIVE'`\n - `type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'`\n - `excluded_account_tokens?: string[]`\n - `excluded_business_account_tokens?: string[]`\n - `excluded_card_tokens?: 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 authRule of client.authRules.v2.list()) {\n console.log(authRule);\n}\n```", + perLanguage: { + go: { + method: 'client.AuthRules.V2.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.AuthRules.V2.List(context.TODO(), lithic.AuthRuleV2ListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v2/auth_rules \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'authRules().v2().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AuthRuleV2ListPage;\nimport com.lithic.api.models.AuthRuleV2ListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AuthRuleV2ListPage page = client.authRules().v2().list();\n }\n}', + }, + kotlin: { + method: 'authRules().v2().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AuthRuleV2ListPage\nimport com.lithic.api.models.AuthRuleV2ListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: AuthRuleV2ListPage = client.authRules().v2().list()\n}', + }, + python: { + method: 'auth_rules.v2.list', + example: + '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.auth_rules.v2.list()\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'auth_rules.v2.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.auth_rules.v2.list\n\nputs(page)', + }, + typescript: { + method: 'client.authRules.v2.list', + example: + "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 authRule of client.authRules.v2.list()) {\n console.log(authRule.token);\n}", + }, + }, }, { name: 'retrieve', @@ -357,6 +1025,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }", markdown: "## retrieve\n\n`client.authRules.v2.retrieve(auth_rule_token: string): { token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: object; draft_version: object; event_stream: event_stream; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n**get** `/v2/auth_rules/{auth_rule_token}`\n\nFetches a V2 Auth rule by its token\n\n### Parameters\n\n- `auth_rule_token: string`\n\n### Returns\n\n- `{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n - `token: string`\n - `account_tokens: string[]`\n - `business_account_tokens: string[]`\n - `card_tokens: string[]`\n - `current_version: { parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; version: number; }`\n - `draft_version: { error: string; parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }`\n - `event_stream: string`\n - `lithic_managed: boolean`\n - `name: string`\n - `program_level: boolean`\n - `state: 'ACTIVE' | 'INACTIVE'`\n - `type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'`\n - `excluded_account_tokens?: string[]`\n - `excluded_business_account_tokens?: string[]`\n - `excluded_card_tokens?: string[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst authRule = await client.authRules.v2.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(authRule);\n```", + perLanguage: { + go: { + method: 'client.AuthRules.V2.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tauthRule, err := client.AuthRules.V2.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", authRule.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'authRules().v2().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AuthRule;\nimport com.lithic.api.models.AuthRuleV2RetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AuthRule authRule = client.authRules().v2().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'authRules().v2().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AuthRule\nimport com.lithic.api.models.AuthRuleV2RetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val authRule: AuthRule = client.authRules().v2().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'auth_rules.v2.retrieve', + example: + '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)\nauth_rule = client.auth_rules.v2.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(auth_rule.token)', + }, + ruby: { + method: 'auth_rules.v2.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nauth_rule = lithic.auth_rules.v2.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(auth_rule)', + }, + typescript: { + method: 'client.authRules.v2.retrieve', + example: + "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\nconst authRule = await client.authRules.v2.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(authRule.token);", + }, + }, }, { name: 'update', @@ -373,30 +1077,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ ], response: "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }", - }, - { - name: 'list', - endpoint: '/v2/auth_rules', - httpMethod: 'get', - summary: 'List rules', - description: 'Lists V2 Auth rules', - stainlessPath: '(resource) auth_rules.v2 > (method) list', - qualified: 'client.authRules.v2.list', - params: [ - 'account_token?: string;', - 'business_account_token?: string;', - 'card_token?: string;', - 'ending_before?: string;', - 'event_stream?: string;', - 'event_streams?: string[];', - 'page_size?: number;', - "scope?: 'PROGRAM' | 'ACCOUNT' | 'BUSINESS_ACCOUNT' | 'CARD' | 'ANY';", - 'starting_after?: string;', - ], - response: - "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }", - markdown: - "## list\n\n`client.authRules.v2.list(account_token?: string, business_account_token?: string, card_token?: string, ending_before?: string, event_stream?: string, event_streams?: string[], page_size?: number, scope?: 'PROGRAM' | 'ACCOUNT' | 'BUSINESS_ACCOUNT' | 'CARD' | 'ANY', starting_after?: string): { token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: object; draft_version: object; event_stream: event_stream; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n**get** `/v2/auth_rules`\n\nLists V2 Auth rules\n\n### Parameters\n\n- `account_token?: string`\n Only return Auth Rules that are bound to the provided account token.\n\n- `business_account_token?: string`\n Only return Auth Rules that are bound to the provided business account token.\n\n- `card_token?: string`\n Only return Auth Rules that are bound to the provided card token.\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- `event_stream?: string`\n Deprecated: Use event_streams instead. Only return Auth rules that are executed during the provided event stream.\n\n- `event_streams?: string[]`\n Only return Auth rules that are executed during any of the provided event streams. If event_streams and event_stream are specified, the values will be combined.\n\n- `page_size?: number`\n Page size (for pagination).\n\n- `scope?: 'PROGRAM' | 'ACCOUNT' | 'BUSINESS_ACCOUNT' | 'CARD' | 'ANY'`\n Only return Auth Rules that are bound to the provided scope.\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_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n - `token: string`\n - `account_tokens: string[]`\n - `business_account_tokens: string[]`\n - `card_tokens: string[]`\n - `current_version: { parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; version: number; }`\n - `draft_version: { error: string; parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }`\n - `event_stream: string`\n - `lithic_managed: boolean`\n - `name: string`\n - `program_level: boolean`\n - `state: 'ACTIVE' | 'INACTIVE'`\n - `type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'`\n - `excluded_account_tokens?: string[]`\n - `excluded_business_account_tokens?: string[]`\n - `excluded_card_tokens?: 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 authRule of client.authRules.v2.list()) {\n console.log(authRule);\n}\n```", + perLanguage: { + go: { + method: 'client.AuthRules.V2.Update', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tauthRule, err := client.AuthRules.V2.Update(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.AuthRuleV2UpdateParams{\n\t\t\tBody: lithic.AuthRuleV2UpdateParamsBodyAccountLevelRule{},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", authRule.Token)\n}\n', + }, + http: { + example: + "curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", + }, + java: { + method: 'authRules().v2().update', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AuthRule;\nimport com.lithic.api.models.AuthRuleV2UpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AuthRuleV2UpdateParams params = AuthRuleV2UpdateParams.builder()\n .authRuleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .body(AuthRuleV2UpdateParams.Body.AccountLevelRule.builder().build())\n .build();\n AuthRule authRule = client.authRules().v2().update(params);\n }\n}', + }, + kotlin: { + method: 'authRules().v2().update', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AuthRule\nimport com.lithic.api.models.AuthRuleV2UpdateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: AuthRuleV2UpdateParams = AuthRuleV2UpdateParams.builder()\n .authRuleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .body(AuthRuleV2UpdateParams.Body.AccountLevelRule.builder().build())\n .build()\n val authRule: AuthRule = client.authRules().v2().update(params)\n}', + }, + python: { + method: 'auth_rules.v2.update', + example: + '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)\nauth_rule = client.auth_rules.v2.update(\n auth_rule_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(auth_rule.token)', + }, + ruby: { + method: 'auth_rules.v2.update', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nauth_rule = lithic.auth_rules.v2.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", body: {})\n\nputs(auth_rule)', + }, + typescript: { + method: 'client.authRules.v2.update', + example: + "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\nconst authRule = await client.authRules.v2.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(authRule.token);", + }, + }, }, { name: 'delete', @@ -409,6 +1125,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ params: ['auth_rule_token: string;'], markdown: "## delete\n\n`client.authRules.v2.delete(auth_rule_token: string): void`\n\n**delete** `/v2/auth_rules/{auth_rule_token}`\n\nDeletes a V2 Auth rule\n\n### Parameters\n\n- `auth_rule_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.authRules.v2.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", + perLanguage: { + go: { + method: 'client.AuthRules.V2.Delete', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.AuthRules.V2.Delete(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'authRules().v2().delete', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AuthRuleV2DeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n client.authRules().v2().delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'authRules().v2().delete', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AuthRuleV2DeleteParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n client.authRules().v2().delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'auth_rules.v2.delete', + example: + '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)\nclient.auth_rules.v2.delete(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)', + }, + ruby: { + method: 'auth_rules.v2.delete', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.auth_rules.v2.delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(result)', + }, + typescript: { + method: 'client.authRules.v2.delete', + example: + "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\nawait client.authRules.v2.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');", + }, + }, }, { name: 'draft', @@ -427,30 +1179,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }", markdown: "## draft\n\n`client.authRules.v2.draft(auth_rule_token: string, parameters?: { conditions: auth_rule_condition[]; } | { period: velocity_limit_period; scope: 'CARD' | 'ACCOUNT'; filters?: velocity_limit_filters; limit_amount?: number; limit_count?: number; } | { merchants: object[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: object[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: object[]; } | { action: object | object; conditions: object[]; } | { action: object | object; conditions: object[]; } | { code: string; features: rule_feature[]; }): { token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: object; draft_version: object; event_stream: event_stream; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n**post** `/v2/auth_rules/{auth_rule_token}/draft`\n\nCreates a new draft version of a rule that will be ran in shadow mode.\n\nThis can also be utilized to reset the draft parameters, causing a draft version to no longer be ran in shadow mode.\n\n\n### Parameters\n\n- `auth_rule_token: string`\n\n- `parameters?: { conditions: { attribute: conditional_attribute; operation: conditional_operation; value: conditional_value; }[]; } | { period: { duration: number; type: 'CUSTOM'; } | { type: 'DAY'; } | { type: 'WEEK'; day_of_week?: number; } | { type: 'MONTH'; day_of_month?: number; } | { type: 'YEAR'; day_of_month?: number; month?: number; }; scope: 'CARD' | 'ACCOUNT'; filters?: { exclude_countries?: string[]; exclude_mccs?: string[]; include_countries?: string[]; include_mccs?: string[]; include_pan_entry_modes?: string[]; }; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: string; value: string | number | string[] | string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: string; value: string | number | string[] | string; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: string; value: string | number | string[] | string; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: string; value: string | number | string[] | string; }[]; } | { code: string; features: { type: 'AUTHORIZATION'; name?: string; } | { type: 'AUTHENTICATION'; name?: string; } | { type: 'TOKENIZATION'; name?: string; } | { type: 'ACH_RECEIPT'; name?: string; } | { type: 'CARD'; name?: string; } | { type: 'ACCOUNT_HOLDER'; name?: string; } | { type: 'IP_METADATA'; name?: string; } | { period: velocity_limit_period; scope: 'CARD' | 'ACCOUNT'; type: 'SPEND_VELOCITY'; filters?: velocity_limit_filters; name?: string; }[]; }`\n Parameters for the Auth Rule\n\n### Returns\n\n- `{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n - `token: string`\n - `account_tokens: string[]`\n - `business_account_tokens: string[]`\n - `card_tokens: string[]`\n - `current_version: { parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; version: number; }`\n - `draft_version: { error: string; parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }`\n - `event_stream: string`\n - `lithic_managed: boolean`\n - `name: string`\n - `program_level: boolean`\n - `state: 'ACTIVE' | 'INACTIVE'`\n - `type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'`\n - `excluded_account_tokens?: string[]`\n - `excluded_business_account_tokens?: string[]`\n - `excluded_card_tokens?: string[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst authRule = await client.authRules.v2.draft('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(authRule);\n```", - }, - { - name: 'list_results', - endpoint: '/v2/auth_rules/results', - httpMethod: 'get', - summary: 'List rule evaluation results', - description: - 'Lists Auth Rule evaluation results.\n\n**Limitations:**\n- Results are available for the past 3 months only\n- At least one filter (`event_token` or `auth_rule_token`) must be provided\n- When filtering by `event_token`, pagination is not supported\n', - stainlessPath: '(resource) auth_rules.v2 > (method) list_results', - qualified: 'client.authRules.v2.listResults', - params: [ - 'auth_rule_token?: string;', - 'begin?: string;', - 'end?: string;', - 'ending_before?: string;', - 'event_token?: string;', - 'has_actions?: boolean;', - 'page_size?: number;', - 'starting_after?: string;', - ], - response: - "{ token: string; actions: { code: string; type: 'DECLINE'; explanation?: string; } | { type: 'CHALLENGE'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'AUTHORIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'DECLINE' | 'CHALLENGE'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'THREE_DS_AUTHENTICATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'DECLINE'; explanation?: string; reason?: string; } | { type: 'REQUIRE_TFA'; explanation?: string; reason?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'TOKENIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'APPROVE'; explanation?: string; } | { code: string; type: 'RETURN'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'ACH_CREDIT_RECEIPT' | 'ACH_DEBIT_RECEIPT'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; }", - markdown: - "## list_results\n\n`client.authRules.v2.listResults(auth_rule_token?: string, begin?: string, end?: string, ending_before?: string, event_token?: string, has_actions?: boolean, page_size?: number, starting_after?: string): { token: string; actions: object | object[]; auth_rule_token: string; evaluation_time: string; event_stream: 'AUTHORIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: object[]; auth_rule_token: string; evaluation_time: string; event_stream: 'THREE_DS_AUTHENTICATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: object | object[]; auth_rule_token: string; evaluation_time: string; event_stream: 'TOKENIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: object | object[]; auth_rule_token: string; evaluation_time: string; event_stream: 'ACH_CREDIT_RECEIPT' | 'ACH_DEBIT_RECEIPT'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; }`\n\n**get** `/v2/auth_rules/results`\n\nLists Auth Rule evaluation results.\n\n**Limitations:**\n- Results are available for the past 3 months only\n- At least one filter (`event_token` or `auth_rule_token`) must be provided\n- When filtering by `event_token`, pagination is not supported\n\n\n### Parameters\n\n- `auth_rule_token?: string`\n Filter by Auth Rule token\n\n- `begin?: string`\n Date string in RFC 3339 format. Only events evaluated after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only events evaluated before the specified time will be included. UTC time zone.\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- `event_token?: string`\n Filter by event token\n\n- `has_actions?: boolean`\n Filter by whether the rule evaluation produced any actions. When not provided, all results are returned.\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; actions: { code: string; type: 'DECLINE'; explanation?: string; } | { type: 'CHALLENGE'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'AUTHORIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'DECLINE' | 'CHALLENGE'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'THREE_DS_AUTHENTICATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'DECLINE'; explanation?: string; reason?: string; } | { type: 'REQUIRE_TFA'; explanation?: string; reason?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'TOKENIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'APPROVE'; explanation?: string; } | { code: string; type: 'RETURN'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'ACH_CREDIT_RECEIPT' | 'ACH_DEBIT_RECEIPT'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; }`\n Result of an Auth Rule evaluation\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 v2ListResultsResponse of client.authRules.v2.listResults()) {\n console.log(v2ListResultsResponse);\n}\n```", + perLanguage: { + go: { + method: 'client.AuthRules.V2.Draft', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tauthRule, err := client.AuthRules.V2.Draft(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.AuthRuleV2DraftParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", authRule.Token)\n}\n', + }, + http: { + example: + "curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/draft \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", + }, + java: { + method: 'authRules().v2().draft', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AuthRule;\nimport com.lithic.api.models.AuthRuleV2DraftParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AuthRule authRule = client.authRules().v2().draft("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'authRules().v2().draft', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AuthRule\nimport com.lithic.api.models.AuthRuleV2DraftParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val authRule: AuthRule = client.authRules().v2().draft("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'auth_rules.v2.draft', + example: + '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)\nauth_rule = client.auth_rules.v2.draft(\n auth_rule_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(auth_rule.token)', + }, + ruby: { + method: 'auth_rules.v2.draft', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nauth_rule = lithic.auth_rules.v2.draft("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(auth_rule)', + }, + typescript: { + method: 'client.authRules.v2.draft', + example: + "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\nconst authRule = await client.authRules.v2.draft('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(authRule.token);", + }, + }, }, { name: 'list_versions', @@ -465,6 +1229,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ data: { created: string; parameters: conditional_block_parameters | velocity_limit_params | merchant_lock_parameters | conditional_3ds_action_parameters | conditional_authorization_action_parameters | conditional_ach_action_parameters | conditional_tokenization_action_parameters | typescript_code_parameters; state: 'ACTIVE' | 'SHADOW' | 'INACTIVE'; version: number; }[]; }", markdown: "## list_versions\n\n`client.authRules.v2.listVersions(auth_rule_token: string): { data: auth_rule_version[]; }`\n\n**get** `/v2/auth_rules/{auth_rule_token}/versions`\n\nReturns all versions of an auth rule, sorted by version number descending (newest first).\n\n### Parameters\n\n- `auth_rule_token: string`\n\n### Returns\n\n- `{ data: { created: string; parameters: conditional_block_parameters | velocity_limit_params | merchant_lock_parameters | conditional_3ds_action_parameters | conditional_authorization_action_parameters | conditional_ach_action_parameters | conditional_tokenization_action_parameters | typescript_code_parameters; state: 'ACTIVE' | 'SHADOW' | 'INACTIVE'; version: number; }[]; }`\n\n - `data: { created: string; parameters: { conditions: auth_rule_condition[]; } | { period: velocity_limit_period; scope: 'CARD' | 'ACCOUNT'; filters?: velocity_limit_filters; limit_amount?: number; limit_count?: number; } | { merchants: object[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: object[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: object[]; } | { action: object | object; conditions: object[]; } | { action: object | object; conditions: object[]; } | { code: string; features: rule_feature[]; }; state: 'ACTIVE' | 'SHADOW' | 'INACTIVE'; version: number; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.authRules.v2.listVersions('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.AuthRules.V2.ListVersions', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.AuthRules.V2.ListVersions(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/versions \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'authRules().v2().listVersions', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AuthRuleV2ListVersionsParams;\nimport com.lithic.api.models.V2ListVersionsResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n V2ListVersionsResponse response = client.authRules().v2().listVersions("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'authRules().v2().listVersions', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AuthRuleV2ListVersionsParams\nimport com.lithic.api.models.V2ListVersionsResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val response: V2ListVersionsResponse = client.authRules().v2().listVersions("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'auth_rules.v2.list_versions', + example: + '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)\nresponse = client.auth_rules.v2.list_versions(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data)', + }, + ruby: { + method: 'auth_rules.v2.list_versions', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.auth_rules.v2.list_versions("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(response)', + }, + typescript: { + method: 'client.authRules.v2.listVersions', + example: + "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\nconst response = await client.authRules.v2.listVersions('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.data);", + }, + }, }, { name: 'promote', @@ -480,6 +1280,93 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }", markdown: "## promote\n\n`client.authRules.v2.promote(auth_rule_token: string): { token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: object; draft_version: object; event_stream: event_stream; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n**post** `/v2/auth_rules/{auth_rule_token}/promote`\n\nPromotes the draft version of an Auth rule to the currently active version such that it is enforced in the respective stream.\n\n### Parameters\n\n- `auth_rule_token: string`\n\n### Returns\n\n- `{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | object | object | object | object | object | object | object; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }; event_stream: string; lithic_managed: boolean; name: string; program_level: boolean; state: 'ACTIVE' | 'INACTIVE'; type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'; excluded_account_tokens?: string[]; excluded_business_account_tokens?: string[]; excluded_card_tokens?: string[]; }`\n\n - `token: string`\n - `account_tokens: string[]`\n - `business_account_tokens: string[]`\n - `card_tokens: string[]`\n - `current_version: { parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; version: number; }`\n - `draft_version: { error: string; parameters: { conditions: object[]; } | { period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; filters?: object; limit_amount?: number; limit_count?: number; } | { merchants: { comment?: string; descriptor?: string; merchant_id?: string; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: 'DECLINE' | 'CHALLENGE'; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }; conditions: { attribute: 'COMPANY_NAME' | 'COMPANY_ID' | 'TIMESTAMP' | 'TRANSACTION_AMOUNT' | 'SEC_CODE' | 'MEMO'; operation: conditional_operation; value: conditional_value; }[]; } | { action: { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; }; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; }[]; } | { code: string; features: object | object | object | object | object | object | object | object[]; }; state: 'PENDING' | 'SHADOWING' | 'ERROR'; version: number; }`\n - `event_stream: string`\n - `lithic_managed: boolean`\n - `name: string`\n - `program_level: boolean`\n - `state: 'ACTIVE' | 'INACTIVE'`\n - `type: 'CONDITIONAL_BLOCK' | 'VELOCITY_LIMIT' | 'MERCHANT_LOCK' | 'CONDITIONAL_ACTION' | 'TYPESCRIPT_CODE'`\n - `excluded_account_tokens?: string[]`\n - `excluded_business_account_tokens?: string[]`\n - `excluded_card_tokens?: string[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst authRule = await client.authRules.v2.promote('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(authRule);\n```", + perLanguage: { + go: { + method: 'client.AuthRules.V2.Promote', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tauthRule, err := client.AuthRules.V2.Promote(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", authRule.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/promote \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'authRules().v2().promote', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AuthRule;\nimport com.lithic.api.models.AuthRuleV2PromoteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AuthRule authRule = client.authRules().v2().promote("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'authRules().v2().promote', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AuthRule\nimport com.lithic.api.models.AuthRuleV2PromoteParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val authRule: AuthRule = client.authRules().v2().promote("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'auth_rules.v2.promote', + example: + '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)\nauth_rule = client.auth_rules.v2.promote(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(auth_rule.token)', + }, + ruby: { + method: 'auth_rules.v2.promote', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nauth_rule = lithic.auth_rules.v2.promote("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(auth_rule)', + }, + typescript: { + method: 'client.authRules.v2.promote', + example: + "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\nconst authRule = await client.authRules.v2.promote('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(authRule.token);", + }, + }, + }, + { + name: 'retrieve_report', + endpoint: '/v2/auth_rules/{auth_rule_token}/report', + httpMethod: 'get', + summary: 'Retrieve a performance report', + description: + 'Retrieves a performance report for an Auth rule containing daily statistics and evaluation outcomes.\n\n**Time Range Limitations:**\n- Reports are supported for the past 3 months only\n- Maximum interval length is 1 month\n- Report data is available only through the previous day in UTC (current day data is not available)\n\nThe report provides daily statistics for both current and draft versions of the Auth rule, including approval, decline, and challenge counts along with sample events.\n', + stainlessPath: '(resource) auth_rules.v2 > (method) retrieve_report', + qualified: 'client.authRules.v2.retrieveReport', + params: ['auth_rule_token: string;', 'begin: string;', 'end: string;'], + response: + "{ auth_rule_token: string; begin: string; daily_statistics: { current_version_statistics: object; date: string; draft_version_statistics: object; versions: { action_counts: object; examples: object[]; state: 'ACTIVE' | 'SHADOW' | 'INACTIVE'; version: number; }[]; }[]; end: string; }", + markdown: + "## retrieve_report\n\n`client.authRules.v2.retrieveReport(auth_rule_token: string, begin: string, end: string): { auth_rule_token: string; begin: string; daily_statistics: object[]; end: string; }`\n\n**get** `/v2/auth_rules/{auth_rule_token}/report`\n\nRetrieves a performance report for an Auth rule containing daily statistics and evaluation outcomes.\n\n**Time Range Limitations:**\n- Reports are supported for the past 3 months only\n- Maximum interval length is 1 month\n- Report data is available only through the previous day in UTC (current day data is not available)\n\nThe report provides daily statistics for both current and draft versions of the Auth rule, including approval, decline, and challenge counts along with sample events.\n\n\n### Parameters\n\n- `auth_rule_token: string`\n\n- `begin: string`\n Start date for the report\n\n- `end: string`\n End date for the report\n\n### Returns\n\n- `{ auth_rule_token: string; begin: string; daily_statistics: { current_version_statistics: object; date: string; draft_version_statistics: object; versions: { action_counts: object; examples: object[]; state: 'ACTIVE' | 'SHADOW' | 'INACTIVE'; version: number; }[]; }[]; end: string; }`\n\n - `auth_rule_token: string`\n - `begin: string`\n - `daily_statistics: { current_version_statistics: { action_counts?: object; approved?: number; challenged?: number; declined?: number; examples?: { actions?: object | object | object | object | object | object | object[]; approved?: boolean; decision?: 'APPROVED' | 'DECLINED' | 'CHALLENGED'; event_token?: string; timestamp?: string; }[]; }; date: string; draft_version_statistics: { action_counts?: object; approved?: number; challenged?: number; declined?: number; examples?: { actions?: object | object | object | object | object | object | object[]; approved?: boolean; decision?: 'APPROVED' | 'DECLINED' | 'CHALLENGED'; event_token?: string; timestamp?: string; }[]; }; versions: { action_counts: object; examples: { actions: { code: string; type: 'DECLINE'; } | { type: 'CHALLENGE'; } | { type: 'DECLINE' | 'CHALLENGE'; } | { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; } | { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }[]; event_token: string; timestamp: string; }[]; state: 'ACTIVE' | 'SHADOW' | 'INACTIVE'; version: number; }[]; }[]`\n - `end: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.authRules.v2.retrieveReport('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { begin: '2019-12-27', end: '2019-12-27' });\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.AuthRules.V2.GetReport', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.AuthRules.V2.GetReport(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.AuthRuleV2GetReportParams{\n\t\t\tBegin: lithic.F(time.Now()),\n\t\t\tEnd: lithic.F(time.Now()),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.AuthRuleToken)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/report \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'authRules().v2().retrieveReport', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AuthRuleV2RetrieveReportParams;\nimport com.lithic.api.models.V2RetrieveReportResponse;\nimport java.time.LocalDate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AuthRuleV2RetrieveReportParams params = AuthRuleV2RetrieveReportParams.builder()\n .authRuleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .begin(LocalDate.parse("2019-12-27"))\n .end(LocalDate.parse("2019-12-27"))\n .build();\n V2RetrieveReportResponse response = client.authRules().v2().retrieveReport(params);\n }\n}', + }, + kotlin: { + method: 'authRules().v2().retrieveReport', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AuthRuleV2RetrieveReportParams\nimport com.lithic.api.models.V2RetrieveReportResponse\nimport java.time.LocalDate\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: AuthRuleV2RetrieveReportParams = AuthRuleV2RetrieveReportParams.builder()\n .authRuleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .begin(LocalDate.parse("2019-12-27"))\n .end(LocalDate.parse("2019-12-27"))\n .build()\n val response: V2RetrieveReportResponse = client.authRules().v2().retrieveReport(params)\n}', + }, + python: { + method: 'auth_rules.v2.retrieve_report', + example: + 'import os\nfrom datetime import date\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)\nresponse = client.auth_rules.v2.retrieve_report(\n auth_rule_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n begin=date.fromisoformat("2019-12-27"),\n end=date.fromisoformat("2019-12-27"),\n)\nprint(response.auth_rule_token)', + }, + ruby: { + method: 'auth_rules.v2.retrieve_report', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.auth_rules.v2.retrieve_report(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n begin_: "2019-12-27",\n end_: "2019-12-27"\n)\n\nputs(response)', + }, + typescript: { + method: 'client.authRules.v2.retrieveReport', + example: + "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\nconst response = await client.authRules.v2.retrieveReport('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n begin: '2019-12-27',\n end: '2019-12-27',\n});\n\nconsole.log(response.auth_rule_token);", + }, + }, }, { name: 'retrieve_features', @@ -495,22 +1382,103 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ evaluated: string; features: { filters: object; period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; value: { amount: number; count: number; }; }[]; }", markdown: "## retrieve_features\n\n`client.authRules.v2.retrieveFeatures(auth_rule_token: string, account_token?: string, card_token?: string): { evaluated: string; features: object[]; }`\n\n**get** `/v2/auth_rules/{auth_rule_token}/features`\n\nFetches the current calculated Feature values for the given Auth Rule\n\nThis only calculates the features for the active version.\n- VelocityLimit Rules calculates the current Velocity Feature data. This requires a `card_token` or `account_token` matching what the rule is Scoped to.\n- ConditionalBlock Rules calculates the CARD_TRANSACTION_COUNT_* attributes on the rule. This requires a `card_token`\n\n\n### Parameters\n\n- `auth_rule_token: string`\n\n- `account_token?: string`\n\n- `card_token?: string`\n\n### Returns\n\n- `{ evaluated: string; features: { filters: object; period: object | object | object | object | object; scope: 'CARD' | 'ACCOUNT'; value: { amount: number; count: number; }; }[]; }`\n\n - `evaluated: string`\n - `features: { filters: { exclude_countries?: string[]; exclude_mccs?: string[]; include_countries?: string[]; include_mccs?: string[]; include_pan_entry_modes?: string[]; }; period: { duration: number; type: 'CUSTOM'; } | { type: 'DAY'; } | { type: 'WEEK'; day_of_week?: number; } | { type: 'MONTH'; day_of_month?: number; } | { type: 'YEAR'; day_of_month?: number; month?: number; }; scope: 'CARD' | 'ACCOUNT'; value: { amount: number; count: number; }; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.authRules.v2.retrieveFeatures('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.AuthRules.V2.GetFeatures', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.AuthRules.V2.GetFeatures(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.AuthRuleV2GetFeaturesParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Evaluated)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/features \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'authRules().v2().retrieveFeatures', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AuthRuleV2RetrieveFeaturesParams;\nimport com.lithic.api.models.V2RetrieveFeaturesResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n V2RetrieveFeaturesResponse response = client.authRules().v2().retrieveFeatures("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'authRules().v2().retrieveFeatures', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AuthRuleV2RetrieveFeaturesParams\nimport com.lithic.api.models.V2RetrieveFeaturesResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val response: V2RetrieveFeaturesResponse = client.authRules().v2().retrieveFeatures("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'auth_rules.v2.retrieve_features', + example: + '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)\nresponse = client.auth_rules.v2.retrieve_features(\n auth_rule_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.evaluated)', + }, + ruby: { + method: 'auth_rules.v2.retrieve_features', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.auth_rules.v2.retrieve_features("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(response)', + }, + typescript: { + method: 'client.authRules.v2.retrieveFeatures', + example: + "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\nconst response = await client.authRules.v2.retrieveFeatures('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.evaluated);", + }, + }, }, { - name: 'retrieve_report', - endpoint: '/v2/auth_rules/{auth_rule_token}/report', + name: 'list_results', + endpoint: '/v2/auth_rules/results', httpMethod: 'get', - summary: 'Retrieve a performance report', + summary: 'List rule evaluation results', description: - 'Retrieves a performance report for an Auth rule containing daily statistics and evaluation outcomes.\n\n**Time Range Limitations:**\n- Reports are supported for the past 3 months only\n- Maximum interval length is 1 month\n- Report data is available only through the previous day in UTC (current day data is not available)\n\nThe report provides daily statistics for both current and draft versions of the Auth rule, including approval, decline, and challenge counts along with sample events.\n', - stainlessPath: '(resource) auth_rules.v2 > (method) retrieve_report', - qualified: 'client.authRules.v2.retrieveReport', - params: ['auth_rule_token: string;', 'begin: string;', 'end: string;'], - response: - "{ auth_rule_token: string; begin: string; daily_statistics: { current_version_statistics: object; date: string; draft_version_statistics: object; versions: { action_counts: object; examples: object[]; state: 'ACTIVE' | 'SHADOW' | 'INACTIVE'; version: number; }[]; }[]; end: string; }", - markdown: - "## retrieve_report\n\n`client.authRules.v2.retrieveReport(auth_rule_token: string, begin: string, end: string): { auth_rule_token: string; begin: string; daily_statistics: object[]; end: string; }`\n\n**get** `/v2/auth_rules/{auth_rule_token}/report`\n\nRetrieves a performance report for an Auth rule containing daily statistics and evaluation outcomes.\n\n**Time Range Limitations:**\n- Reports are supported for the past 3 months only\n- Maximum interval length is 1 month\n- Report data is available only through the previous day in UTC (current day data is not available)\n\nThe report provides daily statistics for both current and draft versions of the Auth rule, including approval, decline, and challenge counts along with sample events.\n\n\n### Parameters\n\n- `auth_rule_token: string`\n\n- `begin: string`\n Start date for the report\n\n- `end: string`\n End date for the report\n\n### Returns\n\n- `{ auth_rule_token: string; begin: string; daily_statistics: { current_version_statistics: object; date: string; draft_version_statistics: object; versions: { action_counts: object; examples: object[]; state: 'ACTIVE' | 'SHADOW' | 'INACTIVE'; version: number; }[]; }[]; end: string; }`\n\n - `auth_rule_token: string`\n - `begin: string`\n - `daily_statistics: { current_version_statistics: { action_counts?: object; approved?: number; challenged?: number; declined?: number; examples?: { actions?: object | object | object | object | object | object | object[]; approved?: boolean; decision?: 'APPROVED' | 'DECLINED' | 'CHALLENGED'; event_token?: string; timestamp?: string; }[]; }; date: string; draft_version_statistics: { action_counts?: object; approved?: number; challenged?: number; declined?: number; examples?: { actions?: object | object | object | object | object | object | object[]; approved?: boolean; decision?: 'APPROVED' | 'DECLINED' | 'CHALLENGED'; event_token?: string; timestamp?: string; }[]; }; versions: { action_counts: object; examples: { actions: { code: string; type: 'DECLINE'; } | { type: 'CHALLENGE'; } | { type: 'DECLINE' | 'CHALLENGE'; } | { type: 'DECLINE'; reason?: string; } | { type: 'REQUIRE_TFA'; reason?: string; } | { type: 'APPROVE'; } | { code: string; type: 'RETURN'; }[]; event_token: string; timestamp: string; }[]; state: 'ACTIVE' | 'SHADOW' | 'INACTIVE'; version: number; }[]; }[]`\n - `end: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.authRules.v2.retrieveReport('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { begin: '2019-12-27', end: '2019-12-27' });\n\nconsole.log(response);\n```", - }, + 'Lists Auth Rule evaluation results.\n\n**Limitations:**\n- Results are available for the past 3 months only\n- At least one filter (`event_token` or `auth_rule_token`) must be provided\n- When filtering by `event_token`, pagination is not supported\n', + stainlessPath: '(resource) auth_rules.v2 > (method) list_results', + qualified: 'client.authRules.v2.listResults', + params: [ + 'auth_rule_token?: string;', + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'event_token?: string;', + 'has_actions?: boolean;', + 'page_size?: number;', + 'starting_after?: string;', + ], + response: + "{ token: string; actions: { code: string; type: 'DECLINE'; explanation?: string; } | { type: 'CHALLENGE'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'AUTHORIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'DECLINE' | 'CHALLENGE'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'THREE_DS_AUTHENTICATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'DECLINE'; explanation?: string; reason?: string; } | { type: 'REQUIRE_TFA'; explanation?: string; reason?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'TOKENIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'APPROVE'; explanation?: string; } | { code: string; type: 'RETURN'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'ACH_CREDIT_RECEIPT' | 'ACH_DEBIT_RECEIPT'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; }", + markdown: + "## list_results\n\n`client.authRules.v2.listResults(auth_rule_token?: string, begin?: string, end?: string, ending_before?: string, event_token?: string, has_actions?: boolean, page_size?: number, starting_after?: string): { token: string; actions: object | object[]; auth_rule_token: string; evaluation_time: string; event_stream: 'AUTHORIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: object[]; auth_rule_token: string; evaluation_time: string; event_stream: 'THREE_DS_AUTHENTICATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: object | object[]; auth_rule_token: string; evaluation_time: string; event_stream: 'TOKENIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: object | object[]; auth_rule_token: string; evaluation_time: string; event_stream: 'ACH_CREDIT_RECEIPT' | 'ACH_DEBIT_RECEIPT'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; }`\n\n**get** `/v2/auth_rules/results`\n\nLists Auth Rule evaluation results.\n\n**Limitations:**\n- Results are available for the past 3 months only\n- At least one filter (`event_token` or `auth_rule_token`) must be provided\n- When filtering by `event_token`, pagination is not supported\n\n\n### Parameters\n\n- `auth_rule_token?: string`\n Filter by Auth Rule token\n\n- `begin?: string`\n Date string in RFC 3339 format. Only events evaluated after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only events evaluated before the specified time will be included. UTC time zone.\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- `event_token?: string`\n Filter by event token\n\n- `has_actions?: boolean`\n Filter by whether the rule evaluation produced any actions. When not provided, all results are returned.\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; actions: { code: string; type: 'DECLINE'; explanation?: string; } | { type: 'CHALLENGE'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'AUTHORIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'DECLINE' | 'CHALLENGE'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'THREE_DS_AUTHENTICATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'DECLINE'; explanation?: string; reason?: string; } | { type: 'REQUIRE_TFA'; explanation?: string; reason?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'TOKENIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; } | { token: string; actions: { type: 'APPROVE'; explanation?: string; } | { code: string; type: 'RETURN'; explanation?: string; }[]; auth_rule_token: string; evaluation_time: string; event_stream: 'ACH_CREDIT_RECEIPT' | 'ACH_DEBIT_RECEIPT'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; }`\n Result of an Auth Rule evaluation\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 v2ListResultsResponse of client.authRules.v2.listResults()) {\n console.log(v2ListResultsResponse);\n}\n```", + perLanguage: { + go: { + method: 'client.AuthRules.V2.ListResults', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.AuthRules.V2.ListResults(context.TODO(), lithic.AuthRuleV2ListResultsParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v2/auth_rules/results \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'authRules().v2().listResults', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AuthRuleV2ListResultsPage;\nimport com.lithic.api.models.AuthRuleV2ListResultsParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AuthRuleV2ListResultsPage page = client.authRules().v2().listResults();\n }\n}', + }, + kotlin: { + method: 'authRules().v2().listResults', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AuthRuleV2ListResultsPage\nimport com.lithic.api.models.AuthRuleV2ListResultsParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: AuthRuleV2ListResultsPage = client.authRules().v2().listResults()\n}', + }, + python: { + method: 'auth_rules.v2.list_results', + example: + '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.auth_rules.v2.list_results()\npage = page.data[0]\nprint(page)', + }, + ruby: { + method: 'auth_rules.v2.list_results', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.auth_rules.v2.list_results\n\nputs(page)', + }, + typescript: { + method: 'client.authRules.v2.listResults', + example: + "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 v2ListResultsResponse of client.authRules.v2.listResults()) {\n console.log(v2ListResultsResponse);\n}", + }, + }, + }, { name: 'create', endpoint: '/v2/auth_rules/{auth_rule_token}/backtests', @@ -524,6 +1492,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: '{ backtest_token?: string; }', markdown: "## create\n\n`client.authRules.v2.backtests.create(auth_rule_token: string, end?: string, start?: string): { backtest_token?: string; }`\n\n**post** `/v2/auth_rules/{auth_rule_token}/backtests`\n\nInitiates a request to asynchronously generate a backtest for an Auth rule. During backtesting, both the active version (if one exists) and the draft version of the Auth Rule are evaluated by replaying historical transaction data against the rule's conditions. This process allows customers to simulate and understand the effects of proposed rule changes before deployment.\nThe generated backtest report provides detailed results showing whether the draft version of the Auth Rule would have approved or declined historical transactions which were processed during the backtest period. These reports help evaluate how changes to rule configurations might affect overall transaction approval rates.\n\nThe generated backtest report will be delivered asynchronously through a webhook with `event_type` = `auth_rules.backtest_report.created`. See the docs on setting up [webhook subscriptions](https://docs.lithic.com/docs/events-api).\nIt is also possible to request backtest reports on-demand through the `/v2/auth_rules/{auth_rule_token}/backtests/{auth_rule_backtest_token}` endpoint.\n\nLithic currently supports backtesting for `CONDITIONAL_BLOCK` / `CONDITIONAL_ACTION` rules. Backtesting for `VELOCITY_LIMIT` rules is generally not supported. In specific cases (i.e. where Lithic has pre-calculated the requested velocity metrics for historical transactions), a backtest may be feasible. However, such cases are uncommon and customers should not anticipate support for velocity backtests under most configurations.\nIf a historical transaction does not feature the required inputs to evaluate the rule, then it will not be included in the final backtest report.\n\n\n### Parameters\n\n- `auth_rule_token: string`\n\n- `end?: string`\n The end time of the backtest.\n\n- `start?: string`\n The start time of the backtest.\n\n### Returns\n\n- `{ backtest_token?: string; }`\n\n - `backtest_token?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst backtest = await client.authRules.v2.backtests.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(backtest);\n```", + perLanguage: { + go: { + method: 'client.AuthRules.V2.Backtests.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tbacktest, err := client.AuthRules.V2.Backtests.New(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.AuthRuleV2BacktestNewParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", backtest.BacktestToken)\n}\n', + }, + http: { + example: + "curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/backtests \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", + }, + java: { + method: 'authRules().v2().backtests().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AuthRuleV2BacktestCreateParams;\nimport com.lithic.api.models.BacktestCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n BacktestCreateResponse backtest = client.authRules().v2().backtests().create("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'authRules().v2().backtests().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AuthRuleV2BacktestCreateParams\nimport com.lithic.api.models.BacktestCreateResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val backtest: BacktestCreateResponse = client.authRules().v2().backtests().create("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'auth_rules.v2.backtests.create', + example: + '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)\nbacktest = client.auth_rules.v2.backtests.create(\n auth_rule_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(backtest.backtest_token)', + }, + ruby: { + method: 'auth_rules.v2.backtests.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nbacktest = lithic.auth_rules.v2.backtests.create("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(backtest)', + }, + typescript: { + method: 'client.authRules.v2.backtests.create', + example: + "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\nconst backtest = await client.authRules.v2.backtests.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(backtest.backtest_token);", + }, + }, }, { name: 'retrieve', @@ -539,6 +1543,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ backtest_token: string; results: { current_version?: object; draft_version?: object; }; simulation_parameters: { end: string; start: string; }; }', markdown: "## retrieve\n\n`client.authRules.v2.backtests.retrieve(auth_rule_token: string, auth_rule_backtest_token: string): { backtest_token: string; results: object; simulation_parameters: object; }`\n\n**get** `/v2/auth_rules/{auth_rule_token}/backtests/{auth_rule_backtest_token}`\n\nReturns the backtest results of an Auth rule (if available).\n\nBacktesting is an asynchronous process that requires time to complete. If a customer retrieves the backtest results using this endpoint before the report is fully generated, the response will return null for `results.current_version` and `results.draft_version`. Customers are advised to wait for the backtest creation process to complete (as indicated by the webhook event auth_rules.backtest_report.created) before retrieving results from this endpoint.\n\nBacktesting is an asynchronous process, while the backtest is being processed, results will not be available which will cause `results.current_version` and `results.draft_version` objects to contain `null`.\nThe entries in `results` will also always represent the configuration of the rule at the time requests are made to this endpoint. For example, the results for `current_version` in the served backtest report will be consistent with which version of the rule is currently activated in the respective event stream, regardless of which version of the rule was active in the event stream at the time a backtest is requested.\n\n\n### Parameters\n\n- `auth_rule_token: string`\n\n- `auth_rule_backtest_token: string`\n\n### Returns\n\n- `{ backtest_token: string; results: { current_version?: object; draft_version?: object; }; simulation_parameters: { end: string; start: string; }; }`\n\n - `backtest_token: string`\n - `results: { current_version?: { approved?: number; challenged?: number; declined?: number; examples?: { decision?: 'APPROVED' | 'DECLINED' | 'CHALLENGED'; event_token?: string; timestamp?: string; }[]; version?: number; }; draft_version?: { approved?: number; challenged?: number; declined?: number; examples?: { decision?: 'APPROVED' | 'DECLINED' | 'CHALLENGED'; event_token?: string; timestamp?: string; }[]; version?: number; }; }`\n - `simulation_parameters: { end: string; start: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst backtestResults = await client.authRules.v2.backtests.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { auth_rule_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(backtestResults);\n```", + perLanguage: { + go: { + method: 'client.AuthRules.V2.Backtests.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tbacktestResults, err := client.AuthRules.V2.Backtests.Get(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", backtestResults.BacktestToken)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/backtests/$AUTH_RULE_BACKTEST_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'authRules().v2().backtests().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AuthRuleV2BacktestRetrieveParams;\nimport com.lithic.api.models.BacktestResults;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AuthRuleV2BacktestRetrieveParams params = AuthRuleV2BacktestRetrieveParams.builder()\n .authRuleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .authRuleBacktestToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n BacktestResults backtestResults = client.authRules().v2().backtests().retrieve(params);\n }\n}', + }, + kotlin: { + method: 'authRules().v2().backtests().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AuthRuleV2BacktestRetrieveParams\nimport com.lithic.api.models.BacktestResults\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: AuthRuleV2BacktestRetrieveParams = AuthRuleV2BacktestRetrieveParams.builder()\n .authRuleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .authRuleBacktestToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build()\n val backtestResults: BacktestResults = client.authRules().v2().backtests().retrieve(params)\n}', + }, + python: { + method: 'auth_rules.v2.backtests.retrieve', + example: + '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)\nbacktest_results = client.auth_rules.v2.backtests.retrieve(\n auth_rule_backtest_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n auth_rule_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(backtest_results.backtest_token)', + }, + ruby: { + method: 'auth_rules.v2.backtests.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nbacktest_results = lithic.auth_rules.v2.backtests.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n auth_rule_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n)\n\nputs(backtest_results)', + }, + typescript: { + method: 'client.authRules.v2.backtests.retrieve', + example: + "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\nconst backtestResults = await client.authRules.v2.backtests.retrieve(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { auth_rule_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n);\n\nconsole.log(backtestResults.backtest_token);", + }, + }, }, { name: 'retrieve_secret', @@ -552,6 +1592,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: '{ secret?: string; }', markdown: "## retrieve_secret\n\n`client.authStreamEnrollment.retrieveSecret(): { secret?: string; }`\n\n**get** `/v1/auth_stream/secret`\n\nRetrieve the ASA HMAC secret key. If one does not exist for your program yet, calling this endpoint will create one for you. The headers (which you can use to verify webhooks) will begin appearing shortly after calling this endpoint for the first time. See [this page](https://docs.lithic.com/docs/auth-stream-access-asa#asa-webhook-verification) for more detail about verifying ASA webhooks.\n\n\n### Returns\n\n- `{ secret?: string; }`\n\n - `secret?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst authStreamSecret = await client.authStreamEnrollment.retrieveSecret();\n\nconsole.log(authStreamSecret);\n```", + perLanguage: { + go: { + method: 'client.AuthStreamEnrollment.GetSecret', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tauthStreamSecret, err := client.AuthStreamEnrollment.GetSecret(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", authStreamSecret.Secret)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/auth_stream/secret \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'authStreamEnrollment().retrieveSecret', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AuthStreamEnrollmentRetrieveSecretParams;\nimport com.lithic.api.models.AuthStreamSecret;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AuthStreamSecret authStreamSecret = client.authStreamEnrollment().retrieveSecret();\n }\n}', + }, + kotlin: { + method: 'authStreamEnrollment().retrieveSecret', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AuthStreamEnrollmentRetrieveSecretParams\nimport com.lithic.api.models.AuthStreamSecret\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val authStreamSecret: AuthStreamSecret = client.authStreamEnrollment().retrieveSecret()\n}', + }, + python: { + method: 'auth_stream_enrollment.retrieve_secret', + example: + '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)\nauth_stream_secret = client.auth_stream_enrollment.retrieve_secret()\nprint(auth_stream_secret.secret)', + }, + ruby: { + method: 'auth_stream_enrollment.retrieve_secret', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nauth_stream_secret = lithic.auth_stream_enrollment.retrieve_secret\n\nputs(auth_stream_secret)', + }, + typescript: { + method: 'client.authStreamEnrollment.retrieveSecret', + example: + "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\nconst authStreamSecret = await client.authStreamEnrollment.retrieveSecret();\n\nconsole.log(authStreamSecret.secret);", + }, + }, }, { name: 'rotate_secret', @@ -564,6 +1640,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ qualified: 'client.authStreamEnrollment.rotateSecret', markdown: "## rotate_secret\n\n`client.authStreamEnrollment.rotateSecret(): void`\n\n**post** `/v1/auth_stream/secret/rotate`\n\nGenerate a new ASA HMAC secret key. The old ASA HMAC secret key will be deactivated 24 hours after a successful request to this endpoint. Make a [`GET /auth_stream/secret`](https://docs.lithic.com/reference/getauthstreamsecret) request to retrieve the new secret key.\n\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.authStreamEnrollment.rotateSecret()\n```", + perLanguage: { + go: { + method: 'client.AuthStreamEnrollment.RotateSecret', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.AuthStreamEnrollment.RotateSecret(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/auth_stream/secret/rotate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'authStreamEnrollment().rotateSecret', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AuthStreamEnrollmentRotateSecretParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n client.authStreamEnrollment().rotateSecret();\n }\n}', + }, + kotlin: { + method: 'authStreamEnrollment().rotateSecret', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AuthStreamEnrollmentRotateSecretParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n client.authStreamEnrollment().rotateSecret()\n}', + }, + python: { + method: 'auth_stream_enrollment.rotate_secret', + example: + '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)\nclient.auth_stream_enrollment.rotate_secret()', + }, + ruby: { + method: 'auth_stream_enrollment.rotate_secret', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.auth_stream_enrollment.rotate_secret\n\nputs(result)', + }, + typescript: { + method: 'client.authStreamEnrollment.rotateSecret', + example: + "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\nawait client.authStreamEnrollment.rotateSecret();", + }, + }, }, { name: 'retrieve_secret', @@ -577,6 +1689,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: '{ secret?: string; }', markdown: "## retrieve_secret\n\n`client.tokenizationDecisioning.retrieveSecret(): { secret?: string; }`\n\n**get** `/v1/tokenization_decisioning/secret`\n\nRetrieve the Tokenization Decisioning secret key. If one does not exist your program yet, calling this endpoint will create one for you. The headers of the Tokenization Decisioning request will contain a hmac signature which you can use to verify requests originate from Lithic. See [this page](https://docs.lithic.com/docs/events-api#verifying-webhooks) for more detail about verifying Tokenization Decisioning requests.\n\n\n### Returns\n\n- `{ secret?: string; }`\n\n - `secret?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst tokenizationSecret = await client.tokenizationDecisioning.retrieveSecret();\n\nconsole.log(tokenizationSecret);\n```", + perLanguage: { + go: { + method: 'client.TokenizationDecisioning.GetSecret', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\ttokenizationSecret, err := client.TokenizationDecisioning.GetSecret(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", tokenizationSecret.Secret)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/tokenization_decisioning/secret \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'tokenizationDecisioning().retrieveSecret', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TokenizationDecisioningRetrieveSecretParams;\nimport com.lithic.api.models.TokenizationSecret;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n TokenizationSecret tokenizationSecret = client.tokenizationDecisioning().retrieveSecret();\n }\n}', + }, + kotlin: { + method: 'tokenizationDecisioning().retrieveSecret', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TokenizationDecisioningRetrieveSecretParams\nimport com.lithic.api.models.TokenizationSecret\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val tokenizationSecret: TokenizationSecret = client.tokenizationDecisioning().retrieveSecret()\n}', + }, + python: { + method: 'tokenization_decisioning.retrieve_secret', + example: + '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)\ntokenization_secret = client.tokenization_decisioning.retrieve_secret()\nprint(tokenization_secret.secret)', + }, + ruby: { + method: 'tokenization_decisioning.retrieve_secret', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ntokenization_secret = lithic.tokenization_decisioning.retrieve_secret\n\nputs(tokenization_secret)', + }, + typescript: { + method: 'client.tokenizationDecisioning.retrieveSecret', + example: + "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\nconst tokenizationSecret = await client.tokenizationDecisioning.retrieveSecret();\n\nconsole.log(tokenizationSecret.secret);", + }, + }, }, { name: 'rotate_secret', @@ -590,20 +1738,102 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: '{ secret?: string; }', markdown: "## rotate_secret\n\n`client.tokenizationDecisioning.rotateSecret(): { secret?: string; }`\n\n**post** `/v1/tokenization_decisioning/secret/rotate`\n\nGenerate a new Tokenization Decisioning secret key. The old Tokenization Decisioning secret key will be deactivated 24 hours after a successful request to this endpoint.\n\n\n### Returns\n\n- `{ secret?: string; }`\n\n - `secret?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.tokenizationDecisioning.rotateSecret();\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.TokenizationDecisioning.RotateSecret', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.TokenizationDecisioning.RotateSecret(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Secret)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/tokenization_decisioning/secret/rotate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'tokenizationDecisioning().rotateSecret', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TokenizationDecisioningRotateSecretParams;\nimport com.lithic.api.models.TokenizationDecisioningRotateSecretResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n TokenizationDecisioningRotateSecretResponse response = client.tokenizationDecisioning().rotateSecret();\n }\n}', + }, + kotlin: { + method: 'tokenizationDecisioning().rotateSecret', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TokenizationDecisioningRotateSecretParams\nimport com.lithic.api.models.TokenizationDecisioningRotateSecretResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val response: TokenizationDecisioningRotateSecretResponse = client.tokenizationDecisioning().rotateSecret()\n}', + }, + python: { + method: 'tokenization_decisioning.rotate_secret', + example: + '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)\nresponse = client.tokenization_decisioning.rotate_secret()\nprint(response.secret)', + }, + ruby: { + method: 'tokenization_decisioning.rotate_secret', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.tokenization_decisioning.rotate_secret\n\nputs(response)', + }, + typescript: { + method: 'client.tokenizationDecisioning.rotateSecret', + example: + "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\nconst response = await client.tokenizationDecisioning.rotateSecret();\n\nconsole.log(response.secret);", + }, + }, }, { - name: 'retrieve', - endpoint: '/v1/tokenizations/{tokenization_token}', - httpMethod: 'get', - summary: 'Get a single card tokenization', - description: 'Get tokenization', - stainlessPath: '(resource) tokenizations > (method) retrieve', - qualified: 'client.tokenizations.retrieve', - params: ['tokenization_token: string;'], + name: 'simulate', + endpoint: '/v1/simulate/tokenizations', + httpMethod: 'post', + summary: "Simulate a card's tokenization", + description: + "This endpoint is used to simulate a card's tokenization in the Digital Wallet and merchant tokenization ecosystem.\n", + stainlessPath: '(resource) tokenizations > (method) simulate', + qualified: 'client.tokenizations.simulate', + params: [ + 'cvv: string;', + 'expiration_date: string;', + 'pan: string;', + "tokenization_source: 'APPLE_PAY' | 'GOOGLE' | 'SAMSUNG_PAY' | 'MERCHANT';", + 'account_score?: number;', + 'device_score?: number;', + 'entity?: string;', + "wallet_recommended_decision?: 'APPROVED' | 'DECLINED' | 'REQUIRE_ADDITIONAL_AUTHENTICATION';", + ], response: "{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }", markdown: - "## retrieve\n\n`client.tokenizations.retrieve(tokenization_token: string): { token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: object[]; payment_account_reference_id?: string; }`\n\n**get** `/v1/tokenizations/{tokenization_token}`\n\nGet tokenization\n\n### Parameters\n\n- `tokenization_token: string`\n\n### Returns\n\n- `{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `card_token: string`\n - `created_at: string`\n - `dpan: string`\n - `status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'`\n - `token_requestor_name: string | string`\n - `token_unique_reference: string`\n - `tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'`\n - `updated_at: string`\n - `device_id?: string`\n - `digital_card_art_token?: string`\n - `events?: { token?: string; created_at?: string; result?: string; rule_results?: { auth_rule_token: string; explanation: string; name: string; result: 'APPROVED' | 'DECLINED' | 'REQUIRE_TFA' | 'ERROR'; }[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]`\n - `payment_account_reference_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst tokenization = await client.tokenizations.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(tokenization);\n```", + "## simulate\n\n`client.tokenizations.simulate(cvv: string, expiration_date: string, pan: string, tokenization_source: 'APPLE_PAY' | 'GOOGLE' | 'SAMSUNG_PAY' | 'MERCHANT', account_score?: number, device_score?: number, entity?: string, wallet_recommended_decision?: 'APPROVED' | 'DECLINED' | 'REQUIRE_ADDITIONAL_AUTHENTICATION'): { token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: object[]; payment_account_reference_id?: string; }`\n\n**post** `/v1/simulate/tokenizations`\n\nThis endpoint is used to simulate a card's tokenization in the Digital Wallet and merchant tokenization ecosystem.\n\n\n### Parameters\n\n- `cvv: string`\n The three digit cvv for the card.\n\n- `expiration_date: string`\n The expiration date of the card in 'MM/YY' format.\n\n- `pan: string`\n The sixteen digit card number.\n\n- `tokenization_source: 'APPLE_PAY' | 'GOOGLE' | 'SAMSUNG_PAY' | 'MERCHANT'`\n The source of the tokenization request.\n\n- `account_score?: number`\n The account score (1-5) that represents how the Digital Wallet's view on how reputable an end user's account is.\n\n- `device_score?: number`\n The device score (1-5) that represents how the Digital Wallet's view on how reputable an end user's device is.\n\n- `entity?: string`\n Optional field to specify the token requestor name for a merchant token simulation. Ignored when tokenization_source is not MERCHANT.\n\n- `wallet_recommended_decision?: 'APPROVED' | 'DECLINED' | 'REQUIRE_ADDITIONAL_AUTHENTICATION'`\n The decision that the Digital Wallet's recommend\n\n### Returns\n\n- `{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `card_token: string`\n - `created_at: string`\n - `dpan: string`\n - `status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'`\n - `token_requestor_name: string | string`\n - `token_unique_reference: string`\n - `tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'`\n - `updated_at: string`\n - `device_id?: string`\n - `digital_card_art_token?: string`\n - `events?: { token?: string; created_at?: string; result?: string; rule_results?: { auth_rule_token: string; explanation: string; name: string; result: 'APPROVED' | 'DECLINED' | 'REQUIRE_TFA' | 'ERROR'; }[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]`\n - `payment_account_reference_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst tokenization = await client.tokenizations.simulate({\n cvv: '776',\n expiration_date: '08/29',\n pan: '4111111289144142',\n tokenization_source: 'APPLE_PAY',\n});\n\nconsole.log(tokenization);\n```", + perLanguage: { + go: { + method: 'client.Tokenizations.Simulate', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\ttokenization, err := client.Tokenizations.Simulate(context.TODO(), lithic.TokenizationSimulateParams{\n\t\tCvv: lithic.F("776"),\n\t\tExpirationDate: lithic.F("08/29"),\n\t\tPan: lithic.F("4111111289144142"),\n\t\tTokenizationSource: lithic.F(lithic.TokenizationSimulateParamsTokenizationSourceApplePay),\n\t\tAccountScore: lithic.F(int64(5)),\n\t\tDeviceScore: lithic.F(int64(5)),\n\t\tWalletRecommendedDecision: lithic.F(lithic.TokenizationSimulateParamsWalletRecommendedDecisionApproved),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", tokenization.DeviceID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/simulate/tokenizations \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "cvv": "776",\n "expiration_date": "08/29",\n "pan": "4111111289144142",\n "tokenization_source": "APPLE_PAY"\n }\'', + }, + java: { + method: 'tokenizations().simulate', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Tokenization;\nimport com.lithic.api.models.TokenizationSimulateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n TokenizationSimulateParams params = TokenizationSimulateParams.builder()\n .cvv("776")\n .expirationDate("08/29")\n .pan("4111111289144142")\n .tokenizationSource(TokenizationSimulateParams.TokenizationSource.APPLE_PAY)\n .build();\n Tokenization tokenization = client.tokenizations().simulate(params);\n }\n}', + }, + kotlin: { + method: 'tokenizations().simulate', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Tokenization\nimport com.lithic.api.models.TokenizationSimulateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: TokenizationSimulateParams = TokenizationSimulateParams.builder()\n .cvv("776")\n .expirationDate("08/29")\n .pan("4111111289144142")\n .tokenizationSource(TokenizationSimulateParams.TokenizationSource.APPLE_PAY)\n .build()\n val tokenization: Tokenization = client.tokenizations().simulate(params)\n}', + }, + python: { + method: 'tokenizations.simulate', + example: + '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)\ntokenization = client.tokenizations.simulate(\n cvv="776",\n expiration_date="08/29",\n pan="4111111289144142",\n tokenization_source="APPLE_PAY",\n account_score=5,\n device_score=5,\n wallet_recommended_decision="APPROVED",\n)\nprint(tokenization.device_id)', + }, + ruby: { + method: 'tokenizations.simulate', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ntokenization = lithic.tokenizations.simulate(\n cvv: "776",\n expiration_date: "08/29",\n pan: "4111111289144142",\n tokenization_source: :APPLE_PAY\n)\n\nputs(tokenization)', + }, + typescript: { + method: 'client.tokenizations.simulate', + example: + "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\nconst tokenization = await client.tokenizations.simulate({\n cvv: '776',\n expiration_date: '08/29',\n pan: '4111111289144142',\n tokenization_source: 'APPLE_PAY',\n account_score: 5,\n device_score: 5,\n wallet_recommended_decision: 'APPROVED',\n});\n\nconsole.log(tokenization.device_id);", + }, + }, }, { name: 'list', @@ -627,19 +1857,189 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }", markdown: "## list\n\n`client.tokenizations.list(account_token?: string, begin?: string, card_token?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string, tokenization_channel?: 'DIGITAL_WALLET' | 'MERCHANT' | 'ALL'): { token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: object[]; payment_account_reference_id?: string; }`\n\n**get** `/v1/tokenizations`\n\nList card tokenizations\n\n### Parameters\n\n- `account_token?: string`\n Filters for tokenizations associated with a specific account.\n\n- `begin?: string`\n Filter for tokenizations created after this date.\n\n- `card_token?: string`\n Filters for tokenizations associated with a specific card.\n\n- `end?: string`\n Filter for tokenizations created before this date.\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- `tokenization_channel?: 'DIGITAL_WALLET' | 'MERCHANT' | 'ALL'`\n Filter for tokenizations by tokenization channel. If this is not specified, only DIGITAL_WALLET tokenizations will be returned.\n\n### Returns\n\n- `{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `card_token: string`\n - `created_at: string`\n - `dpan: string`\n - `status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'`\n - `token_requestor_name: string | string`\n - `token_unique_reference: string`\n - `tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'`\n - `updated_at: string`\n - `device_id?: string`\n - `digital_card_art_token?: string`\n - `events?: { token?: string; created_at?: string; result?: string; rule_results?: { auth_rule_token: string; explanation: string; name: string; result: 'APPROVED' | 'DECLINED' | 'REQUIRE_TFA' | 'ERROR'; }[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]`\n - `payment_account_reference_id?: 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 tokenization of client.tokenizations.list()) {\n console.log(tokenization);\n}\n```", + perLanguage: { + go: { + method: 'client.Tokenizations.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Tokenizations.List(context.TODO(), lithic.TokenizationListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v1/tokenizations \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'tokenizations().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TokenizationListPage;\nimport com.lithic.api.models.TokenizationListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n TokenizationListPage page = client.tokenizations().list();\n }\n}', + }, + kotlin: { + method: 'tokenizations().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TokenizationListPage\nimport com.lithic.api.models.TokenizationListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: TokenizationListPage = client.tokenizations().list()\n}', + }, + python: { + method: 'tokenizations.list', + example: + '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.tokenizations.list()\npage = page.data[0]\nprint(page.device_id)', + }, + ruby: { + method: 'tokenizations.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.tokenizations.list\n\nputs(page)', + }, + typescript: { + method: 'client.tokenizations.list', + example: + "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 tokenization of client.tokenizations.list()) {\n console.log(tokenization.device_id);\n}", + }, + }, }, { - name: 'activate', - endpoint: '/v1/tokenizations/{tokenization_token}/activate', + name: 'retrieve', + endpoint: '/v1/tokenizations/{tokenization_token}', + httpMethod: 'get', + summary: 'Get a single card tokenization', + description: 'Get tokenization', + stainlessPath: '(resource) tokenizations > (method) retrieve', + qualified: 'client.tokenizations.retrieve', + params: ['tokenization_token: string;'], + response: + "{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }", + markdown: + "## retrieve\n\n`client.tokenizations.retrieve(tokenization_token: string): { token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: object[]; payment_account_reference_id?: string; }`\n\n**get** `/v1/tokenizations/{tokenization_token}`\n\nGet tokenization\n\n### Parameters\n\n- `tokenization_token: string`\n\n### Returns\n\n- `{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `card_token: string`\n - `created_at: string`\n - `dpan: string`\n - `status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'`\n - `token_requestor_name: string | string`\n - `token_unique_reference: string`\n - `tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'`\n - `updated_at: string`\n - `device_id?: string`\n - `digital_card_art_token?: string`\n - `events?: { token?: string; created_at?: string; result?: string; rule_results?: { auth_rule_token: string; explanation: string; name: string; result: 'APPROVED' | 'DECLINED' | 'REQUIRE_TFA' | 'ERROR'; }[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]`\n - `payment_account_reference_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst tokenization = await client.tokenizations.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(tokenization);\n```", + perLanguage: { + go: { + method: 'client.Tokenizations.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\ttokenization, err := client.Tokenizations.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", tokenization.DeviceID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'tokenizations().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Tokenization;\nimport com.lithic.api.models.TokenizationRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n Tokenization tokenization = client.tokenizations().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'tokenizations().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Tokenization\nimport com.lithic.api.models.TokenizationRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val tokenization: Tokenization = client.tokenizations().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'tokenizations.retrieve', + example: + '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)\ntokenization = client.tokenizations.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(tokenization.device_id)', + }, + ruby: { + method: 'tokenizations.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ntokenization = lithic.tokenizations.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(tokenization)', + }, + typescript: { + method: 'client.tokenizations.retrieve', + example: + "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\nconst tokenization = await client.tokenizations.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(tokenization.device_id);", + }, + }, + }, + { + name: 'pause', + endpoint: '/v1/tokenizations/{tokenization_token}/pause', httpMethod: 'post', - summary: 'Activate a card tokenization', + summary: 'Pause a card tokenization', description: - 'This endpoint is used to ask the card network to activate a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network activates the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on digital wallet tokenizations with status `INACTIVE`, `PENDING_ACTIVATION`, or `PENDING_2FA`.\nThis will put the tokenization in an active state, and transactions will be allowed.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.', - stainlessPath: '(resource) tokenizations > (method) activate', - qualified: 'client.tokenizations.activate', + 'This endpoint is used to ask the card network to pause a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network pauses the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on tokenizations with status `ACTIVE`.\nA paused token will prevent merchants from sending authorizations, and is a temporary status that can be changed.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.', + stainlessPath: '(resource) tokenizations > (method) pause', + qualified: 'client.tokenizations.pause', params: ['tokenization_token: string;'], markdown: - "## activate\n\n`client.tokenizations.activate(tokenization_token: string): void`\n\n**post** `/v1/tokenizations/{tokenization_token}/activate`\n\nThis endpoint is used to ask the card network to activate a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network activates the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on digital wallet tokenizations with status `INACTIVE`, `PENDING_ACTIVATION`, or `PENDING_2FA`.\nThis will put the tokenization in an active state, and transactions will be allowed.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n\n### Parameters\n\n- `tokenization_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.tokenizations.activate('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", + "## pause\n\n`client.tokenizations.pause(tokenization_token: string): void`\n\n**post** `/v1/tokenizations/{tokenization_token}/pause`\n\nThis endpoint is used to ask the card network to pause a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network pauses the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on tokenizations with status `ACTIVE`.\nA paused token will prevent merchants from sending authorizations, and is a temporary status that can be changed.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n\n### Parameters\n\n- `tokenization_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.tokenizations.pause('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", + perLanguage: { + go: { + method: 'client.Tokenizations.Pause', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.Tokenizations.Pause(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/pause \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'tokenizations().pause', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TokenizationPauseParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n client.tokenizations().pause("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'tokenizations().pause', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TokenizationPauseParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n client.tokenizations().pause("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'tokenizations.pause', + example: + '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)\nclient.tokenizations.pause(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)', + }, + ruby: { + method: 'tokenizations.pause', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.tokenizations.pause("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(result)', + }, + typescript: { + method: 'client.tokenizations.pause', + example: + "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\nawait client.tokenizations.pause('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');", + }, + }, + }, + { + name: 'unpause', + endpoint: '/v1/tokenizations/{tokenization_token}/unpause', + httpMethod: 'post', + summary: 'Unpause a card tokenization', + description: + 'This endpoint is used to ask the card network to unpause a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network unpauses the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on tokenizations with status `PAUSED`.\nThis will put the tokenization in an active state, and transactions may resume.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.', + stainlessPath: '(resource) tokenizations > (method) unpause', + qualified: 'client.tokenizations.unpause', + params: ['tokenization_token: string;'], + markdown: + "## unpause\n\n`client.tokenizations.unpause(tokenization_token: string): void`\n\n**post** `/v1/tokenizations/{tokenization_token}/unpause`\n\nThis endpoint is used to ask the card network to unpause a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network unpauses the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on tokenizations with status `PAUSED`.\nThis will put the tokenization in an active state, and transactions may resume.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n\n### Parameters\n\n- `tokenization_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.tokenizations.unpause('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", + perLanguage: { + go: { + method: 'client.Tokenizations.Unpause', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.Tokenizations.Unpause(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/unpause \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'tokenizations().unpause', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TokenizationUnpauseParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n client.tokenizations().unpause("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'tokenizations().unpause', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TokenizationUnpauseParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n client.tokenizations().unpause("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'tokenizations.unpause', + example: + '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)\nclient.tokenizations.unpause(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)', + }, + ruby: { + method: 'tokenizations.unpause', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.tokenizations.unpause("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(result)', + }, + typescript: { + method: 'client.tokenizations.unpause', + example: + "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\nawait client.tokenizations.unpause('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');", + }, + }, }, { name: 'deactivate', @@ -653,19 +2053,91 @@ const EMBEDDED_METHODS: MethodEntry[] = [ params: ['tokenization_token: string;'], markdown: "## deactivate\n\n`client.tokenizations.deactivate(tokenization_token: string): void`\n\n**post** `/v1/tokenizations/{tokenization_token}/deactivate`\n\nThis endpoint is used to ask the card network to deactivate a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network deactivates the tokenization, the state will be updated and a tokenization.updated event will be sent.\nAuthorizations attempted with a deactivated tokenization will be blocked and will not be forwarded to Lithic from the network. Deactivating the token is a permanent operation. If the target is a digital wallet tokenization, it will be removed from its device.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n\n### Parameters\n\n- `tokenization_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.tokenizations.deactivate('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", + perLanguage: { + go: { + method: 'client.Tokenizations.Deactivate', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.Tokenizations.Deactivate(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/deactivate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'tokenizations().deactivate', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TokenizationDeactivateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n client.tokenizations().deactivate("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'tokenizations().deactivate', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TokenizationDeactivateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n client.tokenizations().deactivate("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'tokenizations.deactivate', + example: + '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)\nclient.tokenizations.deactivate(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)', + }, + ruby: { + method: 'tokenizations.deactivate', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.tokenizations.deactivate("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(result)', + }, + typescript: { + method: 'client.tokenizations.deactivate', + example: + "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\nawait client.tokenizations.deactivate('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');", + }, + }, }, { - name: 'pause', - endpoint: '/v1/tokenizations/{tokenization_token}/pause', + name: 'activate', + endpoint: '/v1/tokenizations/{tokenization_token}/activate', httpMethod: 'post', - summary: 'Pause a card tokenization', + summary: 'Activate a card tokenization', description: - 'This endpoint is used to ask the card network to pause a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network pauses the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on tokenizations with status `ACTIVE`.\nA paused token will prevent merchants from sending authorizations, and is a temporary status that can be changed.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.', - stainlessPath: '(resource) tokenizations > (method) pause', - qualified: 'client.tokenizations.pause', + 'This endpoint is used to ask the card network to activate a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network activates the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on digital wallet tokenizations with status `INACTIVE`, `PENDING_ACTIVATION`, or `PENDING_2FA`.\nThis will put the tokenization in an active state, and transactions will be allowed.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.', + stainlessPath: '(resource) tokenizations > (method) activate', + qualified: 'client.tokenizations.activate', params: ['tokenization_token: string;'], markdown: - "## pause\n\n`client.tokenizations.pause(tokenization_token: string): void`\n\n**post** `/v1/tokenizations/{tokenization_token}/pause`\n\nThis endpoint is used to ask the card network to pause a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network pauses the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on tokenizations with status `ACTIVE`.\nA paused token will prevent merchants from sending authorizations, and is a temporary status that can be changed.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n\n### Parameters\n\n- `tokenization_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.tokenizations.pause('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", + "## activate\n\n`client.tokenizations.activate(tokenization_token: string): void`\n\n**post** `/v1/tokenizations/{tokenization_token}/activate`\n\nThis endpoint is used to ask the card network to activate a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network activates the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on digital wallet tokenizations with status `INACTIVE`, `PENDING_ACTIVATION`, or `PENDING_2FA`.\nThis will put the tokenization in an active state, and transactions will be allowed.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n\n### Parameters\n\n- `tokenization_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.tokenizations.activate('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", + perLanguage: { + go: { + method: 'client.Tokenizations.Activate', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.Tokenizations.Activate(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/activate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'tokenizations().activate', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TokenizationActivateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n client.tokenizations().activate("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'tokenizations().activate', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TokenizationActivateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n client.tokenizations().activate("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'tokenizations.activate', + example: + '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)\nclient.tokenizations.activate(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)', + }, + ruby: { + method: 'tokenizations.activate', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.tokenizations.activate("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(result)', + }, + typescript: { + method: 'client.tokenizations.activate', + example: + "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\nawait client.tokenizations.activate('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');", + }, + }, }, { name: 'resend_activation_code', @@ -682,43 +2154,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ ], markdown: "## resend_activation_code\n\n`client.tokenizations.resendActivationCode(tokenization_token: string, activation_method_type?: 'EMAIL_TO_CARDHOLDER_ADDRESS' | 'TEXT_TO_CARDHOLDER_NUMBER'): void`\n\n**post** `/v1/tokenizations/{tokenization_token}/resend_activation_code`\n\nThis endpoint is used to ask the card network to send another activation code to a cardholder that has already tried tokenizing a card. A successful response indicates that the request was successfully delivered to the card network.\nThe endpoint may only be used on Mastercard digital wallet tokenizations with status `INACTIVE`, `PENDING_ACTIVATION`, or `PENDING_2FA`. The network will send a new activation code to the one of the contact methods provided in the initial tokenization flow. If a user fails to enter the code correctly 3 times, the contact method will not be eligible for resending the activation code, and the cardholder must restart the provision process.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n\n### Parameters\n\n- `tokenization_token: string`\n\n- `activation_method_type?: 'EMAIL_TO_CARDHOLDER_ADDRESS' | 'TEXT_TO_CARDHOLDER_NUMBER'`\n The communication method that the user has selected to use to receive the authentication code.\nSupported Values: Sms = \"TEXT_TO_CARDHOLDER_NUMBER\". Email = \"EMAIL_TO_CARDHOLDER_ADDRESS\"\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.tokenizations.resendActivationCode('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", - }, - { - name: 'simulate', - endpoint: '/v1/simulate/tokenizations', - httpMethod: 'post', - summary: "Simulate a card's tokenization", - description: - "This endpoint is used to simulate a card's tokenization in the Digital Wallet and merchant tokenization ecosystem.\n", - stainlessPath: '(resource) tokenizations > (method) simulate', - qualified: 'client.tokenizations.simulate', - params: [ - 'cvv: string;', - 'expiration_date: string;', - 'pan: string;', - "tokenization_source: 'APPLE_PAY' | 'GOOGLE' | 'SAMSUNG_PAY' | 'MERCHANT';", - 'account_score?: number;', - 'device_score?: number;', - 'entity?: string;', - "wallet_recommended_decision?: 'APPROVED' | 'DECLINED' | 'REQUIRE_ADDITIONAL_AUTHENTICATION';", - ], - response: - "{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }", - markdown: - "## simulate\n\n`client.tokenizations.simulate(cvv: string, expiration_date: string, pan: string, tokenization_source: 'APPLE_PAY' | 'GOOGLE' | 'SAMSUNG_PAY' | 'MERCHANT', account_score?: number, device_score?: number, entity?: string, wallet_recommended_decision?: 'APPROVED' | 'DECLINED' | 'REQUIRE_ADDITIONAL_AUTHENTICATION'): { token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: object[]; payment_account_reference_id?: string; }`\n\n**post** `/v1/simulate/tokenizations`\n\nThis endpoint is used to simulate a card's tokenization in the Digital Wallet and merchant tokenization ecosystem.\n\n\n### Parameters\n\n- `cvv: string`\n The three digit cvv for the card.\n\n- `expiration_date: string`\n The expiration date of the card in 'MM/YY' format.\n\n- `pan: string`\n The sixteen digit card number.\n\n- `tokenization_source: 'APPLE_PAY' | 'GOOGLE' | 'SAMSUNG_PAY' | 'MERCHANT'`\n The source of the tokenization request.\n\n- `account_score?: number`\n The account score (1-5) that represents how the Digital Wallet's view on how reputable an end user's account is.\n\n- `device_score?: number`\n The device score (1-5) that represents how the Digital Wallet's view on how reputable an end user's device is.\n\n- `entity?: string`\n Optional field to specify the token requestor name for a merchant token simulation. Ignored when tokenization_source is not MERCHANT.\n\n- `wallet_recommended_decision?: 'APPROVED' | 'DECLINED' | 'REQUIRE_ADDITIONAL_AUTHENTICATION'`\n The decision that the Digital Wallet's recommend\n\n### Returns\n\n- `{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `card_token: string`\n - `created_at: string`\n - `dpan: string`\n - `status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'`\n - `token_requestor_name: string | string`\n - `token_unique_reference: string`\n - `tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'`\n - `updated_at: string`\n - `device_id?: string`\n - `digital_card_art_token?: string`\n - `events?: { token?: string; created_at?: string; result?: string; rule_results?: { auth_rule_token: string; explanation: string; name: string; result: 'APPROVED' | 'DECLINED' | 'REQUIRE_TFA' | 'ERROR'; }[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]`\n - `payment_account_reference_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst tokenization = await client.tokenizations.simulate({\n cvv: '776',\n expiration_date: '08/29',\n pan: '4111111289144142',\n tokenization_source: 'APPLE_PAY',\n});\n\nconsole.log(tokenization);\n```", - }, - { - name: 'unpause', - endpoint: '/v1/tokenizations/{tokenization_token}/unpause', - httpMethod: 'post', - summary: 'Unpause a card tokenization', - description: - 'This endpoint is used to ask the card network to unpause a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network unpauses the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on tokenizations with status `PAUSED`.\nThis will put the tokenization in an active state, and transactions may resume.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.', - stainlessPath: '(resource) tokenizations > (method) unpause', - qualified: 'client.tokenizations.unpause', - params: ['tokenization_token: string;'], - markdown: - "## unpause\n\n`client.tokenizations.unpause(tokenization_token: string): void`\n\n**post** `/v1/tokenizations/{tokenization_token}/unpause`\n\nThis endpoint is used to ask the card network to unpause a tokenization. A successful response indicates that the request was successfully delivered to the card network. When the card network unpauses the tokenization, the state will be updated and a tokenization.updated event will be sent. The endpoint may only be used on tokenizations with status `PAUSED`.\nThis will put the tokenization in an active state, and transactions may resume.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n\n### Parameters\n\n- `tokenization_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.tokenizations.unpause('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", + perLanguage: { + go: { + method: 'client.Tokenizations.ResendActivationCode', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.Tokenizations.ResendActivationCode(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.TokenizationResendActivationCodeParams{\n\t\t\tActivationMethodType: lithic.F(lithic.TokenizationResendActivationCodeParamsActivationMethodTypeTextToCardholderNumber),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/resend_activation_code \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'tokenizations().resendActivationCode', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TokenizationResendActivationCodeParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n client.tokenizations().resendActivationCode("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'tokenizations().resendActivationCode', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TokenizationResendActivationCodeParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n client.tokenizations().resendActivationCode("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'tokenizations.resend_activation_code', + example: + '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)\nclient.tokenizations.resend_activation_code(\n tokenization_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n activation_method_type="TEXT_TO_CARDHOLDER_NUMBER",\n)', + }, + ruby: { + method: 'tokenizations.resend_activation_code', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.tokenizations.resend_activation_code("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(result)', + }, + typescript: { + method: 'client.tokenizations.resendActivationCode', + example: + "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\nawait client.tokenizations.resendActivationCode('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n activation_method_type: 'TEXT_TO_CARDHOLDER_NUMBER',\n});", + }, + }, }, { name: 'update_digital_card_art', @@ -734,6 +2205,100 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }", markdown: "## update_digital_card_art\n\n`client.tokenizations.updateDigitalCardArt(tokenization_token: string, digital_card_art_token?: string): { token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: object[]; payment_account_reference_id?: string; }`\n\n**post** `/v1/tokenizations/{tokenization_token}/update_digital_card_art`\n\nThis endpoint is used update the digital card art for a digital wallet tokenization. A successful response indicates that the card network has updated the tokenization's art, and the tokenization's `digital_cart_art_token` field was updated.\nThe endpoint may not be used on tokenizations with status `DEACTIVATED`.\nNote that this updates the art for one specific tokenization, not all tokenizations for a card. New tokenizations for a card will be created with the art referenced in the card object's `digital_card_art_token` field.\nReach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n\n### Parameters\n\n- `tokenization_token: string`\n\n- `digital_card_art_token?: string`\n Specifies the digital card art to be displayed in the user’s digital wallet for a tokenization. This artwork must be approved by the network and configured by Lithic to use. See [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art).\n\n### Returns\n\n- `{ token: string; account_token: string; card_token: string; created_at: string; dpan: string; status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'; token_requestor_name: string | string; token_unique_reference: string; tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'; updated_at: string; device_id?: string; digital_card_art_token?: string; events?: { token?: string; created_at?: string; result?: string; rule_results?: object[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]; payment_account_reference_id?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `card_token: string`\n - `created_at: string`\n - `dpan: string`\n - `status: 'ACTIVE' | 'DEACTIVATED' | 'INACTIVE' | 'PAUSED' | 'PENDING_2FA' | 'PENDING_ACTIVATION' | 'UNKNOWN'`\n - `token_requestor_name: string | string`\n - `token_unique_reference: string`\n - `tokenization_channel: 'DIGITAL_WALLET' | 'MERCHANT'`\n - `updated_at: string`\n - `device_id?: string`\n - `digital_card_art_token?: string`\n - `events?: { token?: string; created_at?: string; result?: string; rule_results?: { auth_rule_token: string; explanation: string; name: string; result: 'APPROVED' | 'DECLINED' | 'REQUIRE_TFA' | 'ERROR'; }[]; tokenization_decline_reasons?: string[]; tokenization_tfa_reasons?: string[]; type?: string; }[]`\n - `payment_account_reference_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst tokenization = await client.tokenizations.updateDigitalCardArt('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(tokenization);\n```", + perLanguage: { + go: { + method: 'client.Tokenizations.UpdateDigitalCardArt', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\ttokenization, err := client.Tokenizations.UpdateDigitalCardArt(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.TokenizationUpdateDigitalCardArtParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", tokenization.DeviceID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/update_digital_card_art \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'tokenizations().updateDigitalCardArt', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Tokenization;\nimport com.lithic.api.models.TokenizationUpdateDigitalCardArtParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n Tokenization tokenization = client.tokenizations().updateDigitalCardArt("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'tokenizations().updateDigitalCardArt', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Tokenization\nimport com.lithic.api.models.TokenizationUpdateDigitalCardArtParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val tokenization: Tokenization = client.tokenizations().updateDigitalCardArt("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'tokenizations.update_digital_card_art', + example: + '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)\ntokenization = client.tokenizations.update_digital_card_art(\n tokenization_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(tokenization.device_id)', + }, + ruby: { + method: 'tokenizations.update_digital_card_art', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ntokenization = lithic.tokenizations.update_digital_card_art("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(tokenization)', + }, + typescript: { + method: 'client.tokenizations.updateDigitalCardArt', + example: + "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\nconst tokenization = await client.tokenizations.updateDigitalCardArt(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(tokenization.device_id);", + }, + }, + }, + { + name: 'list', + endpoint: '/v1/cards', + httpMethod: 'get', + summary: 'List cards', + description: 'List cards.', + stainlessPath: '(resource) cards > (method) list', + qualified: 'client.cards.list', + params: [ + 'account_token?: string;', + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'memo?: string;', + 'page_size?: number;', + 'starting_after?: string;', + "state?: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT';", + ], + response: + "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", + markdown: + "## list\n\n`client.cards.list(account_token?: string, begin?: string, end?: string, ending_before?: string, memo?: string, page_size?: number, starting_after?: string, state?: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'): { token: string; account_token: string; card_program_token: string; created: string; funding: object; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: spend_limit_duration; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n\n**get** `/v1/cards`\n\nList cards.\n\n### Parameters\n\n- `account_token?: string`\n Returns cards associated with the specified account.\n\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `memo?: string`\n Returns cards containing the specified partial or full memo text.\n\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- `state?: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'`\n Returns cards with the specified state.\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details without PCI information\n\n - `token: string`\n - `account_token: string`\n - `card_program_token: string`\n - `created: string`\n - `funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }`\n - `last_four: string`\n - `pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'`\n - `spend_limit: number`\n - `spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'`\n - `state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'`\n - `type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'`\n - `auth_rule_tokens?: string[]`\n - `bulk_order_token?: string`\n - `cardholder_currency?: string`\n - `comment?: string`\n - `digital_card_art_token?: string`\n - `exp_month?: string`\n - `exp_year?: string`\n - `hostname?: string`\n - `memo?: string`\n - `network_program_token?: string`\n - `pending_commands?: string[]`\n - `product_id?: string`\n - `replacement_for?: string`\n - `substatus?: 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 nonPCICard of client.cards.list()) {\n console.log(nonPCICard);\n}\n```", + perLanguage: { + go: { + method: 'client.Cards.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Cards.List(context.TODO(), lithic.CardListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v1/cards \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'cards().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.CardListPage;\nimport com.lithic.api.models.CardListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardListPage page = client.cards().list();\n }\n}', + }, + kotlin: { + method: 'cards().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.CardListPage\nimport com.lithic.api.models.CardListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: CardListPage = client.cards().list()\n}', + }, + python: { + method: 'cards.list', + example: + '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.cards.list()\npage = page.data[0]\nprint(page.product_id)', + }, + ruby: { + method: 'cards.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.cards.list\n\nputs(page)', + }, + typescript: { + method: 'client.cards.list', + example: + "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 nonPCICard of client.cards.list()) {\n console.log(nonPCICard.product_id);\n}", + }, + }, }, { name: 'create', @@ -771,6 +2336,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", markdown: "## create\n\n`client.cards.create(type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET', account_token?: string, bulk_order_token?: string, card_program_token?: string, carrier?: { qr_code_url?: string; }, digital_card_art_token?: string, exp_month?: string, exp_year?: string, memo?: string, pin?: string, product_id?: string, replacement_account_token?: string, replacement_comment?: string, replacement_for?: string, replacement_substatus?: string, shipping_address?: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }, shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING', spend_limit?: number, spend_limit_duration?: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION', state?: 'OPEN' | 'PAUSED', Idempotency-Key?: string): object`\n\n**post** `/v1/cards`\n\nCreate a new virtual or physical card. Parameters `shipping_address` and `product_id` only apply to physical cards.\n\n\n### Parameters\n\n- `type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'`\n Card types:\n* `VIRTUAL` - Card will authorize at any merchant and can be added to a digital wallet like Apple Pay or Google Pay (if the card program is digital wallet-enabled).\n* `PHYSICAL` - Manufactured and sent to the cardholder. We offer white label branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe functionality. Reach out at [lithic.com/contact](https://lithic.com/contact) for more information.\n* `SINGLE_USE` - Card is closed upon first successful authorization.\n* `MERCHANT_LOCKED` - Card is locked to the first merchant that successfully authorizes the card.\n* `UNLOCKED` - *[Deprecated]* Similar behavior to VIRTUAL cards, please use VIRTUAL instead.\n* `DIGITAL_WALLET` - *[Deprecated]* Similar behavior to VIRTUAL cards, please use VIRTUAL instead.\n\n- `account_token?: string`\n Globally unique identifier for the account that the card will be associated with. Required for programs enrolling users using the [/account\\_holders endpoint](https://docs.lithic.com/docs/account-holders-kyc). See [Managing Your Program](doc:managing-your-program) for more information.\n\n\n- `bulk_order_token?: string`\n Globally unique identifier for an existing bulk order to associate this card with. When specified, the card will be added to the bulk order for batch shipment. Only applicable to cards of type PHYSICAL\n\n- `card_program_token?: string`\n For card programs with more than one BIN range. This must be configured with Lithic before use. Identifies the card program/BIN range under which to create the card. If omitted, will utilize the program's default `card_program_token`. In Sandbox, use 00000000-0000-0000-1000-000000000000 and 00000000-0000-0000-2000-000000000000 to test creating cards on specific card programs.\n\n- `carrier?: { qr_code_url?: string; }`\n - `qr_code_url?: string`\n QR code URL to display on the card carrier. The `qr_code_url` field requires your domain to be allowlisted by Lithic before use. Contact Support to configure your QR code domain\n\n- `digital_card_art_token?: string`\n Specifies the digital card art to be displayed in the user’s digital wallet after tokenization. This artwork must be approved by Mastercard and configured by Lithic to use. See [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art).\n\n- `exp_month?: string`\n Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, an expiration date will be generated.\n\n- `exp_year?: string`\n Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an expiration date will be generated.\n\n- `memo?: string`\n Friendly name to identify the card.\n\n- `pin?: string`\n Encrypted PIN block (in base64). Applies to cards of type `PHYSICAL` and `VIRTUAL`. See [Encrypted PIN Block](https://docs.lithic.com/docs/cards#encrypted-pin-block).\n\n- `product_id?: string`\n Only applicable to cards of type `PHYSICAL`. This must be configured with Lithic before use. Specifies the configuration (i.e., physical card art) that the card should be manufactured with.\n\n- `replacement_account_token?: string`\n Restricted field limited to select use cases. Lithic will reach out directly if this field should be used. Globally unique identifier for the replacement card's account. If this field is specified, `replacement_for` must also be specified. If `replacement_for` is specified and this field is omitted, the replacement card's account will be inferred from the card being replaced.\n\n- `replacement_comment?: string`\n Additional context or information related to the card that this card will replace.\n\n- `replacement_for?: string`\n Globally unique identifier for the card that this card will replace. If the card type is `PHYSICAL` it will be replaced by a `PHYSICAL` card. If the card type is `VIRTUAL` it will be replaced by a `VIRTUAL` card.\n\n- `replacement_substatus?: string`\n Card state substatus values for the card that this card will replace:\n* `LOST` - The physical card is no longer in the cardholder's possession due to being lost or never received by the cardholder.\n* `COMPROMISED` - Card information has been exposed, potentially leading to unauthorized access. This may involve physical card theft, cloning, or online data breaches.\n* `DAMAGED` - The physical card is not functioning properly, such as having chip failures or a demagnetized magnetic stripe.\n* `END_USER_REQUEST` - The cardholder requested the closure of the card for reasons unrelated to fraud or damage, such as switching to a different product or closing the account.\n* `ISSUER_REQUEST` - The issuer closed the card for reasons unrelated to fraud or damage, such as account inactivity, product or policy changes, or technology upgrades.\n* `NOT_ACTIVE` - The card hasn’t had any transaction activity for a specified period, applicable to statuses like `PAUSED` or `CLOSED`.\n* `SUSPICIOUS_ACTIVITY` - The card has one or more suspicious transactions or activities that require review. This can involve prompting the cardholder to confirm legitimate use or report confirmed fraud.\n* `INTERNAL_REVIEW` - The card is temporarily paused pending further internal review.\n* `EXPIRED` - The card has expired and has been closed without being reissued.\n* `UNDELIVERABLE` - The card cannot be delivered to the cardholder and has been returned.\n* `OTHER` - The reason for the status does not fall into any of the above categories. A comment should be provided to specify the reason.\n\n- `shipping_address?: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }`\n - `address1: string`\n Valid USPS routable address.\n - `city: string`\n City\n - `country: string`\n Uppercase ISO 3166-1 alpha-3 three character abbreviation.\n - `first_name: string`\n Customer's first name. This will be the first name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `last_name: string`\n Customer's surname (family name). This will be the last name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `postal_code: string`\n Postal code (formerly zipcode). For US addresses, either five-digit postal code or nine-digit postal code (ZIP+4) using the format 12345-1234.\n - `state: string`\n Uppercase ISO 3166-2 two character abbreviation for US and CA. Optional with a limit of 24 characters for other countries.\n - `address2?: string`\n Unit number (if applicable).\n - `email?: string`\n Email address to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n - `line2_text?: string`\n Text to be printed on line two of the physical card. Use of this field requires additional permissions.\n - `phone_number?: string`\n Cardholder's phone number in E.164 format to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n\n- `shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING'`\n Shipping method for the card. Only applies to cards of type PHYSICAL.\nUse of options besides `STANDARD` require additional permissions.\n\n* `STANDARD` - USPS regular mail or similar international option, with no tracking\n* `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking\n* `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking\n* `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with tracking\n* `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking\n* `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar international option, with tracking\n* `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and timeline are inherited from the parent bulk order.\n\n- `spend_limit?: number`\n Amount (in cents) to limit approved authorizations (e.g. 100000 would be a $1,000 limit). Transaction requests above the spend limit will be declined. Note that a spend limit of 0 is effectively no limit, and should only be used to reset or remove a prior limit. Only a limit of 1 or above will result in declined transactions due to checks against the card limit.\n\n- `spend_limit_duration?: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'`\n Spend limit duration values:\n\n* `ANNUALLY` - Card will authorize transactions up to spend limit for the trailing year.\n* `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card.\n* `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month. To support recurring monthly payments, which can occur on different day every month, the time window we consider for monthly velocity starts 6 days after the current calendar date one month prior.\n* `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is under the spend limit.\n\n- `state?: 'OPEN' | 'PAUSED'`\n Card state values:\n* `OPEN` - Card will approve authorizations (if they match card and account parameters).\n* `PAUSED` - Card will decline authorizations, but can be resumed at a later time.\n\n- `Idempotency-Key?: string`\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details with potentially PCI sensitive information for Enterprise customers\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst card = await client.cards.create({ type: 'VIRTUAL' });\n\nconsole.log(card);\n```", + perLanguage: { + go: { + method: 'client.Cards.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tcard, err := client.Cards.New(context.TODO(), lithic.CardNewParams{\n\t\tType: lithic.F(lithic.CardNewParamsTypeVirtual),\n\t\tMemo: lithic.F("New Card"),\n\t\tSpendLimit: lithic.F(int64(1000)),\n\t\tSpendLimitDuration: lithic.F(lithic.SpendLimitDurationTransaction),\n\t\tState: lithic.F(lithic.CardNewParamsStateOpen),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", card)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/cards \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "type": "VIRTUAL",\n "bulk_order_token": "5e9483eb-8103-4e16-9794-2106111b2eca",\n "card_program_token": "5e9483eb-8103-4e16-9794-2106111b2eca",\n "digital_card_art_token": "5e9483eb-8103-4e16-9794-2106111b2eca",\n "exp_month": "06",\n "exp_year": "2027",\n "memo": "New Card",\n "product_id": "1",\n "replacement_account_token": "5e9483eb-8103-4e16-9794-2106111b2eca",\n "replacement_for": "5e9483eb-8103-4e16-9794-2106111b2eca"\n }\'', + }, + java: { + method: 'cards().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Card;\nimport com.lithic.api.models.CardCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardCreateParams params = CardCreateParams.builder()\n .type(CardCreateParams.Type.VIRTUAL)\n .build();\n Card card = client.cards().create(params);\n }\n}', + }, + kotlin: { + method: 'cards().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Card\nimport com.lithic.api.models.CardCreateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: CardCreateParams = CardCreateParams.builder()\n .type(CardCreateParams.Type.VIRTUAL)\n .build()\n val card: Card = client.cards().create(params)\n}', + }, + python: { + method: 'cards.create', + example: + '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)\ncard = client.cards.create(\n type="VIRTUAL",\n memo="New Card",\n spend_limit=1000,\n spend_limit_duration="TRANSACTION",\n state="OPEN",\n)\nprint(card)', + }, + ruby: { + method: 'cards.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ncard = lithic.cards.create(type: :VIRTUAL)\n\nputs(card)', + }, + typescript: { + method: 'client.cards.create', + example: + "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\nconst card = await client.cards.create({\n type: 'VIRTUAL',\n memo: 'New Card',\n spend_limit: 1000,\n spend_limit_duration: 'TRANSACTION',\n state: 'OPEN',\n});\n\nconsole.log(card);", + }, + }, }, { name: 'retrieve', @@ -785,6 +2386,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", markdown: "## retrieve\n\n`client.cards.retrieve(card_token: string): object`\n\n**get** `/v1/cards/{card_token}`\n\nGet card configuration such as spend limit and state.\n\n### Parameters\n\n- `card_token: string`\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details with potentially PCI sensitive information for Enterprise customers\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst card = await client.cards.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(card);\n```", + perLanguage: { + go: { + method: 'client.Cards.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tcard, err := client.Cards.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", card)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'cards().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Card;\nimport com.lithic.api.models.CardRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n Card card = client.cards().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'cards().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Card\nimport com.lithic.api.models.CardRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val card: Card = client.cards().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'cards.retrieve', + example: + '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)\ncard = client.cards.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(card)', + }, + ruby: { + method: 'cards.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ncard = lithic.cards.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(card)', + }, + typescript: { + method: 'client.cards.retrieve', + example: + "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\nconst card = await client.cards.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(card);", + }, + }, }, { name: 'update', @@ -812,64 +2449,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", markdown: "## update\n\n`client.cards.update(card_token: string, comment?: string, digital_card_art_token?: string, memo?: string, network_program_token?: string, pin?: string, pin_status?: 'OK', spend_limit?: number, spend_limit_duration?: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION', state?: 'CLOSED' | 'OPEN' | 'PAUSED', substatus?: string): object`\n\n**patch** `/v1/cards/{card_token}`\n\nUpdate the specified properties of the card. Unsupplied properties will remain unchanged.\n\n*Note: setting a card to a `CLOSED` state is a final action that cannot be undone.*\n\n\n### Parameters\n\n- `card_token: string`\n\n- `comment?: string`\n Additional context or information related to the card.\n\n- `digital_card_art_token?: string`\n Specifies the digital card art to be displayed in the user’s digital wallet after tokenization. This artwork must be approved by Mastercard and configured by Lithic to use. See [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art).\n\n- `memo?: string`\n Friendly name to identify the card.\n\n- `network_program_token?: string`\n Globally unique identifier for the card's network program. Currently applicable to Visa cards participating in Account Level Management only.\n\n- `pin?: string`\n Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and `VIRTUAL`. Changing PIN also resets PIN status to `OK`. See [Encrypted PIN Block](https://docs.lithic.com/docs/cards#encrypted-pin-block).\n\n- `pin_status?: 'OK'`\n Indicates if a card is blocked due a PIN status issue (e.g. excessive incorrect attempts). Can only be set to `OK` to unblock a card.\n\n- `spend_limit?: number`\n Amount (in cents) to limit approved authorizations (e.g. 100000 would be a $1,000 limit). Transaction requests above the spend limit will be declined. Note that a spend limit of 0 is effectively no limit, and should only be used to reset or remove a prior limit. Only a limit of 1 or above will result in declined transactions due to checks against the card limit.\n\n- `spend_limit_duration?: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'`\n Spend limit duration values:\n\n* `ANNUALLY` - Card will authorize transactions up to spend limit for the trailing year.\n* `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card.\n* `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month. To support recurring monthly payments, which can occur on different day every month, the time window we consider for monthly velocity starts 6 days after the current calendar date one month prior.\n* `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is under the spend limit.\n\n- `state?: 'CLOSED' | 'OPEN' | 'PAUSED'`\n Card state values:\n* `CLOSED` - Card will no longer approve authorizations. Closing a card cannot be undone.\n* `OPEN` - Card will approve authorizations (if they match card and account parameters).\n* `PAUSED` - Card will decline authorizations, but can be resumed at a later time.\n\n- `substatus?: string`\n Card state substatus values:\n* `LOST` - The physical card is no longer in the cardholder's possession due to being lost or never received by the cardholder.\n* `COMPROMISED` - Card information has been exposed, potentially leading to unauthorized access. This may involve physical card theft, cloning, or online data breaches.\n* `DAMAGED` - The physical card is not functioning properly, such as having chip failures or a demagnetized magnetic stripe.\n* `END_USER_REQUEST` - The cardholder requested the closure of the card for reasons unrelated to fraud or damage, such as switching to a different product or closing the account.\n* `ISSUER_REQUEST` - The issuer closed the card for reasons unrelated to fraud or damage, such as account inactivity, product or policy changes, or technology upgrades.\n* `NOT_ACTIVE` - The card hasn’t had any transaction activity for a specified period, applicable to statuses like `PAUSED` or `CLOSED`.\n* `SUSPICIOUS_ACTIVITY` - The card has one or more suspicious transactions or activities that require review. This can involve prompting the cardholder to confirm legitimate use or report confirmed fraud.\n* `INTERNAL_REVIEW` - The card is temporarily paused pending further internal review.\n* `EXPIRED` - The card has expired and has been closed without being reissued.\n* `UNDELIVERABLE` - The card cannot be delivered to the cardholder and has been returned.\n* `OTHER` - The reason for the status does not fall into any of the above categories. A comment should be provided to specify the reason.\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details with potentially PCI sensitive information for Enterprise customers\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst card = await client.cards.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(card);\n```", - }, - { - name: 'list', - endpoint: '/v1/cards', - httpMethod: 'get', - summary: 'List cards', - description: 'List cards.', - stainlessPath: '(resource) cards > (method) list', - qualified: 'client.cards.list', - params: [ - 'account_token?: string;', - 'begin?: string;', - 'end?: string;', - 'ending_before?: string;', - 'memo?: string;', - 'page_size?: number;', - 'starting_after?: string;', - "state?: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT';", - ], - response: - "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", - markdown: - "## list\n\n`client.cards.list(account_token?: string, begin?: string, end?: string, ending_before?: string, memo?: string, page_size?: number, starting_after?: string, state?: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'): { token: string; account_token: string; card_program_token: string; created: string; funding: object; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: spend_limit_duration; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n\n**get** `/v1/cards`\n\nList cards.\n\n### Parameters\n\n- `account_token?: string`\n Returns cards associated with the specified account.\n\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `memo?: string`\n Returns cards containing the specified partial or full memo text.\n\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- `state?: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'`\n Returns cards with the specified state.\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details without PCI information\n\n - `token: string`\n - `account_token: string`\n - `card_program_token: string`\n - `created: string`\n - `funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }`\n - `last_four: string`\n - `pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'`\n - `spend_limit: number`\n - `spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'`\n - `state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'`\n - `type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'`\n - `auth_rule_tokens?: string[]`\n - `bulk_order_token?: string`\n - `cardholder_currency?: string`\n - `comment?: string`\n - `digital_card_art_token?: string`\n - `exp_month?: string`\n - `exp_year?: string`\n - `hostname?: string`\n - `memo?: string`\n - `network_program_token?: string`\n - `pending_commands?: string[]`\n - `product_id?: string`\n - `replacement_for?: string`\n - `substatus?: 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 nonPCICard of client.cards.list()) {\n console.log(nonPCICard);\n}\n```", - }, - { - name: 'convert_physical', - endpoint: '/v1/cards/{card_token}/convert_physical', - httpMethod: 'post', - summary: 'Convert virtual to physical card', - description: - "Convert a virtual card into a physical card and manufacture it.\nCustomer must supply relevant fields for physical card creation including `product_id`, `carrier`, `shipping_method`, and `shipping_address`.\nThe card token will be unchanged. The card's type will be altered to `PHYSICAL`.\nThe card will be set to state `PENDING_FULFILLMENT` and fulfilled at next fulfillment cycle.\nVirtual cards created on card programs which do not support physical cards cannot be converted. The card program cannot be changed as part of the conversion. Cards must be in an `OPEN` state to be converted.\nOnly applies to cards of type `VIRTUAL` (or existing cards with deprecated types of `DIGITAL_WALLET` and `UNLOCKED`).", - stainlessPath: '(resource) cards > (method) convert_physical', - qualified: 'client.cards.convertPhysical', - params: [ - 'card_token: string;', - 'shipping_address: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; };', - 'carrier?: { qr_code_url?: string; };', - 'product_id?: string;', - "shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING';", - ], - response: - "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", - markdown: - "## convert_physical\n\n`client.cards.convertPhysical(card_token: string, shipping_address: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }, carrier?: { qr_code_url?: string; }, product_id?: string, shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING'): object`\n\n**post** `/v1/cards/{card_token}/convert_physical`\n\nConvert a virtual card into a physical card and manufacture it.\nCustomer must supply relevant fields for physical card creation including `product_id`, `carrier`, `shipping_method`, and `shipping_address`.\nThe card token will be unchanged. The card's type will be altered to `PHYSICAL`.\nThe card will be set to state `PENDING_FULFILLMENT` and fulfilled at next fulfillment cycle.\nVirtual cards created on card programs which do not support physical cards cannot be converted. The card program cannot be changed as part of the conversion. Cards must be in an `OPEN` state to be converted.\nOnly applies to cards of type `VIRTUAL` (or existing cards with deprecated types of `DIGITAL_WALLET` and `UNLOCKED`).\n\n### Parameters\n\n- `card_token: string`\n\n- `shipping_address: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }`\n The shipping address this card will be sent to.\n - `address1: string`\n Valid USPS routable address.\n - `city: string`\n City\n - `country: string`\n Uppercase ISO 3166-1 alpha-3 three character abbreviation.\n - `first_name: string`\n Customer's first name. This will be the first name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `last_name: string`\n Customer's surname (family name). This will be the last name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `postal_code: string`\n Postal code (formerly zipcode). For US addresses, either five-digit postal code or nine-digit postal code (ZIP+4) using the format 12345-1234.\n - `state: string`\n Uppercase ISO 3166-2 two character abbreviation for US and CA. Optional with a limit of 24 characters for other countries.\n - `address2?: string`\n Unit number (if applicable).\n - `email?: string`\n Email address to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n - `line2_text?: string`\n Text to be printed on line two of the physical card. Use of this field requires additional permissions.\n - `phone_number?: string`\n Cardholder's phone number in E.164 format to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n\n- `carrier?: { qr_code_url?: string; }`\n If omitted, the previous carrier will be used.\n - `qr_code_url?: string`\n QR code URL to display on the card carrier. The `qr_code_url` field requires your domain to be allowlisted by Lithic before use. Contact Support to configure your QR code domain\n\n- `product_id?: string`\n Specifies the configuration (e.g. physical card art) that the card should be manufactured with, and only applies to cards of type `PHYSICAL`. This must be configured with Lithic before use.\n\n\n- `shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING'`\n Shipping method for the card. Only applies to cards of type PHYSICAL.\nUse of options besides `STANDARD` require additional permissions.\n\n* `STANDARD` - USPS regular mail or similar international option, with no tracking\n* `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking\n* `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking\n* `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with tracking\n* `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking\n* `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar international option, with tracking\n* `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and timeline are inherited from the parent bulk order.\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details with potentially PCI sensitive information for Enterprise customers\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst card = await client.cards.convertPhysical('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { shipping_address: {\n address1: '5 Broad Street',\n city: 'NEW YORK',\n country: 'USA',\n first_name: 'Janet',\n last_name: 'Yellen',\n postal_code: '10001',\n state: 'NY',\n} });\n\nconsole.log(card);\n```", - }, - { - name: 'embed', - endpoint: '/v1/embed/card', - httpMethod: 'get', - summary: 'Embedded card UI', - description: - 'Handling full card PANs and CVV codes requires that you comply with the Payment Card Industry Data Security Standards (PCI DSS). Some clients choose to reduce their compliance obligations by leveraging our embedded card UI solution documented below.\n\nIn this setup, PANs and CVV codes are presented to the end-user via a card UI that we provide, optionally styled in the customer\'s branding using a specified css stylesheet. A user\'s browser makes the request directly to api.lithic.com, so card PANs and CVVs never touch the API customer\'s servers while full card data is displayed to their end-users. The response contains an HTML document (see Embedded Card UI or Changelog for upcoming changes in January). This means that the url for the request can be inserted straight into the `src` attribute of an iframe.\n\n```html\n\n```\n\nYou should compute the request payload on the server side. You can render it (or the whole iframe) on the server or make an ajax call from your front end code, but **do not ever embed your API key into front end code, as doing so introduces a serious security vulnerability**.\n', - stainlessPath: '(resource) cards > (method) embed', - qualified: 'client.cards.embed', - params: ['embed_request: string;', 'hmac: string;'], - response: 'string', - markdown: - "## embed\n\n`client.cards.embed(embed_request: string, hmac: string): string`\n\n**get** `/v1/embed/card`\n\nHandling full card PANs and CVV codes requires that you comply with the Payment Card Industry Data Security Standards (PCI DSS). Some clients choose to reduce their compliance obligations by leveraging our embedded card UI solution documented below.\n\nIn this setup, PANs and CVV codes are presented to the end-user via a card UI that we provide, optionally styled in the customer's branding using a specified css stylesheet. A user's browser makes the request directly to api.lithic.com, so card PANs and CVVs never touch the API customer's servers while full card data is displayed to their end-users. The response contains an HTML document (see Embedded Card UI or Changelog for upcoming changes in January). This means that the url for the request can be inserted straight into the `src` attribute of an iframe.\n\n```html\n\n```\n\nYou should compute the request payload on the server side. You can render it (or the whole iframe) on the server or make an ajax call from your front end code, but **do not ever embed your API key into front end code, as doing so introduces a serious security vulnerability**.\n\n\n### Parameters\n\n- `embed_request: string`\n A base64 encoded JSON string of an EmbedRequest to specify which card to load.\n\n- `hmac: string`\n SHA256 HMAC of the embed_request JSON string with base64 digest.\n\n### Returns\n\n- `string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.cards.embed({ embed_request: 'embed_request', hmac: 'hmac' });\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Cards.Update', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tcard, err := client.Cards.Update(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.CardUpdateParams{\n\t\t\tMemo: lithic.F("Updated Name"),\n\t\t\tSpendLimit: lithic.F(int64(100)),\n\t\t\tSpendLimitDuration: lithic.F(lithic.SpendLimitDurationForever),\n\t\t\tState: lithic.F(lithic.CardUpdateParamsStateOpen),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", card)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "digital_card_art_token": "00000000-0000-0000-1000-000000000000",\n "memo": "Updated Name",\n "network_program_token": "00000000-0000-0000-1000-000000000000"\n }\'', + }, + java: { + method: 'cards().update', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Card;\nimport com.lithic.api.models.CardUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n Card card = client.cards().update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'cards().update', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Card\nimport com.lithic.api.models.CardUpdateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val card: Card = client.cards().update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'cards.update', + example: + '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)\ncard = client.cards.update(\n card_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n memo="Updated Name",\n spend_limit=100,\n spend_limit_duration="FOREVER",\n state="OPEN",\n)\nprint(card)', + }, + ruby: { + method: 'cards.update', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ncard = lithic.cards.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(card)', + }, + typescript: { + method: 'client.cards.update', + example: + "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\nconst card = await client.cards.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n memo: 'Updated Name',\n spend_limit: 100,\n spend_limit_duration: 'FOREVER',\n state: 'OPEN',\n});\n\nconsole.log(card);", + }, + }, }, { name: 'provision', @@ -893,6 +2508,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ provisioning_payload?: string | { activationData?: string; encryptedData?: string; ephemeralPublicKey?: string; }; }', markdown: "## provision\n\n`client.cards.provision(card_token: string, certificate?: string, client_device_id?: string, client_wallet_account_id?: string, digital_wallet?: 'APPLE_PAY' | 'GOOGLE_PAY' | 'SAMSUNG_PAY', nonce?: string, nonce_signature?: string): { provisioning_payload?: string | provision_response; }`\n\n**post** `/v1/cards/{card_token}/provision`\n\nAllow your cardholders to directly add payment cards to the device's digital wallet (e.g. Apple Pay) with one touch from your app.\n\nThis requires some additional setup and configuration. Please [Contact Us](https://lithic.com/contact) or your Customer Success representative for more information.\n\n\n### Parameters\n\n- `card_token: string`\n\n- `certificate?: string`\n Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only `activationData` in the response. Apple's public leaf certificate. Base64 encoded in PEM format with headers `(-----BEGIN CERTIFICATE-----)` and trailers omitted. Provided by the device's wallet.\n\n- `client_device_id?: string`\n Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is on the Visa network. Stable device identification set by the wallet provider.\n\n- `client_wallet_account_id?: string`\n Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the card is on the Visa network. Consumer ID that identifies the wallet account holder entity.\n\n- `digital_wallet?: 'APPLE_PAY' | 'GOOGLE_PAY' | 'SAMSUNG_PAY'`\n Name of digital wallet provider.\n\n- `nonce?: string`\n Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only `activationData` in the response. Base64 cryptographic nonce provided by the device's wallet.\n\n- `nonce_signature?: string`\n Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only `activationData` in the response. Base64 cryptographic nonce provided by the device's wallet.\n\n### Returns\n\n- `{ provisioning_payload?: string | { activationData?: string; encryptedData?: string; ephemeralPublicKey?: string; }; }`\n\n - `provisioning_payload?: string | { activationData?: string; encryptedData?: string; ephemeralPublicKey?: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.cards.provision('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Cards.Provision', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Cards.Provision(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.CardProvisionParams{\n\t\t\tDigitalWallet: lithic.F(lithic.CardProvisionParamsDigitalWalletGooglePay),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.ProvisioningPayload)\n}\n', + }, + http: { + example: + "curl https://api.lithic.com/v1/cards/$CARD_TOKEN/provision \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", + }, + java: { + method: 'cards().provision', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.CardProvisionParams;\nimport com.lithic.api.models.CardProvisionResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardProvisionResponse response = client.cards().provision("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'cards().provision', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.CardProvisionParams\nimport com.lithic.api.models.CardProvisionResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val response: CardProvisionResponse = client.cards().provision("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'cards.provision', + example: + '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)\nresponse = client.cards.provision(\n card_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n digital_wallet="GOOGLE_PAY",\n)\nprint(response.provisioning_payload)', + }, + ruby: { + method: 'cards.provision', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.cards.provision("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(response)', + }, + typescript: { + method: 'client.cards.provision', + example: + "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\nconst response = await client.cards.provision('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n digital_wallet: 'GOOGLE_PAY',\n});\n\nconsole.log(response.provisioning_payload);", + }, + }, }, { name: 'reissue', @@ -914,6 +2565,142 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", markdown: "## reissue\n\n`client.cards.reissue(card_token: string, carrier?: { qr_code_url?: string; }, product_id?: string, shipping_address?: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }, shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING'): object`\n\n**post** `/v1/cards/{card_token}/reissue`\n\nInitiate print and shipment of a duplicate physical card (e.g. card is physically damaged). The PAN, expiry, and CVC2 will remain the same and the original card can continue to be used until the new card is activated.\nOnly applies to cards of type `PHYSICAL`. A card can be reissued or renewed a total of 8 times.\n\n### Parameters\n\n- `card_token: string`\n\n- `carrier?: { qr_code_url?: string; }`\n If omitted, the previous carrier will be used.\n - `qr_code_url?: string`\n QR code URL to display on the card carrier. The `qr_code_url` field requires your domain to be allowlisted by Lithic before use. Contact Support to configure your QR code domain\n\n- `product_id?: string`\n Specifies the configuration (e.g. physical card art) that the card should be manufactured with, and only applies to cards of type `PHYSICAL`. This must be configured with Lithic before use.\n\n\n- `shipping_address?: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }`\n If omitted, the previous shipping address will be used.\n - `address1: string`\n Valid USPS routable address.\n - `city: string`\n City\n - `country: string`\n Uppercase ISO 3166-1 alpha-3 three character abbreviation.\n - `first_name: string`\n Customer's first name. This will be the first name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `last_name: string`\n Customer's surname (family name). This will be the last name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `postal_code: string`\n Postal code (formerly zipcode). For US addresses, either five-digit postal code or nine-digit postal code (ZIP+4) using the format 12345-1234.\n - `state: string`\n Uppercase ISO 3166-2 two character abbreviation for US and CA. Optional with a limit of 24 characters for other countries.\n - `address2?: string`\n Unit number (if applicable).\n - `email?: string`\n Email address to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n - `line2_text?: string`\n Text to be printed on line two of the physical card. Use of this field requires additional permissions.\n - `phone_number?: string`\n Cardholder's phone number in E.164 format to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n\n- `shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING'`\n Shipping method for the card. Only applies to cards of type PHYSICAL.\nUse of options besides `STANDARD` require additional permissions.\n\n* `STANDARD` - USPS regular mail or similar international option, with no tracking\n* `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking\n* `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking\n* `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with tracking\n* `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking\n* `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar international option, with tracking\n* `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and timeline are inherited from the parent bulk order.\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details with potentially PCI sensitive information for Enterprise customers\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst card = await client.cards.reissue('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(card);\n```", + perLanguage: { + go: { + method: 'client.Cards.Reissue', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n\t"github.com/lithic-com/lithic-go/shared"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tcard, err := client.Cards.Reissue(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.CardReissueParams{\n\t\t\tCarrier: lithic.F(shared.CarrierParam{\n\t\t\t\tQrCodeURL: lithic.F("https://lithic.com/activate-card/1"),\n\t\t\t}),\n\t\t\tProductID: lithic.F("100"),\n\t\t\tShippingAddress: lithic.F(shared.ShippingAddressParam{\n\t\t\t\tAddress1: lithic.F("5 Broad Street"),\n\t\t\t\tAddress2: lithic.F("Unit 5A"),\n\t\t\t\tCity: lithic.F("NEW YORK"),\n\t\t\t\tCountry: lithic.F("USA"),\n\t\t\t\tFirstName: lithic.F("Janet"),\n\t\t\t\tLastName: lithic.F("Yellen"),\n\t\t\t\tPostalCode: lithic.F("10001"),\n\t\t\t\tState: lithic.F("NY"),\n\t\t\t}),\n\t\t\tShippingMethod: lithic.F(lithic.CardReissueParamsShippingMethodStandard),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", card)\n}\n', + }, + http: { + example: + "curl https://api.lithic.com/v1/cards/$CARD_TOKEN/reissue \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", + }, + java: { + method: 'cards().reissue', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Card;\nimport com.lithic.api.models.CardReissueParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n Card card = client.cards().reissue("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'cards().reissue', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Card\nimport com.lithic.api.models.CardReissueParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val card: Card = client.cards().reissue("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'cards.reissue', + example: + '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)\ncard = client.cards.reissue(\n card_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n carrier={\n "qr_code_url": "https://lithic.com/activate-card/1"\n },\n product_id="100",\n shipping_address={\n "address1": "5 Broad Street",\n "address2": "Unit 5A",\n "city": "NEW YORK",\n "country": "USA",\n "first_name": "Janet",\n "last_name": "Yellen",\n "postal_code": "10001",\n "state": "NY",\n },\n shipping_method="STANDARD",\n)\nprint(card)', + }, + ruby: { + method: 'cards.reissue', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ncard = lithic.cards.reissue("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(card)', + }, + typescript: { + method: 'client.cards.reissue', + example: + "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\nconst card = await client.cards.reissue('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n carrier: { qr_code_url: 'https://lithic.com/activate-card/1' },\n product_id: '100',\n shipping_address: {\n address1: '5 Broad Street',\n address2: 'Unit 5A',\n city: 'NEW YORK',\n country: 'USA',\n first_name: 'Janet',\n last_name: 'Yellen',\n postal_code: '10001',\n state: 'NY',\n },\n shipping_method: 'STANDARD',\n});\n\nconsole.log(card);", + }, + }, + }, + { + name: 'embed', + endpoint: '/v1/embed/card', + httpMethod: 'get', + summary: 'Embedded card UI', + description: + 'Handling full card PANs and CVV codes requires that you comply with the Payment Card Industry Data Security Standards (PCI DSS). Some clients choose to reduce their compliance obligations by leveraging our embedded card UI solution documented below.\n\nIn this setup, PANs and CVV codes are presented to the end-user via a card UI that we provide, optionally styled in the customer\'s branding using a specified css stylesheet. A user\'s browser makes the request directly to api.lithic.com, so card PANs and CVVs never touch the API customer\'s servers while full card data is displayed to their end-users. The response contains an HTML document (see Embedded Card UI or Changelog for upcoming changes in January). This means that the url for the request can be inserted straight into the `src` attribute of an iframe.\n\n```html\n\n```\n\nYou should compute the request payload on the server side. You can render it (or the whole iframe) on the server or make an ajax call from your front end code, but **do not ever embed your API key into front end code, as doing so introduces a serious security vulnerability**.\n', + stainlessPath: '(resource) cards > (method) embed', + qualified: 'client.cards.embed', + params: ['embed_request: string;', 'hmac: string;'], + response: 'string', + markdown: + "## embed\n\n`client.cards.embed(embed_request: string, hmac: string): string`\n\n**get** `/v1/embed/card`\n\nHandling full card PANs and CVV codes requires that you comply with the Payment Card Industry Data Security Standards (PCI DSS). Some clients choose to reduce their compliance obligations by leveraging our embedded card UI solution documented below.\n\nIn this setup, PANs and CVV codes are presented to the end-user via a card UI that we provide, optionally styled in the customer's branding using a specified css stylesheet. A user's browser makes the request directly to api.lithic.com, so card PANs and CVVs never touch the API customer's servers while full card data is displayed to their end-users. The response contains an HTML document (see Embedded Card UI or Changelog for upcoming changes in January). This means that the url for the request can be inserted straight into the `src` attribute of an iframe.\n\n```html\n\n```\n\nYou should compute the request payload on the server side. You can render it (or the whole iframe) on the server or make an ajax call from your front end code, but **do not ever embed your API key into front end code, as doing so introduces a serious security vulnerability**.\n\n\n### Parameters\n\n- `embed_request: string`\n A base64 encoded JSON string of an EmbedRequest to specify which card to load.\n\n- `hmac: string`\n SHA256 HMAC of the embed_request JSON string with base64 digest.\n\n### Returns\n\n- `string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.cards.embed({ embed_request: 'embed_request', hmac: 'hmac' });\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Cards.Embed', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Cards.Embed(context.TODO(), lithic.CardEmbedParams{\n\t\tEmbedRequest: lithic.F("embed_request"),\n\t\tHmac: lithic.F("hmac"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v1/embed/card \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'cards().embed', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.CardEmbedParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardEmbedParams params = CardEmbedParams.builder()\n .embedRequest("embed_request")\n .hmac("hmac")\n .build();\n String response = client.cards().embed(params);\n }\n}', + }, + kotlin: { + method: 'cards().embed', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.CardEmbedParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: CardEmbedParams = CardEmbedParams.builder()\n .embedRequest("embed_request")\n .hmac("hmac")\n .build()\n val response: String = client.cards().embed(params)\n}', + }, + python: { + method: 'cards.embed', + example: + '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)\nresponse = client.cards.embed(\n embed_request="embed_request",\n hmac="hmac",\n)\nprint(response)', + }, + ruby: { + method: 'cards.embed', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.cards.embed(embed_request: "embed_request", hmac: "hmac")\n\nputs(response)', + }, + typescript: { + method: 'client.cards.embed', + example: + "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\nconst response = await client.cards.embed({ embed_request: 'embed_request', hmac: 'hmac' });\n\nconsole.log(response);", + }, + }, + }, + { + name: 'retrieve_spend_limits', + endpoint: '/v1/cards/{card_token}/spend_limits', + httpMethod: 'get', + summary: "Get card's available spend limit", + description: + "Get a Card's available spend limit, which is based on the spend limit configured on the Card and the amount already spent over the spend limit's duration. For example, if the Card has a monthly spend limit of $1000 configured, and has spent $600 in the last month, the available spend limit returned would be $400.", + stainlessPath: '(resource) cards > (method) retrieve_spend_limits', + qualified: 'client.cards.retrieveSpendLimits', + params: ['card_token: string;'], + response: + '{ available_spend_limit: { annually?: number; forever?: number; monthly?: number; }; spend_limit?: { annually?: number; forever?: number; monthly?: number; }; spend_velocity?: { annually?: number; forever?: number; monthly?: number; }; }', + markdown: + "## retrieve_spend_limits\n\n`client.cards.retrieveSpendLimits(card_token: string): { available_spend_limit: object; spend_limit?: object; spend_velocity?: object; }`\n\n**get** `/v1/cards/{card_token}/spend_limits`\n\nGet a Card's available spend limit, which is based on the spend limit configured on the Card and the amount already spent over the spend limit's duration. For example, if the Card has a monthly spend limit of $1000 configured, and has spent $600 in the last month, the available spend limit returned would be $400.\n\n### Parameters\n\n- `card_token: string`\n\n### Returns\n\n- `{ available_spend_limit: { annually?: number; forever?: number; monthly?: number; }; spend_limit?: { annually?: number; forever?: number; monthly?: number; }; spend_velocity?: { annually?: number; forever?: number; monthly?: number; }; }`\n\n - `available_spend_limit: { annually?: number; forever?: number; monthly?: number; }`\n - `spend_limit?: { annually?: number; forever?: number; monthly?: number; }`\n - `spend_velocity?: { annually?: number; forever?: number; monthly?: number; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst cardSpendLimits = await client.cards.retrieveSpendLimits('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(cardSpendLimits);\n```", + perLanguage: { + go: { + method: 'client.Cards.GetSpendLimits', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tcardSpendLimits, err := client.Cards.GetSpendLimits(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", cardSpendLimits.AvailableSpendLimit)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN/spend_limits \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'cards().retrieveSpendLimits', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.CardRetrieveSpendLimitsParams;\nimport com.lithic.api.models.CardSpendLimits;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardSpendLimits cardSpendLimits = client.cards().retrieveSpendLimits("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'cards().retrieveSpendLimits', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.CardRetrieveSpendLimitsParams\nimport com.lithic.api.models.CardSpendLimits\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val cardSpendLimits: CardSpendLimits = client.cards().retrieveSpendLimits("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'cards.retrieve_spend_limits', + example: + '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)\ncard_spend_limits = client.cards.retrieve_spend_limits(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(card_spend_limits.available_spend_limit)', + }, + ruby: { + method: 'cards.retrieve_spend_limits', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ncard_spend_limits = lithic.cards.retrieve_spend_limits("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(card_spend_limits)', + }, + typescript: { + method: 'client.cards.retrieveSpendLimits', + example: + "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\nconst cardSpendLimits = await client.cards.retrieveSpendLimits(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(cardSpendLimits.available_spend_limit);", + }, + }, }, { name: 'renew', @@ -937,36 +2724,150 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", markdown: "## renew\n\n`client.cards.renew(card_token: string, shipping_address: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }, carrier?: { qr_code_url?: string; }, exp_month?: string, exp_year?: string, product_id?: string, shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING'): object`\n\n**post** `/v1/cards/{card_token}/renew`\n\nApplies to card types `PHYSICAL` and `VIRTUAL`.\nFor `PHYSICAL`, creates a new card with the same card token and PAN, but updated expiry and CVC2 code. The original card will keep working for card-present transactions until the new card is activated. For card-not-present transactions, the original card details (expiry, CVC2) will also keep working until the new card is activated.\nA `PHYSICAL` card can be reissued or renewed a total of 8 times.\nFor `VIRTUAL`, the card will retain the same card token and PAN and receive an updated expiry and CVC2 code.\n`product_id`, `shipping_method`, `shipping_address`, `carrier` are only relevant for renewing `PHYSICAL` cards.\n\n### Parameters\n\n- `card_token: string`\n\n- `shipping_address: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }`\n The shipping address this card will be sent to.\n - `address1: string`\n Valid USPS routable address.\n - `city: string`\n City\n - `country: string`\n Uppercase ISO 3166-1 alpha-3 three character abbreviation.\n - `first_name: string`\n Customer's first name. This will be the first name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `last_name: string`\n Customer's surname (family name). This will be the last name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `postal_code: string`\n Postal code (formerly zipcode). For US addresses, either five-digit postal code or nine-digit postal code (ZIP+4) using the format 12345-1234.\n - `state: string`\n Uppercase ISO 3166-2 two character abbreviation for US and CA. Optional with a limit of 24 characters for other countries.\n - `address2?: string`\n Unit number (if applicable).\n - `email?: string`\n Email address to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n - `line2_text?: string`\n Text to be printed on line two of the physical card. Use of this field requires additional permissions.\n - `phone_number?: string`\n Cardholder's phone number in E.164 format to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n\n- `carrier?: { qr_code_url?: string; }`\n If omitted, the previous carrier will be used.\n - `qr_code_url?: string`\n QR code URL to display on the card carrier. The `qr_code_url` field requires your domain to be allowlisted by Lithic before use. Contact Support to configure your QR code domain\n\n- `exp_month?: string`\n Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, an expiration date six years in the future will be generated.\n\n- `exp_year?: string`\n Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an expiration date six years in the future will be generated.\n\n- `product_id?: string`\n Specifies the configuration (e.g. physical card art) that the card should be manufactured with, and only applies to cards of type `PHYSICAL`. This must be configured with Lithic before use.\n\n\n- `shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING'`\n Shipping method for the card. Only applies to cards of type PHYSICAL.\nUse of options besides `STANDARD` require additional permissions.\n\n* `STANDARD` - USPS regular mail or similar international option, with no tracking\n* `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking\n* `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking\n* `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with tracking\n* `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking\n* `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar international option, with tracking\n* `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and timeline are inherited from the parent bulk order.\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details with potentially PCI sensitive information for Enterprise customers\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst card = await client.cards.renew('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { shipping_address: {\n address1: '5 Broad Street',\n city: 'NEW YORK',\n country: 'USA',\n first_name: 'Janet',\n last_name: 'Yellen',\n postal_code: '10001',\n state: 'NY',\n} });\n\nconsole.log(card);\n```", + perLanguage: { + go: { + method: 'client.Cards.Renew', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n\t"github.com/lithic-com/lithic-go/shared"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tcard, err := client.Cards.Renew(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.CardRenewParams{\n\t\t\tShippingAddress: lithic.F(shared.ShippingAddressParam{\n\t\t\t\tAddress1: lithic.F("5 Broad Street"),\n\t\t\t\tAddress2: lithic.F("Unit 5A"),\n\t\t\t\tCity: lithic.F("NEW YORK"),\n\t\t\t\tCountry: lithic.F("USA"),\n\t\t\t\tFirstName: lithic.F("Janet"),\n\t\t\t\tLastName: lithic.F("Yellen"),\n\t\t\t\tPostalCode: lithic.F("10001"),\n\t\t\t\tState: lithic.F("NY"),\n\t\t\t}),\n\t\t\tCarrier: lithic.F(shared.CarrierParam{\n\t\t\t\tQrCodeURL: lithic.F("https://lithic.com/activate-card/1"),\n\t\t\t}),\n\t\t\tProductID: lithic.F("100"),\n\t\t\tShippingMethod: lithic.F(lithic.CardRenewParamsShippingMethodStandard),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", card)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN/renew \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "shipping_address": {\n "address1": "5 Broad Street",\n "city": "NEW YORK",\n "country": "USA",\n "first_name": "Janet",\n "last_name": "Yellen",\n "postal_code": "10001",\n "state": "NY",\n "address2": "Unit 5A"\n },\n "exp_month": "06",\n "exp_year": "2027"\n }\'', + }, + java: { + method: 'cards().renew', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Card;\nimport com.lithic.api.models.CardRenewParams;\nimport com.lithic.api.models.ShippingAddress;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardRenewParams params = CardRenewParams.builder()\n .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .shippingAddress(ShippingAddress.builder()\n .address1("5 Broad Street")\n .city("NEW YORK")\n .country("USA")\n .firstName("Janet")\n .lastName("Yellen")\n .postalCode("10001")\n .state("NY")\n .build())\n .build();\n Card card = client.cards().renew(params);\n }\n}', + }, + kotlin: { + method: 'cards().renew', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Card\nimport com.lithic.api.models.CardRenewParams\nimport com.lithic.api.models.ShippingAddress\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: CardRenewParams = CardRenewParams.builder()\n .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .shippingAddress(ShippingAddress.builder()\n .address1("5 Broad Street")\n .city("NEW YORK")\n .country("USA")\n .firstName("Janet")\n .lastName("Yellen")\n .postalCode("10001")\n .state("NY")\n .build())\n .build()\n val card: Card = client.cards().renew(params)\n}', + }, + python: { + method: 'cards.renew', + example: + '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)\ncard = client.cards.renew(\n card_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n shipping_address={\n "address1": "5 Broad Street",\n "address2": "Unit 5A",\n "city": "NEW YORK",\n "country": "USA",\n "first_name": "Janet",\n "last_name": "Yellen",\n "postal_code": "10001",\n "state": "NY",\n },\n carrier={\n "qr_code_url": "https://lithic.com/activate-card/1"\n },\n product_id="100",\n shipping_method="STANDARD",\n)\nprint(card)', + }, + ruby: { + method: 'cards.renew', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ncard = lithic.cards.renew(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n shipping_address: {\n address1: "5 Broad Street",\n city: "NEW YORK",\n country: "USA",\n first_name: "Janet",\n last_name: "Yellen",\n postal_code: "10001",\n state: "NY"\n }\n)\n\nputs(card)', + }, + typescript: { + method: 'client.cards.renew', + example: + "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\nconst card = await client.cards.renew('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n shipping_address: {\n address1: '5 Broad Street',\n address2: 'Unit 5A',\n city: 'NEW YORK',\n country: 'USA',\n first_name: 'Janet',\n last_name: 'Yellen',\n postal_code: '10001',\n state: 'NY',\n },\n carrier: { qr_code_url: 'https://lithic.com/activate-card/1' },\n product_id: '100',\n shipping_method: 'STANDARD',\n});\n\nconsole.log(card);", + }, + }, }, { - name: 'retrieve_spend_limits', - endpoint: '/v1/cards/{card_token}/spend_limits', - httpMethod: 'get', - summary: "Get card's available spend limit", + name: 'search_by_pan', + endpoint: '/v1/cards/search_by_pan', + httpMethod: 'post', + summary: 'Search for card by PAN', description: - "Get a Card's available spend limit, which is based on the spend limit configured on the Card and the amount already spent over the spend limit's duration. For example, if the Card has a monthly spend limit of $1000 configured, and has spent $600 in the last month, the available spend limit returned would be $400.", - stainlessPath: '(resource) cards > (method) retrieve_spend_limits', - qualified: 'client.cards.retrieveSpendLimits', - params: ['card_token: string;'], + 'Get card configuration such as spend limit and state. Customers must be PCI compliant to use this endpoint. Please contact [support@lithic.com](mailto:support@lithic.com) for questions.\n*Note: this is a `POST` endpoint because it is more secure to send sensitive data in a request body than in a URL.*', + stainlessPath: '(resource) cards > (method) search_by_pan', + qualified: 'client.cards.searchByPan', + params: ['pan: string;'], response: - '{ available_spend_limit: { annually?: number; forever?: number; monthly?: number; }; spend_limit?: { annually?: number; forever?: number; monthly?: number; }; spend_velocity?: { annually?: number; forever?: number; monthly?: number; }; }', + "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", markdown: - "## retrieve_spend_limits\n\n`client.cards.retrieveSpendLimits(card_token: string): { available_spend_limit: object; spend_limit?: object; spend_velocity?: object; }`\n\n**get** `/v1/cards/{card_token}/spend_limits`\n\nGet a Card's available spend limit, which is based on the spend limit configured on the Card and the amount already spent over the spend limit's duration. For example, if the Card has a monthly spend limit of $1000 configured, and has spent $600 in the last month, the available spend limit returned would be $400.\n\n### Parameters\n\n- `card_token: string`\n\n### Returns\n\n- `{ available_spend_limit: { annually?: number; forever?: number; monthly?: number; }; spend_limit?: { annually?: number; forever?: number; monthly?: number; }; spend_velocity?: { annually?: number; forever?: number; monthly?: number; }; }`\n\n - `available_spend_limit: { annually?: number; forever?: number; monthly?: number; }`\n - `spend_limit?: { annually?: number; forever?: number; monthly?: number; }`\n - `spend_velocity?: { annually?: number; forever?: number; monthly?: number; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst cardSpendLimits = await client.cards.retrieveSpendLimits('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(cardSpendLimits);\n```", + "## search_by_pan\n\n`client.cards.searchByPan(pan: string): object`\n\n**post** `/v1/cards/search_by_pan`\n\nGet card configuration such as spend limit and state. Customers must be PCI compliant to use this endpoint. Please contact [support@lithic.com](mailto:support@lithic.com) for questions.\n*Note: this is a `POST` endpoint because it is more secure to send sensitive data in a request body than in a URL.*\n\n### Parameters\n\n- `pan: string`\n The PAN for the card being retrieved.\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details with potentially PCI sensitive information for Enterprise customers\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst card = await client.cards.searchByPan({ pan: '4111111289144142' });\n\nconsole.log(card);\n```", + perLanguage: { + go: { + method: 'client.Cards.SearchByPan', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tcard, err := client.Cards.SearchByPan(context.TODO(), lithic.CardSearchByPanParams{\n\t\tPan: lithic.F("4111111289144142"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", card)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/cards/search_by_pan \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "pan": "4111111289144142"\n }\'', + }, + java: { + method: 'cards().searchByPan', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Card;\nimport com.lithic.api.models.CardSearchByPanParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardSearchByPanParams params = CardSearchByPanParams.builder()\n .pan("4111111289144142")\n .build();\n Card card = client.cards().searchByPan(params);\n }\n}', + }, + kotlin: { + method: 'cards().searchByPan', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Card\nimport com.lithic.api.models.CardSearchByPanParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: CardSearchByPanParams = CardSearchByPanParams.builder()\n .pan("4111111289144142")\n .build()\n val card: Card = client.cards().searchByPan(params)\n}', + }, + python: { + method: 'cards.search_by_pan', + example: + '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)\ncard = client.cards.search_by_pan(\n pan="4111111289144142",\n)\nprint(card)', + }, + ruby: { + method: 'cards.search_by_pan', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ncard = lithic.cards.search_by_pan(pan: "4111111289144142")\n\nputs(card)', + }, + typescript: { + method: 'client.cards.searchByPan', + example: + "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\nconst card = await client.cards.searchByPan({ pan: '4111111289144142' });\n\nconsole.log(card);", + }, + }, }, { - name: 'search_by_pan', - endpoint: '/v1/cards/search_by_pan', + name: 'convert_physical', + endpoint: '/v1/cards/{card_token}/convert_physical', httpMethod: 'post', - summary: 'Search for card by PAN', + summary: 'Convert virtual to physical card', description: - 'Get card configuration such as spend limit and state. Customers must be PCI compliant to use this endpoint. Please contact [support@lithic.com](mailto:support@lithic.com) for questions.\n*Note: this is a `POST` endpoint because it is more secure to send sensitive data in a request body than in a URL.*', - stainlessPath: '(resource) cards > (method) search_by_pan', - qualified: 'client.cards.searchByPan', - params: ['pan: string;'], + "Convert a virtual card into a physical card and manufacture it.\nCustomer must supply relevant fields for physical card creation including `product_id`, `carrier`, `shipping_method`, and `shipping_address`.\nThe card token will be unchanged. The card's type will be altered to `PHYSICAL`.\nThe card will be set to state `PENDING_FULFILLMENT` and fulfilled at next fulfillment cycle.\nVirtual cards created on card programs which do not support physical cards cannot be converted. The card program cannot be changed as part of the conversion. Cards must be in an `OPEN` state to be converted.\nOnly applies to cards of type `VIRTUAL` (or existing cards with deprecated types of `DIGITAL_WALLET` and `UNLOCKED`).", + stainlessPath: '(resource) cards > (method) convert_physical', + qualified: 'client.cards.convertPhysical', + params: [ + 'card_token: string;', + 'shipping_address: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; };', + 'carrier?: { qr_code_url?: string; };', + 'product_id?: string;', + "shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING';", + ], response: "{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }", markdown: - "## search_by_pan\n\n`client.cards.searchByPan(pan: string): object`\n\n**post** `/v1/cards/search_by_pan`\n\nGet card configuration such as spend limit and state. Customers must be PCI compliant to use this endpoint. Please contact [support@lithic.com](mailto:support@lithic.com) for questions.\n*Note: this is a `POST` endpoint because it is more secure to send sensitive data in a request body than in a URL.*\n\n### Parameters\n\n- `pan: string`\n The PAN for the card being retrieved.\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details with potentially PCI sensitive information for Enterprise customers\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst card = await client.cards.searchByPan({ pan: '4111111289144142' });\n\nconsole.log(card);\n```", + "## convert_physical\n\n`client.cards.convertPhysical(card_token: string, shipping_address: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }, carrier?: { qr_code_url?: string; }, product_id?: string, shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING'): object`\n\n**post** `/v1/cards/{card_token}/convert_physical`\n\nConvert a virtual card into a physical card and manufacture it.\nCustomer must supply relevant fields for physical card creation including `product_id`, `carrier`, `shipping_method`, and `shipping_address`.\nThe card token will be unchanged. The card's type will be altered to `PHYSICAL`.\nThe card will be set to state `PENDING_FULFILLMENT` and fulfilled at next fulfillment cycle.\nVirtual cards created on card programs which do not support physical cards cannot be converted. The card program cannot be changed as part of the conversion. Cards must be in an `OPEN` state to be converted.\nOnly applies to cards of type `VIRTUAL` (or existing cards with deprecated types of `DIGITAL_WALLET` and `UNLOCKED`).\n\n### Parameters\n\n- `card_token: string`\n\n- `shipping_address: { address1: string; city: string; country: string; first_name: string; last_name: string; postal_code: string; state: string; address2?: string; email?: string; line2_text?: string; phone_number?: string; }`\n The shipping address this card will be sent to.\n - `address1: string`\n Valid USPS routable address.\n - `city: string`\n City\n - `country: string`\n Uppercase ISO 3166-1 alpha-3 three character abbreviation.\n - `first_name: string`\n Customer's first name. This will be the first name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `last_name: string`\n Customer's surname (family name). This will be the last name printed on the physical card. The combined length of `first_name` and `last_name` may not exceed 25 characters.\n - `postal_code: string`\n Postal code (formerly zipcode). For US addresses, either five-digit postal code or nine-digit postal code (ZIP+4) using the format 12345-1234.\n - `state: string`\n Uppercase ISO 3166-2 two character abbreviation for US and CA. Optional with a limit of 24 characters for other countries.\n - `address2?: string`\n Unit number (if applicable).\n - `email?: string`\n Email address to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n - `line2_text?: string`\n Text to be printed on line two of the physical card. Use of this field requires additional permissions.\n - `phone_number?: string`\n Cardholder's phone number in E.164 format to be contacted for expedited shipping process purposes. Required if `shipping_method` is `EXPEDITED`.\n\n- `carrier?: { qr_code_url?: string; }`\n If omitted, the previous carrier will be used.\n - `qr_code_url?: string`\n QR code URL to display on the card carrier. The `qr_code_url` field requires your domain to be allowlisted by Lithic before use. Contact Support to configure your QR code domain\n\n- `product_id?: string`\n Specifies the configuration (e.g. physical card art) that the card should be manufactured with, and only applies to cards of type `PHYSICAL`. This must be configured with Lithic before use.\n\n\n- `shipping_method?: '2_DAY' | 'BULK' | 'EXPEDITED' | 'EXPRESS' | 'PRIORITY' | 'STANDARD' | 'STANDARD_WITH_TRACKING'`\n Shipping method for the card. Only applies to cards of type PHYSICAL.\nUse of options besides `STANDARD` require additional permissions.\n\n* `STANDARD` - USPS regular mail or similar international option, with no tracking\n* `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking\n* `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking\n* `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day shipping, with tracking\n* `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking\n* `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar international option, with tracking\n* `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and timeline are inherited from the parent bulk order.\n\n### Returns\n\n- `{ token: string; account_token: string; card_program_token: string; created: string; funding: { token: string; created: string; last_four: string; state: 'DELETED' | 'ENABLED' | 'PENDING'; type: 'DEPOSITORY_CHECKING' | 'DEPOSITORY_SAVINGS'; account_name?: string; nickname?: string; }; last_four: string; pin_status: 'OK' | 'BLOCKED' | 'NOT_SET'; spend_limit: number; spend_limit_duration: 'ANNUALLY' | 'FOREVER' | 'MONTHLY' | 'TRANSACTION'; state: 'CLOSED' | 'OPEN' | 'PAUSED' | 'PENDING_ACTIVATION' | 'PENDING_FULFILLMENT'; type: 'MERCHANT_LOCKED' | 'PHYSICAL' | 'SINGLE_USE' | 'VIRTUAL' | 'UNLOCKED' | 'DIGITAL_WALLET'; auth_rule_tokens?: string[]; bulk_order_token?: string; cardholder_currency?: string; comment?: string; digital_card_art_token?: string; exp_month?: string; exp_year?: string; hostname?: string; memo?: string; network_program_token?: string; pending_commands?: string[]; product_id?: string; replacement_for?: string; substatus?: string; }`\n Card details with potentially PCI sensitive information for Enterprise customers\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst card = await client.cards.convertPhysical('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { shipping_address: {\n address1: '5 Broad Street',\n city: 'NEW YORK',\n country: 'USA',\n first_name: 'Janet',\n last_name: 'Yellen',\n postal_code: '10001',\n state: 'NY',\n} });\n\nconsole.log(card);\n```", + perLanguage: { + go: { + method: 'client.Cards.ConvertPhysical', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n\t"github.com/lithic-com/lithic-go/shared"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tcard, err := client.Cards.ConvertPhysical(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.CardConvertPhysicalParams{\n\t\t\tShippingAddress: lithic.F(shared.ShippingAddressParam{\n\t\t\t\tAddress1: lithic.F("5 Broad Street"),\n\t\t\t\tAddress2: lithic.F("Unit 5A"),\n\t\t\t\tCity: lithic.F("NEW YORK"),\n\t\t\t\tCountry: lithic.F("USA"),\n\t\t\t\tFirstName: lithic.F("Janet"),\n\t\t\t\tLastName: lithic.F("Yellen"),\n\t\t\t\tPostalCode: lithic.F("10001"),\n\t\t\t\tState: lithic.F("NY"),\n\t\t\t}),\n\t\t\tCarrier: lithic.F(shared.CarrierParam{\n\t\t\t\tQrCodeURL: lithic.F("https://lithic.com/activate-card/1"),\n\t\t\t}),\n\t\t\tProductID: lithic.F("100"),\n\t\t\tShippingMethod: lithic.F(lithic.CardConvertPhysicalParamsShippingMethodStandard),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", card)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN/convert_physical \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "shipping_address": {\n "address1": "5 Broad Street",\n "city": "NEW YORK",\n "country": "USA",\n "first_name": "Janet",\n "last_name": "Yellen",\n "postal_code": "10001",\n "state": "NY",\n "address2": "Unit 5A"\n }\n }\'', + }, + java: { + method: 'cards().convertPhysical', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Card;\nimport com.lithic.api.models.CardConvertPhysicalParams;\nimport com.lithic.api.models.ShippingAddress;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardConvertPhysicalParams params = CardConvertPhysicalParams.builder()\n .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .shippingAddress(ShippingAddress.builder()\n .address1("5 Broad Street")\n .city("NEW YORK")\n .country("USA")\n .firstName("Janet")\n .lastName("Yellen")\n .postalCode("10001")\n .state("NY")\n .build())\n .build();\n Card card = client.cards().convertPhysical(params);\n }\n}', + }, + kotlin: { + method: 'cards().convertPhysical', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Card\nimport com.lithic.api.models.CardConvertPhysicalParams\nimport com.lithic.api.models.ShippingAddress\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: CardConvertPhysicalParams = CardConvertPhysicalParams.builder()\n .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .shippingAddress(ShippingAddress.builder()\n .address1("5 Broad Street")\n .city("NEW YORK")\n .country("USA")\n .firstName("Janet")\n .lastName("Yellen")\n .postalCode("10001")\n .state("NY")\n .build())\n .build()\n val card: Card = client.cards().convertPhysical(params)\n}', + }, + python: { + method: 'cards.convert_physical', + example: + '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)\ncard = client.cards.convert_physical(\n card_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n shipping_address={\n "address1": "5 Broad Street",\n "address2": "Unit 5A",\n "city": "NEW YORK",\n "country": "USA",\n "first_name": "Janet",\n "last_name": "Yellen",\n "postal_code": "10001",\n "state": "NY",\n },\n carrier={\n "qr_code_url": "https://lithic.com/activate-card/1"\n },\n product_id="100",\n shipping_method="STANDARD",\n)\nprint(card)', + }, + ruby: { + method: 'cards.convert_physical', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ncard = lithic.cards.convert_physical(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n shipping_address: {\n address1: "5 Broad Street",\n city: "NEW YORK",\n country: "USA",\n first_name: "Janet",\n last_name: "Yellen",\n postal_code: "10001",\n state: "NY"\n }\n)\n\nputs(card)', + }, + typescript: { + method: 'client.cards.convertPhysical', + example: + "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\nconst card = await client.cards.convertPhysical('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n shipping_address: {\n address1: '5 Broad Street',\n address2: 'Unit 5A',\n city: 'NEW YORK',\n country: 'USA',\n first_name: 'Janet',\n last_name: 'Yellen',\n postal_code: '10001',\n state: 'NY',\n },\n carrier: { qr_code_url: 'https://lithic.com/activate-card/1' },\n product_id: '100',\n shipping_method: 'STANDARD',\n});\n\nconsole.log(card);", + }, + }, }, { name: 'web_provision', @@ -988,6 +2889,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ jws: { header?: { kid?: string; }; payload?: string; protected?: string; signature?: string; }; state: string; } | { google_opc?: string; tsp_opc?: string; }', markdown: "## web_provision\n\n`client.cards.webProvision(card_token: string, client_device_id?: string, client_wallet_account_id?: string, digital_wallet?: 'APPLE_PAY' | 'GOOGLE_PAY', server_session_id?: string): { jws: object; state: string; } | { google_opc?: string; tsp_opc?: string; }`\n\n**post** `/v1/cards/{card_token}/web_provision`\n\nAllow your cardholders to directly add payment cards to the device's digital wallet from a browser on the web.\n\nThis requires some additional setup and configuration. Please [Contact Us](https://lithic.com/contact) or your Customer Success representative for more information.\n\n\n### Parameters\n\n- `card_token: string`\n\n- `client_device_id?: string`\n Only applicable if `digital_wallet` is GOOGLE_PAY. Google Pay Web Push Provisioning device identifier required for the tokenization flow\n\n- `client_wallet_account_id?: string`\n Only applicable if `digital_wallet` is GOOGLE_PAY. Google Pay Web Push Provisioning wallet account identifier required for the tokenization flow\n\n- `digital_wallet?: 'APPLE_PAY' | 'GOOGLE_PAY'`\n Name of digital wallet provider.\n\n- `server_session_id?: string`\n Only applicable if `digital_wallet` is GOOGLE_PAY. Google Pay Web Push Provisioning session identifier required for the FPAN flow.\n\n### Returns\n\n- `{ jws: { header?: { kid?: string; }; payload?: string; protected?: string; signature?: string; }; state: string; } | { google_opc?: string; tsp_opc?: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.cards.webProvision('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Cards.WebProvision', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Cards.WebProvision(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.CardWebProvisionParams{\n\t\t\tDigitalWallet: lithic.F(lithic.CardWebProvisionParamsDigitalWalletApplePay),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n', + }, + http: { + example: + "curl https://api.lithic.com/v1/cards/$CARD_TOKEN/web_provision \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", + }, + java: { + method: 'cards().webProvision', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.CardWebProvisionParams;\nimport com.lithic.api.models.CardWebProvisionResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardWebProvisionResponse response = client.cards().webProvision("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'cards().webProvision', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.CardWebProvisionParams\nimport com.lithic.api.models.CardWebProvisionResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val response: CardWebProvisionResponse = client.cards().webProvision("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'cards.web_provision', + example: + '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)\nresponse = client.cards.web_provision(\n card_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n digital_wallet="APPLE_PAY",\n)\nprint(response)', + }, + ruby: { + method: 'cards.web_provision', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.cards.web_provision("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(response)', + }, + typescript: { + method: 'client.cards.webProvision', + example: + "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\nconst response = await client.cards.webProvision('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n digital_wallet: 'APPLE_PAY',\n});\n\nconsole.log(response);", + }, + }, }, { name: 'list', @@ -1002,6 +2939,101 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; available_amount: number; created: string; currency: string; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; updated: string; }", markdown: "## list\n\n`client.cards.balances.list(card_token: string, balance_date?: string, last_transaction_event_token?: string): { token: string; available_amount: number; created: string; currency: string; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; updated: string; }`\n\n**get** `/v1/cards/{card_token}/balances`\n\nGet the balances for a given card.\n\n### Parameters\n\n- `card_token: string`\n\n- `balance_date?: string`\n UTC date of the balance to retrieve. Defaults to latest available balance\n\n- `last_transaction_event_token?: string`\n Balance after a given financial event occured.\nFor example, passing the event_token of a $5 CARD_CLEARING financial event will return a balance decreased by $5\n\n\n### Returns\n\n- `{ token: string; available_amount: number; created: string; currency: string; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; updated: string; }`\n Balance of a Financial Account\n\n - `token: string`\n - `available_amount: number`\n - `created: string`\n - `currency: string`\n - `last_transaction_event_token: string`\n - `last_transaction_token: string`\n - `pending_amount: number`\n - `total_amount: number`\n - `type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'`\n - `updated: 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 financialAccountBalance of client.cards.balances.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(financialAccountBalance);\n}\n```", + perLanguage: { + go: { + method: 'client.Cards.Balances.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Cards.Balances.List(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.CardBalanceListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN/balances \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'cards().balances().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.CardBalanceListPage;\nimport com.lithic.api.models.CardBalanceListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardBalanceListPage page = client.cards().balances().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'cards().balances().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.CardBalanceListPage\nimport com.lithic.api.models.CardBalanceListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: CardBalanceListPage = client.cards().balances().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'cards.balances.list', + example: + '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.cards.balances.list(\n card_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'cards.balances.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.cards.balances.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(page)', + }, + typescript: { + method: 'client.cards.balances.list', + example: + "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 financialAccountBalance of client.cards.balances.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n)) {\n console.log(financialAccountBalance.token);\n}", + }, + }, + }, + { + name: 'list', + endpoint: '/v1/cards/{card_token}/financial_transactions', + httpMethod: 'get', + summary: 'List card financial transactions', + description: 'List the financial transactions for a given card.', + stainlessPath: '(resource) cards.financial_transactions > (method) list', + qualified: 'client.cards.financialTransactions.list', + params: [ + 'card_token: string;', + 'begin?: string;', + "category?: 'CARD' | 'TRANSFER';", + 'end?: string;', + 'ending_before?: string;', + "result?: 'APPROVED' | 'DECLINED';", + 'starting_after?: string;', + "status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED';", + ], + response: + "{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }", + markdown: + "## list\n\n`client.cards.financialTransactions.list(card_token: string, begin?: string, category?: 'CARD' | 'TRANSFER', end?: string, ending_before?: string, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'): { token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: financial_event[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n**get** `/v1/cards/{card_token}/financial_transactions`\n\nList the financial transactions for a given card.\n\n### Parameters\n\n- `card_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `category?: 'CARD' | 'TRANSFER'`\n Financial Transaction category to be returned.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `result?: 'APPROVED' | 'DECLINED'`\n Financial Transaction result to be returned.\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- `status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'`\n Financial Transaction status to be returned.\n\n### Returns\n\n- `{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n - `token: string`\n - `category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'`\n - `created: string`\n - `currency: string`\n - `descriptor: string`\n - `events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'`\n - `updated: 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 financialTransaction of client.cards.financialTransactions.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(financialTransaction);\n}\n```", + perLanguage: { + go: { + method: 'client.Cards.FinancialTransactions.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Cards.FinancialTransactions.List(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.CardFinancialTransactionListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN/financial_transactions \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'cards().financialTransactions().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.CardFinancialTransactionListPage;\nimport com.lithic.api.models.CardFinancialTransactionListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardFinancialTransactionListPage page = client.cards().financialTransactions().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'cards().financialTransactions().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.CardFinancialTransactionListPage\nimport com.lithic.api.models.CardFinancialTransactionListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: CardFinancialTransactionListPage = client.cards().financialTransactions().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'cards.financial_transactions.list', + example: + '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.cards.financial_transactions.list(\n card_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'cards.financial_transactions.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.cards.financial_transactions.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(page)', + }, + typescript: { + method: 'client.cards.financialTransactions.list', + example: + "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 financialTransaction of client.cards.financialTransactions.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n)) {\n console.log(financialTransaction.token);\n}", + }, + }, }, { name: 'retrieve', @@ -1016,29 +3048,98 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }", markdown: "## retrieve\n\n`client.cards.financialTransactions.retrieve(card_token: string, financial_transaction_token: string): { token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: financial_event[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n**get** `/v1/cards/{card_token}/financial_transactions/{financial_transaction_token}`\n\nGet the card financial transaction for the provided token.\n\n### Parameters\n\n- `card_token: string`\n\n- `financial_transaction_token: string`\n\n### Returns\n\n- `{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n - `token: string`\n - `category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'`\n - `created: string`\n - `currency: string`\n - `descriptor: string`\n - `events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialTransaction = await client.cards.financialTransactions.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { card_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(financialTransaction);\n```", + perLanguage: { + go: { + method: 'client.Cards.FinancialTransactions.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tfinancialTransaction, err := client.Cards.FinancialTransactions.Get(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", financialTransaction.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN/financial_transactions/$FINANCIAL_TRANSACTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'cards().financialTransactions().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.CardFinancialTransactionRetrieveParams;\nimport com.lithic.api.models.FinancialTransaction;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardFinancialTransactionRetrieveParams params = CardFinancialTransactionRetrieveParams.builder()\n .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .financialTransactionToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n FinancialTransaction financialTransaction = client.cards().financialTransactions().retrieve(params);\n }\n}', + }, + kotlin: { + method: 'cards().financialTransactions().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.CardFinancialTransactionRetrieveParams\nimport com.lithic.api.models.FinancialTransaction\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: CardFinancialTransactionRetrieveParams = CardFinancialTransactionRetrieveParams.builder()\n .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .financialTransactionToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build()\n val financialTransaction: FinancialTransaction = client.cards().financialTransactions().retrieve(params)\n}', + }, + python: { + method: 'cards.financial_transactions.retrieve', + example: + '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)\nfinancial_transaction = client.cards.financial_transactions.retrieve(\n financial_transaction_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n card_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(financial_transaction.token)', + }, + ruby: { + method: 'cards.financial_transactions.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nfinancial_transaction = lithic.cards.financial_transactions.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n card_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n)\n\nputs(financial_transaction)', + }, + typescript: { + method: 'client.cards.financialTransactions.retrieve', + example: + "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\nconst financialTransaction = await client.cards.financialTransactions.retrieve(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { card_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n);\n\nconsole.log(financialTransaction.token);", + }, + }, }, { name: 'list', - endpoint: '/v1/cards/{card_token}/financial_transactions', + endpoint: '/v1/card_bulk_orders', httpMethod: 'get', - summary: 'List card financial transactions', - description: 'List the financial transactions for a given card.', - stainlessPath: '(resource) cards.financial_transactions > (method) list', - qualified: 'client.cards.financialTransactions.list', + summary: 'List bulk orders', + description: 'List bulk orders for physical card shipments', + stainlessPath: '(resource) card_bulk_orders > (method) list', + qualified: 'client.cardBulkOrders.list', params: [ - 'card_token: string;', 'begin?: string;', - "category?: 'CARD' | 'TRANSFER';", 'end?: string;', 'ending_before?: string;', - "result?: 'APPROVED' | 'DECLINED';", + 'page_size?: number;', 'starting_after?: string;', - "status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED';", ], response: - "{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }", + "{ token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }", markdown: - "## list\n\n`client.cards.financialTransactions.list(card_token: string, begin?: string, category?: 'CARD' | 'TRANSFER', end?: string, ending_before?: string, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'): { token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: financial_event[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n**get** `/v1/cards/{card_token}/financial_transactions`\n\nList the financial transactions for a given card.\n\n### Parameters\n\n- `card_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `category?: 'CARD' | 'TRANSFER'`\n Financial Transaction category to be returned.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `result?: 'APPROVED' | 'DECLINED'`\n Financial Transaction result to be returned.\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- `status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'`\n Financial Transaction status to be returned.\n\n### Returns\n\n- `{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n - `token: string`\n - `category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'`\n - `created: string`\n - `currency: string`\n - `descriptor: string`\n - `events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'`\n - `updated: 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 financialTransaction of client.cards.financialTransactions.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(financialTransaction);\n}\n```", + "## list\n\n`client.cardBulkOrders.list(begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n\n**get** `/v1/card_bulk_orders`\n\nList bulk orders for physical card shipments\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n Represents a bulk order for physical card shipments\n\n - `token: string`\n - `card_tokens: string[]`\n - `created: string`\n - `customer_product_id: string`\n - `shipping_address: object`\n - `shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'`\n - `status: 'OPEN' | 'LOCKED'`\n - `updated: 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 cardBulkOrder of client.cardBulkOrders.list()) {\n console.log(cardBulkOrder);\n}\n```", + perLanguage: { + go: { + method: 'client.CardBulkOrders.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.CardBulkOrders.List(context.TODO(), lithic.CardBulkOrderListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/card_bulk_orders \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'cardBulkOrders().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.CardBulkOrderListPage;\nimport com.lithic.api.models.CardBulkOrderListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardBulkOrderListPage page = client.cardBulkOrders().list();\n }\n}', + }, + kotlin: { + method: 'cardBulkOrders().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.CardBulkOrderListPage\nimport com.lithic.api.models.CardBulkOrderListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: CardBulkOrderListPage = client.cardBulkOrders().list()\n}', + }, + python: { + method: 'card_bulk_orders.list', + example: + '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.card_bulk_orders.list()\npage = page.data[0]\nprint(page.customer_product_id)', + }, + ruby: { + method: 'card_bulk_orders.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.card_bulk_orders.list\n\nputs(page)', + }, + typescript: { + method: 'client.cardBulkOrders.list', + example: + "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 cardBulkOrder of client.cardBulkOrders.list()) {\n console.log(cardBulkOrder.customer_product_id);\n}", + }, + }, }, { name: 'create', @@ -1058,6 +3159,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }", markdown: "## create\n\n`client.cardBulkOrders.create(customer_product_id: string, shipping_address: object, shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'): { token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n\n**post** `/v1/card_bulk_orders`\n\nCreate a new bulk order for physical card shipments. Cards can be added to the order via the POST /v1/cards endpoint by specifying the bulk_order_token. Lock the order via PATCH /v1/card_bulk_orders/{bulk_order_token} to prepare for shipment. Please work with your Customer Success Manager and card personalization bureau to ensure bulk shipping is supported for your program.\n\n### Parameters\n\n- `customer_product_id: string`\n Customer-specified product configuration for physical card manufacturing. This must be configured with Lithic before use\n\n- `shipping_address: object`\n Shipping address for all cards in this bulk order\n\n- `shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'`\n Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and BULK_EXPRESS are only available with Perfect Plastic Printing\n\n### Returns\n\n- `{ token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n Represents a bulk order for physical card shipments\n\n - `token: string`\n - `card_tokens: string[]`\n - `created: string`\n - `customer_product_id: string`\n - `shipping_address: object`\n - `shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'`\n - `status: 'OPEN' | 'LOCKED'`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst cardBulkOrder = await client.cardBulkOrders.create({\n customer_product_id: 'custom-card-design-123',\n shipping_address: {\n address1: '123 Main Street',\n city: 'NEW YORK',\n country: 'USA',\n first_name: 'Johnny',\n last_name: 'Appleseed',\n postal_code: '10001',\n state: 'NY',\n},\n shipping_method: 'BULK_EXPEDITED',\n});\n\nconsole.log(cardBulkOrder);\n```", + perLanguage: { + go: { + method: 'client.CardBulkOrders.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tcardBulkOrder, err := client.CardBulkOrders.New(context.TODO(), lithic.CardBulkOrderNewParams{\n\t\tCustomerProductID: lithic.F("custom-card-design-123"),\n\t\tShippingAddress: lithic.F[any](map[string]interface{}{\n\t\t\t"address1": "123 Main Street",\n\t\t\t"city": "NEW YORK",\n\t\t\t"country": "USA",\n\t\t\t"first_name": "Johnny",\n\t\t\t"last_name": "Appleseed",\n\t\t\t"postal_code": "10001",\n\t\t\t"state": "NY",\n\t\t}),\n\t\tShippingMethod: lithic.F(lithic.CardBulkOrderNewParamsShippingMethodBulkExpedited),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", cardBulkOrder.CustomerProductID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/card_bulk_orders \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "customer_product_id": "custom-card-design-123",\n "shipping_address": {\n "address1": "123 Main Street",\n "city": "NEW YORK",\n "country": "USA",\n "first_name": "Johnny",\n "last_name": "Appleseed",\n "postal_code": "10001",\n "state": "NY"\n },\n "shipping_method": "BULK_EXPEDITED"\n }\'', + }, + java: { + method: 'cardBulkOrders().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.core.JsonValue;\nimport com.lithic.api.models.CardBulkOrder;\nimport com.lithic.api.models.CardBulkOrderCreateParams;\nimport java.util.Map;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardBulkOrderCreateParams params = CardBulkOrderCreateParams.builder()\n .customerProductId("custom-card-design-123")\n .shippingAddress(JsonValue.from(Map.of(\n "address1",\n "123 Main Street",\n "city",\n "NEW YORK",\n "country",\n "USA",\n "first_name",\n "Johnny",\n "last_name",\n "Appleseed",\n "postal_code",\n "10001",\n "state",\n "NY"\n )))\n .shippingMethod(CardBulkOrderCreateParams.ShippingMethod.BULK_EXPEDITED)\n .build();\n CardBulkOrder cardBulkOrder = client.cardBulkOrders().create(params);\n }\n}', + }, + kotlin: { + method: 'cardBulkOrders().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.core.JsonValue\nimport com.lithic.api.models.CardBulkOrder\nimport com.lithic.api.models.CardBulkOrderCreateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: CardBulkOrderCreateParams = CardBulkOrderCreateParams.builder()\n .customerProductId("custom-card-design-123")\n .shippingAddress(JsonValue.from(mapOf(\n "address1" to "123 Main Street",\n "city" to "NEW YORK",\n "country" to "USA",\n "first_name" to "Johnny",\n "last_name" to "Appleseed",\n "postal_code" to "10001",\n "state" to "NY",\n )))\n .shippingMethod(CardBulkOrderCreateParams.ShippingMethod.BULK_EXPEDITED)\n .build()\n val cardBulkOrder: CardBulkOrder = client.cardBulkOrders().create(params)\n}', + }, + python: { + method: 'card_bulk_orders.create', + example: + '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)\ncard_bulk_order = client.card_bulk_orders.create(\n customer_product_id="custom-card-design-123",\n shipping_address={\n "address1": "123 Main Street",\n "city": "NEW YORK",\n "country": "USA",\n "first_name": "Johnny",\n "last_name": "Appleseed",\n "postal_code": "10001",\n "state": "NY",\n },\n shipping_method="BULK_EXPEDITED",\n)\nprint(card_bulk_order.customer_product_id)', + }, + ruby: { + method: 'card_bulk_orders.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ncard_bulk_order = lithic.card_bulk_orders.create(\n customer_product_id: "custom-card-design-123",\n shipping_address: {\n address1: "123 Main Street",\n city: "NEW YORK",\n country: "USA",\n first_name: "Johnny",\n last_name: "Appleseed",\n postal_code: "10001",\n state: "NY"\n },\n shipping_method: :BULK_EXPEDITED\n)\n\nputs(card_bulk_order)', + }, + typescript: { + method: 'client.cardBulkOrders.create', + example: + "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\nconst cardBulkOrder = await client.cardBulkOrders.create({\n customer_product_id: 'custom-card-design-123',\n shipping_address: {\n address1: '123 Main Street',\n city: 'NEW YORK',\n country: 'USA',\n first_name: 'Johnny',\n last_name: 'Appleseed',\n postal_code: '10001',\n state: 'NY',\n },\n shipping_method: 'BULK_EXPEDITED',\n});\n\nconsole.log(cardBulkOrder.customer_product_id);", + }, + }, }, { name: 'retrieve', @@ -1072,6 +3209,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }", markdown: "## retrieve\n\n`client.cardBulkOrders.retrieve(bulk_order_token: string): { token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n\n**get** `/v1/card_bulk_orders/{bulk_order_token}`\n\nRetrieve a specific bulk order by token\n\n### Parameters\n\n- `bulk_order_token: string`\n\n### Returns\n\n- `{ token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n Represents a bulk order for physical card shipments\n\n - `token: string`\n - `card_tokens: string[]`\n - `created: string`\n - `customer_product_id: string`\n - `shipping_address: object`\n - `shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'`\n - `status: 'OPEN' | 'LOCKED'`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst cardBulkOrder = await client.cardBulkOrders.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(cardBulkOrder);\n```", + perLanguage: { + go: { + method: 'client.CardBulkOrders.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tcardBulkOrder, err := client.CardBulkOrders.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", cardBulkOrder.CustomerProductID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/card_bulk_orders/$BULK_ORDER_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'cardBulkOrders().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.CardBulkOrder;\nimport com.lithic.api.models.CardBulkOrderRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardBulkOrder cardBulkOrder = client.cardBulkOrders().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'cardBulkOrders().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.CardBulkOrder\nimport com.lithic.api.models.CardBulkOrderRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val cardBulkOrder: CardBulkOrder = client.cardBulkOrders().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'card_bulk_orders.retrieve', + example: + '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)\ncard_bulk_order = client.card_bulk_orders.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(card_bulk_order.customer_product_id)', + }, + ruby: { + method: 'card_bulk_orders.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ncard_bulk_order = lithic.card_bulk_orders.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(card_bulk_order)', + }, + typescript: { + method: 'client.cardBulkOrders.retrieve', + example: + "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\nconst cardBulkOrder = await client.cardBulkOrders.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(cardBulkOrder.customer_product_id);", + }, + }, }, { name: 'update', @@ -1087,26 +3260,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }", markdown: "## update\n\n`client.cardBulkOrders.update(bulk_order_token: string, status: 'LOCKED'): { token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n\n**patch** `/v1/card_bulk_orders/{bulk_order_token}`\n\nUpdate a bulk order. Primarily used to lock the order, preventing additional cards from being added\n\n### Parameters\n\n- `bulk_order_token: string`\n\n- `status: 'LOCKED'`\n Status to update the bulk order to. Use LOCKED to finalize the order\n\n### Returns\n\n- `{ token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n Represents a bulk order for physical card shipments\n\n - `token: string`\n - `card_tokens: string[]`\n - `created: string`\n - `customer_product_id: string`\n - `shipping_address: object`\n - `shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'`\n - `status: 'OPEN' | 'LOCKED'`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst cardBulkOrder = await client.cardBulkOrders.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { status: 'LOCKED' });\n\nconsole.log(cardBulkOrder);\n```", - }, - { - name: 'list', - endpoint: '/v1/card_bulk_orders', - httpMethod: 'get', - summary: 'List bulk orders', - description: 'List bulk orders for physical card shipments', - stainlessPath: '(resource) card_bulk_orders > (method) list', - qualified: 'client.cardBulkOrders.list', - params: [ - 'begin?: string;', - 'end?: string;', - 'ending_before?: string;', - 'page_size?: number;', - 'starting_after?: string;', - ], - response: - "{ token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }", - markdown: - "## list\n\n`client.cardBulkOrders.list(begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n\n**get** `/v1/card_bulk_orders`\n\nList bulk orders for physical card shipments\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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; card_tokens: string[]; created: string; customer_product_id: string; shipping_address: object; shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'; status: 'OPEN' | 'LOCKED'; updated: string; }`\n Represents a bulk order for physical card shipments\n\n - `token: string`\n - `card_tokens: string[]`\n - `created: string`\n - `customer_product_id: string`\n - `shipping_address: object`\n - `shipping_method: 'BULK_EXPEDITED' | 'BULK_PRIORITY' | 'BULK_2_DAY' | 'BULK_EXPRESS'`\n - `status: 'OPEN' | 'LOCKED'`\n - `updated: 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 cardBulkOrder of client.cardBulkOrders.list()) {\n console.log(cardBulkOrder);\n}\n```", + perLanguage: { + go: { + method: 'client.CardBulkOrders.Update', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tcardBulkOrder, err := client.CardBulkOrders.Update(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.CardBulkOrderUpdateParams{\n\t\t\tStatus: lithic.F(lithic.CardBulkOrderUpdateParamsStatusLocked),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", cardBulkOrder.CustomerProductID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/card_bulk_orders/$BULK_ORDER_TOKEN \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "status": "LOCKED"\n }\'', + }, + java: { + method: 'cardBulkOrders().update', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.CardBulkOrder;\nimport com.lithic.api.models.CardBulkOrderUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardBulkOrderUpdateParams params = CardBulkOrderUpdateParams.builder()\n .bulkOrderToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .status(CardBulkOrderUpdateParams.Status.LOCKED)\n .build();\n CardBulkOrder cardBulkOrder = client.cardBulkOrders().update(params);\n }\n}', + }, + kotlin: { + method: 'cardBulkOrders().update', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.CardBulkOrder\nimport com.lithic.api.models.CardBulkOrderUpdateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: CardBulkOrderUpdateParams = CardBulkOrderUpdateParams.builder()\n .bulkOrderToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .status(CardBulkOrderUpdateParams.Status.LOCKED)\n .build()\n val cardBulkOrder: CardBulkOrder = client.cardBulkOrders().update(params)\n}', + }, + python: { + method: 'card_bulk_orders.update', + example: + '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)\ncard_bulk_order = client.card_bulk_orders.update(\n bulk_order_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n status="LOCKED",\n)\nprint(card_bulk_order.customer_product_id)', + }, + ruby: { + method: 'card_bulk_orders.update', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ncard_bulk_order = lithic.card_bulk_orders.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", status: :LOCKED)\n\nputs(card_bulk_order)', + }, + typescript: { + method: 'client.cardBulkOrders.update', + example: + "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\nconst cardBulkOrder = await client.cardBulkOrders.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n status: 'LOCKED',\n});\n\nconsole.log(cardBulkOrder.customer_product_id);", + }, + }, }, { name: 'list', @@ -1126,6 +3315,98 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }", markdown: "## list\n\n`client.balances.list(account_token?: string, balance_date?: string, business_account_token?: string, financial_account_type?: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'): { available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }`\n\n**get** `/v1/balances`\n\nGet the balances for a program, business, or a given end-user account\n\n### Parameters\n\n- `account_token?: string`\n List balances for all financial accounts of a given account_token.\n\n- `balance_date?: string`\n UTC date and time of the balances to retrieve. Defaults to latest available balances\n\n- `business_account_token?: string`\n List balances for all financial accounts of a given business_account_token.\n\n- `financial_account_type?: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'`\n List balances for a given Financial Account type.\n\n### Returns\n\n- `{ available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }`\n Balance\n\n - `available_amount: number`\n - `created: string`\n - `currency: string`\n - `financial_account_token: string`\n - `financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'`\n - `last_transaction_event_token: string`\n - `last_transaction_token: string`\n - `pending_amount: number`\n - `total_amount: number`\n - `updated: 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 balance of client.balances.list()) {\n console.log(balance);\n}\n```", + perLanguage: { + go: { + method: 'client.Balances.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Balances.List(context.TODO(), lithic.BalanceListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v1/balances \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'balances().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.BalanceListPage;\nimport com.lithic.api.models.BalanceListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n BalanceListPage page = client.balances().list();\n }\n}', + }, + kotlin: { + method: 'balances().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.BalanceListPage\nimport com.lithic.api.models.BalanceListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: BalanceListPage = client.balances().list()\n}', + }, + python: { + method: 'balances.list', + example: + '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.balances.list()\npage = page.data[0]\nprint(page.available_amount)', + }, + ruby: { + method: 'balances.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.balances.list\n\nputs(page)', + }, + typescript: { + method: 'client.balances.list', + example: + "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 balance of client.balances.list()) {\n console.log(balance.available_amount);\n}", + }, + }, + }, + { + name: 'list', + endpoint: '/v1/disputes', + httpMethod: 'get', + summary: 'List chargeback requests', + description: 'List chargeback requests.', + stainlessPath: '(resource) disputes > (method) list', + qualified: 'client.disputes.list', + params: [ + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'page_size?: number;', + 'starting_after?: string;', + 'status?: string;', + 'transaction_tokens?: string[];', + ], + response: + '{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }', + markdown: + "## list\n\n`client.disputes.list(begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string, status?: string, transaction_tokens?: string[]): { token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n\n**get** `/v1/disputes`\n\nList chargeback requests.\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `status?: string`\n Filter by status.\n\n- `transaction_tokens?: string[]`\n Transaction tokens to filter by.\n\n### Returns\n\n- `{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n Dispute.\n\n - `token: string`\n - `amount: number`\n - `arbitration_date: string`\n - `created: string`\n - `customer_filed_date: string`\n - `customer_note: string`\n - `network_claim_ids: string[]`\n - `network_filed_date: string`\n - `network_reason_code: string`\n - `prearbitration_date: string`\n - `primary_claim_id: string`\n - `reason: string`\n - `representment_date: string`\n - `resolution_date: string`\n - `resolution_note: string`\n - `resolution_reason: string`\n - `status: string`\n - `transaction_token: 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 dispute of client.disputes.list()) {\n console.log(dispute);\n}\n```", + perLanguage: { + go: { + method: 'client.Disputes.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Disputes.List(context.TODO(), lithic.DisputeListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v1/disputes \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'disputes().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.DisputeListPage;\nimport com.lithic.api.models.DisputeListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n DisputeListPage page = client.disputes().list();\n }\n}', + }, + kotlin: { + method: 'disputes().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.DisputeListPage\nimport com.lithic.api.models.DisputeListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: DisputeListPage = client.disputes().list()\n}', + }, + python: { + method: 'disputes.list', + example: + '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.disputes.list()\npage = page.data[0]\nprint(page.network_claim_ids)', + }, + ruby: { + method: 'disputes.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.disputes.list\n\nputs(page)', + }, + typescript: { + method: 'client.disputes.list', + example: + "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 dispute of client.disputes.list()) {\n console.log(dispute.network_claim_ids);\n}", + }, + }, }, { name: 'create', @@ -1146,6 +3427,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }', markdown: "## create\n\n`client.disputes.create(amount: number, reason: string, transaction_token: string, customer_filed_date?: string, customer_note?: string): { token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n\n**post** `/v1/disputes`\n\nRequest a chargeback.\n\n### Parameters\n\n- `amount: number`\n Amount for chargeback\n\n- `reason: string`\n Reason for chargeback\n\n- `transaction_token: string`\n Transaction for chargeback\n\n- `customer_filed_date?: string`\n Date the customer filed the chargeback request\n\n- `customer_note?: string`\n Customer description\n\n### Returns\n\n- `{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n Dispute.\n\n - `token: string`\n - `amount: number`\n - `arbitration_date: string`\n - `created: string`\n - `customer_filed_date: string`\n - `customer_note: string`\n - `network_claim_ids: string[]`\n - `network_filed_date: string`\n - `network_reason_code: string`\n - `prearbitration_date: string`\n - `primary_claim_id: string`\n - `reason: string`\n - `representment_date: string`\n - `resolution_date: string`\n - `resolution_note: string`\n - `resolution_reason: string`\n - `status: string`\n - `transaction_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst dispute = await client.disputes.create({\n amount: 10000,\n reason: 'FRAUD_CARD_PRESENT',\n transaction_token: '12345624-aa69-4cbc-a946-30d90181b621',\n});\n\nconsole.log(dispute);\n```", + perLanguage: { + go: { + method: 'client.Disputes.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tdispute, err := client.Disputes.New(context.TODO(), lithic.DisputeNewParams{\n\t\tAmount: lithic.F(int64(10000)),\n\t\tReason: lithic.F(lithic.DisputeNewParamsReasonFraudCardPresent),\n\t\tTransactionToken: lithic.F("12345624-aa69-4cbc-a946-30d90181b621"),\n\t\tCustomerFiledDate: lithic.F(time.Now()),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dispute.NetworkClaimIDs)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/disputes \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "amount": 10000,\n "reason": "FRAUD_CARD_PRESENT",\n "transaction_token": "12345624-aa69-4cbc-a946-30d90181b621"\n }\'', + }, + java: { + method: 'disputes().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Dispute;\nimport com.lithic.api.models.DisputeCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n DisputeCreateParams params = DisputeCreateParams.builder()\n .amount(10000L)\n .reason(DisputeCreateParams.Reason.FRAUD_CARD_PRESENT)\n .transactionToken("12345624-aa69-4cbc-a946-30d90181b621")\n .build();\n Dispute dispute = client.disputes().create(params);\n }\n}', + }, + kotlin: { + method: 'disputes().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Dispute\nimport com.lithic.api.models.DisputeCreateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: DisputeCreateParams = DisputeCreateParams.builder()\n .amount(10000L)\n .reason(DisputeCreateParams.Reason.FRAUD_CARD_PRESENT)\n .transactionToken("12345624-aa69-4cbc-a946-30d90181b621")\n .build()\n val dispute: Dispute = client.disputes().create(params)\n}', + }, + python: { + method: 'disputes.create', + example: + 'import os\nfrom datetime import datetime\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)\ndispute = client.disputes.create(\n amount=10000,\n reason="FRAUD_CARD_PRESENT",\n transaction_token="12345624-aa69-4cbc-a946-30d90181b621",\n customer_filed_date=datetime.fromisoformat("2021-06-28T22:53:15"),\n)\nprint(dispute.network_claim_ids)', + }, + ruby: { + method: 'disputes.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ndispute = lithic.disputes.create(\n amount: 10000,\n reason: :FRAUD_CARD_PRESENT,\n transaction_token: "12345624-aa69-4cbc-a946-30d90181b621"\n)\n\nputs(dispute)', + }, + typescript: { + method: 'client.disputes.create', + example: + "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\nconst dispute = await client.disputes.create({\n amount: 10000,\n reason: 'FRAUD_CARD_PRESENT',\n transaction_token: '12345624-aa69-4cbc-a946-30d90181b621',\n customer_filed_date: '2021-06-28T22:53:15Z',\n});\n\nconsole.log(dispute.network_claim_ids);", + }, + }, }, { name: 'retrieve', @@ -1160,6 +3477,92 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }', markdown: "## retrieve\n\n`client.disputes.retrieve(dispute_token: string): { token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n\n**get** `/v1/disputes/{dispute_token}`\n\nGet chargeback request.\n\n### Parameters\n\n- `dispute_token: string`\n\n### Returns\n\n- `{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n Dispute.\n\n - `token: string`\n - `amount: number`\n - `arbitration_date: string`\n - `created: string`\n - `customer_filed_date: string`\n - `customer_note: string`\n - `network_claim_ids: string[]`\n - `network_filed_date: string`\n - `network_reason_code: string`\n - `prearbitration_date: string`\n - `primary_claim_id: string`\n - `reason: string`\n - `representment_date: string`\n - `resolution_date: string`\n - `resolution_note: string`\n - `resolution_reason: string`\n - `status: string`\n - `transaction_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst dispute = await client.disputes.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(dispute);\n```", + perLanguage: { + go: { + method: 'client.Disputes.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tdispute, err := client.Disputes.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dispute.NetworkClaimIDs)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'disputes().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Dispute;\nimport com.lithic.api.models.DisputeRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n Dispute dispute = client.disputes().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'disputes().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Dispute\nimport com.lithic.api.models.DisputeRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val dispute: Dispute = client.disputes().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'disputes.retrieve', + example: + '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)\ndispute = client.disputes.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(dispute.network_claim_ids)', + }, + ruby: { + method: 'disputes.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ndispute = lithic.disputes.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(dispute)', + }, + typescript: { + method: 'client.disputes.retrieve', + example: + "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\nconst dispute = await client.disputes.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(dispute.network_claim_ids);", + }, + }, + }, + { + name: 'delete', + endpoint: '/v1/disputes/{dispute_token}', + httpMethod: 'delete', + summary: 'Withdraw chargeback request', + description: 'Withdraw chargeback request.', + stainlessPath: '(resource) disputes > (method) delete', + qualified: 'client.disputes.delete', + params: ['dispute_token: string;'], + response: + '{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }', + markdown: + "## delete\n\n`client.disputes.delete(dispute_token: string): { token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n\n**delete** `/v1/disputes/{dispute_token}`\n\nWithdraw chargeback request.\n\n### Parameters\n\n- `dispute_token: string`\n\n### Returns\n\n- `{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n Dispute.\n\n - `token: string`\n - `amount: number`\n - `arbitration_date: string`\n - `created: string`\n - `customer_filed_date: string`\n - `customer_note: string`\n - `network_claim_ids: string[]`\n - `network_filed_date: string`\n - `network_reason_code: string`\n - `prearbitration_date: string`\n - `primary_claim_id: string`\n - `reason: string`\n - `representment_date: string`\n - `resolution_date: string`\n - `resolution_note: string`\n - `resolution_reason: string`\n - `status: string`\n - `transaction_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst dispute = await client.disputes.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(dispute);\n```", + perLanguage: { + go: { + method: 'client.Disputes.Delete', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tdispute, err := client.Disputes.Delete(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dispute.NetworkClaimIDs)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'disputes().delete', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Dispute;\nimport com.lithic.api.models.DisputeDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n Dispute dispute = client.disputes().delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'disputes().delete', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Dispute\nimport com.lithic.api.models.DisputeDeleteParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val dispute: Dispute = client.disputes().delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'disputes.delete', + example: + '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)\ndispute = client.disputes.delete(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(dispute.network_claim_ids)', + }, + ruby: { + method: 'disputes.delete', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ndispute = lithic.disputes.delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(dispute)', + }, + typescript: { + method: 'client.disputes.delete', + example: + "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\nconst dispute = await client.disputes.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(dispute.network_claim_ids);", + }, + }, }, { name: 'update', @@ -1180,57 +3583,99 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }', markdown: "## update\n\n`client.disputes.update(dispute_token: string, amount?: number, customer_filed_date?: string, customer_note?: string, reason?: string): { token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n\n**patch** `/v1/disputes/{dispute_token}`\n\nUpdate chargeback request. Can only be modified if status is `NEW`.\n\n### Parameters\n\n- `dispute_token: string`\n\n- `amount?: number`\n Amount for chargeback\n\n- `customer_filed_date?: string`\n Date the customer filed the chargeback request\n\n- `customer_note?: string`\n Customer description\n\n- `reason?: string`\n Reason for chargeback\n\n### Returns\n\n- `{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n Dispute.\n\n - `token: string`\n - `amount: number`\n - `arbitration_date: string`\n - `created: string`\n - `customer_filed_date: string`\n - `customer_note: string`\n - `network_claim_ids: string[]`\n - `network_filed_date: string`\n - `network_reason_code: string`\n - `prearbitration_date: string`\n - `primary_claim_id: string`\n - `reason: string`\n - `representment_date: string`\n - `resolution_date: string`\n - `resolution_note: string`\n - `resolution_reason: string`\n - `status: string`\n - `transaction_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst dispute = await client.disputes.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(dispute);\n```", + perLanguage: { + go: { + method: 'client.Disputes.Update', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tdispute, err := client.Disputes.Update(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.DisputeUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dispute.NetworkClaimIDs)\n}\n', + }, + http: { + example: + "curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", + }, + java: { + method: 'disputes().update', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Dispute;\nimport com.lithic.api.models.DisputeUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n Dispute dispute = client.disputes().update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'disputes().update', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Dispute\nimport com.lithic.api.models.DisputeUpdateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val dispute: Dispute = client.disputes().update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'disputes.update', + example: + '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)\ndispute = client.disputes.update(\n dispute_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(dispute.network_claim_ids)', + }, + ruby: { + method: 'disputes.update', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ndispute = lithic.disputes.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(dispute)', + }, + typescript: { + method: 'client.disputes.update', + example: + "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\nconst dispute = await client.disputes.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(dispute.network_claim_ids);", + }, + }, }, { - name: 'list', - endpoint: '/v1/disputes', + name: 'list_evidences', + endpoint: '/v1/disputes/{dispute_token}/evidences', httpMethod: 'get', - summary: 'List chargeback requests', - description: 'List chargeback requests.', - stainlessPath: '(resource) disputes > (method) list', - qualified: 'client.disputes.list', + summary: 'List evidence', + description: 'List evidence for a chargeback request.', + stainlessPath: '(resource) disputes > (method) list_evidences', + qualified: 'client.disputes.listEvidences', params: [ + 'dispute_token: string;', 'begin?: string;', 'end?: string;', 'ending_before?: string;', 'page_size?: number;', 'starting_after?: string;', - 'status?: string;', - 'transaction_tokens?: string[];', ], - response: - '{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }', - markdown: - "## list\n\n`client.disputes.list(begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string, status?: string, transaction_tokens?: string[]): { token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n\n**get** `/v1/disputes`\n\nList chargeback requests.\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `status?: string`\n Filter by status.\n\n- `transaction_tokens?: string[]`\n Transaction tokens to filter by.\n\n### Returns\n\n- `{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n Dispute.\n\n - `token: string`\n - `amount: number`\n - `arbitration_date: string`\n - `created: string`\n - `customer_filed_date: string`\n - `customer_note: string`\n - `network_claim_ids: string[]`\n - `network_filed_date: string`\n - `network_reason_code: string`\n - `prearbitration_date: string`\n - `primary_claim_id: string`\n - `reason: string`\n - `representment_date: string`\n - `resolution_date: string`\n - `resolution_note: string`\n - `resolution_reason: string`\n - `status: string`\n - `transaction_token: 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 dispute of client.disputes.list()) {\n console.log(dispute);\n}\n```", - }, - { - name: 'delete', - endpoint: '/v1/disputes/{dispute_token}', - httpMethod: 'delete', - summary: 'Withdraw chargeback request', - description: 'Withdraw chargeback request.', - stainlessPath: '(resource) disputes > (method) delete', - qualified: 'client.disputes.delete', - params: ['dispute_token: string;'], - response: - '{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }', - markdown: - "## delete\n\n`client.disputes.delete(dispute_token: string): { token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n\n**delete** `/v1/disputes/{dispute_token}`\n\nWithdraw chargeback request.\n\n### Parameters\n\n- `dispute_token: string`\n\n### Returns\n\n- `{ token: string; amount: number; arbitration_date: string; created: string; customer_filed_date: string; customer_note: string; network_claim_ids: string[]; network_filed_date: string; network_reason_code: string; prearbitration_date: string; primary_claim_id: string; reason: string; representment_date: string; resolution_date: string; resolution_note: string; resolution_reason: string; status: string; transaction_token: string; }`\n Dispute.\n\n - `token: string`\n - `amount: number`\n - `arbitration_date: string`\n - `created: string`\n - `customer_filed_date: string`\n - `customer_note: string`\n - `network_claim_ids: string[]`\n - `network_filed_date: string`\n - `network_reason_code: string`\n - `prearbitration_date: string`\n - `primary_claim_id: string`\n - `reason: string`\n - `representment_date: string`\n - `resolution_date: string`\n - `resolution_note: string`\n - `resolution_reason: string`\n - `status: string`\n - `transaction_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst dispute = await client.disputes.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(dispute);\n```", - }, - { - name: 'delete_evidence', - endpoint: '/v1/disputes/{dispute_token}/evidences/{evidence_token}', - httpMethod: 'delete', - summary: 'Delete evidence', - description: - 'Soft delete evidence for a chargeback request. Evidence will not be reviewed or submitted by Lithic after it is withdrawn.', - stainlessPath: '(resource) disputes > (method) delete_evidence', - qualified: 'client.disputes.deleteEvidence', - params: ['dispute_token: string;', 'evidence_token: string;'], response: "{ token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }", markdown: - "## delete_evidence\n\n`client.disputes.deleteEvidence(dispute_token: string, evidence_token: string): { token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n\n**delete** `/v1/disputes/{dispute_token}/evidences/{evidence_token}`\n\nSoft delete evidence for a chargeback request. Evidence will not be reviewed or submitted by Lithic after it is withdrawn.\n\n### Parameters\n\n- `dispute_token: string`\n\n- `evidence_token: string`\n\n### Returns\n\n- `{ token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n Dispute evidence.\n\n - `token: string`\n - `created: string`\n - `dispute_token: string`\n - `upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'`\n - `download_url?: string`\n - `filename?: string`\n - `upload_url?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst disputeEvidence = await client.disputes.deleteEvidence('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { dispute_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(disputeEvidence);\n```", + "## list_evidences\n\n`client.disputes.listEvidences(dispute_token: string, begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n\n**get** `/v1/disputes/{dispute_token}/evidences`\n\nList evidence for a chargeback request.\n\n### Parameters\n\n- `dispute_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n Dispute evidence.\n\n - `token: string`\n - `created: string`\n - `dispute_token: string`\n - `upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'`\n - `download_url?: string`\n - `filename?: string`\n - `upload_url?: 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 disputeEvidence of client.disputes.listEvidences('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(disputeEvidence);\n}\n```", + perLanguage: { + go: { + method: 'client.Disputes.ListEvidences', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Disputes.ListEvidences(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.DisputeListEvidencesParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN/evidences \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'disputes().listEvidences', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.DisputeListEvidencesPage;\nimport com.lithic.api.models.DisputeListEvidencesParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n DisputeListEvidencesPage page = client.disputes().listEvidences("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'disputes().listEvidences', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.DisputeListEvidencesPage\nimport com.lithic.api.models.DisputeListEvidencesParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: DisputeListEvidencesPage = client.disputes().listEvidences("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'disputes.list_evidences', + example: + '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.disputes.list_evidences(\n dispute_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'disputes.list_evidences', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.disputes.list_evidences("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(page)', + }, + typescript: { + method: 'client.disputes.listEvidences', + example: + "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 disputeEvidence of client.disputes.listEvidences(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n)) {\n console.log(disputeEvidence.token);\n}", + }, + }, }, { name: 'initiate_evidence_upload', @@ -1246,27 +3691,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }", markdown: "## initiate_evidence_upload\n\n`client.disputes.initiateEvidenceUpload(dispute_token: string, filename?: string): { token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n\n**post** `/v1/disputes/{dispute_token}/evidences`\n\nUse this endpoint to upload evidence for a chargeback request. It will return a URL to upload your documents to. The URL will expire in 30 minutes.\n\nUploaded documents must either be a `jpg`, `png` or `pdf` file, and each must be less than 5 GiB.\n\n\n### Parameters\n\n- `dispute_token: string`\n\n- `filename?: string`\n Filename of the evidence.\n\n### Returns\n\n- `{ token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n Dispute evidence.\n\n - `token: string`\n - `created: string`\n - `dispute_token: string`\n - `upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'`\n - `download_url?: string`\n - `filename?: string`\n - `upload_url?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst disputeEvidence = await client.disputes.initiateEvidenceUpload('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(disputeEvidence);\n```", - }, - { - name: 'list_evidences', - endpoint: '/v1/disputes/{dispute_token}/evidences', - httpMethod: 'get', - summary: 'List evidence', - description: 'List evidence for a chargeback request.', - stainlessPath: '(resource) disputes > (method) list_evidences', - qualified: 'client.disputes.listEvidences', - params: [ - 'dispute_token: string;', - 'begin?: string;', - 'end?: string;', - 'ending_before?: string;', - 'page_size?: number;', - 'starting_after?: string;', - ], - response: - "{ token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }", - markdown: - "## list_evidences\n\n`client.disputes.listEvidences(dispute_token: string, begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n\n**get** `/v1/disputes/{dispute_token}/evidences`\n\nList evidence for a chargeback request.\n\n### Parameters\n\n- `dispute_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n Dispute evidence.\n\n - `token: string`\n - `created: string`\n - `dispute_token: string`\n - `upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'`\n - `download_url?: string`\n - `filename?: string`\n - `upload_url?: 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 disputeEvidence of client.disputes.listEvidences('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(disputeEvidence);\n}\n```", + perLanguage: { + go: { + method: 'client.Disputes.InitiateEvidenceUpload', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tdisputeEvidence, err := client.Disputes.InitiateEvidenceUpload(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.DisputeInitiateEvidenceUploadParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", disputeEvidence.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN/evidences \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'disputes().initiateEvidenceUpload', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.DisputeEvidence;\nimport com.lithic.api.models.DisputeInitiateEvidenceUploadParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n DisputeEvidence disputeEvidence = client.disputes().initiateEvidenceUpload("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'disputes().initiateEvidenceUpload', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.DisputeEvidence\nimport com.lithic.api.models.DisputeInitiateEvidenceUploadParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val disputeEvidence: DisputeEvidence = client.disputes().initiateEvidenceUpload("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'disputes.initiate_evidence_upload', + example: + '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)\ndispute_evidence = client.disputes.initiate_evidence_upload(\n dispute_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(dispute_evidence.token)', + }, + ruby: { + method: 'disputes.initiate_evidence_upload', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ndispute_evidence = lithic.disputes.initiate_evidence_upload("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(dispute_evidence)', + }, + typescript: { + method: 'client.disputes.initiateEvidenceUpload', + example: + "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\nconst disputeEvidence = await client.disputes.initiateEvidenceUpload(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(disputeEvidence.token);", + }, + }, }, { name: 'retrieve_evidence', @@ -1281,20 +3741,93 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }", markdown: "## retrieve_evidence\n\n`client.disputes.retrieveEvidence(dispute_token: string, evidence_token: string): { token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n\n**get** `/v1/disputes/{dispute_token}/evidences/{evidence_token}`\n\nGet evidence for a chargeback request.\n\n### Parameters\n\n- `dispute_token: string`\n\n- `evidence_token: string`\n\n### Returns\n\n- `{ token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n Dispute evidence.\n\n - `token: string`\n - `created: string`\n - `dispute_token: string`\n - `upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'`\n - `download_url?: string`\n - `filename?: string`\n - `upload_url?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst disputeEvidence = await client.disputes.retrieveEvidence('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { dispute_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(disputeEvidence);\n```", + perLanguage: { + go: { + method: 'client.Disputes.GetEvidence', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tdisputeEvidence, err := client.Disputes.GetEvidence(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", disputeEvidence.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN/evidences/$EVIDENCE_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'disputes().retrieveEvidence', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.DisputeEvidence;\nimport com.lithic.api.models.DisputeRetrieveEvidenceParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n DisputeRetrieveEvidenceParams params = DisputeRetrieveEvidenceParams.builder()\n .disputeToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .evidenceToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n DisputeEvidence disputeEvidence = client.disputes().retrieveEvidence(params);\n }\n}', + }, + kotlin: { + method: 'disputes().retrieveEvidence', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.DisputeEvidence\nimport com.lithic.api.models.DisputeRetrieveEvidenceParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: DisputeRetrieveEvidenceParams = DisputeRetrieveEvidenceParams.builder()\n .disputeToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .evidenceToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build()\n val disputeEvidence: DisputeEvidence = client.disputes().retrieveEvidence(params)\n}', + }, + python: { + method: 'disputes.retrieve_evidence', + example: + '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)\ndispute_evidence = client.disputes.retrieve_evidence(\n evidence_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n dispute_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(dispute_evidence.token)', + }, + ruby: { + method: 'disputes.retrieve_evidence', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ndispute_evidence = lithic.disputes.retrieve_evidence(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n dispute_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n)\n\nputs(dispute_evidence)', + }, + typescript: { + method: 'client.disputes.retrieveEvidence', + example: + "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\nconst disputeEvidence = await client.disputes.retrieveEvidence(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { dispute_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n);\n\nconsole.log(disputeEvidence.token);", + }, + }, }, { - name: 'retrieve', - endpoint: '/v2/disputes/{dispute_token}', - httpMethod: 'get', - summary: 'Retrieve a dispute', - description: 'Retrieves a specific dispute by its token.', - stainlessPath: '(resource) disputes_v2 > (method) retrieve', - qualified: 'client.disputesV2.retrieve', - params: ['dispute_token: string;'], + name: 'delete_evidence', + endpoint: '/v1/disputes/{dispute_token}/evidences/{evidence_token}', + httpMethod: 'delete', + summary: 'Delete evidence', + description: + 'Soft delete evidence for a chargeback request. Evidence will not be reviewed or submitted by Lithic after it is withdrawn.', + stainlessPath: '(resource) disputes > (method) delete_evidence', + qualified: 'client.disputes.deleteEvidence', + params: ['dispute_token: string;', 'evidence_token: string;'], response: - "{ token: string; account_token: string; card_token: string; case_id: string; created: string; currency: string; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; events: { token: string; created: string; data: object | object | object; type: 'WORKFLOW' | 'FINANCIAL' | 'CARDHOLDER_LIABILITY'; }[]; liability_allocation: { denied_amount: number; original_amount: number; recovered_amount: number; remaining_amount: number; written_off_amount: number; }; merchant: object; network: 'VISA' | 'MASTERCARD'; status: 'OPEN' | 'CLOSED'; transaction_series: { related_transaction_event_token: string; related_transaction_token: string; type: 'DISPUTE'; }; updated: string; }", + "{ token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }", markdown: - "## retrieve\n\n`client.disputesV2.retrieve(dispute_token: string): { token: string; account_token: string; card_token: string; case_id: string; created: string; currency: string; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; events: object[]; liability_allocation: object; merchant: merchant; network: 'VISA' | 'MASTERCARD'; status: 'OPEN' | 'CLOSED'; transaction_series: object; updated: string; }`\n\n**get** `/v2/disputes/{dispute_token}`\n\nRetrieves a specific dispute by its token.\n\n### Parameters\n\n- `dispute_token: string`\n\n### Returns\n\n- `{ token: string; account_token: string; card_token: string; case_id: string; created: string; currency: string; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; events: { token: string; created: string; data: { action: 'OPENED' | 'CLOSED' | 'REOPENED'; amount: number; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; reason: string; stage: 'CLAIM'; type: 'WORKFLOW'; } | { amount: number; polarity: 'CREDIT' | 'DEBIT'; stage: 'CHARGEBACK' | 'REPRESENTMENT' | 'PREARBITRATION' | 'ARBITRATION' | 'COLLABORATION'; type: 'FINANCIAL'; } | { action: 'PROVISIONAL_CREDIT_GRANTED' | 'PROVISIONAL_CREDIT_REVERSED' | 'WRITTEN_OFF'; amount: number; reason: string; type: 'CARDHOLDER_LIABILITY'; }; type: 'WORKFLOW' | 'FINANCIAL' | 'CARDHOLDER_LIABILITY'; }[]; liability_allocation: { denied_amount: number; original_amount: number; recovered_amount: number; remaining_amount: number; written_off_amount: number; }; merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }; network: 'VISA' | 'MASTERCARD'; status: 'OPEN' | 'CLOSED'; transaction_series: { related_transaction_event_token: string; related_transaction_token: string; type: 'DISPUTE'; }; updated: string; }`\n The Dispute object tracks the progression of a dispute throughout its lifecycle.\n\n - `token: string`\n - `account_token: string`\n - `card_token: string`\n - `case_id: string`\n - `created: string`\n - `currency: string`\n - `disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'`\n - `events: { token: string; created: string; data: { action: 'OPENED' | 'CLOSED' | 'REOPENED'; amount: number; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; reason: string; stage: 'CLAIM'; type: 'WORKFLOW'; } | { amount: number; polarity: 'CREDIT' | 'DEBIT'; stage: 'CHARGEBACK' | 'REPRESENTMENT' | 'PREARBITRATION' | 'ARBITRATION' | 'COLLABORATION'; type: 'FINANCIAL'; } | { action: 'PROVISIONAL_CREDIT_GRANTED' | 'PROVISIONAL_CREDIT_REVERSED' | 'WRITTEN_OFF'; amount: number; reason: string; type: 'CARDHOLDER_LIABILITY'; }; type: 'WORKFLOW' | 'FINANCIAL' | 'CARDHOLDER_LIABILITY'; }[]`\n - `liability_allocation: { denied_amount: number; original_amount: number; recovered_amount: number; remaining_amount: number; written_off_amount: number; }`\n - `merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }`\n - `network: 'VISA' | 'MASTERCARD'`\n - `status: 'OPEN' | 'CLOSED'`\n - `transaction_series: { related_transaction_event_token: string; related_transaction_token: string; type: 'DISPUTE'; }`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst disputeV2 = await client.disputesV2.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(disputeV2);\n```", + "## delete_evidence\n\n`client.disputes.deleteEvidence(dispute_token: string, evidence_token: string): { token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n\n**delete** `/v1/disputes/{dispute_token}/evidences/{evidence_token}`\n\nSoft delete evidence for a chargeback request. Evidence will not be reviewed or submitted by Lithic after it is withdrawn.\n\n### Parameters\n\n- `dispute_token: string`\n\n- `evidence_token: string`\n\n### Returns\n\n- `{ token: string; created: string; dispute_token: string; upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'; download_url?: string; filename?: string; upload_url?: string; }`\n Dispute evidence.\n\n - `token: string`\n - `created: string`\n - `dispute_token: string`\n - `upload_status: 'DELETED' | 'ERROR' | 'PENDING' | 'REJECTED' | 'UPLOADED'`\n - `download_url?: string`\n - `filename?: string`\n - `upload_url?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst disputeEvidence = await client.disputes.deleteEvidence('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { dispute_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(disputeEvidence);\n```", + perLanguage: { + go: { + method: 'client.Disputes.DeleteEvidence', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tdisputeEvidence, err := client.Disputes.DeleteEvidence(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", disputeEvidence.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN/evidences/$EVIDENCE_TOKEN \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'disputes().deleteEvidence', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.DisputeDeleteEvidenceParams;\nimport com.lithic.api.models.DisputeEvidence;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n DisputeDeleteEvidenceParams params = DisputeDeleteEvidenceParams.builder()\n .disputeToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .evidenceToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n DisputeEvidence disputeEvidence = client.disputes().deleteEvidence(params);\n }\n}', + }, + kotlin: { + method: 'disputes().deleteEvidence', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.DisputeDeleteEvidenceParams\nimport com.lithic.api.models.DisputeEvidence\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: DisputeDeleteEvidenceParams = DisputeDeleteEvidenceParams.builder()\n .disputeToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .evidenceToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build()\n val disputeEvidence: DisputeEvidence = client.disputes().deleteEvidence(params)\n}', + }, + python: { + method: 'disputes.delete_evidence', + example: + '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)\ndispute_evidence = client.disputes.delete_evidence(\n evidence_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n dispute_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(dispute_evidence.token)', + }, + ruby: { + method: 'disputes.delete_evidence', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ndispute_evidence = lithic.disputes.delete_evidence(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n dispute_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n)\n\nputs(dispute_evidence)', + }, + typescript: { + method: 'client.disputes.deleteEvidence', + example: + "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\nconst disputeEvidence = await client.disputes.deleteEvidence(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { dispute_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n);\n\nconsole.log(disputeEvidence.token);", + }, + }, }, { name: 'list', @@ -1318,19 +3851,91 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_token: string; card_token: string; case_id: string; created: string; currency: string; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; events: { token: string; created: string; data: object | object | object; type: 'WORKFLOW' | 'FINANCIAL' | 'CARDHOLDER_LIABILITY'; }[]; liability_allocation: { denied_amount: number; original_amount: number; recovered_amount: number; remaining_amount: number; written_off_amount: number; }; merchant: object; network: 'VISA' | 'MASTERCARD'; status: 'OPEN' | 'CLOSED'; transaction_series: { related_transaction_event_token: string; related_transaction_token: string; type: 'DISPUTE'; }; updated: string; }", markdown: "## list\n\n`client.disputesV2.list(account_token?: string, begin?: string, card_token?: string, disputed_transaction_token?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; account_token: string; card_token: string; case_id: string; created: string; currency: string; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; events: object[]; liability_allocation: object; merchant: merchant; network: 'VISA' | 'MASTERCARD'; status: 'OPEN' | 'CLOSED'; transaction_series: object; updated: string; }`\n\n**get** `/v2/disputes`\n\nReturns a paginated list of disputes.\n\n### Parameters\n\n- `account_token?: string`\n Filter by account token.\n\n- `begin?: string`\n RFC 3339 timestamp for filtering by created date, inclusive.\n\n- `card_token?: string`\n Filter by card token.\n\n- `disputed_transaction_token?: string`\n Filter by the token of the transaction being disputed. Corresponds with transaction_series.related_transaction_token in the Dispute.\n\n- `end?: string`\n RFC 3339 timestamp for filtering by created date, inclusive.\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 Number of items to return.\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; card_token: string; case_id: string; created: string; currency: string; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; events: { token: string; created: string; data: { action: 'OPENED' | 'CLOSED' | 'REOPENED'; amount: number; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; reason: string; stage: 'CLAIM'; type: 'WORKFLOW'; } | { amount: number; polarity: 'CREDIT' | 'DEBIT'; stage: 'CHARGEBACK' | 'REPRESENTMENT' | 'PREARBITRATION' | 'ARBITRATION' | 'COLLABORATION'; type: 'FINANCIAL'; } | { action: 'PROVISIONAL_CREDIT_GRANTED' | 'PROVISIONAL_CREDIT_REVERSED' | 'WRITTEN_OFF'; amount: number; reason: string; type: 'CARDHOLDER_LIABILITY'; }; type: 'WORKFLOW' | 'FINANCIAL' | 'CARDHOLDER_LIABILITY'; }[]; liability_allocation: { denied_amount: number; original_amount: number; recovered_amount: number; remaining_amount: number; written_off_amount: number; }; merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }; network: 'VISA' | 'MASTERCARD'; status: 'OPEN' | 'CLOSED'; transaction_series: { related_transaction_event_token: string; related_transaction_token: string; type: 'DISPUTE'; }; updated: string; }`\n The Dispute object tracks the progression of a dispute throughout its lifecycle.\n\n - `token: string`\n - `account_token: string`\n - `card_token: string`\n - `case_id: string`\n - `created: string`\n - `currency: string`\n - `disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'`\n - `events: { token: string; created: string; data: { action: 'OPENED' | 'CLOSED' | 'REOPENED'; amount: number; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; reason: string; stage: 'CLAIM'; type: 'WORKFLOW'; } | { amount: number; polarity: 'CREDIT' | 'DEBIT'; stage: 'CHARGEBACK' | 'REPRESENTMENT' | 'PREARBITRATION' | 'ARBITRATION' | 'COLLABORATION'; type: 'FINANCIAL'; } | { action: 'PROVISIONAL_CREDIT_GRANTED' | 'PROVISIONAL_CREDIT_REVERSED' | 'WRITTEN_OFF'; amount: number; reason: string; type: 'CARDHOLDER_LIABILITY'; }; type: 'WORKFLOW' | 'FINANCIAL' | 'CARDHOLDER_LIABILITY'; }[]`\n - `liability_allocation: { denied_amount: number; original_amount: number; recovered_amount: number; remaining_amount: number; written_off_amount: number; }`\n - `merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }`\n - `network: 'VISA' | 'MASTERCARD'`\n - `status: 'OPEN' | 'CLOSED'`\n - `transaction_series: { related_transaction_event_token: string; related_transaction_token: string; type: 'DISPUTE'; }`\n - `updated: 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 disputeV2 of client.disputesV2.list()) {\n console.log(disputeV2);\n}\n```", + perLanguage: { + go: { + method: 'client.DisputesV2.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.DisputesV2.List(context.TODO(), lithic.DisputesV2ListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v2/disputes \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'disputesV2().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.DisputesV2ListPage;\nimport com.lithic.api.models.DisputesV2ListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n DisputesV2ListPage page = client.disputesV2().list();\n }\n}', + }, + kotlin: { + method: 'disputesV2().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.DisputesV2ListPage\nimport com.lithic.api.models.DisputesV2ListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: DisputesV2ListPage = client.disputesV2().list()\n}', + }, + python: { + method: 'disputes_v2.list', + example: + '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.disputes_v2.list()\npage = page.data[0]\nprint(page.case_id)', + }, + ruby: { + method: 'disputes_v2.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.disputes_v2.list\n\nputs(page)', + }, + typescript: { + method: 'client.disputesV2.list', + example: + "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 disputeV2 of client.disputesV2.list()) {\n console.log(disputeV2.case_id);\n}", + }, + }, }, { name: 'retrieve', - endpoint: '/v1/events/{event_token}', + endpoint: '/v2/disputes/{dispute_token}', httpMethod: 'get', - summary: 'Get event', - description: 'Get an event.', - stainlessPath: '(resource) events > (method) retrieve', - qualified: 'client.events.retrieve', - params: ['event_token: string;'], - response: '{ token: string; created: string; event_type: string; payload: object; }', + summary: 'Retrieve a dispute', + description: 'Retrieves a specific dispute by its token.', + stainlessPath: '(resource) disputes_v2 > (method) retrieve', + qualified: 'client.disputesV2.retrieve', + params: ['dispute_token: string;'], + response: + "{ token: string; account_token: string; card_token: string; case_id: string; created: string; currency: string; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; events: { token: string; created: string; data: object | object | object; type: 'WORKFLOW' | 'FINANCIAL' | 'CARDHOLDER_LIABILITY'; }[]; liability_allocation: { denied_amount: number; original_amount: number; recovered_amount: number; remaining_amount: number; written_off_amount: number; }; merchant: object; network: 'VISA' | 'MASTERCARD'; status: 'OPEN' | 'CLOSED'; transaction_series: { related_transaction_event_token: string; related_transaction_token: string; type: 'DISPUTE'; }; updated: string; }", markdown: - "## retrieve\n\n`client.events.retrieve(event_token: string): { token: string; created: string; event_type: string; payload: object; }`\n\n**get** `/v1/events/{event_token}`\n\nGet an event.\n\n### Parameters\n\n- `event_token: string`\n\n### Returns\n\n- `{ token: string; created: string; event_type: string; payload: object; }`\n A single event that affects the transaction state and lifecycle.\n\n - `token: string`\n - `created: string`\n - `event_type: string`\n - `payload: object`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst event = await client.events.retrieve('event_token');\n\nconsole.log(event);\n```", + "## retrieve\n\n`client.disputesV2.retrieve(dispute_token: string): { token: string; account_token: string; card_token: string; case_id: string; created: string; currency: string; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; events: object[]; liability_allocation: object; merchant: merchant; network: 'VISA' | 'MASTERCARD'; status: 'OPEN' | 'CLOSED'; transaction_series: object; updated: string; }`\n\n**get** `/v2/disputes/{dispute_token}`\n\nRetrieves a specific dispute by its token.\n\n### Parameters\n\n- `dispute_token: string`\n\n### Returns\n\n- `{ token: string; account_token: string; card_token: string; case_id: string; created: string; currency: string; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; events: { token: string; created: string; data: { action: 'OPENED' | 'CLOSED' | 'REOPENED'; amount: number; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; reason: string; stage: 'CLAIM'; type: 'WORKFLOW'; } | { amount: number; polarity: 'CREDIT' | 'DEBIT'; stage: 'CHARGEBACK' | 'REPRESENTMENT' | 'PREARBITRATION' | 'ARBITRATION' | 'COLLABORATION'; type: 'FINANCIAL'; } | { action: 'PROVISIONAL_CREDIT_GRANTED' | 'PROVISIONAL_CREDIT_REVERSED' | 'WRITTEN_OFF'; amount: number; reason: string; type: 'CARDHOLDER_LIABILITY'; }; type: 'WORKFLOW' | 'FINANCIAL' | 'CARDHOLDER_LIABILITY'; }[]; liability_allocation: { denied_amount: number; original_amount: number; recovered_amount: number; remaining_amount: number; written_off_amount: number; }; merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }; network: 'VISA' | 'MASTERCARD'; status: 'OPEN' | 'CLOSED'; transaction_series: { related_transaction_event_token: string; related_transaction_token: string; type: 'DISPUTE'; }; updated: string; }`\n The Dispute object tracks the progression of a dispute throughout its lifecycle.\n\n - `token: string`\n - `account_token: string`\n - `card_token: string`\n - `case_id: string`\n - `created: string`\n - `currency: string`\n - `disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'`\n - `events: { token: string; created: string; data: { action: 'OPENED' | 'CLOSED' | 'REOPENED'; amount: number; disposition: 'WON' | 'LOST' | 'PARTIALLY_WON' | 'WITHDRAWN' | 'DENIED'; reason: string; stage: 'CLAIM'; type: 'WORKFLOW'; } | { amount: number; polarity: 'CREDIT' | 'DEBIT'; stage: 'CHARGEBACK' | 'REPRESENTMENT' | 'PREARBITRATION' | 'ARBITRATION' | 'COLLABORATION'; type: 'FINANCIAL'; } | { action: 'PROVISIONAL_CREDIT_GRANTED' | 'PROVISIONAL_CREDIT_REVERSED' | 'WRITTEN_OFF'; amount: number; reason: string; type: 'CARDHOLDER_LIABILITY'; }; type: 'WORKFLOW' | 'FINANCIAL' | 'CARDHOLDER_LIABILITY'; }[]`\n - `liability_allocation: { denied_amount: number; original_amount: number; recovered_amount: number; remaining_amount: number; written_off_amount: number; }`\n - `merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }`\n - `network: 'VISA' | 'MASTERCARD'`\n - `status: 'OPEN' | 'CLOSED'`\n - `transaction_series: { related_transaction_event_token: string; related_transaction_token: string; type: 'DISPUTE'; }`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst disputeV2 = await client.disputesV2.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(disputeV2);\n```", + perLanguage: { + go: { + method: 'client.DisputesV2.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tdisputeV2, err := client.DisputesV2.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", disputeV2.CaseID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v2/disputes/$DISPUTE_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'disputesV2().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.DisputeV2;\nimport com.lithic.api.models.DisputesV2RetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n DisputeV2 disputeV2 = client.disputesV2().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'disputesV2().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.DisputeV2\nimport com.lithic.api.models.DisputesV2RetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val disputeV2: DisputeV2 = client.disputesV2().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'disputes_v2.retrieve', + example: + '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)\ndispute_v2 = client.disputes_v2.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(dispute_v2.case_id)', + }, + ruby: { + method: 'disputes_v2.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ndispute_v2 = lithic.disputes_v2.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(dispute_v2)', + }, + typescript: { + method: 'client.disputesV2.retrieve', + example: + "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\nconst disputeV2 = await client.disputesV2.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(disputeV2.case_id);", + }, + }, }, { name: 'list', @@ -1352,6 +3957,90 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: '{ token: string; created: string; event_type: string; payload: object; }', markdown: "## list\n\n`client.events.list(begin?: string, end?: string, ending_before?: string, event_types?: string[], page_size?: number, starting_after?: string, with_content?: boolean): { token: string; created: string; event_type: string; payload: object; }`\n\n**get** `/v1/events`\n\nList all events.\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `event_types?: string[]`\n Event types to filter events by.\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- `with_content?: boolean`\n Whether to include the event payload content in the response.\n\n### Returns\n\n- `{ token: string; created: string; event_type: string; payload: object; }`\n A single event that affects the transaction state and lifecycle.\n\n - `token: string`\n - `created: string`\n - `event_type: string`\n - `payload: object`\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 event of client.events.list()) {\n console.log(event);\n}\n```", + perLanguage: { + go: { + method: 'client.Events.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Events.List(context.TODO(), lithic.EventListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v1/events \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'events().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.EventListPage;\nimport com.lithic.api.models.EventListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n EventListPage page = client.events().list();\n }\n}', + }, + kotlin: { + method: 'events().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.EventListPage\nimport com.lithic.api.models.EventListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: EventListPage = client.events().list()\n}', + }, + python: { + method: 'events.list', + example: + '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.events.list()\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'events.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.events.list\n\nputs(page)', + }, + typescript: { + method: 'client.events.list', + example: + "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 event of client.events.list()) {\n console.log(event.token);\n}", + }, + }, + }, + { + name: 'retrieve', + endpoint: '/v1/events/{event_token}', + httpMethod: 'get', + summary: 'Get event', + description: 'Get an event.', + stainlessPath: '(resource) events > (method) retrieve', + qualified: 'client.events.retrieve', + params: ['event_token: string;'], + response: '{ token: string; created: string; event_type: string; payload: object; }', + markdown: + "## retrieve\n\n`client.events.retrieve(event_token: string): { token: string; created: string; event_type: string; payload: object; }`\n\n**get** `/v1/events/{event_token}`\n\nGet an event.\n\n### Parameters\n\n- `event_token: string`\n\n### Returns\n\n- `{ token: string; created: string; event_type: string; payload: object; }`\n A single event that affects the transaction state and lifecycle.\n\n - `token: string`\n - `created: string`\n - `event_type: string`\n - `payload: object`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst event = await client.events.retrieve('event_token');\n\nconsole.log(event);\n```", + perLanguage: { + go: { + method: 'client.Events.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tevent, err := client.Events.Get(context.TODO(), "event_token")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", event.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/events/$EVENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'events().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Event;\nimport com.lithic.api.models.EventRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n Event event = client.events().retrieve("event_token");\n }\n}', + }, + kotlin: { + method: 'events().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Event\nimport com.lithic.api.models.EventRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val event: Event = client.events().retrieve("event_token")\n}', + }, + python: { + method: 'events.retrieve', + example: + '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)\nevent = client.events.retrieve(\n "event_token",\n)\nprint(event.token)', + }, + ruby: { + method: 'events.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nevent = lithic.events.retrieve("event_token")\n\nputs(event)', + }, + typescript: { + method: 'client.events.retrieve', + example: + "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\nconst event = await client.events.retrieve('event_token');\n\nconsole.log(event.token);", + }, + }, }, { name: 'list_attempts', @@ -1374,20 +4063,142 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; created: string; event_subscription_token: string; event_token: string; response: string; response_status_code: number; status: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'; url: string; }", markdown: "## list_attempts\n\n`client.events.listAttempts(event_token: string, begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string, status?: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'): { token: string; created: string; event_subscription_token: string; event_token: string; response: string; response_status_code: number; status: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'; url: string; }`\n\n**get** `/v1/events/{event_token}/attempts`\n\nList all the message attempts for a given event.\n\n### Parameters\n\n- `event_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `status?: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'`\n\n### Returns\n\n- `{ token: string; created: string; event_subscription_token: string; event_token: string; response: string; response_status_code: number; status: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'; url: string; }`\n A subscription to specific event types.\n\n - `token: string`\n - `created: string`\n - `event_subscription_token: string`\n - `event_token: string`\n - `response: string`\n - `response_status_code: number`\n - `status: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'`\n - `url: 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 messageAttempt of client.events.listAttempts('event_token')) {\n console.log(messageAttempt);\n}\n```", + perLanguage: { + go: { + method: 'client.Events.ListAttempts', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Events.ListAttempts(\n\t\tcontext.TODO(),\n\t\t"event_token",\n\t\tlithic.EventListAttemptsParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/events/$EVENT_TOKEN/attempts \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'events().listAttempts', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.EventListAttemptsPage;\nimport com.lithic.api.models.EventListAttemptsParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n EventListAttemptsPage page = client.events().listAttempts("event_token");\n }\n}', + }, + kotlin: { + method: 'events().listAttempts', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.EventListAttemptsPage\nimport com.lithic.api.models.EventListAttemptsParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: EventListAttemptsPage = client.events().listAttempts("event_token")\n}', + }, + python: { + method: 'events.list_attempts', + example: + '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.events.list_attempts(\n event_token="event_token",\n)\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'events.list_attempts', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.events.list_attempts("event_token")\n\nputs(page)', + }, + typescript: { + method: 'client.events.listAttempts', + example: + "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 messageAttempt of client.events.listAttempts('event_token')) {\n console.log(messageAttempt.token);\n}", + }, + }, }, { - name: 'create', + name: 'list', endpoint: '/v1/event_subscriptions', - httpMethod: 'post', - summary: 'Create event subscription', - description: 'Create a new event subscription.', - stainlessPath: '(resource) events.subscriptions > (method) create', + httpMethod: 'get', + summary: 'List event subscriptions', + description: 'List all the event subscriptions.', + stainlessPath: '(resource) events.subscriptions > (method) list', + qualified: 'client.events.subscriptions.list', + params: ['ending_before?: string;', 'page_size?: number;', 'starting_after?: string;'], + response: + '{ token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }', + markdown: + "## list\n\n`client.events.subscriptions.list(ending_before?: string, page_size?: number, starting_after?: string): { token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n\n**get** `/v1/event_subscriptions`\n\nList all the event subscriptions.\n\n### Parameters\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; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n A subscription to specific event types.\n\n - `token: string`\n - `description: string`\n - `disabled: boolean`\n - `url: string`\n - `event_types?: 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 eventSubscription of client.events.subscriptions.list()) {\n console.log(eventSubscription);\n}\n```", + perLanguage: { + go: { + method: 'client.Events.Subscriptions.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Events.Subscriptions.List(context.TODO(), lithic.EventSubscriptionListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/event_subscriptions \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'events().subscriptions().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.EventSubscriptionListPage;\nimport com.lithic.api.models.EventSubscriptionListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n EventSubscriptionListPage page = client.events().subscriptions().list();\n }\n}', + }, + kotlin: { + method: 'events().subscriptions().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.EventSubscriptionListPage\nimport com.lithic.api.models.EventSubscriptionListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: EventSubscriptionListPage = client.events().subscriptions().list()\n}', + }, + python: { + method: 'events.subscriptions.list', + example: + '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.events.subscriptions.list()\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'events.subscriptions.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.events.subscriptions.list\n\nputs(page)', + }, + typescript: { + method: 'client.events.subscriptions.list', + example: + "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 eventSubscription of client.events.subscriptions.list()) {\n console.log(eventSubscription.token);\n}", + }, + }, + }, + { + name: 'create', + endpoint: '/v1/event_subscriptions', + httpMethod: 'post', + summary: 'Create event subscription', + description: 'Create a new event subscription.', + stainlessPath: '(resource) events.subscriptions > (method) create', qualified: 'client.events.subscriptions.create', params: ['url: string;', 'description?: string;', 'disabled?: boolean;', 'event_types?: string[];'], response: '{ token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }', markdown: "## create\n\n`client.events.subscriptions.create(url: string, description?: string, disabled?: boolean, event_types?: string[]): { token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n\n**post** `/v1/event_subscriptions`\n\nCreate a new event subscription.\n\n### Parameters\n\n- `url: string`\n URL to which event webhooks will be sent. URL must be a valid HTTPS address.\n\n- `description?: string`\n Event subscription description.\n\n- `disabled?: boolean`\n Whether the event subscription is active (false) or inactive (true).\n\n- `event_types?: string[]`\n Indicates types of events that will be sent to this subscription. If left blank, all types will be sent.\n\n### Returns\n\n- `{ token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n A subscription to specific event types.\n\n - `token: string`\n - `description: string`\n - `disabled: boolean`\n - `url: string`\n - `event_types?: string[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst eventSubscription = await client.events.subscriptions.create({ url: 'https://example.com' });\n\nconsole.log(eventSubscription);\n```", + perLanguage: { + go: { + method: 'client.Events.Subscriptions.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\teventSubscription, err := client.Events.Subscriptions.New(context.TODO(), lithic.EventSubscriptionNewParams{\n\t\tURL: lithic.F("https://example.com"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", eventSubscription.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/event_subscriptions \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "url": "https://example.com"\n }\'', + }, + java: { + method: 'events().subscriptions().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.EventSubscription;\nimport com.lithic.api.models.EventSubscriptionCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n EventSubscriptionCreateParams params = EventSubscriptionCreateParams.builder()\n .url("https://example.com")\n .build();\n EventSubscription eventSubscription = client.events().subscriptions().create(params);\n }\n}', + }, + kotlin: { + method: 'events().subscriptions().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.EventSubscription\nimport com.lithic.api.models.EventSubscriptionCreateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: EventSubscriptionCreateParams = EventSubscriptionCreateParams.builder()\n .url("https://example.com")\n .build()\n val eventSubscription: EventSubscription = client.events().subscriptions().create(params)\n}', + }, + python: { + method: 'events.subscriptions.create', + example: + '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)\nevent_subscription = client.events.subscriptions.create(\n url="https://example.com",\n)\nprint(event_subscription.token)', + }, + ruby: { + method: 'events.subscriptions.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nevent_subscription = lithic.events.subscriptions.create(url: "https://example.com")\n\nputs(event_subscription)', + }, + typescript: { + method: 'client.events.subscriptions.create', + example: + "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\nconst eventSubscription = await client.events.subscriptions.create({ url: 'https://example.com' });\n\nconsole.log(eventSubscription.token);", + }, + }, }, { name: 'retrieve', @@ -1402,6 +4213,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }', markdown: "## retrieve\n\n`client.events.subscriptions.retrieve(event_subscription_token: string): { token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n\n**get** `/v1/event_subscriptions/{event_subscription_token}`\n\nGet an event subscription.\n\n### Parameters\n\n- `event_subscription_token: string`\n\n### Returns\n\n- `{ token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n A subscription to specific event types.\n\n - `token: string`\n - `description: string`\n - `disabled: boolean`\n - `url: string`\n - `event_types?: string[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst eventSubscription = await client.events.subscriptions.retrieve('event_subscription_token');\n\nconsole.log(eventSubscription);\n```", + perLanguage: { + go: { + method: 'client.Events.Subscriptions.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\teventSubscription, err := client.Events.Subscriptions.Get(context.TODO(), "event_subscription_token")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", eventSubscription.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'events().subscriptions().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.EventSubscription;\nimport com.lithic.api.models.EventSubscriptionRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n EventSubscription eventSubscription = client.events().subscriptions().retrieve("event_subscription_token");\n }\n}', + }, + kotlin: { + method: 'events().subscriptions().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.EventSubscription\nimport com.lithic.api.models.EventSubscriptionRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val eventSubscription: EventSubscription = client.events().subscriptions().retrieve("event_subscription_token")\n}', + }, + python: { + method: 'events.subscriptions.retrieve', + example: + '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)\nevent_subscription = client.events.subscriptions.retrieve(\n "event_subscription_token",\n)\nprint(event_subscription.token)', + }, + ruby: { + method: 'events.subscriptions.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nevent_subscription = lithic.events.subscriptions.retrieve("event_subscription_token")\n\nputs(event_subscription)', + }, + typescript: { + method: 'client.events.subscriptions.retrieve', + example: + "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\nconst eventSubscription = await client.events.subscriptions.retrieve('event_subscription_token');\n\nconsole.log(eventSubscription.token);", + }, + }, }, { name: 'update', @@ -1422,20 +4269,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }', markdown: "## update\n\n`client.events.subscriptions.update(event_subscription_token: string, url: string, description?: string, disabled?: boolean, event_types?: string[]): { token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n\n**patch** `/v1/event_subscriptions/{event_subscription_token}`\n\nUpdate an event subscription.\n\n### Parameters\n\n- `event_subscription_token: string`\n\n- `url: string`\n URL to which event webhooks will be sent. URL must be a valid HTTPS address.\n\n- `description?: string`\n Event subscription description.\n\n- `disabled?: boolean`\n Whether the event subscription is active (false) or inactive (true).\n\n- `event_types?: string[]`\n Indicates types of events that will be sent to this subscription. If left blank, all types will be sent.\n\n### Returns\n\n- `{ token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n A subscription to specific event types.\n\n - `token: string`\n - `description: string`\n - `disabled: boolean`\n - `url: string`\n - `event_types?: string[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst eventSubscription = await client.events.subscriptions.update('event_subscription_token', { url: 'https://example.com' });\n\nconsole.log(eventSubscription);\n```", - }, - { - name: 'list', - endpoint: '/v1/event_subscriptions', - httpMethod: 'get', - summary: 'List event subscriptions', - description: 'List all the event subscriptions.', - stainlessPath: '(resource) events.subscriptions > (method) list', - qualified: 'client.events.subscriptions.list', - params: ['ending_before?: string;', 'page_size?: number;', 'starting_after?: string;'], - response: - '{ token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }', - markdown: - "## list\n\n`client.events.subscriptions.list(ending_before?: string, page_size?: number, starting_after?: string): { token: string; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n\n**get** `/v1/event_subscriptions`\n\nList all the event subscriptions.\n\n### Parameters\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; description: string; disabled: boolean; url: string; event_types?: string[]; }`\n A subscription to specific event types.\n\n - `token: string`\n - `description: string`\n - `disabled: boolean`\n - `url: string`\n - `event_types?: 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 eventSubscription of client.events.subscriptions.list()) {\n console.log(eventSubscription);\n}\n```", + perLanguage: { + go: { + method: 'client.Events.Subscriptions.Update', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\teventSubscription, err := client.Events.Subscriptions.Update(\n\t\tcontext.TODO(),\n\t\t"event_subscription_token",\n\t\tlithic.EventSubscriptionUpdateParams{\n\t\t\tURL: lithic.F("https://example.com"),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", eventSubscription.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "url": "https://example.com"\n }\'', + }, + java: { + method: 'events().subscriptions().update', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.EventSubscription;\nimport com.lithic.api.models.EventSubscriptionUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n EventSubscriptionUpdateParams params = EventSubscriptionUpdateParams.builder()\n .eventSubscriptionToken("event_subscription_token")\n .url("https://example.com")\n .build();\n EventSubscription eventSubscription = client.events().subscriptions().update(params);\n }\n}', + }, + kotlin: { + method: 'events().subscriptions().update', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.EventSubscription\nimport com.lithic.api.models.EventSubscriptionUpdateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: EventSubscriptionUpdateParams = EventSubscriptionUpdateParams.builder()\n .eventSubscriptionToken("event_subscription_token")\n .url("https://example.com")\n .build()\n val eventSubscription: EventSubscription = client.events().subscriptions().update(params)\n}', + }, + python: { + method: 'events.subscriptions.update', + example: + '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)\nevent_subscription = client.events.subscriptions.update(\n event_subscription_token="event_subscription_token",\n url="https://example.com",\n)\nprint(event_subscription.token)', + }, + ruby: { + method: 'events.subscriptions.update', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nevent_subscription = lithic.events.subscriptions.update("event_subscription_token", url: "https://example.com")\n\nputs(event_subscription)', + }, + typescript: { + method: 'client.events.subscriptions.update', + example: + "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\nconst eventSubscription = await client.events.subscriptions.update('event_subscription_token', {\n url: 'https://example.com',\n});\n\nconsole.log(eventSubscription.token);", + }, + }, }, { name: 'delete', @@ -1448,6 +4317,90 @@ const EMBEDDED_METHODS: MethodEntry[] = [ params: ['event_subscription_token: string;'], markdown: "## delete\n\n`client.events.subscriptions.delete(event_subscription_token: string): void`\n\n**delete** `/v1/event_subscriptions/{event_subscription_token}`\n\nDelete an event subscription.\n\n### Parameters\n\n- `event_subscription_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.events.subscriptions.delete('event_subscription_token')\n```", + perLanguage: { + go: { + method: 'client.Events.Subscriptions.Delete', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.Events.Subscriptions.Delete(context.TODO(), "event_subscription_token")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'events().subscriptions().delete', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.EventSubscriptionDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n client.events().subscriptions().delete("event_subscription_token");\n }\n}', + }, + kotlin: { + method: 'events().subscriptions().delete', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.EventSubscriptionDeleteParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n client.events().subscriptions().delete("event_subscription_token")\n}', + }, + python: { + method: 'events.subscriptions.delete', + example: + '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)\nclient.events.subscriptions.delete(\n "event_subscription_token",\n)', + }, + ruby: { + method: 'events.subscriptions.delete', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.events.subscriptions.delete("event_subscription_token")\n\nputs(result)', + }, + typescript: { + method: 'client.events.subscriptions.delete', + example: + "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\nawait client.events.subscriptions.delete('event_subscription_token');", + }, + }, + }, + { + name: 'recover', + endpoint: '/v1/event_subscriptions/{event_subscription_token}/recover', + httpMethod: 'post', + summary: 'Resend failed messages', + description: 'Resend all failed messages since a given time.', + stainlessPath: '(resource) events.subscriptions > (method) recover', + qualified: 'client.events.subscriptions.recover', + params: ['event_subscription_token: string;', 'begin?: string;', 'end?: string;'], + markdown: + "## recover\n\n`client.events.subscriptions.recover(event_subscription_token: string, begin?: string, end?: string): void`\n\n**post** `/v1/event_subscriptions/{event_subscription_token}/recover`\n\nResend all failed messages since a given time.\n\n### Parameters\n\n- `event_subscription_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.events.subscriptions.recover('event_subscription_token')\n```", + perLanguage: { + go: { + method: 'client.Events.Subscriptions.Recover', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.Events.Subscriptions.Recover(\n\t\tcontext.TODO(),\n\t\t"event_subscription_token",\n\t\tlithic.EventSubscriptionRecoverParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/recover \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'events().subscriptions().recover', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.EventSubscriptionRecoverParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n client.events().subscriptions().recover("event_subscription_token");\n }\n}', + }, + kotlin: { + method: 'events().subscriptions().recover', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.EventSubscriptionRecoverParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n client.events().subscriptions().recover("event_subscription_token")\n}', + }, + python: { + method: 'events.subscriptions.recover', + example: + '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)\nclient.events.subscriptions.recover(\n event_subscription_token="event_subscription_token",\n)', + }, + ruby: { + method: 'events.subscriptions.recover', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.events.subscriptions.recover("event_subscription_token")\n\nputs(result)', + }, + typescript: { + method: 'client.events.subscriptions.recover', + example: + "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\nawait client.events.subscriptions.recover('event_subscription_token');", + }, + }, }, { name: 'list_attempts', @@ -1470,18 +4423,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; created: string; event_subscription_token: string; event_token: string; response: string; response_status_code: number; status: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'; url: string; }", markdown: "## list_attempts\n\n`client.events.subscriptions.listAttempts(event_subscription_token: string, begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string, status?: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'): { token: string; created: string; event_subscription_token: string; event_token: string; response: string; response_status_code: number; status: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'; url: string; }`\n\n**get** `/v1/event_subscriptions/{event_subscription_token}/attempts`\n\nList all the message attempts for a given event subscription.\n\n### Parameters\n\n- `event_subscription_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `status?: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'`\n\n### Returns\n\n- `{ token: string; created: string; event_subscription_token: string; event_token: string; response: string; response_status_code: number; status: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'; url: string; }`\n A subscription to specific event types.\n\n - `token: string`\n - `created: string`\n - `event_subscription_token: string`\n - `event_token: string`\n - `response: string`\n - `response_status_code: number`\n - `status: 'FAILED' | 'PENDING' | 'SENDING' | 'SUCCESS'`\n - `url: 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 messageAttempt of client.events.subscriptions.listAttempts('event_subscription_token')) {\n console.log(messageAttempt);\n}\n```", - }, - { - name: 'recover', - endpoint: '/v1/event_subscriptions/{event_subscription_token}/recover', - httpMethod: 'post', - summary: 'Resend failed messages', - description: 'Resend all failed messages since a given time.', - stainlessPath: '(resource) events.subscriptions > (method) recover', - qualified: 'client.events.subscriptions.recover', - params: ['event_subscription_token: string;', 'begin?: string;', 'end?: string;'], - markdown: - "## recover\n\n`client.events.subscriptions.recover(event_subscription_token: string, begin?: string, end?: string): void`\n\n**post** `/v1/event_subscriptions/{event_subscription_token}/recover`\n\nResend all failed messages since a given time.\n\n### Parameters\n\n- `event_subscription_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.events.subscriptions.recover('event_subscription_token')\n```", + perLanguage: { + go: { + method: 'client.Events.Subscriptions.ListAttempts', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Events.Subscriptions.ListAttempts(\n\t\tcontext.TODO(),\n\t\t"event_subscription_token",\n\t\tlithic.EventSubscriptionListAttemptsParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/attempts \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'events().subscriptions().listAttempts', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.EventSubscriptionListAttemptsPage;\nimport com.lithic.api.models.EventSubscriptionListAttemptsParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n EventSubscriptionListAttemptsPage page = client.events().subscriptions().listAttempts("event_subscription_token");\n }\n}', + }, + kotlin: { + method: 'events().subscriptions().listAttempts', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.EventSubscriptionListAttemptsPage\nimport com.lithic.api.models.EventSubscriptionListAttemptsParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: EventSubscriptionListAttemptsPage = client.events().subscriptions().listAttempts("event_subscription_token")\n}', + }, + python: { + method: 'events.subscriptions.list_attempts', + example: + '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.events.subscriptions.list_attempts(\n event_subscription_token="event_subscription_token",\n)\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'events.subscriptions.list_attempts', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.events.subscriptions.list_attempts("event_subscription_token")\n\nputs(page)', + }, + typescript: { + method: 'client.events.subscriptions.listAttempts', + example: + "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 messageAttempt of client.events.subscriptions.listAttempts(\n 'event_subscription_token',\n)) {\n console.log(messageAttempt.token);\n}", + }, + }, }, { name: 'replay_missing', @@ -1495,6 +4472,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ params: ['event_subscription_token: string;', 'begin?: string;', 'end?: string;'], markdown: "## replay_missing\n\n`client.events.subscriptions.replayMissing(event_subscription_token: string, begin?: string, end?: string): void`\n\n**post** `/v1/event_subscriptions/{event_subscription_token}/replay_missing`\n\nReplays messages to the endpoint. Only messages that were created after `begin` will be sent. Messages that were previously sent to the endpoint are not resent.\nMessage will be retried if endpoint responds with a non-2xx status code. See [Retry Schedule](https://docs.lithic.com/docs/events-api#retry-schedule) for details.\n\n\n### Parameters\n\n- `event_subscription_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.events.subscriptions.replayMissing('event_subscription_token')\n```", + perLanguage: { + go: { + method: 'client.Events.Subscriptions.ReplayMissing', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.Events.Subscriptions.ReplayMissing(\n\t\tcontext.TODO(),\n\t\t"event_subscription_token",\n\t\tlithic.EventSubscriptionReplayMissingParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/replay_missing \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'events().subscriptions().replayMissing', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.EventSubscriptionReplayMissingParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n client.events().subscriptions().replayMissing("event_subscription_token");\n }\n}', + }, + kotlin: { + method: 'events().subscriptions().replayMissing', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.EventSubscriptionReplayMissingParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n client.events().subscriptions().replayMissing("event_subscription_token")\n}', + }, + python: { + method: 'events.subscriptions.replay_missing', + example: + '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)\nclient.events.subscriptions.replay_missing(\n event_subscription_token="event_subscription_token",\n)', + }, + ruby: { + method: 'events.subscriptions.replay_missing', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.events.subscriptions.replay_missing("event_subscription_token")\n\nputs(result)', + }, + typescript: { + method: 'client.events.subscriptions.replayMissing', + example: + "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\nawait client.events.subscriptions.replayMissing('event_subscription_token');", + }, + }, }, { name: 'retrieve_secret', @@ -1508,6 +4521,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: '{ secret?: string; }', markdown: "## retrieve_secret\n\n`client.events.subscriptions.retrieveSecret(event_subscription_token: string): { secret?: string; }`\n\n**get** `/v1/event_subscriptions/{event_subscription_token}/secret`\n\nGet the secret for an event subscription.\n\n### Parameters\n\n- `event_subscription_token: string`\n\n### Returns\n\n- `{ secret?: string; }`\n\n - `secret?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.events.subscriptions.retrieveSecret('event_subscription_token');\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Events.Subscriptions.GetSecret', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Events.Subscriptions.GetSecret(context.TODO(), "event_subscription_token")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Secret)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/secret \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'events().subscriptions().retrieveSecret', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.EventSubscriptionRetrieveSecretParams;\nimport com.lithic.api.models.SubscriptionRetrieveSecretResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n SubscriptionRetrieveSecretResponse response = client.events().subscriptions().retrieveSecret("event_subscription_token");\n }\n}', + }, + kotlin: { + method: 'events().subscriptions().retrieveSecret', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.EventSubscriptionRetrieveSecretParams\nimport com.lithic.api.models.SubscriptionRetrieveSecretResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val response: SubscriptionRetrieveSecretResponse = client.events().subscriptions().retrieveSecret("event_subscription_token")\n}', + }, + python: { + method: 'events.subscriptions.retrieve_secret', + example: + '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)\nresponse = client.events.subscriptions.retrieve_secret(\n "event_subscription_token",\n)\nprint(response.secret)', + }, + ruby: { + method: 'events.subscriptions.retrieve_secret', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.events.subscriptions.retrieve_secret("event_subscription_token")\n\nputs(response)', + }, + typescript: { + method: 'client.events.subscriptions.retrieveSecret', + example: + "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\nconst response = await client.events.subscriptions.retrieveSecret('event_subscription_token');\n\nconsole.log(response.secret);", + }, + }, }, { name: 'rotate_secret', @@ -1521,6 +4570,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ params: ['event_subscription_token: string;'], markdown: "## rotate_secret\n\n`client.events.subscriptions.rotateSecret(event_subscription_token: string): void`\n\n**post** `/v1/event_subscriptions/{event_subscription_token}/secret/rotate`\n\nRotate the secret for an event subscription. The previous secret will be valid for the next 24 hours.\n\n\n### Parameters\n\n- `event_subscription_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.events.subscriptions.rotateSecret('event_subscription_token')\n```", + perLanguage: { + go: { + method: 'client.Events.Subscriptions.RotateSecret', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.Events.Subscriptions.RotateSecret(context.TODO(), "event_subscription_token")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/secret/rotate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'events().subscriptions().rotateSecret', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.EventSubscriptionRotateSecretParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n client.events().subscriptions().rotateSecret("event_subscription_token");\n }\n}', + }, + kotlin: { + method: 'events().subscriptions().rotateSecret', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.EventSubscriptionRotateSecretParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n client.events().subscriptions().rotateSecret("event_subscription_token")\n}', + }, + python: { + method: 'events.subscriptions.rotate_secret', + example: + '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)\nclient.events.subscriptions.rotate_secret(\n "event_subscription_token",\n)', + }, + ruby: { + method: 'events.subscriptions.rotate_secret', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.events.subscriptions.rotate_secret("event_subscription_token")\n\nputs(result)', + }, + typescript: { + method: 'client.events.subscriptions.rotateSecret', + example: + "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\nawait client.events.subscriptions.rotateSecret('event_subscription_token');", + }, + }, }, { name: 'send_simulated_example', @@ -1533,6 +4618,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ params: ['event_subscription_token: string;', 'event_type?: string;'], markdown: "## send_simulated_example\n\n`client.events.subscriptions.sendSimulatedExample(event_subscription_token: string, event_type?: string): void`\n\n**post** `/v1/simulate/event_subscriptions/{event_subscription_token}/send_example`\n\nSend an example message for event.\n\n### Parameters\n\n- `event_subscription_token: string`\n\n- `event_type?: string`\n Event type to send example message for.\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.events.subscriptions.sendSimulatedExample('event_subscription_token')\n```", + perLanguage: { + go: { + method: 'client.Events.Subscriptions.SendSimulatedExample', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.Events.Subscriptions.SendSimulatedExample(\n\t\tcontext.TODO(),\n\t\t"event_subscription_token",\n\t\tlithic.EventSubscriptionSendSimulatedExampleParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/simulate/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/send_example \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'events().subscriptions().sendSimulatedExample', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.EventSubscriptionSendSimulatedExampleParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n client.events().subscriptions().sendSimulatedExample("event_subscription_token");\n }\n}', + }, + kotlin: { + method: 'events().subscriptions().sendSimulatedExample', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.EventSubscriptionSendSimulatedExampleParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n client.events().subscriptions().sendSimulatedExample("event_subscription_token")\n}', + }, + python: { + method: 'events.subscriptions.send_simulated_example', + example: + '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)\nclient.events.subscriptions.send_simulated_example(\n event_subscription_token="event_subscription_token",\n)', + }, + ruby: { + method: 'events.subscriptions.send_simulated_example', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.events.subscriptions.send_simulated_example("event_subscription_token")\n\nputs(result)', + }, + typescript: { + method: 'client.events.subscriptions.sendSimulatedExample', + example: + "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\nawait client.events.subscriptions.sendSimulatedExample('event_subscription_token');", + }, + }, }, { name: 'resend', @@ -1545,6 +4666,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ params: ['event_token: string;', 'event_subscription_token: string;'], markdown: "## resend\n\n`client.events.eventSubscriptions.resend(event_token: string, event_subscription_token: string): void`\n\n**post** `/v1/events/{event_token}/event_subscriptions/{event_subscription_token}/resend`\n\nResend an event to an event subscription.\n\n### Parameters\n\n- `event_token: string`\n\n- `event_subscription_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.events.eventSubscriptions.resend('event_subscription_token', { event_token: 'event_token' })\n```", + perLanguage: { + go: { + method: 'client.Events.EventSubscriptions.Resend', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.Events.EventSubscriptions.Resend(\n\t\tcontext.TODO(),\n\t\t"event_token",\n\t\t"event_subscription_token",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/events/$EVENT_TOKEN/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/resend \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'events().eventSubscriptions().resend', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.EventEventSubscriptionResendParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n EventEventSubscriptionResendParams params = EventEventSubscriptionResendParams.builder()\n .eventToken("event_token")\n .eventSubscriptionToken("event_subscription_token")\n .build();\n client.events().eventSubscriptions().resend(params);\n }\n}', + }, + kotlin: { + method: 'events().eventSubscriptions().resend', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.EventEventSubscriptionResendParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: EventEventSubscriptionResendParams = EventEventSubscriptionResendParams.builder()\n .eventToken("event_token")\n .eventSubscriptionToken("event_subscription_token")\n .build()\n client.events().eventSubscriptions().resend(params)\n}', + }, + python: { + method: 'events.event_subscriptions.resend', + example: + '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)\nclient.events.event_subscriptions.resend(\n event_subscription_token="event_subscription_token",\n event_token="event_token",\n)', + }, + ruby: { + method: 'events.event_subscriptions.resend', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.events.event_subscriptions.resend("event_subscription_token", event_token: "event_token")\n\nputs(result)', + }, + typescript: { + method: 'client.events.eventSubscriptions.resend', + example: + "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\nawait client.events.eventSubscriptions.resend('event_subscription_token', {\n event_token: 'event_token',\n});", + }, + }, }, { name: 'create', @@ -1559,26 +4716,91 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token?: string; category?: 'TRANSFER'; created?: string; currency?: string; descriptor?: string; events?: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; from_balance?: { available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }[]; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; to_balance?: { available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }[]; updated?: string; }", markdown: "## create\n\n`client.transfers.create(amount: number, from: string, to: string, token?: string, memo?: string): { token?: string; category?: 'TRANSFER'; created?: string; currency?: string; descriptor?: string; events?: financial_event[]; from_balance?: balance[]; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; to_balance?: balance[]; updated?: string; }`\n\n**post** `/v1/transfer`\n\nTransfer funds between two financial accounts or between a financial account and card\n\n### Parameters\n\n- `amount: number`\n Amount to be transferred in the currency’s smallest unit (e.g., cents for USD). This should always be a positive value.\n\n- `from: string`\n Globally unique identifier for the financial account or card that will send the funds. Accepted type dependent on the program's use case.\n\n- `to: string`\n Globally unique identifier for the financial account or card that will receive the funds. Accepted type dependent on the program's use case.\n\n- `token?: string`\n Customer-provided token that will serve as an idempotency token. This token will become the transaction token.\n\n- `memo?: string`\n Optional descriptor for the transfer.\n\n### Returns\n\n- `{ token?: string; category?: 'TRANSFER'; created?: string; currency?: string; descriptor?: string; events?: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; from_balance?: { available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }[]; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; to_balance?: { available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }[]; updated?: string; }`\n\n - `token?: string`\n - `category?: 'TRANSFER'`\n - `created?: string`\n - `currency?: string`\n - `descriptor?: string`\n - `events?: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]`\n - `from_balance?: { available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }[]`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'`\n - `to_balance?: { available_amount: number; created: string; currency: string; financial_account_token: string; financial_account_type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; updated: string; }[]`\n - `updated?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst transfer = await client.transfers.create({\n amount: 0,\n from: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n to: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(transfer);\n```", + perLanguage: { + go: { + method: 'client.Transfers.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\ttransfer, err := client.Transfers.New(context.TODO(), lithic.TransferNewParams{\n\t\tAmount: lithic.F(int64(0)),\n\t\tFrom: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),\n\t\tTo: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", transfer.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/transfer \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "amount": 0,\n "from": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "to": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }\'', + }, + java: { + method: 'transfers().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Transfer;\nimport com.lithic.api.models.TransferCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n TransferCreateParams params = TransferCreateParams.builder()\n .amount(0L)\n .from("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .to("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n Transfer transfer = client.transfers().create(params);\n }\n}', + }, + kotlin: { + method: 'transfers().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Transfer\nimport com.lithic.api.models.TransferCreateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: TransferCreateParams = TransferCreateParams.builder()\n .amount(0L)\n .from("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .to("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build()\n val transfer: Transfer = client.transfers().create(params)\n}', + }, + ruby: { + method: 'transfers.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ntransfer = lithic.transfers.create(\n amount: 0,\n from: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n to: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n)\n\nputs(transfer)', + }, + typescript: { + method: 'client.transfers.create', + example: + "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\nconst transfer = await client.transfers.create({\n amount: 0,\n from: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n to: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(transfer.token);", + }, + }, }, { - name: 'create', + name: 'list', endpoint: '/v1/financial_accounts', - httpMethod: 'post', - summary: 'Create financial account', - description: 'Create a new financial account', - stainlessPath: '(resource) financial_accounts > (method) create', - qualified: 'client.financialAccounts.create', + httpMethod: 'get', + summary: 'List financial accounts', + description: 'Retrieve information on your financial accounts including routing and account number.', + stainlessPath: '(resource) financial_accounts > (method) list', + qualified: 'client.financialAccounts.list', params: [ - 'nickname: string;', - "type: 'OPERATING';", 'account_token?: string;', - 'is_for_benefit_of?: boolean;', - 'Idempotency-Key?: string;', + 'business_account_token?: string;', + "type?: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY' | 'EARLY_DIRECT_DEPOSIT_FLOAT';", ], response: "{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }", markdown: - "## create\n\n`client.financialAccounts.create(nickname: string, type: 'OPERATING', account_token?: string, is_for_benefit_of?: boolean, Idempotency-Key?: string): { token: string; account_token: string; created: string; credit_configuration: object; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n**post** `/v1/financial_accounts`\n\nCreate a new financial account\n\n### Parameters\n\n- `nickname: string`\n\n- `type: 'OPERATING'`\n\n- `account_token?: string`\n\n- `is_for_benefit_of?: boolean`\n\n- `Idempotency-Key?: string`\n\n### Returns\n\n- `{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `created: string`\n - `credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n - `is_for_benefit_of: boolean`\n - `nickname: string`\n - `status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'`\n - `substatus: string`\n - `type: string`\n - `updated: string`\n - `user_defined_status: string`\n - `account_number?: string`\n - `routing_number?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialAccount = await client.financialAccounts.create({ nickname: 'nickname', type: 'OPERATING' });\n\nconsole.log(financialAccount);\n```", + "## list\n\n`client.financialAccounts.list(account_token?: string, business_account_token?: string, type?: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY' | 'EARLY_DIRECT_DEPOSIT_FLOAT'): { token: string; account_token: string; created: string; credit_configuration: object; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n**get** `/v1/financial_accounts`\n\nRetrieve information on your financial accounts including routing and account number.\n\n### Parameters\n\n- `account_token?: string`\n List financial accounts for a given account_token or business_account_token\n\n- `business_account_token?: string`\n List financial accounts for a given business_account_token\n\n- `type?: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY' | 'EARLY_DIRECT_DEPOSIT_FLOAT'`\n List financial accounts of a given type\n\n### Returns\n\n- `{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `created: string`\n - `credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n - `is_for_benefit_of: boolean`\n - `nickname: string`\n - `status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'`\n - `substatus: string`\n - `type: string`\n - `updated: string`\n - `user_defined_status: string`\n - `account_number?: string`\n - `routing_number?: 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 financialAccount of client.financialAccounts.list()) {\n console.log(financialAccount);\n}\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.FinancialAccounts.List(context.TODO(), lithic.FinancialAccountListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccountListPage;\nimport com.lithic.api.models.FinancialAccountListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountListPage page = client.financialAccounts().list();\n }\n}', + }, + kotlin: { + method: 'financialAccounts().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccountListPage\nimport com.lithic.api.models.FinancialAccountListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: FinancialAccountListPage = client.financialAccounts().list()\n}', + }, + python: { + method: 'financial_accounts.list', + example: + '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.financial_accounts.list()\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'financial_accounts.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.financial_accounts.list\n\nputs(page)', + }, + typescript: { + method: 'client.financialAccounts.list', + example: + "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 financialAccount of client.financialAccounts.list()) {\n console.log(financialAccount.token);\n}", + }, + }, }, { name: 'retrieve', @@ -1593,6 +4815,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }", markdown: "## retrieve\n\n`client.financialAccounts.retrieve(financial_account_token: string): { token: string; account_token: string; created: string; credit_configuration: object; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}`\n\nGet a financial account\n\n### Parameters\n\n- `financial_account_token: string`\n\n### Returns\n\n- `{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `created: string`\n - `credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n - `is_for_benefit_of: boolean`\n - `nickname: string`\n - `status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'`\n - `substatus: string`\n - `type: string`\n - `updated: string`\n - `user_defined_status: string`\n - `account_number?: string`\n - `routing_number?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialAccount = await client.financialAccounts.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(financialAccount);\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tfinancialAccount, err := client.FinancialAccounts.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", financialAccount.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccount;\nimport com.lithic.api.models.FinancialAccountRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccount financialAccount = client.financialAccounts().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'financialAccounts().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccount\nimport com.lithic.api.models.FinancialAccountRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val financialAccount: FinancialAccount = client.financialAccounts().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'financial_accounts.retrieve', + example: + '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)\nfinancial_account = client.financial_accounts.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(financial_account.token)', + }, + ruby: { + method: 'financial_accounts.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nfinancial_account = lithic.financial_accounts.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(financial_account)', + }, + typescript: { + method: 'client.financialAccounts.retrieve', + example: + "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\nconst financialAccount = await client.financialAccounts.retrieve(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(financialAccount.token);", + }, + }, }, { name: 'update', @@ -1607,24 +4865,153 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }", markdown: "## update\n\n`client.financialAccounts.update(financial_account_token: string, nickname?: string): { token: string; account_token: string; created: string; credit_configuration: object; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n**patch** `/v1/financial_accounts/{financial_account_token}`\n\nUpdate a financial account\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `nickname?: string`\n\n### Returns\n\n- `{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `created: string`\n - `credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n - `is_for_benefit_of: boolean`\n - `nickname: string`\n - `status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'`\n - `substatus: string`\n - `type: string`\n - `updated: string`\n - `user_defined_status: string`\n - `account_number?: string`\n - `routing_number?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialAccount = await client.financialAccounts.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(financialAccount);\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.Update', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tfinancialAccount, err := client.FinancialAccounts.Update(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.FinancialAccountUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", financialAccount.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN \\\n -X PATCH \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().update', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccount;\nimport com.lithic.api.models.FinancialAccountUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccount financialAccount = client.financialAccounts().update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'financialAccounts().update', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccount\nimport com.lithic.api.models.FinancialAccountUpdateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val financialAccount: FinancialAccount = client.financialAccounts().update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'financial_accounts.update', + example: + '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)\nfinancial_account = client.financial_accounts.update(\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(financial_account.token)', + }, + ruby: { + method: 'financial_accounts.update', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nfinancial_account = lithic.financial_accounts.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(financial_account)', + }, + typescript: { + method: 'client.financialAccounts.update', + example: + "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\nconst financialAccount = await client.financialAccounts.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(financialAccount.token);", + }, + }, }, { - name: 'list', + name: 'update_status', + endpoint: '/v1/financial_accounts/{financial_account_token}/update_status', + httpMethod: 'post', + summary: 'Update financial account status', + description: 'Update financial account status', + stainlessPath: '(resource) financial_accounts > (method) update_status', + qualified: 'client.financialAccounts.updateStatus', + params: [ + 'financial_account_token: string;', + "status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING';", + 'substatus: string;', + 'user_defined_status?: string;', + ], + response: + "{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }", + markdown: + "## update_status\n\n`client.financialAccounts.updateStatus(financial_account_token: string, status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING', substatus: string, user_defined_status?: string): { token: string; account_token: string; created: string; credit_configuration: object; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n**post** `/v1/financial_accounts/{financial_account_token}/update_status`\n\nUpdate financial account status\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'`\n Status of the financial account\n\n- `substatus: string`\n Substatus for the financial account\n\n- `user_defined_status?: string`\n User-defined status for the financial account\n\n### Returns\n\n- `{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `created: string`\n - `credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n - `is_for_benefit_of: boolean`\n - `nickname: string`\n - `status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'`\n - `substatus: string`\n - `type: string`\n - `updated: string`\n - `user_defined_status: string`\n - `account_number?: string`\n - `routing_number?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialAccount = await client.financialAccounts.updateStatus('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { status: 'OPEN', substatus: 'CHARGED_OFF_FRAUD' });\n\nconsole.log(financialAccount);\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.UpdateStatus', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tfinancialAccount, err := client.FinancialAccounts.UpdateStatus(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.FinancialAccountUpdateStatusParams{\n\t\t\tStatus: lithic.F(lithic.FinancialAccountUpdateStatusParamsStatusOpen),\n\t\t\tSubstatus: lithic.F(lithic.FinancialAccountUpdateStatusParamsSubstatusChargedOffFraud),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", financialAccount.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/update_status \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "status": "OPEN",\n "substatus": "CHARGED_OFF_FRAUD"\n }\'', + }, + java: { + method: 'financialAccounts().updateStatus', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccount;\nimport com.lithic.api.models.FinancialAccountUpdateStatusParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountUpdateStatusParams params = FinancialAccountUpdateStatusParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .status(FinancialAccountUpdateStatusParams.FinancialAccountStatus.CLOSED)\n .substatus(FinancialAccountUpdateStatusParams.UpdateFinancialAccountSubstatus.END_USER_REQUEST)\n .build();\n FinancialAccount financialAccount = client.financialAccounts().updateStatus(params);\n }\n}', + }, + kotlin: { + method: 'financialAccounts().updateStatus', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccount\nimport com.lithic.api.models.FinancialAccountUpdateStatusParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: FinancialAccountUpdateStatusParams = FinancialAccountUpdateStatusParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .status(FinancialAccountUpdateStatusParams.FinancialAccountStatus.CLOSED)\n .substatus(FinancialAccountUpdateStatusParams.UpdateFinancialAccountSubstatus.END_USER_REQUEST)\n .build()\n val financialAccount: FinancialAccount = client.financialAccounts().updateStatus(params)\n}', + }, + python: { + method: 'financial_accounts.update_status', + example: + '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)\nfinancial_account = client.financial_accounts.update_status(\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n status="OPEN",\n substatus="CHARGED_OFF_FRAUD",\n)\nprint(financial_account.token)', + }, + ruby: { + method: 'financial_accounts.update_status', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nfinancial_account = lithic.financial_accounts.update_status(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n status: :OPEN,\n substatus: :CHARGED_OFF_FRAUD\n)\n\nputs(financial_account)', + }, + typescript: { + method: 'client.financialAccounts.updateStatus', + example: + "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\nconst financialAccount = await client.financialAccounts.updateStatus(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { status: 'OPEN', substatus: 'CHARGED_OFF_FRAUD' },\n);\n\nconsole.log(financialAccount.token);", + }, + }, + }, + { + name: 'create', endpoint: '/v1/financial_accounts', - httpMethod: 'get', - summary: 'List financial accounts', - description: 'Retrieve information on your financial accounts including routing and account number.', - stainlessPath: '(resource) financial_accounts > (method) list', - qualified: 'client.financialAccounts.list', + httpMethod: 'post', + summary: 'Create financial account', + description: 'Create a new financial account', + stainlessPath: '(resource) financial_accounts > (method) create', + qualified: 'client.financialAccounts.create', params: [ + 'nickname: string;', + "type: 'OPERATING';", 'account_token?: string;', - 'business_account_token?: string;', - "type?: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY' | 'EARLY_DIRECT_DEPOSIT_FLOAT';", + 'is_for_benefit_of?: boolean;', + 'Idempotency-Key?: string;', ], response: "{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }", markdown: - "## list\n\n`client.financialAccounts.list(account_token?: string, business_account_token?: string, type?: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY' | 'EARLY_DIRECT_DEPOSIT_FLOAT'): { token: string; account_token: string; created: string; credit_configuration: object; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n**get** `/v1/financial_accounts`\n\nRetrieve information on your financial accounts including routing and account number.\n\n### Parameters\n\n- `account_token?: string`\n List financial accounts for a given account_token or business_account_token\n\n- `business_account_token?: string`\n List financial accounts for a given business_account_token\n\n- `type?: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY' | 'EARLY_DIRECT_DEPOSIT_FLOAT'`\n List financial accounts of a given type\n\n### Returns\n\n- `{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `created: string`\n - `credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n - `is_for_benefit_of: boolean`\n - `nickname: string`\n - `status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'`\n - `substatus: string`\n - `type: string`\n - `updated: string`\n - `user_defined_status: string`\n - `account_number?: string`\n - `routing_number?: 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 financialAccount of client.financialAccounts.list()) {\n console.log(financialAccount);\n}\n```", + "## create\n\n`client.financialAccounts.create(nickname: string, type: 'OPERATING', account_token?: string, is_for_benefit_of?: boolean, Idempotency-Key?: string): { token: string; account_token: string; created: string; credit_configuration: object; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n**post** `/v1/financial_accounts`\n\nCreate a new financial account\n\n### Parameters\n\n- `nickname: string`\n\n- `type: 'OPERATING'`\n\n- `account_token?: string`\n\n- `is_for_benefit_of?: boolean`\n\n- `Idempotency-Key?: string`\n\n### Returns\n\n- `{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `created: string`\n - `credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n - `is_for_benefit_of: boolean`\n - `nickname: string`\n - `status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'`\n - `substatus: string`\n - `type: string`\n - `updated: string`\n - `user_defined_status: string`\n - `account_number?: string`\n - `routing_number?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialAccount = await client.financialAccounts.create({ nickname: 'nickname', type: 'OPERATING' });\n\nconsole.log(financialAccount);\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tfinancialAccount, err := client.FinancialAccounts.New(context.TODO(), lithic.FinancialAccountNewParams{\n\t\tNickname: lithic.F("nickname"),\n\t\tType: lithic.F(lithic.FinancialAccountNewParamsTypeOperating),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", financialAccount.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "nickname": "nickname",\n "type": "OPERATING"\n }\'', + }, + java: { + method: 'financialAccounts().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccount;\nimport com.lithic.api.models.FinancialAccountCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountCreateParams params = FinancialAccountCreateParams.builder()\n .nickname("nickname")\n .type(FinancialAccountCreateParams.Type.OPERATING)\n .build();\n FinancialAccount financialAccount = client.financialAccounts().create(params);\n }\n}', + }, + kotlin: { + method: 'financialAccounts().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccount\nimport com.lithic.api.models.FinancialAccountCreateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: FinancialAccountCreateParams = FinancialAccountCreateParams.builder()\n .nickname("nickname")\n .type(FinancialAccountCreateParams.Type.OPERATING)\n .build()\n val financialAccount: FinancialAccount = client.financialAccounts().create(params)\n}', + }, + python: { + method: 'financial_accounts.create', + example: + '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)\nfinancial_account = client.financial_accounts.create(\n nickname="nickname",\n type="OPERATING",\n)\nprint(financial_account.token)', + }, + ruby: { + method: 'financial_accounts.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nfinancial_account = lithic.financial_accounts.create(nickname: "nickname", type: :OPERATING)\n\nputs(financial_account)', + }, + typescript: { + method: 'client.financialAccounts.create', + example: + "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\nconst financialAccount = await client.financialAccounts.create({\n nickname: 'nickname',\n type: 'OPERATING',\n});\n\nconsole.log(financialAccount.token);", + }, + }, }, { name: 'register_account_number', @@ -1637,25 +5024,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ params: ['financial_account_token: string;', 'account_number: string;'], markdown: "## register_account_number\n\n`client.financialAccounts.registerAccountNumber(financial_account_token: string, account_number: string): void`\n\n**post** `/v1/financial_accounts/{financial_account_token}/register_account_number`\n\nRegister account number\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `account_number: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.financialAccounts.registerAccountNumber('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_number: 'account_number' })\n```", - }, - { - name: 'update_status', - endpoint: '/v1/financial_accounts/{financial_account_token}/update_status', - httpMethod: 'post', - summary: 'Update financial account status', - description: 'Update financial account status', - stainlessPath: '(resource) financial_accounts > (method) update_status', - qualified: 'client.financialAccounts.updateStatus', - params: [ - 'financial_account_token: string;', - "status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING';", - 'substatus: string;', - 'user_defined_status?: string;', - ], - response: - "{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }", - markdown: - "## update_status\n\n`client.financialAccounts.updateStatus(financial_account_token: string, status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING', substatus: string, user_defined_status?: string): { token: string; account_token: string; created: string; credit_configuration: object; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n**post** `/v1/financial_accounts/{financial_account_token}/update_status`\n\nUpdate financial account status\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'`\n Status of the financial account\n\n- `substatus: string`\n Substatus for the financial account\n\n- `user_defined_status?: string`\n User-defined status for the financial account\n\n### Returns\n\n- `{ token: string; account_token: string; created: string; credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }; is_for_benefit_of: boolean; nickname: string; status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus: string; type: string; updated: string; user_defined_status: string; account_number?: string; routing_number?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `created: string`\n - `credit_configuration: { auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n - `is_for_benefit_of: boolean`\n - `nickname: string`\n - `status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'`\n - `substatus: string`\n - `type: string`\n - `updated: string`\n - `user_defined_status: string`\n - `account_number?: string`\n - `routing_number?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialAccount = await client.financialAccounts.updateStatus('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { status: 'OPEN', substatus: 'CHARGED_OFF_FRAUD' });\n\nconsole.log(financialAccount);\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.RegisterAccountNumber', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.FinancialAccounts.RegisterAccountNumber(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.FinancialAccountRegisterAccountNumberParams{\n\t\t\tAccountNumber: lithic.F("account_number"),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/register_account_number \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "account_number": "account_number"\n }\'', + }, + java: { + method: 'financialAccounts().registerAccountNumber', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccountRegisterAccountNumberParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountRegisterAccountNumberParams params = FinancialAccountRegisterAccountNumberParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .accountNumber("account_number")\n .build();\n client.financialAccounts().registerAccountNumber(params);\n }\n}', + }, + kotlin: { + method: 'financialAccounts().registerAccountNumber', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccountRegisterAccountNumberParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: FinancialAccountRegisterAccountNumberParams = FinancialAccountRegisterAccountNumberParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .accountNumber("account_number")\n .build()\n client.financialAccounts().registerAccountNumber(params)\n}', + }, + python: { + method: 'financial_accounts.register_account_number', + example: + '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)\nclient.financial_accounts.register_account_number(\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n account_number="account_number",\n)', + }, + ruby: { + method: 'financial_accounts.register_account_number', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.financial_accounts.register_account_number(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n account_number: "account_number"\n)\n\nputs(result)', + }, + typescript: { + method: 'client.financialAccounts.registerAccountNumber', + example: + "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\nawait client.financialAccounts.registerAccountNumber('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n account_number: 'account_number',\n});", + }, + }, }, { name: 'list', @@ -1674,21 +5078,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; available_amount: number; created: string; currency: string; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; updated: string; }", markdown: "## list\n\n`client.financialAccounts.balances.list(financial_account_token: string, balance_date?: string, last_transaction_event_token?: string): { token: string; available_amount: number; created: string; currency: string; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; updated: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/balances`\n\nGet the balances for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `balance_date?: string`\n UTC date of the balance to retrieve. Defaults to latest available balance\n\n- `last_transaction_event_token?: string`\n Balance after a given financial event occured.\nFor example, passing the event_token of a $5 CARD_CLEARING financial event will return a balance decreased by $5\n\n\n### Returns\n\n- `{ token: string; available_amount: number; created: string; currency: string; last_transaction_event_token: string; last_transaction_token: string; pending_amount: number; total_amount: number; type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'; updated: string; }`\n Balance of a Financial Account\n\n - `token: string`\n - `available_amount: number`\n - `created: string`\n - `currency: string`\n - `last_transaction_event_token: string`\n - `last_transaction_token: string`\n - `pending_amount: number`\n - `total_amount: number`\n - `type: 'ISSUING' | 'OPERATING' | 'RESERVE' | 'SECURITY'`\n - `updated: 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 financialAccountBalance of client.financialAccounts.balances.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(financialAccountBalance);\n}\n```", - }, - { - name: 'retrieve', - endpoint: - '/v1/financial_accounts/{financial_account_token}/financial_transactions/{financial_transaction_token}', - httpMethod: 'get', - summary: 'Get financial transaction', - description: 'Get the financial transaction for the provided token.', - stainlessPath: '(resource) financial_accounts.financial_transactions > (method) retrieve', - qualified: 'client.financialAccounts.financialTransactions.retrieve', - params: ['financial_account_token: string;', 'financial_transaction_token: string;'], - response: - "{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }", - markdown: - "## retrieve\n\n`client.financialAccounts.financialTransactions.retrieve(financial_account_token: string, financial_transaction_token: string): { token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: financial_event[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/financial_transactions/{financial_transaction_token}`\n\nGet the financial transaction for the provided token.\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `financial_transaction_token: string`\n\n### Returns\n\n- `{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n - `token: string`\n - `category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'`\n - `created: string`\n - `currency: string`\n - `descriptor: string`\n - `events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialTransaction = await client.financialAccounts.financialTransactions.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(financialTransaction);\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.Balances.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.FinancialAccounts.Balances.List(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.FinancialAccountBalanceListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/balances \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().balances().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccountBalanceListPage;\nimport com.lithic.api.models.FinancialAccountBalanceListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountBalanceListPage page = client.financialAccounts().balances().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'financialAccounts().balances().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccountBalanceListPage\nimport com.lithic.api.models.FinancialAccountBalanceListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: FinancialAccountBalanceListPage = client.financialAccounts().balances().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'financial_accounts.balances.list', + example: + '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.financial_accounts.balances.list(\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'financial_accounts.balances.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.financial_accounts.balances.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(page)', + }, + typescript: { + method: 'client.financialAccounts.balances.list', + example: + "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 financialAccountBalance of client.financialAccounts.balances.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n)) {\n console.log(financialAccountBalance.token);\n}", + }, + }, }, { name: 'list', @@ -1712,6 +5137,93 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }", markdown: "## list\n\n`client.financialAccounts.financialTransactions.list(financial_account_token: string, begin?: string, category?: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER', end?: string, ending_before?: string, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'): { token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: financial_event[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/financial_transactions`\n\nList the financial transactions for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `category?: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'`\n Financial Transaction category to be returned.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `result?: 'APPROVED' | 'DECLINED'`\n Financial Transaction result to be returned.\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- `status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'`\n Financial Transaction status to be returned.\n\n### Returns\n\n- `{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n - `token: string`\n - `category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'`\n - `created: string`\n - `currency: string`\n - `descriptor: string`\n - `events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'`\n - `updated: 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 financialTransaction of client.financialAccounts.financialTransactions.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(financialTransaction);\n}\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.FinancialTransactions.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.FinancialAccounts.FinancialTransactions.List(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.FinancialTransactionListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/financial_transactions \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().financialTransactions().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialTransactionListPage;\nimport com.lithic.api.models.FinancialTransactionListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialTransactionListPage page = client.financialAccounts().financialTransactions().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'financialAccounts().financialTransactions().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialTransactionListPage\nimport com.lithic.api.models.FinancialTransactionListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: FinancialTransactionListPage = client.financialAccounts().financialTransactions().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'financial_accounts.financial_transactions.list', + example: + '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.financial_accounts.financial_transactions.list(\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'financial_accounts.financial_transactions.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.financial_accounts.financial_transactions.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(page)', + }, + typescript: { + method: 'client.financialAccounts.financialTransactions.list', + example: + "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 financialTransaction of client.financialAccounts.financialTransactions.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n)) {\n console.log(financialTransaction.token);\n}", + }, + }, + }, + { + name: 'retrieve', + endpoint: + '/v1/financial_accounts/{financial_account_token}/financial_transactions/{financial_transaction_token}', + httpMethod: 'get', + summary: 'Get financial transaction', + description: 'Get the financial transaction for the provided token.', + stainlessPath: '(resource) financial_accounts.financial_transactions > (method) retrieve', + qualified: 'client.financialAccounts.financialTransactions.retrieve', + params: ['financial_account_token: string;', 'financial_transaction_token: string;'], + response: + "{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }", + markdown: + "## retrieve\n\n`client.financialAccounts.financialTransactions.retrieve(financial_account_token: string, financial_transaction_token: string): { token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: financial_event[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/financial_transactions/{financial_transaction_token}`\n\nGet the financial transaction for the provided token.\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `financial_transaction_token: string`\n\n### Returns\n\n- `{ token: string; category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'; updated: string; }`\n\n - `token: string`\n - `category: 'ACH' | 'CARD' | 'INTERNAL' | 'TRANSFER'`\n - `created: string`\n - `currency: string`\n - `descriptor: string`\n - `events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'SETTLED' | 'VOIDED'`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialTransaction = await client.financialAccounts.financialTransactions.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(financialTransaction);\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.FinancialTransactions.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tfinancialTransaction, err := client.FinancialAccounts.FinancialTransactions.Get(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", financialTransaction.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/financial_transactions/$FINANCIAL_TRANSACTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().financialTransactions().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialTransaction;\nimport com.lithic.api.models.FinancialTransactionRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialTransactionRetrieveParams params = FinancialTransactionRetrieveParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .financialTransactionToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n FinancialTransaction financialTransaction = client.financialAccounts().financialTransactions().retrieve(params);\n }\n}', + }, + kotlin: { + method: 'financialAccounts().financialTransactions().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialTransaction\nimport com.lithic.api.models.FinancialTransactionRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: FinancialTransactionRetrieveParams = FinancialTransactionRetrieveParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .financialTransactionToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build()\n val financialTransaction: FinancialTransaction = client.financialAccounts().financialTransactions().retrieve(params)\n}', + }, + python: { + method: 'financial_accounts.financial_transactions.retrieve', + example: + '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)\nfinancial_transaction = client.financial_accounts.financial_transactions.retrieve(\n financial_transaction_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(financial_transaction.token)', + }, + ruby: { + method: 'financial_accounts.financial_transactions.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nfinancial_transaction = lithic.financial_accounts.financial_transactions.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n financial_account_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n)\n\nputs(financial_transaction)', + }, + typescript: { + method: 'client.financialAccounts.financialTransactions.retrieve', + example: + "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\nconst financialTransaction = await client.financialAccounts.financialTransactions.retrieve(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n);\n\nconsole.log(financialTransaction.token);", + }, + }, }, { name: 'retrieve', @@ -1726,6 +5238,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ account_token: string; auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }', markdown: "## retrieve\n\n`client.financialAccounts.creditConfiguration.retrieve(financial_account_token: string): { account_token: string; auto_collection_configuration: object; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/credit_configuration`\n\nGet an Account's credit configuration\n\n### Parameters\n\n- `financial_account_token: string`\n\n### Returns\n\n- `{ account_token: string; auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n\n - `account_token: string`\n - `auto_collection_configuration: { auto_collection_enabled: boolean; }`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `external_bank_account_token: string`\n - `tier: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialAccountCreditConfig = await client.financialAccounts.creditConfiguration.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(financialAccountCreditConfig);\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.CreditConfiguration.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tfinancialAccountCreditConfig, err := client.FinancialAccounts.CreditConfiguration.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", financialAccountCreditConfig.AccountToken)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/credit_configuration \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().creditConfiguration().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccountCreditConfig;\nimport com.lithic.api.models.FinancialAccountCreditConfigurationRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountCreditConfig financialAccountCreditConfig = client.financialAccounts().creditConfiguration().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'financialAccounts().creditConfiguration().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccountCreditConfig\nimport com.lithic.api.models.FinancialAccountCreditConfigurationRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val financialAccountCreditConfig: FinancialAccountCreditConfig = client.financialAccounts().creditConfiguration().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'financial_accounts.credit_configuration.retrieve', + example: + '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)\nfinancial_account_credit_config = client.financial_accounts.credit_configuration.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(financial_account_credit_config.account_token)', + }, + ruby: { + method: 'financial_accounts.credit_configuration.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nfinancial_account_credit_config = lithic.financial_accounts.credit_configuration.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(financial_account_credit_config)', + }, + typescript: { + method: 'client.financialAccounts.creditConfiguration.retrieve', + example: + "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\nconst financialAccountCreditConfig = await client.financialAccounts.creditConfiguration.retrieve(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(financialAccountCreditConfig.account_token);", + }, + }, }, { name: 'update', @@ -1747,20 +5295,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ account_token: string; auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }', markdown: "## update\n\n`client.financialAccounts.creditConfiguration.update(financial_account_token: string, auto_collection_configuration?: { auto_collection_enabled?: boolean; }, credit_limit?: number, credit_product_token?: string, external_bank_account_token?: string, tier?: string): { account_token: string; auto_collection_configuration: object; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n\n**patch** `/v1/financial_accounts/{financial_account_token}/credit_configuration`\n\nUpdate an account's credit configuration\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `auto_collection_configuration?: { auto_collection_enabled?: boolean; }`\n - `auto_collection_enabled?: boolean`\n If auto collection is enabled for this account\n\n- `credit_limit?: number`\n\n- `credit_product_token?: string`\n Globally unique identifier for the credit product\n\n- `external_bank_account_token?: string`\n\n- `tier?: string`\n Tier to assign to a financial account\n\n### Returns\n\n- `{ account_token: string; auto_collection_configuration: { auto_collection_enabled: boolean; }; credit_limit: number; credit_product_token: string; external_bank_account_token: string; tier: string; }`\n\n - `account_token: string`\n - `auto_collection_configuration: { auto_collection_enabled: boolean; }`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `external_bank_account_token: string`\n - `tier: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst financialAccountCreditConfig = await client.financialAccounts.creditConfiguration.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(financialAccountCreditConfig);\n```", - }, - { - name: 'retrieve', - endpoint: '/v1/financial_accounts/{financial_account_token}/statements/{statement_token}', - httpMethod: 'get', - summary: 'Get statement by token', - description: 'Get a specific statement for a given financial account.', - stainlessPath: '(resource) financial_accounts.statements > (method) retrieve', - qualified: 'client.financialAccounts.statements.retrieve', - params: ['financial_account_token: string;', 'statement_token: string;'], - response: - "{ token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; }", - markdown: - "## retrieve\n\n`client.financialAccounts.statements.retrieve(financial_account_token: string, statement_token: string): { token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/statements/{statement_token}`\n\nGet a specific statement for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n- `statement_token: string`\n Globally unique identifier for statements.\n\n### Returns\n\n- `{ token: string; account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }; amount_due: { amount: number; past_due: number; }; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; interest_details?: { actual_interest_charged: number; daily_balance_amounts: object; effective_apr: object; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: object; prime_rate: string; minimum_interest_charged?: number; }; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }; }`\n\n - `token: string`\n - `account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }`\n - `amount_due: { amount: number; past_due: number; }`\n - `available_credit: number`\n - `created: string`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `days_in_billing_cycle: number`\n - `ending_balance: number`\n - `financial_account_token: string`\n - `payment_due_date: string`\n - `period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `starting_balance: number`\n - `statement_end_date: string`\n - `statement_start_date: string`\n - `statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'`\n - `updated: string`\n - `ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `interest_details?: { actual_interest_charged: number; daily_balance_amounts: { balance_transfers: string; cash_advances: string; purchases: string; }; effective_apr: { balance_transfers: string; cash_advances: string; purchases: string; }; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: { balance_transfers: string; cash_advances: string; purchases: string; }; prime_rate: string; minimum_interest_charged?: number; }`\n - `next_payment_due_date?: string`\n - `next_statement_end_date?: string`\n - `payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst statement = await client.financialAccounts.statements.retrieve('statement_token', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(statement);\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.CreditConfiguration.Update', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tfinancialAccountCreditConfig, err := client.FinancialAccounts.CreditConfiguration.Update(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.FinancialAccountCreditConfigurationUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", financialAccountCreditConfig.AccountToken)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/credit_configuration \\\n -X PATCH \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().creditConfiguration().update', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccountCreditConfig;\nimport com.lithic.api.models.FinancialAccountCreditConfigurationUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountCreditConfig financialAccountCreditConfig = client.financialAccounts().creditConfiguration().update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'financialAccounts().creditConfiguration().update', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccountCreditConfig\nimport com.lithic.api.models.FinancialAccountCreditConfigurationUpdateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val financialAccountCreditConfig: FinancialAccountCreditConfig = client.financialAccounts().creditConfiguration().update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'financial_accounts.credit_configuration.update', + example: + '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)\nfinancial_account_credit_config = client.financial_accounts.credit_configuration.update(\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(financial_account_credit_config.account_token)', + }, + ruby: { + method: 'financial_accounts.credit_configuration.update', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nfinancial_account_credit_config = lithic.financial_accounts.credit_configuration.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(financial_account_credit_config)', + }, + typescript: { + method: 'client.financialAccounts.creditConfiguration.update', + example: + "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\nconst financialAccountCreditConfig = await client.financialAccounts.creditConfiguration.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(financialAccountCreditConfig.account_token);", + }, + }, }, { name: 'list', @@ -1783,6 +5353,92 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; }", markdown: "## list\n\n`client.financialAccounts.statements.list(financial_account_token: string, begin?: string, end?: string, ending_before?: string, include_initial_statements?: boolean, page_size?: number, starting_after?: string): { token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/statements`\n\nList the statements for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified date will be included.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified date will be included.\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- `include_initial_statements?: boolean`\n Whether to include the initial statement. It is not included by default.\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_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }; amount_due: { amount: number; past_due: number; }; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; interest_details?: { actual_interest_charged: number; daily_balance_amounts: object; effective_apr: object; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: object; prime_rate: string; minimum_interest_charged?: number; }; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }; }`\n\n - `token: string`\n - `account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }`\n - `amount_due: { amount: number; past_due: number; }`\n - `available_credit: number`\n - `created: string`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `days_in_billing_cycle: number`\n - `ending_balance: number`\n - `financial_account_token: string`\n - `payment_due_date: string`\n - `period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `starting_balance: number`\n - `statement_end_date: string`\n - `statement_start_date: string`\n - `statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'`\n - `updated: string`\n - `ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `interest_details?: { actual_interest_charged: number; daily_balance_amounts: { balance_transfers: string; cash_advances: string; purchases: string; }; effective_apr: { balance_transfers: string; cash_advances: string; purchases: string; }; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: { balance_transfers: string; cash_advances: string; purchases: string; }; prime_rate: string; minimum_interest_charged?: number; }`\n - `next_payment_due_date?: string`\n - `next_statement_end_date?: string`\n - `payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }`\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 statement of client.financialAccounts.statements.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(statement);\n}\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.Statements.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.FinancialAccounts.Statements.List(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.FinancialAccountStatementListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/statements \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().statements().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccountStatementListPage;\nimport com.lithic.api.models.FinancialAccountStatementListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountStatementListPage page = client.financialAccounts().statements().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'financialAccounts().statements().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccountStatementListPage\nimport com.lithic.api.models.FinancialAccountStatementListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: FinancialAccountStatementListPage = client.financialAccounts().statements().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'financial_accounts.statements.list', + example: + '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.financial_accounts.statements.list(\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'financial_accounts.statements.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.financial_accounts.statements.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(page)', + }, + typescript: { + method: 'client.financialAccounts.statements.list', + example: + "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 statement of client.financialAccounts.statements.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n)) {\n console.log(statement.token);\n}", + }, + }, + }, + { + name: 'retrieve', + endpoint: '/v1/financial_accounts/{financial_account_token}/statements/{statement_token}', + httpMethod: 'get', + summary: 'Get statement by token', + description: 'Get a specific statement for a given financial account.', + stainlessPath: '(resource) financial_accounts.statements > (method) retrieve', + qualified: 'client.financialAccounts.statements.retrieve', + params: ['financial_account_token: string;', 'statement_token: string;'], + response: + "{ token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; }", + markdown: + "## retrieve\n\n`client.financialAccounts.statements.retrieve(financial_account_token: string, statement_token: string): { token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/statements/{statement_token}`\n\nGet a specific statement for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n- `statement_token: string`\n Globally unique identifier for statements.\n\n### Returns\n\n- `{ token: string; account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }; amount_due: { amount: number; past_due: number; }; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; interest_details?: { actual_interest_charged: number; daily_balance_amounts: object; effective_apr: object; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: object; prime_rate: string; minimum_interest_charged?: number; }; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }; }`\n\n - `token: string`\n - `account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }`\n - `amount_due: { amount: number; past_due: number; }`\n - `available_credit: number`\n - `created: string`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `days_in_billing_cycle: number`\n - `ending_balance: number`\n - `financial_account_token: string`\n - `payment_due_date: string`\n - `period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `starting_balance: number`\n - `statement_end_date: string`\n - `statement_start_date: string`\n - `statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'`\n - `updated: string`\n - `ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `interest_details?: { actual_interest_charged: number; daily_balance_amounts: { balance_transfers: string; cash_advances: string; purchases: string; }; effective_apr: { balance_transfers: string; cash_advances: string; purchases: string; }; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: { balance_transfers: string; cash_advances: string; purchases: string; }; prime_rate: string; minimum_interest_charged?: number; }`\n - `next_payment_due_date?: string`\n - `next_statement_end_date?: string`\n - `payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst statement = await client.financialAccounts.statements.retrieve('statement_token', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(statement);\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.Statements.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tstatement, err := client.FinancialAccounts.Statements.Get(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t"statement_token",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", statement.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/statements/$STATEMENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().statements().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccountStatementRetrieveParams;\nimport com.lithic.api.models.Statement;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountStatementRetrieveParams params = FinancialAccountStatementRetrieveParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .statementToken("statement_token")\n .build();\n Statement statement = client.financialAccounts().statements().retrieve(params);\n }\n}', + }, + kotlin: { + method: 'financialAccounts().statements().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccountStatementRetrieveParams\nimport com.lithic.api.models.Statement\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: FinancialAccountStatementRetrieveParams = FinancialAccountStatementRetrieveParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .statementToken("statement_token")\n .build()\n val statement: Statement = client.financialAccounts().statements().retrieve(params)\n}', + }, + python: { + method: 'financial_accounts.statements.retrieve', + example: + '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)\nstatement = client.financial_accounts.statements.retrieve(\n statement_token="statement_token",\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(statement.token)', + }, + ruby: { + method: 'financial_accounts.statements.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nstatement = lithic.financial_accounts.statements.retrieve(\n "statement_token",\n financial_account_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n)\n\nputs(statement)', + }, + typescript: { + method: 'client.financialAccounts.statements.retrieve', + example: + "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\nconst statement = await client.financialAccounts.statements.retrieve('statement_token', {\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(statement.token);", + }, + }, }, { name: 'list', @@ -1803,20 +5459,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ token: string; amount: number; category: string; created: string; currency: string; effective_date: string; event_type: string; financial_account_token: string; financial_transaction_event_token: string; financial_transaction_token: string; card_token?: string; descriptor?: string; event_subtype?: string; loan_tape_date?: string; }', markdown: "## list\n\n`client.financialAccounts.statements.lineItems.list(financial_account_token: string, statement_token: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; amount: number; category: string; created: string; currency: string; effective_date: string; event_type: string; financial_account_token: string; financial_transaction_event_token: string; financial_transaction_token: string; card_token?: string; descriptor?: string; event_subtype?: string; loan_tape_date?: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/statements/{statement_token}/line_items`\n\nList the line items for a given statement within a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n- `statement_token: string`\n Globally unique identifier for statements.\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; amount: number; category: string; created: string; currency: string; effective_date: string; event_type: string; financial_account_token: string; financial_transaction_event_token: string; financial_transaction_token: string; card_token?: string; descriptor?: string; event_subtype?: string; loan_tape_date?: string; }`\n\n - `token: string`\n - `amount: number`\n - `category: string`\n - `created: string`\n - `currency: string`\n - `effective_date: string`\n - `event_type: string`\n - `financial_account_token: string`\n - `financial_transaction_event_token: string`\n - `financial_transaction_token: string`\n - `card_token?: string`\n - `descriptor?: string`\n - `event_subtype?: string`\n - `loan_tape_date?: 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 lineItem of client.financialAccounts.statements.lineItems.list('statement_token', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' })) {\n console.log(lineItem);\n}\n```", - }, - { - name: 'retrieve', - endpoint: '/v1/financial_accounts/{financial_account_token}/loan_tapes/{loan_tape_token}', - httpMethod: 'get', - summary: 'Get loan tape by token', - description: 'Get a specific loan tape for a given financial account.', - stainlessPath: '(resource) financial_accounts.loan_tapes > (method) retrieve', - qualified: 'client.financialAccounts.loanTapes.retrieve', - params: ['financial_account_token: string;', 'loan_tape_token: string;'], - response: - '{ token: string; account_standing: object; available_credit: number; balances: object; created: string; credit_limit: number; credit_product_token: string; date: string; day_totals: statement_totals; ending_balance: number; excess_credits: number; financial_account_token: string; interest_details: object; minimum_payment_balance: object; payment_allocation: object; period_totals: statement_totals; previous_statement_balance: object; starting_balance: number; updated: string; version: number; ytd_totals: statement_totals; tier?: string; }', - markdown: - "## retrieve\n\n`client.financialAccounts.loanTapes.retrieve(financial_account_token: string, loan_tape_token: string): { token: string; account_standing: object; available_credit: number; balances: object; created: string; credit_limit: number; credit_product_token: string; date: string; day_totals: statement_totals; ending_balance: number; excess_credits: number; financial_account_token: string; interest_details: object; minimum_payment_balance: object; payment_allocation: object; period_totals: statement_totals; previous_statement_balance: object; starting_balance: number; updated: string; version: number; ytd_totals: statement_totals; tier?: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/loan_tapes/{loan_tape_token}`\n\nGet a specific loan tape for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n- `loan_tape_token: string`\n Globally unique identifier for loan tape.\n\n### Returns\n\n- `{ token: string; account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }; available_credit: number; balances: { due: object; next_statement_due: object; past_due: object; past_statements_due: object; }; created: string; credit_limit: number; credit_product_token: string; date: string; day_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; ending_balance: number; excess_credits: number; financial_account_token: string; interest_details: { actual_interest_charged: number; daily_balance_amounts: object; effective_apr: object; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: object; prime_rate: string; minimum_interest_charged?: number; }; minimum_payment_balance: { amount: number; remaining: number; }; payment_allocation: { fee_details: object; fees: number; interest: number; interest_details: object; principal: number; principal_details: object; }; period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; previous_statement_balance: { amount: number; remaining: number; }; starting_balance: number; updated: string; version: number; ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; tier?: string; }`\n\n - `token: string`\n - `account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }`\n - `available_credit: number`\n - `balances: { due: { fees: number; interest: number; principal: number; }; next_statement_due: { fees: number; interest: number; principal: number; }; past_due: { fees: number; interest: number; principal: number; }; past_statements_due: { fees: number; interest: number; principal: number; }; }`\n - `created: string`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `date: string`\n - `day_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `ending_balance: number`\n - `excess_credits: number`\n - `financial_account_token: string`\n - `interest_details: { actual_interest_charged: number; daily_balance_amounts: { balance_transfers: string; cash_advances: string; purchases: string; }; effective_apr: { balance_transfers: string; cash_advances: string; purchases: string; }; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: { balance_transfers: string; cash_advances: string; purchases: string; }; prime_rate: string; minimum_interest_charged?: number; }`\n - `minimum_payment_balance: { amount: number; remaining: number; }`\n - `payment_allocation: { fee_details: { balance_transfers: string; cash_advances: string; purchases: string; }; fees: number; interest: number; interest_details: { balance_transfers: string; cash_advances: string; purchases: string; }; principal: number; principal_details: { balance_transfers: string; cash_advances: string; purchases: string; }; }`\n - `period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `previous_statement_balance: { amount: number; remaining: number; }`\n - `starting_balance: number`\n - `updated: string`\n - `version: number`\n - `ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `tier?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst loanTape = await client.financialAccounts.loanTapes.retrieve('loan_tape_token', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(loanTape);\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.Statements.LineItems.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.FinancialAccounts.Statements.LineItems.List(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t"statement_token",\n\t\tlithic.FinancialAccountStatementLineItemListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/statements/$STATEMENT_TOKEN/line_items \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().statements().lineItems().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccountStatementLineItemListPage;\nimport com.lithic.api.models.FinancialAccountStatementLineItemListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountStatementLineItemListParams params = FinancialAccountStatementLineItemListParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .statementToken("statement_token")\n .build();\n FinancialAccountStatementLineItemListPage page = client.financialAccounts().statements().lineItems().list(params);\n }\n}', + }, + kotlin: { + method: 'financialAccounts().statements().lineItems().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccountStatementLineItemListPage\nimport com.lithic.api.models.FinancialAccountStatementLineItemListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: FinancialAccountStatementLineItemListParams = FinancialAccountStatementLineItemListParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .statementToken("statement_token")\n .build()\n val page: FinancialAccountStatementLineItemListPage = client.financialAccounts().statements().lineItems().list(params)\n}', + }, + python: { + method: 'financial_accounts.statements.line_items.list', + example: + '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.financial_accounts.statements.line_items.list(\n statement_token="statement_token",\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'financial_accounts.statements.line_items.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.financial_accounts.statements.line_items.list(\n "statement_token",\n financial_account_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n)\n\nputs(page)', + }, + typescript: { + method: 'client.financialAccounts.statements.lineItems.list', + example: + "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 lineItem of client.financialAccounts.statements.lineItems.list('statement_token', {\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n})) {\n console.log(lineItem.token);\n}", + }, + }, }, { name: 'list', @@ -1838,6 +5516,92 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ token: string; account_standing: object; available_credit: number; balances: object; created: string; credit_limit: number; credit_product_token: string; date: string; day_totals: statement_totals; ending_balance: number; excess_credits: number; financial_account_token: string; interest_details: object; minimum_payment_balance: object; payment_allocation: object; period_totals: statement_totals; previous_statement_balance: object; starting_balance: number; updated: string; version: number; ytd_totals: statement_totals; tier?: string; }', markdown: "## list\n\n`client.financialAccounts.loanTapes.list(financial_account_token: string, begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; account_standing: object; available_credit: number; balances: object; created: string; credit_limit: number; credit_product_token: string; date: string; day_totals: statement_totals; ending_balance: number; excess_credits: number; financial_account_token: string; interest_details: object; minimum_payment_balance: object; payment_allocation: object; period_totals: statement_totals; previous_statement_balance: object; starting_balance: number; updated: string; version: number; ytd_totals: statement_totals; tier?: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/loan_tapes`\n\nList the loan tapes for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified date will be included.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified date will be included.\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_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }; available_credit: number; balances: { due: object; next_statement_due: object; past_due: object; past_statements_due: object; }; created: string; credit_limit: number; credit_product_token: string; date: string; day_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; ending_balance: number; excess_credits: number; financial_account_token: string; interest_details: { actual_interest_charged: number; daily_balance_amounts: object; effective_apr: object; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: object; prime_rate: string; minimum_interest_charged?: number; }; minimum_payment_balance: { amount: number; remaining: number; }; payment_allocation: { fee_details: object; fees: number; interest: number; interest_details: object; principal: number; principal_details: object; }; period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; previous_statement_balance: { amount: number; remaining: number; }; starting_balance: number; updated: string; version: number; ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; tier?: string; }`\n\n - `token: string`\n - `account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }`\n - `available_credit: number`\n - `balances: { due: { fees: number; interest: number; principal: number; }; next_statement_due: { fees: number; interest: number; principal: number; }; past_due: { fees: number; interest: number; principal: number; }; past_statements_due: { fees: number; interest: number; principal: number; }; }`\n - `created: string`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `date: string`\n - `day_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `ending_balance: number`\n - `excess_credits: number`\n - `financial_account_token: string`\n - `interest_details: { actual_interest_charged: number; daily_balance_amounts: { balance_transfers: string; cash_advances: string; purchases: string; }; effective_apr: { balance_transfers: string; cash_advances: string; purchases: string; }; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: { balance_transfers: string; cash_advances: string; purchases: string; }; prime_rate: string; minimum_interest_charged?: number; }`\n - `minimum_payment_balance: { amount: number; remaining: number; }`\n - `payment_allocation: { fee_details: { balance_transfers: string; cash_advances: string; purchases: string; }; fees: number; interest: number; interest_details: { balance_transfers: string; cash_advances: string; purchases: string; }; principal: number; principal_details: { balance_transfers: string; cash_advances: string; purchases: string; }; }`\n - `period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `previous_statement_balance: { amount: number; remaining: number; }`\n - `starting_balance: number`\n - `updated: string`\n - `version: number`\n - `ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `tier?: 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 loanTape of client.financialAccounts.loanTapes.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(loanTape);\n}\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.LoanTapes.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.FinancialAccounts.LoanTapes.List(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.FinancialAccountLoanTapeListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/loan_tapes \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().loanTapes().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccountLoanTapeListPage;\nimport com.lithic.api.models.FinancialAccountLoanTapeListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountLoanTapeListPage page = client.financialAccounts().loanTapes().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'financialAccounts().loanTapes().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccountLoanTapeListPage\nimport com.lithic.api.models.FinancialAccountLoanTapeListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: FinancialAccountLoanTapeListPage = client.financialAccounts().loanTapes().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'financial_accounts.loan_tapes.list', + example: + '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.financial_accounts.loan_tapes.list(\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'financial_accounts.loan_tapes.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.financial_accounts.loan_tapes.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(page)', + }, + typescript: { + method: 'client.financialAccounts.loanTapes.list', + example: + "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 loanTape of client.financialAccounts.loanTapes.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n)) {\n console.log(loanTape.token);\n}", + }, + }, + }, + { + name: 'retrieve', + endpoint: '/v1/financial_accounts/{financial_account_token}/loan_tapes/{loan_tape_token}', + httpMethod: 'get', + summary: 'Get loan tape by token', + description: 'Get a specific loan tape for a given financial account.', + stainlessPath: '(resource) financial_accounts.loan_tapes > (method) retrieve', + qualified: 'client.financialAccounts.loanTapes.retrieve', + params: ['financial_account_token: string;', 'loan_tape_token: string;'], + response: + '{ token: string; account_standing: object; available_credit: number; balances: object; created: string; credit_limit: number; credit_product_token: string; date: string; day_totals: statement_totals; ending_balance: number; excess_credits: number; financial_account_token: string; interest_details: object; minimum_payment_balance: object; payment_allocation: object; period_totals: statement_totals; previous_statement_balance: object; starting_balance: number; updated: string; version: number; ytd_totals: statement_totals; tier?: string; }', + markdown: + "## retrieve\n\n`client.financialAccounts.loanTapes.retrieve(financial_account_token: string, loan_tape_token: string): { token: string; account_standing: object; available_credit: number; balances: object; created: string; credit_limit: number; credit_product_token: string; date: string; day_totals: statement_totals; ending_balance: number; excess_credits: number; financial_account_token: string; interest_details: object; minimum_payment_balance: object; payment_allocation: object; period_totals: statement_totals; previous_statement_balance: object; starting_balance: number; updated: string; version: number; ytd_totals: statement_totals; tier?: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/loan_tapes/{loan_tape_token}`\n\nGet a specific loan tape for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n- `loan_tape_token: string`\n Globally unique identifier for loan tape.\n\n### Returns\n\n- `{ token: string; account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }; available_credit: number; balances: { due: object; next_statement_due: object; past_due: object; past_statements_due: object; }; created: string; credit_limit: number; credit_product_token: string; date: string; day_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; ending_balance: number; excess_credits: number; financial_account_token: string; interest_details: { actual_interest_charged: number; daily_balance_amounts: object; effective_apr: object; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: object; prime_rate: string; minimum_interest_charged?: number; }; minimum_payment_balance: { amount: number; remaining: number; }; payment_allocation: { fee_details: object; fees: number; interest: number; interest_details: object; principal: number; principal_details: object; }; period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; previous_statement_balance: { amount: number; remaining: number; }; starting_balance: number; updated: string; version: number; ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; tier?: string; }`\n\n - `token: string`\n - `account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }`\n - `available_credit: number`\n - `balances: { due: { fees: number; interest: number; principal: number; }; next_statement_due: { fees: number; interest: number; principal: number; }; past_due: { fees: number; interest: number; principal: number; }; past_statements_due: { fees: number; interest: number; principal: number; }; }`\n - `created: string`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `date: string`\n - `day_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `ending_balance: number`\n - `excess_credits: number`\n - `financial_account_token: string`\n - `interest_details: { actual_interest_charged: number; daily_balance_amounts: { balance_transfers: string; cash_advances: string; purchases: string; }; effective_apr: { balance_transfers: string; cash_advances: string; purchases: string; }; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: { balance_transfers: string; cash_advances: string; purchases: string; }; prime_rate: string; minimum_interest_charged?: number; }`\n - `minimum_payment_balance: { amount: number; remaining: number; }`\n - `payment_allocation: { fee_details: { balance_transfers: string; cash_advances: string; purchases: string; }; fees: number; interest: number; interest_details: { balance_transfers: string; cash_advances: string; purchases: string; }; principal: number; principal_details: { balance_transfers: string; cash_advances: string; purchases: string; }; }`\n - `period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `previous_statement_balance: { amount: number; remaining: number; }`\n - `starting_balance: number`\n - `updated: string`\n - `version: number`\n - `ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `tier?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst loanTape = await client.financialAccounts.loanTapes.retrieve('loan_tape_token', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(loanTape);\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.LoanTapes.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tloanTape, err := client.FinancialAccounts.LoanTapes.Get(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t"loan_tape_token",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", loanTape.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/loan_tapes/$LOAN_TAPE_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().loanTapes().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccountLoanTapeRetrieveParams;\nimport com.lithic.api.models.LoanTape;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountLoanTapeRetrieveParams params = FinancialAccountLoanTapeRetrieveParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .loanTapeToken("loan_tape_token")\n .build();\n LoanTape loanTape = client.financialAccounts().loanTapes().retrieve(params);\n }\n}', + }, + kotlin: { + method: 'financialAccounts().loanTapes().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccountLoanTapeRetrieveParams\nimport com.lithic.api.models.LoanTape\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: FinancialAccountLoanTapeRetrieveParams = FinancialAccountLoanTapeRetrieveParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .loanTapeToken("loan_tape_token")\n .build()\n val loanTape: LoanTape = client.financialAccounts().loanTapes().retrieve(params)\n}', + }, + python: { + method: 'financial_accounts.loan_tapes.retrieve', + example: + '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)\nloan_tape = client.financial_accounts.loan_tapes.retrieve(\n loan_tape_token="loan_tape_token",\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(loan_tape.token)', + }, + ruby: { + method: 'financial_accounts.loan_tapes.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nloan_tape = lithic.financial_accounts.loan_tapes.retrieve(\n "loan_tape_token",\n financial_account_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n)\n\nputs(loan_tape)', + }, + typescript: { + method: 'client.financialAccounts.loanTapes.retrieve', + example: + "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\nconst loanTape = await client.financialAccounts.loanTapes.retrieve('loan_tape_token', {\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(loanTape.token);", + }, + }, }, { name: 'retrieve', @@ -1852,6 +5616,98 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ created_at: string; financial_account_token: string; instance_token: string; updated_at: string; credit_product_token?: string; loan_tape_rebuild_configuration?: { rebuild_needed: boolean; last_rebuild?: string; rebuild_from?: string; }; tier_schedule_changed_at?: string; }', markdown: "## retrieve\n\n`client.financialAccounts.loanTapeConfiguration.retrieve(financial_account_token: string): { created_at: string; financial_account_token: string; instance_token: string; updated_at: string; credit_product_token?: string; loan_tape_rebuild_configuration?: loan_tape_rebuild_configuration; tier_schedule_changed_at?: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/loan_tape_configuration`\n\nGet the loan tape configuration for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n### Returns\n\n- `{ created_at: string; financial_account_token: string; instance_token: string; updated_at: string; credit_product_token?: string; loan_tape_rebuild_configuration?: { rebuild_needed: boolean; last_rebuild?: string; rebuild_from?: string; }; tier_schedule_changed_at?: string; }`\n Configuration for loan tapes\n\n - `created_at: string`\n - `financial_account_token: string`\n - `instance_token: string`\n - `updated_at: string`\n - `credit_product_token?: string`\n - `loan_tape_rebuild_configuration?: { rebuild_needed: boolean; last_rebuild?: string; rebuild_from?: string; }`\n - `tier_schedule_changed_at?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst loanTapeConfiguration = await client.financialAccounts.loanTapeConfiguration.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(loanTapeConfiguration);\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.LoanTapeConfiguration.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tloanTapeConfiguration, err := client.FinancialAccounts.LoanTapeConfiguration.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", loanTapeConfiguration.CreatedAt)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/loan_tape_configuration \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().loanTapeConfiguration().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccountLoanTapeConfigurationRetrieveParams;\nimport com.lithic.api.models.LoanTapeConfiguration;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n LoanTapeConfiguration loanTapeConfiguration = client.financialAccounts().loanTapeConfiguration().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'financialAccounts().loanTapeConfiguration().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccountLoanTapeConfigurationRetrieveParams\nimport com.lithic.api.models.LoanTapeConfiguration\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val loanTapeConfiguration: LoanTapeConfiguration = client.financialAccounts().loanTapeConfiguration().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'financial_accounts.loan_tape_configuration.retrieve', + example: + '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)\nloan_tape_configuration = client.financial_accounts.loan_tape_configuration.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(loan_tape_configuration.created_at)', + }, + ruby: { + method: 'financial_accounts.loan_tape_configuration.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nloan_tape_configuration = lithic.financial_accounts.loan_tape_configuration.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(loan_tape_configuration)', + }, + typescript: { + method: 'client.financialAccounts.loanTapeConfiguration.retrieve', + example: + "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\nconst loanTapeConfiguration = await client.financialAccounts.loanTapeConfiguration.retrieve(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(loanTapeConfiguration.created_at);", + }, + }, + }, + { + name: 'list', + endpoint: '/v1/financial_accounts/{financial_account_token}/interest_tier_schedule', + httpMethod: 'get', + summary: 'List interest tier schedules', + description: + 'List interest tier schedules for a financial account with optional date filtering.\n\nIf no date parameters are provided, returns all tier schedules.\nIf date parameters are provided, uses filtering to return matching schedules (max 100).\n- for_date: Returns exact match (takes precedence over other dates)\n- before_date: Returns schedules with effective_date <= before_date\n- after_date: Returns schedules with effective_date >= after_date\n- Both before_date and after_date: Returns schedules in range', + stainlessPath: '(resource) financial_accounts.interest_tier_schedule > (method) list', + qualified: 'client.financialAccounts.interestTierSchedule.list', + params: [ + 'financial_account_token: string;', + 'after_date?: string;', + 'before_date?: string;', + 'for_date?: string;', + ], + response: + '{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }', + markdown: + "## list\n\n`client.financialAccounts.interestTierSchedule.list(financial_account_token: string, after_date?: string, before_date?: string, for_date?: string): { credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/interest_tier_schedule`\n\nList interest tier schedules for a financial account with optional date filtering.\n\nIf no date parameters are provided, returns all tier schedules.\nIf date parameters are provided, uses filtering to return matching schedules (max 100).\n- for_date: Returns exact match (takes precedence over other dates)\n- before_date: Returns schedules with effective_date <= before_date\n- after_date: Returns schedules with effective_date >= after_date\n- Both before_date and after_date: Returns schedules in range\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `after_date?: string`\n Return schedules with effective_date >= after_date (ISO format YYYY-MM-DD)\n\n- `before_date?: string`\n Return schedules with effective_date <= before_date (ISO format YYYY-MM-DD)\n\n- `for_date?: string`\n Return schedule with effective_date == for_date (ISO format YYYY-MM-DD)\n\n### Returns\n\n- `{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n Entry in the Tier Schedule of an account\n\n - `credit_product_token: string`\n - `effective_date: string`\n - `penalty_rates?: object`\n - `tier_name?: string`\n - `tier_rates?: object`\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 interestTierSchedule of client.financialAccounts.interestTierSchedule.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(interestTierSchedule);\n}\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.InterestTierSchedule.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.FinancialAccounts.InterestTierSchedule.List(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.FinancialAccountInterestTierScheduleListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/interest_tier_schedule \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().interestTierSchedule().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccountInterestTierScheduleListPage;\nimport com.lithic.api.models.FinancialAccountInterestTierScheduleListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountInterestTierScheduleListPage page = client.financialAccounts().interestTierSchedule().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'financialAccounts().interestTierSchedule().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccountInterestTierScheduleListPage\nimport com.lithic.api.models.FinancialAccountInterestTierScheduleListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: FinancialAccountInterestTierScheduleListPage = client.financialAccounts().interestTierSchedule().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'financial_accounts.interest_tier_schedule.list', + example: + '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.financial_accounts.interest_tier_schedule.list(\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\npage = page.data[0]\nprint(page.credit_product_token)', + }, + ruby: { + method: 'financial_accounts.interest_tier_schedule.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.financial_accounts.interest_tier_schedule.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(page)', + }, + typescript: { + method: 'client.financialAccounts.interestTierSchedule.list', + example: + "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 interestTierSchedule of client.financialAccounts.interestTierSchedule.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n)) {\n console.log(interestTierSchedule.credit_product_token);\n}", + }, + }, }, { name: 'create', @@ -1873,6 +5729,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }', markdown: "## create\n\n`client.financialAccounts.interestTierSchedule.create(financial_account_token: string, credit_product_token: string, effective_date: string, penalty_rates?: object, tier_name?: string, tier_rates?: object): { credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n\n**post** `/v1/financial_accounts/{financial_account_token}/interest_tier_schedule`\n\nCreate a new interest tier schedule entry for a supported financial account\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `credit_product_token: string`\n Globally unique identifier for a credit product\n\n- `effective_date: string`\n Date the tier should be effective in YYYY-MM-DD format\n\n- `penalty_rates?: object`\n Custom rates per category for penalties\n\n- `tier_name?: string`\n Name of a tier contained in the credit product. Mutually exclusive with tier_rates\n\n- `tier_rates?: object`\n Custom rates per category. Mutually exclusive with tier_name\n\n### Returns\n\n- `{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n Entry in the Tier Schedule of an account\n\n - `credit_product_token: string`\n - `effective_date: string`\n - `penalty_rates?: object`\n - `tier_name?: string`\n - `tier_rates?: object`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst interestTierSchedule = await client.financialAccounts.interestTierSchedule.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { credit_product_token: 'credit_product_token', effective_date: '2019-12-27' });\n\nconsole.log(interestTierSchedule);\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.InterestTierSchedule.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tinterestTierSchedule, err := client.FinancialAccounts.InterestTierSchedule.New(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.FinancialAccountInterestTierScheduleNewParams{\n\t\t\tInterestTierSchedule: lithic.InterestTierScheduleParam{\n\t\t\t\tCreditProductToken: lithic.F("credit_product_token"),\n\t\t\t\tEffectiveDate: lithic.F(time.Now()),\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", interestTierSchedule.CreditProductToken)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/interest_tier_schedule \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "credit_product_token": "credit_product_token",\n "effective_date": "2019-12-27"\n }\'', + }, + java: { + method: 'financialAccounts().interestTierSchedule().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccountInterestTierScheduleCreateParams;\nimport com.lithic.api.models.InterestTierSchedule;\nimport java.time.LocalDate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountInterestTierScheduleCreateParams params = FinancialAccountInterestTierScheduleCreateParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .interestTierSchedule(InterestTierSchedule.builder()\n .creditProductToken("credit_product_token")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build())\n .build();\n InterestTierSchedule interestTierSchedule = client.financialAccounts().interestTierSchedule().create(params);\n }\n}', + }, + kotlin: { + method: 'financialAccounts().interestTierSchedule().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccountInterestTierScheduleCreateParams\nimport com.lithic.api.models.InterestTierSchedule\nimport java.time.LocalDate\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: FinancialAccountInterestTierScheduleCreateParams = FinancialAccountInterestTierScheduleCreateParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .interestTierSchedule(InterestTierSchedule.builder()\n .creditProductToken("credit_product_token")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build())\n .build()\n val interestTierSchedule: InterestTierSchedule = client.financialAccounts().interestTierSchedule().create(params)\n}', + }, + python: { + method: 'financial_accounts.interest_tier_schedule.create', + example: + 'import os\nfrom datetime import date\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)\ninterest_tier_schedule = client.financial_accounts.interest_tier_schedule.create(\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n credit_product_token="credit_product_token",\n effective_date=date.fromisoformat("2019-12-27"),\n)\nprint(interest_tier_schedule.credit_product_token)', + }, + ruby: { + method: 'financial_accounts.interest_tier_schedule.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ninterest_tier_schedule = lithic.financial_accounts.interest_tier_schedule.create(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n credit_product_token: "credit_product_token",\n effective_date: "2019-12-27"\n)\n\nputs(interest_tier_schedule)', + }, + typescript: { + method: 'client.financialAccounts.interestTierSchedule.create', + example: + "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\nconst interestTierSchedule = await client.financialAccounts.interestTierSchedule.create(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { credit_product_token: 'credit_product_token', effective_date: '2019-12-27' },\n);\n\nconsole.log(interestTierSchedule.credit_product_token);", + }, + }, }, { name: 'retrieve', @@ -1887,6 +5779,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }', markdown: "## retrieve\n\n`client.financialAccounts.interestTierSchedule.retrieve(financial_account_token: string, effective_date: string): { credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/interest_tier_schedule/{effective_date}`\n\nGet a specific interest tier schedule by effective date\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `effective_date: string`\n\n### Returns\n\n- `{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n Entry in the Tier Schedule of an account\n\n - `credit_product_token: string`\n - `effective_date: string`\n - `penalty_rates?: object`\n - `tier_name?: string`\n - `tier_rates?: object`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst interestTierSchedule = await client.financialAccounts.interestTierSchedule.retrieve('2019-12-27', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(interestTierSchedule);\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.InterestTierSchedule.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tinterestTierSchedule, err := client.FinancialAccounts.InterestTierSchedule.Get(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\ttime.Now(),\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", interestTierSchedule.CreditProductToken)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/interest_tier_schedule/$EFFECTIVE_DATE \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().interestTierSchedule().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccountInterestTierScheduleRetrieveParams;\nimport com.lithic.api.models.InterestTierSchedule;\nimport java.time.LocalDate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountInterestTierScheduleRetrieveParams params = FinancialAccountInterestTierScheduleRetrieveParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build();\n InterestTierSchedule interestTierSchedule = client.financialAccounts().interestTierSchedule().retrieve(params);\n }\n}', + }, + kotlin: { + method: 'financialAccounts().interestTierSchedule().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccountInterestTierScheduleRetrieveParams\nimport com.lithic.api.models.InterestTierSchedule\nimport java.time.LocalDate\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: FinancialAccountInterestTierScheduleRetrieveParams = FinancialAccountInterestTierScheduleRetrieveParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build()\n val interestTierSchedule: InterestTierSchedule = client.financialAccounts().interestTierSchedule().retrieve(params)\n}', + }, + python: { + method: 'financial_accounts.interest_tier_schedule.retrieve', + example: + 'import os\nfrom datetime import date\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)\ninterest_tier_schedule = client.financial_accounts.interest_tier_schedule.retrieve(\n effective_date=date.fromisoformat("2019-12-27"),\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(interest_tier_schedule.credit_product_token)', + }, + ruby: { + method: 'financial_accounts.interest_tier_schedule.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ninterest_tier_schedule = lithic.financial_accounts.interest_tier_schedule.retrieve(\n "2019-12-27",\n financial_account_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n)\n\nputs(interest_tier_schedule)', + }, + typescript: { + method: 'client.financialAccounts.interestTierSchedule.retrieve', + example: + "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\nconst interestTierSchedule = await client.financialAccounts.interestTierSchedule.retrieve(\n '2019-12-27',\n { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n);\n\nconsole.log(interestTierSchedule.credit_product_token);", + }, + }, }, { name: 'update', @@ -1907,58 +5835,95 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }', markdown: "## update\n\n`client.financialAccounts.interestTierSchedule.update(financial_account_token: string, effective_date: string, penalty_rates?: object, tier_name?: string, tier_rates?: object): { credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n\n**put** `/v1/financial_accounts/{financial_account_token}/interest_tier_schedule/{effective_date}`\n\nUpdate an existing interest tier schedule\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `effective_date: string`\n\n- `penalty_rates?: object`\n Custom rates per category for penalties\n\n- `tier_name?: string`\n Name of a tier contained in the credit product. Mutually exclusive with tier_rates\n\n- `tier_rates?: object`\n Custom rates per category. Mutually exclusive with tier_name\n\n### Returns\n\n- `{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n Entry in the Tier Schedule of an account\n\n - `credit_product_token: string`\n - `effective_date: string`\n - `penalty_rates?: object`\n - `tier_name?: string`\n - `tier_rates?: object`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst interestTierSchedule = await client.financialAccounts.interestTierSchedule.update('2019-12-27', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(interestTierSchedule);\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.InterestTierSchedule.Update', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tinterestTierSchedule, err := client.FinancialAccounts.InterestTierSchedule.Update(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\ttime.Now(),\n\t\tlithic.FinancialAccountInterestTierScheduleUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", interestTierSchedule.CreditProductToken)\n}\n', + }, + http: { + example: + "curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/interest_tier_schedule/$EFFECTIVE_DATE \\\n -X PUT \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", + }, + java: { + method: 'financialAccounts().interestTierSchedule().update', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccountInterestTierScheduleUpdateParams;\nimport com.lithic.api.models.InterestTierSchedule;\nimport java.time.LocalDate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountInterestTierScheduleUpdateParams params = FinancialAccountInterestTierScheduleUpdateParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build();\n InterestTierSchedule interestTierSchedule = client.financialAccounts().interestTierSchedule().update(params);\n }\n}', + }, + kotlin: { + method: 'financialAccounts().interestTierSchedule().update', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccountInterestTierScheduleUpdateParams\nimport com.lithic.api.models.InterestTierSchedule\nimport java.time.LocalDate\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: FinancialAccountInterestTierScheduleUpdateParams = FinancialAccountInterestTierScheduleUpdateParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build()\n val interestTierSchedule: InterestTierSchedule = client.financialAccounts().interestTierSchedule().update(params)\n}', + }, + python: { + method: 'financial_accounts.interest_tier_schedule.update', + example: + 'import os\nfrom datetime import date\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)\ninterest_tier_schedule = client.financial_accounts.interest_tier_schedule.update(\n effective_date=date.fromisoformat("2019-12-27"),\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(interest_tier_schedule.credit_product_token)', + }, + ruby: { + method: 'financial_accounts.interest_tier_schedule.update', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ninterest_tier_schedule = lithic.financial_accounts.interest_tier_schedule.update(\n "2019-12-27",\n financial_account_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n)\n\nputs(interest_tier_schedule)', + }, + typescript: { + method: 'client.financialAccounts.interestTierSchedule.update', + example: + "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\nconst interestTierSchedule = await client.financialAccounts.interestTierSchedule.update(\n '2019-12-27',\n { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n);\n\nconsole.log(interestTierSchedule.credit_product_token);", + }, + }, + }, + { + name: 'delete', + endpoint: '/v1/financial_accounts/{financial_account_token}/interest_tier_schedule/{effective_date}', + httpMethod: 'delete', + summary: 'Delete interest tier schedule', + description: + "Delete an interest tier schedule entry.\n\nReturns:\n- 400 Bad Request: Invalid effective_date format OR attempting to delete the earliest\n tier schedule entry for a non-PENDING account\n- 404 Not Found: Tier schedule entry not found for the given effective_date OR ledger account not found\n\nNote: PENDING accounts can delete the earliest tier schedule entry (account hasn't opened yet).\nActive/non-PENDING accounts cannot delete the earliest entry to prevent orphaning the account.\n\nIf the deleted tier schedule has a past effective_date and the account is ACTIVE,\nthe loan tape rebuild configuration will be updated to trigger rebuilds from that date.", + stainlessPath: '(resource) financial_accounts.interest_tier_schedule > (method) delete', + qualified: 'client.financialAccounts.interestTierSchedule.delete', + params: ['financial_account_token: string;', 'effective_date: string;'], + markdown: + "## delete\n\n`client.financialAccounts.interestTierSchedule.delete(financial_account_token: string, effective_date: string): void`\n\n**delete** `/v1/financial_accounts/{financial_account_token}/interest_tier_schedule/{effective_date}`\n\nDelete an interest tier schedule entry.\n\nReturns:\n- 400 Bad Request: Invalid effective_date format OR attempting to delete the earliest\n tier schedule entry for a non-PENDING account\n- 404 Not Found: Tier schedule entry not found for the given effective_date OR ledger account not found\n\nNote: PENDING accounts can delete the earliest tier schedule entry (account hasn't opened yet).\nActive/non-PENDING accounts cannot delete the earliest entry to prevent orphaning the account.\n\nIf the deleted tier schedule has a past effective_date and the account is ACTIVE,\nthe loan tape rebuild configuration will be updated to trigger rebuilds from that date.\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `effective_date: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.financialAccounts.interestTierSchedule.delete('2019-12-27', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' })\n```", + perLanguage: { + go: { + method: 'client.FinancialAccounts.InterestTierSchedule.Delete', + example: + 'package main\n\nimport (\n\t"context"\n\t"time"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.FinancialAccounts.InterestTierSchedule.Delete(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\ttime.Now(),\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/interest_tier_schedule/$EFFECTIVE_DATE \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'financialAccounts().interestTierSchedule().delete', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FinancialAccountInterestTierScheduleDeleteParams;\nimport java.time.LocalDate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FinancialAccountInterestTierScheduleDeleteParams params = FinancialAccountInterestTierScheduleDeleteParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build();\n client.financialAccounts().interestTierSchedule().delete(params);\n }\n}', + }, + kotlin: { + method: 'financialAccounts().interestTierSchedule().delete', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FinancialAccountInterestTierScheduleDeleteParams\nimport java.time.LocalDate\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: FinancialAccountInterestTierScheduleDeleteParams = FinancialAccountInterestTierScheduleDeleteParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build()\n client.financialAccounts().interestTierSchedule().delete(params)\n}', + }, + python: { + method: 'financial_accounts.interest_tier_schedule.delete', + example: + 'import os\nfrom datetime import date\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)\nclient.financial_accounts.interest_tier_schedule.delete(\n effective_date=date.fromisoformat("2019-12-27"),\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)', + }, + ruby: { + method: 'financial_accounts.interest_tier_schedule.delete', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.financial_accounts.interest_tier_schedule.delete(\n "2019-12-27",\n financial_account_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n)\n\nputs(result)', + }, + typescript: { + method: 'client.financialAccounts.interestTierSchedule.delete', + example: + "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\nawait client.financialAccounts.interestTierSchedule.delete('2019-12-27', {\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});", + }, + }, }, { name: 'list', - endpoint: '/v1/financial_accounts/{financial_account_token}/interest_tier_schedule', - httpMethod: 'get', - summary: 'List interest tier schedules', - description: - 'List interest tier schedules for a financial account with optional date filtering.\n\nIf no date parameters are provided, returns all tier schedules.\nIf date parameters are provided, uses filtering to return matching schedules (max 100).\n- for_date: Returns exact match (takes precedence over other dates)\n- before_date: Returns schedules with effective_date <= before_date\n- after_date: Returns schedules with effective_date >= after_date\n- Both before_date and after_date: Returns schedules in range', - stainlessPath: '(resource) financial_accounts.interest_tier_schedule > (method) list', - qualified: 'client.financialAccounts.interestTierSchedule.list', - params: [ - 'financial_account_token: string;', - 'after_date?: string;', - 'before_date?: string;', - 'for_date?: string;', - ], - response: - '{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }', - markdown: - "## list\n\n`client.financialAccounts.interestTierSchedule.list(financial_account_token: string, after_date?: string, before_date?: string, for_date?: string): { credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/interest_tier_schedule`\n\nList interest tier schedules for a financial account with optional date filtering.\n\nIf no date parameters are provided, returns all tier schedules.\nIf date parameters are provided, uses filtering to return matching schedules (max 100).\n- for_date: Returns exact match (takes precedence over other dates)\n- before_date: Returns schedules with effective_date <= before_date\n- after_date: Returns schedules with effective_date >= after_date\n- Both before_date and after_date: Returns schedules in range\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `after_date?: string`\n Return schedules with effective_date >= after_date (ISO format YYYY-MM-DD)\n\n- `before_date?: string`\n Return schedules with effective_date <= before_date (ISO format YYYY-MM-DD)\n\n- `for_date?: string`\n Return schedule with effective_date == for_date (ISO format YYYY-MM-DD)\n\n### Returns\n\n- `{ credit_product_token: string; effective_date: string; penalty_rates?: object; tier_name?: string; tier_rates?: object; }`\n Entry in the Tier Schedule of an account\n\n - `credit_product_token: string`\n - `effective_date: string`\n - `penalty_rates?: object`\n - `tier_name?: string`\n - `tier_rates?: object`\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 interestTierSchedule of client.financialAccounts.interestTierSchedule.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(interestTierSchedule);\n}\n```", - }, - { - name: 'delete', - endpoint: '/v1/financial_accounts/{financial_account_token}/interest_tier_schedule/{effective_date}', - httpMethod: 'delete', - summary: 'Delete interest tier schedule', - description: - "Delete an interest tier schedule entry.\n\nReturns:\n- 400 Bad Request: Invalid effective_date format OR attempting to delete the earliest\n tier schedule entry for a non-PENDING account\n- 404 Not Found: Tier schedule entry not found for the given effective_date OR ledger account not found\n\nNote: PENDING accounts can delete the earliest tier schedule entry (account hasn't opened yet).\nActive/non-PENDING accounts cannot delete the earliest entry to prevent orphaning the account.\n\nIf the deleted tier schedule has a past effective_date and the account is ACTIVE,\nthe loan tape rebuild configuration will be updated to trigger rebuilds from that date.", - stainlessPath: '(resource) financial_accounts.interest_tier_schedule > (method) delete', - qualified: 'client.financialAccounts.interestTierSchedule.delete', - params: ['financial_account_token: string;', 'effective_date: string;'], - markdown: - "## delete\n\n`client.financialAccounts.interestTierSchedule.delete(financial_account_token: string, effective_date: string): void`\n\n**delete** `/v1/financial_accounts/{financial_account_token}/interest_tier_schedule/{effective_date}`\n\nDelete an interest tier schedule entry.\n\nReturns:\n- 400 Bad Request: Invalid effective_date format OR attempting to delete the earliest\n tier schedule entry for a non-PENDING account\n- 404 Not Found: Tier schedule entry not found for the given effective_date OR ledger account not found\n\nNote: PENDING accounts can delete the earliest tier schedule entry (account hasn't opened yet).\nActive/non-PENDING accounts cannot delete the earliest entry to prevent orphaning the account.\n\nIf the deleted tier schedule has a past effective_date and the account is ACTIVE,\nthe loan tape rebuild configuration will be updated to trigger rebuilds from that date.\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `effective_date: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.financialAccounts.interestTierSchedule.delete('2019-12-27', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' })\n```", - }, - { - name: 'retrieve', - endpoint: '/v1/transactions/{transaction_token}', - httpMethod: 'get', - summary: 'Get card transaction', - description: - 'Get a specific card transaction. All amounts are in the smallest unit of their respective currency (e.g., cents for USD).\n', - stainlessPath: '(resource) transactions > (method) retrieve', - qualified: 'client.transactions.retrieve', - params: ['transaction_token: string;'], - response: - "{ token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: object; authorization_amount: number; authorization_code: string; avs: object; card_token: string; cardholder_authentication: cardholder_authentication; created: string; financial_account_token: string; merchant: merchant; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: object; result: string; service_location: object; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: token_info; updated: string; events?: object[]; }", - markdown: - "## retrieve\n\n`client.transactions.retrieve(transaction_token: string): { token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: object; authorization_amount: number; authorization_code: string; avs: object; card_token: string; cardholder_authentication: cardholder_authentication; created: string; financial_account_token: string; merchant: merchant; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: object; result: string; service_location: object; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: token_info; updated: string; events?: object[]; }`\n\n**get** `/v1/transactions/{transaction_token}`\n\nGet a specific card transaction. All amounts are in the smallest unit of their respective currency (e.g., cents for USD).\n\n\n### Parameters\n\n- `transaction_token: string`\n\n### Returns\n\n- `{ token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: { cardholder: { amount: number; conversion_rate: string; currency: currency; }; hold: { amount: number; currency: currency; }; merchant: { amount: number; currency: currency; }; settlement: { amount: number; currency: currency; }; }; authorization_amount: number; authorization_code: string; avs: { address: string; zipcode: string; }; card_token: string; cardholder_authentication: { authentication_method: 'FRICTIONLESS' | 'CHALLENGE' | 'NONE'; authentication_result: 'ATTEMPTS' | 'DECLINE' | 'NONE' | 'SUCCESS'; decision_made_by: 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'LITHIC_DEFAULT' | 'LITHIC_RULES' | 'NETWORK' | 'UNKNOWN'; liability_shift: '3DS_AUTHENTICATED' | 'TOKEN_AUTHENTICATED' | 'NONE'; three_ds_authentication_token: string; }; created: string; financial_account_token: string; merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: { entry_mode: { card: 'NOT_PRESENT' | 'PREAUTHORIZED' | 'PRESENT' | 'UNKNOWN'; cardholder: string; pan: string; pin_entered: boolean; }; terminal: { attended: boolean; card_retention_capable: boolean; on_premise: boolean; operator: 'ADMINISTRATIVE' | 'CARDHOLDER' | 'CARD_ACCEPTOR' | 'UNKNOWN'; partial_approval_capable: boolean; pin_capability: 'CAPABLE' | 'INOPERATIVE' | 'NOT_CAPABLE' | 'UNSPECIFIED'; type: string; acceptor_terminal_id?: string; }; }; result: string; service_location: { city: string; country: string; postal_code: string; state: string; street_address: string; }; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: { wallet_type: 'APPLE_PAY' | 'GOOGLE_PAY' | 'MASTERPASS' | 'MERCHANT' | 'OTHER' | 'SAMSUNG_PAY'; }; updated: string; events?: { token: string; amount: number; amounts: { cardholder: object; merchant: object; settlement: object; }; created: string; detailed_results: string[]; effective_polarity: 'CREDIT' | 'DEBIT'; network_info: { acquirer: object; amex: object; mastercard: object; visa: object; }; result: string; rule_results: { auth_rule_token: string; explanation: string; name: string; result: string; }[]; type: string; account_type?: 'CHECKING' | 'SAVINGS'; network_specific_data?: { mastercard: object; visa: object; }; }[]; }`\n\n - `token: string`\n - `account_token: string`\n - `acquirer_fee: number`\n - `acquirer_reference_number: string`\n - `amount: number`\n - `amounts: { cardholder: { amount: number; conversion_rate: string; currency: string; }; hold: { amount: number; currency: string; }; merchant: { amount: number; currency: string; }; settlement: { amount: number; currency: string; }; }`\n - `authorization_amount: number`\n - `authorization_code: string`\n - `avs: { address: string; zipcode: string; }`\n - `card_token: string`\n - `cardholder_authentication: { authentication_method: 'FRICTIONLESS' | 'CHALLENGE' | 'NONE'; authentication_result: 'ATTEMPTS' | 'DECLINE' | 'NONE' | 'SUCCESS'; decision_made_by: 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'LITHIC_DEFAULT' | 'LITHIC_RULES' | 'NETWORK' | 'UNKNOWN'; liability_shift: '3DS_AUTHENTICATED' | 'TOKEN_AUTHENTICATED' | 'NONE'; three_ds_authentication_token: string; }`\n - `created: string`\n - `financial_account_token: string`\n - `merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }`\n - `merchant_amount: number`\n - `merchant_authorization_amount: number`\n - `merchant_currency: string`\n - `network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'`\n - `network_risk_score: number`\n - `pos: { entry_mode: { card: 'NOT_PRESENT' | 'PREAUTHORIZED' | 'PRESENT' | 'UNKNOWN'; cardholder: string; pan: string; pin_entered: boolean; }; terminal: { attended: boolean; card_retention_capable: boolean; on_premise: boolean; operator: 'ADMINISTRATIVE' | 'CARDHOLDER' | 'CARD_ACCEPTOR' | 'UNKNOWN'; partial_approval_capable: boolean; pin_capability: 'CAPABLE' | 'INOPERATIVE' | 'NOT_CAPABLE' | 'UNSPECIFIED'; type: string; acceptor_terminal_id?: string; }; }`\n - `result: string`\n - `service_location: { city: string; country: string; postal_code: string; state: string; street_address: string; }`\n - `settled_amount: number`\n - `status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'`\n - `tags: object`\n - `token_info: { wallet_type: 'APPLE_PAY' | 'GOOGLE_PAY' | 'MASTERPASS' | 'MERCHANT' | 'OTHER' | 'SAMSUNG_PAY'; }`\n - `updated: string`\n - `events?: { token: string; amount: number; amounts: { cardholder: { amount: number; conversion_rate: string; currency: string; }; merchant: { amount: number; currency: string; }; settlement: { amount: number; conversion_rate: string; currency: string; }; }; created: string; detailed_results: string[]; effective_polarity: 'CREDIT' | 'DEBIT'; network_info: { acquirer: { acquirer_reference_number: string; retrieval_reference_number: string; }; amex: { original_transaction_id: string; transaction_id: string; }; mastercard: { banknet_reference_number: string; original_banknet_reference_number: string; original_switch_serial_number: string; switch_serial_number: string; }; visa: { original_transaction_id: string; transaction_id: string; }; }; result: string; rule_results: { auth_rule_token: string; explanation: string; name: string; result: string; }[]; type: string; account_type?: 'CHECKING' | 'SAVINGS'; network_specific_data?: { mastercard: { ecommerce_security_level_indicator: string; on_behalf_service_result: { result_1: string; result_2: string; service: string; }[]; transaction_type_identifier: string; }; visa: { business_application_identifier: string; }; }; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst transaction = await client.transactions.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(transaction);\n```", - }, - { - name: 'list', - endpoint: '/v1/transactions', + endpoint: '/v1/transactions', httpMethod: 'get', summary: 'List card transactions', description: @@ -1980,18 +5945,92 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: object; authorization_amount: number; authorization_code: string; avs: object; card_token: string; cardholder_authentication: cardholder_authentication; created: string; financial_account_token: string; merchant: merchant; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: object; result: string; service_location: object; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: token_info; updated: string; events?: object[]; }", markdown: "## list\n\n`client.transactions.list(account_token?: string, begin?: string, card_token?: string, end?: string, ending_before?: string, page_size?: number, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'PENDING' | 'VOIDED' | 'SETTLED' | 'DECLINED' | 'EXPIRED'): { token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: object; authorization_amount: number; authorization_code: string; avs: object; card_token: string; cardholder_authentication: cardholder_authentication; created: string; financial_account_token: string; merchant: merchant; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: object; result: string; service_location: object; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: token_info; updated: string; events?: object[]; }`\n\n**get** `/v1/transactions`\n\nList card transactions. All amounts are in the smallest unit of their respective currency (e.g., cents for USD) and inclusive of any acquirer fees.\n\n\n### Parameters\n\n- `account_token?: string`\n Filters for transactions associated with a specific account.\n\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `card_token?: string`\n Filters for transactions associated with a specific card.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `result?: 'APPROVED' | 'DECLINED'`\n Filters for transactions using transaction result field. Can filter by `APPROVED`, and `DECLINED`.\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- `status?: 'PENDING' | 'VOIDED' | 'SETTLED' | 'DECLINED' | 'EXPIRED'`\n Filters for transactions using transaction status field.\n\n### Returns\n\n- `{ token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: { cardholder: { amount: number; conversion_rate: string; currency: currency; }; hold: { amount: number; currency: currency; }; merchant: { amount: number; currency: currency; }; settlement: { amount: number; currency: currency; }; }; authorization_amount: number; authorization_code: string; avs: { address: string; zipcode: string; }; card_token: string; cardholder_authentication: { authentication_method: 'FRICTIONLESS' | 'CHALLENGE' | 'NONE'; authentication_result: 'ATTEMPTS' | 'DECLINE' | 'NONE' | 'SUCCESS'; decision_made_by: 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'LITHIC_DEFAULT' | 'LITHIC_RULES' | 'NETWORK' | 'UNKNOWN'; liability_shift: '3DS_AUTHENTICATED' | 'TOKEN_AUTHENTICATED' | 'NONE'; three_ds_authentication_token: string; }; created: string; financial_account_token: string; merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: { entry_mode: { card: 'NOT_PRESENT' | 'PREAUTHORIZED' | 'PRESENT' | 'UNKNOWN'; cardholder: string; pan: string; pin_entered: boolean; }; terminal: { attended: boolean; card_retention_capable: boolean; on_premise: boolean; operator: 'ADMINISTRATIVE' | 'CARDHOLDER' | 'CARD_ACCEPTOR' | 'UNKNOWN'; partial_approval_capable: boolean; pin_capability: 'CAPABLE' | 'INOPERATIVE' | 'NOT_CAPABLE' | 'UNSPECIFIED'; type: string; acceptor_terminal_id?: string; }; }; result: string; service_location: { city: string; country: string; postal_code: string; state: string; street_address: string; }; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: { wallet_type: 'APPLE_PAY' | 'GOOGLE_PAY' | 'MASTERPASS' | 'MERCHANT' | 'OTHER' | 'SAMSUNG_PAY'; }; updated: string; events?: { token: string; amount: number; amounts: { cardholder: object; merchant: object; settlement: object; }; created: string; detailed_results: string[]; effective_polarity: 'CREDIT' | 'DEBIT'; network_info: { acquirer: object; amex: object; mastercard: object; visa: object; }; result: string; rule_results: { auth_rule_token: string; explanation: string; name: string; result: string; }[]; type: string; account_type?: 'CHECKING' | 'SAVINGS'; network_specific_data?: { mastercard: object; visa: object; }; }[]; }`\n\n - `token: string`\n - `account_token: string`\n - `acquirer_fee: number`\n - `acquirer_reference_number: string`\n - `amount: number`\n - `amounts: { cardholder: { amount: number; conversion_rate: string; currency: string; }; hold: { amount: number; currency: string; }; merchant: { amount: number; currency: string; }; settlement: { amount: number; currency: string; }; }`\n - `authorization_amount: number`\n - `authorization_code: string`\n - `avs: { address: string; zipcode: string; }`\n - `card_token: string`\n - `cardholder_authentication: { authentication_method: 'FRICTIONLESS' | 'CHALLENGE' | 'NONE'; authentication_result: 'ATTEMPTS' | 'DECLINE' | 'NONE' | 'SUCCESS'; decision_made_by: 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'LITHIC_DEFAULT' | 'LITHIC_RULES' | 'NETWORK' | 'UNKNOWN'; liability_shift: '3DS_AUTHENTICATED' | 'TOKEN_AUTHENTICATED' | 'NONE'; three_ds_authentication_token: string; }`\n - `created: string`\n - `financial_account_token: string`\n - `merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }`\n - `merchant_amount: number`\n - `merchant_authorization_amount: number`\n - `merchant_currency: string`\n - `network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'`\n - `network_risk_score: number`\n - `pos: { entry_mode: { card: 'NOT_PRESENT' | 'PREAUTHORIZED' | 'PRESENT' | 'UNKNOWN'; cardholder: string; pan: string; pin_entered: boolean; }; terminal: { attended: boolean; card_retention_capable: boolean; on_premise: boolean; operator: 'ADMINISTRATIVE' | 'CARDHOLDER' | 'CARD_ACCEPTOR' | 'UNKNOWN'; partial_approval_capable: boolean; pin_capability: 'CAPABLE' | 'INOPERATIVE' | 'NOT_CAPABLE' | 'UNSPECIFIED'; type: string; acceptor_terminal_id?: string; }; }`\n - `result: string`\n - `service_location: { city: string; country: string; postal_code: string; state: string; street_address: string; }`\n - `settled_amount: number`\n - `status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'`\n - `tags: object`\n - `token_info: { wallet_type: 'APPLE_PAY' | 'GOOGLE_PAY' | 'MASTERPASS' | 'MERCHANT' | 'OTHER' | 'SAMSUNG_PAY'; }`\n - `updated: string`\n - `events?: { token: string; amount: number; amounts: { cardholder: { amount: number; conversion_rate: string; currency: string; }; merchant: { amount: number; currency: string; }; settlement: { amount: number; conversion_rate: string; currency: string; }; }; created: string; detailed_results: string[]; effective_polarity: 'CREDIT' | 'DEBIT'; network_info: { acquirer: { acquirer_reference_number: string; retrieval_reference_number: string; }; amex: { original_transaction_id: string; transaction_id: string; }; mastercard: { banknet_reference_number: string; original_banknet_reference_number: string; original_switch_serial_number: string; switch_serial_number: string; }; visa: { original_transaction_id: string; transaction_id: string; }; }; result: string; rule_results: { auth_rule_token: string; explanation: string; name: string; result: string; }[]; type: string; account_type?: 'CHECKING' | 'SAVINGS'; network_specific_data?: { mastercard: { ecommerce_security_level_indicator: string; on_behalf_service_result: { result_1: string; result_2: string; service: string; }[]; transaction_type_identifier: string; }; visa: { business_application_identifier: 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 transaction of client.transactions.list()) {\n console.log(transaction);\n}\n```", + perLanguage: { + go: { + method: 'client.Transactions.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Transactions.List(context.TODO(), lithic.TransactionListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v1/transactions \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'transactions().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TransactionListPage;\nimport com.lithic.api.models.TransactionListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n TransactionListPage page = client.transactions().list();\n }\n}', + }, + kotlin: { + method: 'transactions().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TransactionListPage\nimport com.lithic.api.models.TransactionListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: TransactionListPage = client.transactions().list()\n}', + }, + python: { + method: 'transactions.list', + example: + '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.transactions.list()\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'transactions.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.transactions.list\n\nputs(page)', + }, + typescript: { + method: 'client.transactions.list', + example: + "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 transaction of client.transactions.list()) {\n console.log(transaction.token);\n}", + }, + }, }, { - name: 'expire_authorization', - endpoint: '/v1/transactions/{transaction_token}/expire_authorization', - httpMethod: 'post', - summary: 'Expire an authorization', - description: 'Expire authorization', - stainlessPath: '(resource) transactions > (method) expire_authorization', - qualified: 'client.transactions.expireAuthorization', + name: 'retrieve', + endpoint: '/v1/transactions/{transaction_token}', + httpMethod: 'get', + summary: 'Get card transaction', + description: + 'Get a specific card transaction. All amounts are in the smallest unit of their respective currency (e.g., cents for USD).\n', + stainlessPath: '(resource) transactions > (method) retrieve', + qualified: 'client.transactions.retrieve', params: ['transaction_token: string;'], + response: + "{ token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: object; authorization_amount: number; authorization_code: string; avs: object; card_token: string; cardholder_authentication: cardholder_authentication; created: string; financial_account_token: string; merchant: merchant; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: object; result: string; service_location: object; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: token_info; updated: string; events?: object[]; }", markdown: - "## expire_authorization\n\n`client.transactions.expireAuthorization(transaction_token: string): void`\n\n**post** `/v1/transactions/{transaction_token}/expire_authorization`\n\nExpire authorization\n\n### Parameters\n\n- `transaction_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.transactions.expireAuthorization('00000000-0000-0000-0000-000000000000')\n```", + "## retrieve\n\n`client.transactions.retrieve(transaction_token: string): { token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: object; authorization_amount: number; authorization_code: string; avs: object; card_token: string; cardholder_authentication: cardholder_authentication; created: string; financial_account_token: string; merchant: merchant; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: object; result: string; service_location: object; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: token_info; updated: string; events?: object[]; }`\n\n**get** `/v1/transactions/{transaction_token}`\n\nGet a specific card transaction. All amounts are in the smallest unit of their respective currency (e.g., cents for USD).\n\n\n### Parameters\n\n- `transaction_token: string`\n\n### Returns\n\n- `{ token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: { cardholder: { amount: number; conversion_rate: string; currency: currency; }; hold: { amount: number; currency: currency; }; merchant: { amount: number; currency: currency; }; settlement: { amount: number; currency: currency; }; }; authorization_amount: number; authorization_code: string; avs: { address: string; zipcode: string; }; card_token: string; cardholder_authentication: { authentication_method: 'FRICTIONLESS' | 'CHALLENGE' | 'NONE'; authentication_result: 'ATTEMPTS' | 'DECLINE' | 'NONE' | 'SUCCESS'; decision_made_by: 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'LITHIC_DEFAULT' | 'LITHIC_RULES' | 'NETWORK' | 'UNKNOWN'; liability_shift: '3DS_AUTHENTICATED' | 'TOKEN_AUTHENTICATED' | 'NONE'; three_ds_authentication_token: string; }; created: string; financial_account_token: string; merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: { entry_mode: { card: 'NOT_PRESENT' | 'PREAUTHORIZED' | 'PRESENT' | 'UNKNOWN'; cardholder: string; pan: string; pin_entered: boolean; }; terminal: { attended: boolean; card_retention_capable: boolean; on_premise: boolean; operator: 'ADMINISTRATIVE' | 'CARDHOLDER' | 'CARD_ACCEPTOR' | 'UNKNOWN'; partial_approval_capable: boolean; pin_capability: 'CAPABLE' | 'INOPERATIVE' | 'NOT_CAPABLE' | 'UNSPECIFIED'; type: string; acceptor_terminal_id?: string; }; }; result: string; service_location: { city: string; country: string; postal_code: string; state: string; street_address: string; }; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: { wallet_type: 'APPLE_PAY' | 'GOOGLE_PAY' | 'MASTERPASS' | 'MERCHANT' | 'OTHER' | 'SAMSUNG_PAY'; }; updated: string; events?: { token: string; amount: number; amounts: { cardholder: object; merchant: object; settlement: object; }; created: string; detailed_results: string[]; effective_polarity: 'CREDIT' | 'DEBIT'; network_info: { acquirer: object; amex: object; mastercard: object; visa: object; }; result: string; rule_results: { auth_rule_token: string; explanation: string; name: string; result: string; }[]; type: string; account_type?: 'CHECKING' | 'SAVINGS'; network_specific_data?: { mastercard: object; visa: object; }; }[]; }`\n\n - `token: string`\n - `account_token: string`\n - `acquirer_fee: number`\n - `acquirer_reference_number: string`\n - `amount: number`\n - `amounts: { cardholder: { amount: number; conversion_rate: string; currency: string; }; hold: { amount: number; currency: string; }; merchant: { amount: number; currency: string; }; settlement: { amount: number; currency: string; }; }`\n - `authorization_amount: number`\n - `authorization_code: string`\n - `avs: { address: string; zipcode: string; }`\n - `card_token: string`\n - `cardholder_authentication: { authentication_method: 'FRICTIONLESS' | 'CHALLENGE' | 'NONE'; authentication_result: 'ATTEMPTS' | 'DECLINE' | 'NONE' | 'SUCCESS'; decision_made_by: 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'LITHIC_DEFAULT' | 'LITHIC_RULES' | 'NETWORK' | 'UNKNOWN'; liability_shift: '3DS_AUTHENTICATED' | 'TOKEN_AUTHENTICATED' | 'NONE'; three_ds_authentication_token: string; }`\n - `created: string`\n - `financial_account_token: string`\n - `merchant: { acceptor_id: string; acquiring_institution_id: string; city: string; country: string; descriptor: string; mcc: string; state: string; }`\n - `merchant_amount: number`\n - `merchant_authorization_amount: number`\n - `merchant_currency: string`\n - `network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'`\n - `network_risk_score: number`\n - `pos: { entry_mode: { card: 'NOT_PRESENT' | 'PREAUTHORIZED' | 'PRESENT' | 'UNKNOWN'; cardholder: string; pan: string; pin_entered: boolean; }; terminal: { attended: boolean; card_retention_capable: boolean; on_premise: boolean; operator: 'ADMINISTRATIVE' | 'CARDHOLDER' | 'CARD_ACCEPTOR' | 'UNKNOWN'; partial_approval_capable: boolean; pin_capability: 'CAPABLE' | 'INOPERATIVE' | 'NOT_CAPABLE' | 'UNSPECIFIED'; type: string; acceptor_terminal_id?: string; }; }`\n - `result: string`\n - `service_location: { city: string; country: string; postal_code: string; state: string; street_address: string; }`\n - `settled_amount: number`\n - `status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'`\n - `tags: object`\n - `token_info: { wallet_type: 'APPLE_PAY' | 'GOOGLE_PAY' | 'MASTERPASS' | 'MERCHANT' | 'OTHER' | 'SAMSUNG_PAY'; }`\n - `updated: string`\n - `events?: { token: string; amount: number; amounts: { cardholder: { amount: number; conversion_rate: string; currency: string; }; merchant: { amount: number; currency: string; }; settlement: { amount: number; conversion_rate: string; currency: string; }; }; created: string; detailed_results: string[]; effective_polarity: 'CREDIT' | 'DEBIT'; network_info: { acquirer: { acquirer_reference_number: string; retrieval_reference_number: string; }; amex: { original_transaction_id: string; transaction_id: string; }; mastercard: { banknet_reference_number: string; original_banknet_reference_number: string; original_switch_serial_number: string; switch_serial_number: string; }; visa: { original_transaction_id: string; transaction_id: string; }; }; result: string; rule_results: { auth_rule_token: string; explanation: string; name: string; result: string; }[]; type: string; account_type?: 'CHECKING' | 'SAVINGS'; network_specific_data?: { mastercard: { ecommerce_security_level_indicator: string; on_behalf_service_result: { result_1: string; result_2: string; service: string; }[]; transaction_type_identifier: string; }; visa: { business_application_identifier: string; }; }; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst transaction = await client.transactions.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(transaction);\n```", + perLanguage: { + go: { + method: 'client.Transactions.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\ttransaction, err := client.Transactions.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", transaction.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/transactions/$TRANSACTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'transactions().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Transaction;\nimport com.lithic.api.models.TransactionRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n Transaction transaction = client.transactions().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'transactions().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Transaction\nimport com.lithic.api.models.TransactionRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val transaction: Transaction = client.transactions().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'transactions.retrieve', + example: + '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)\ntransaction = client.transactions.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(transaction.token)', + }, + ruby: { + method: 'transactions.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ntransaction = lithic.transactions.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(transaction)', + }, + typescript: { + method: 'client.transactions.retrieve', + example: + "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\nconst transaction = await client.transactions.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(transaction.token);", + }, + }, }, { name: 'simulate_authorization', @@ -2020,20 +6059,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: '{ token?: string; debugging_request_id?: string; }', markdown: "## simulate_authorization\n\n`client.transactions.simulateAuthorization(amount: number, descriptor: string, pan: string, mcc?: string, merchant_acceptor_city?: string, merchant_acceptor_country?: string, merchant_acceptor_id?: string, merchant_acceptor_state?: string, merchant_amount?: number, merchant_currency?: string, partial_approval_capable?: boolean, pin?: string, status?: string): { token?: string; debugging_request_id?: string; }`\n\n**post** `/v1/simulate/authorize`\n\nSimulates an authorization request from the card network as if it came from a merchant acquirer.\nIf you are configured for ASA, simulating authorizations requires your ASA client to be set up properly, i.e. be able to respond to the ASA request with a valid JSON. For users that are not configured for ASA, a daily transaction limit of $5000 USD is applied by default. You can update this limit via the [update account](https://docs.lithic.com/reference/patchaccountbytoken) endpoint.\n\n\n### Parameters\n\n- `amount: number`\n Amount (in cents) to authorize. For credit authorizations and financial credit authorizations, any value entered will be converted into a negative amount in the simulated transaction. For example, entering 100 in this field will result in a -100 amount in the transaction. For balance inquiries, this field must be set to 0.\n\n- `descriptor: string`\n Merchant descriptor.\n\n- `pan: string`\n Sixteen digit card number.\n\n- `mcc?: string`\n Merchant category code for the transaction to be simulated. A four-digit number listed in ISO 18245.\nSupported merchant category codes can be found [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).\n\n\n- `merchant_acceptor_city?: string`\n Merchant acceptor city\n\n- `merchant_acceptor_country?: string`\n Merchant acceptor country code (ISO 3166-1 alpha-3)\n\n- `merchant_acceptor_id?: string`\n Unique identifier to identify the payment card acceptor.\n\n- `merchant_acceptor_state?: string`\n Merchant acceptor state/province (ISO 3166-2 subdivision code)\n\n- `merchant_amount?: number`\n Amount of the transaction to be simulated in currency specified in merchant_currency, including any acquirer fees.\n\n- `merchant_currency?: string`\n 3-character alphabetic ISO 4217 currency code. Note: Simulator only accepts USD, GBP, EUR and defaults to GBP if another ISO 4217 code is provided\n\n- `partial_approval_capable?: boolean`\n Set to true if the terminal is capable of partial approval otherwise false.\nPartial approval is when part of a transaction is approved and another\npayment must be used for the remainder.\n\n\n- `pin?: string`\n Simulate entering a PIN. If omitted, PIN check will not be performed.\n\n- `status?: string`\n Type of event to simulate.\n* `AUTHORIZATION` is a dual message purchase authorization, meaning a subsequent clearing step is required to settle the transaction.\n* `BALANCE_INQUIRY` is a $0 authorization requesting the balance held on the card, and is most often observed when a cardholder requests to view a card's balance at an ATM.\n* `CREDIT_AUTHORIZATION` is a dual message request from a merchant to authorize a refund, meaning a subsequent clearing step is required to settle the transaction.\n* `FINANCIAL_AUTHORIZATION` is a single message request from a merchant to debit funds immediately (such as an ATM withdrawal), and no subsequent clearing is required to settle the transaction.\n* `FINANCIAL_CREDIT_AUTHORIZATION` is a single message request from a merchant to credit funds immediately, and no subsequent clearing is required to settle the transaction.\n\n### Returns\n\n- `{ token?: string; debugging_request_id?: string; }`\n\n - `token?: string`\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.simulateAuthorization({\n amount: 3831,\n descriptor: 'COFFEE SHOP',\n pan: '4111111289144142',\n});\n\nconsole.log(response);\n```", - }, - { - name: 'simulate_authorization_advice', - endpoint: '/v1/simulate/authorization_advice', - httpMethod: 'post', - summary: 'Simulate authorization advice', - description: - 'Simulates an authorization advice from the card network as if it came from a merchant acquirer. An authorization advice changes the pending amount of the transaction.\n', - stainlessPath: '(resource) transactions > (method) simulate_authorization_advice', - qualified: 'client.transactions.simulateAuthorizationAdvice', - params: ['token: string;', 'amount: number;'], - response: '{ token?: string; debugging_request_id?: string; }', - markdown: - "## simulate_authorization_advice\n\n`client.transactions.simulateAuthorizationAdvice(token: string, amount: number): { token?: string; debugging_request_id?: string; }`\n\n**post** `/v1/simulate/authorization_advice`\n\nSimulates an authorization advice from the card network as if it came from a merchant acquirer. An authorization advice changes the pending amount of the transaction.\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 authorize. This amount will override the transaction's amount that was originally set by /v1/simulate/authorize.\n\n### Returns\n\n- `{ token?: string; debugging_request_id?: string; }`\n\n - `token?: string`\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.simulateAuthorizationAdvice({ token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac', amount: 3831 });\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Transactions.SimulateAuthorization', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Transactions.SimulateAuthorization(context.TODO(), lithic.TransactionSimulateAuthorizationParams{\n\t\tAmount: lithic.F(int64(3831)),\n\t\tDescriptor: lithic.F("COFFEE SHOP"),\n\t\tPan: lithic.F("4111111289144142"),\n\t\tMerchantAcceptorCity: lithic.F("LOS ANGELES"),\n\t\tMerchantAcceptorCountry: lithic.F("USA"),\n\t\tMerchantAcceptorState: lithic.F("CA"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.DebuggingRequestID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/simulate/authorize \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "amount": 3831,\n "descriptor": "COFFEE SHOP",\n "pan": "4111111289144142",\n "mcc": "5812",\n "merchant_acceptor_city": "LOS ANGELES",\n "merchant_acceptor_country": "USA",\n "merchant_acceptor_id": "OODKZAPJVN4YS7O",\n "merchant_acceptor_state": "CA",\n "merchant_currency": "GBP",\n "pin": "1234",\n "status": "AUTHORIZATION"\n }\'', + }, + java: { + method: 'transactions().simulateAuthorization', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TransactionSimulateAuthorizationParams;\nimport com.lithic.api.models.TransactionSimulateAuthorizationResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n TransactionSimulateAuthorizationParams params = TransactionSimulateAuthorizationParams.builder()\n .amount(3831L)\n .descriptor("COFFEE SHOP")\n .pan("4111111289144142")\n .build();\n TransactionSimulateAuthorizationResponse response = client.transactions().simulateAuthorization(params);\n }\n}', + }, + kotlin: { + method: 'transactions().simulateAuthorization', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TransactionSimulateAuthorizationParams\nimport com.lithic.api.models.TransactionSimulateAuthorizationResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: TransactionSimulateAuthorizationParams = TransactionSimulateAuthorizationParams.builder()\n .amount(3831L)\n .descriptor("COFFEE SHOP")\n .pan("4111111289144142")\n .build()\n val response: TransactionSimulateAuthorizationResponse = client.transactions().simulateAuthorization(params)\n}', + }, + python: { + method: 'transactions.simulate_authorization', + example: + '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)\nresponse = client.transactions.simulate_authorization(\n amount=3831,\n descriptor="COFFEE SHOP",\n pan="4111111289144142",\n merchant_acceptor_city="LOS ANGELES",\n merchant_acceptor_country="USA",\n merchant_acceptor_state="CA",\n)\nprint(response.debugging_request_id)', + }, + ruby: { + method: 'transactions.simulate_authorization', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.transactions.simulate_authorization(\n amount: 3831,\n descriptor: "COFFEE SHOP",\n pan: "4111111289144142"\n)\n\nputs(response)', + }, + typescript: { + method: 'client.transactions.simulateAuthorization', + example: + "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\nconst response = await client.transactions.simulateAuthorization({\n amount: 3831,\n descriptor: 'COFFEE SHOP',\n pan: '4111111289144142',\n merchant_acceptor_city: 'LOS ANGELES',\n merchant_acceptor_country: 'USA',\n merchant_acceptor_state: 'CA',\n});\n\nconsole.log(response.debugging_request_id);", + }, + }, }, { name: 'simulate_clearing', @@ -2048,6 +6109,196 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: '{ debugging_request_id?: string; }', markdown: "## 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```", + perLanguage: { + go: { + method: 'client.Transactions.SimulateClearing', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Transactions.SimulateClearing(context.TODO(), lithic.TransactionSimulateClearingParams{\n\t\tToken: lithic.F("fabd829d-7f7b-4432-a8f2-07ea4889aaac"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.DebuggingRequestID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/simulate/clearing \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "token": "fabd829d-7f7b-4432-a8f2-07ea4889aaac"\n }\'', + }, + java: { + method: 'transactions().simulateClearing', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TransactionSimulateClearingParams;\nimport com.lithic.api.models.TransactionSimulateClearingResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n TransactionSimulateClearingParams params = TransactionSimulateClearingParams.builder()\n .token("fabd829d-7f7b-4432-a8f2-07ea4889aaac")\n .build();\n TransactionSimulateClearingResponse response = client.transactions().simulateClearing(params);\n }\n}', + }, + kotlin: { + method: 'transactions().simulateClearing', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TransactionSimulateClearingParams\nimport com.lithic.api.models.TransactionSimulateClearingResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: TransactionSimulateClearingParams = TransactionSimulateClearingParams.builder()\n .token("fabd829d-7f7b-4432-a8f2-07ea4889aaac")\n .build()\n val response: TransactionSimulateClearingResponse = client.transactions().simulateClearing(params)\n}', + }, + python: { + method: 'transactions.simulate_clearing', + example: + '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)\nresponse = client.transactions.simulate_clearing(\n token="fabd829d-7f7b-4432-a8f2-07ea4889aaac",\n amount=0,\n)\nprint(response.debugging_request_id)', + }, + ruby: { + method: 'transactions.simulate_clearing', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.transactions.simulate_clearing(token: "fabd829d-7f7b-4432-a8f2-07ea4889aaac")\n\nputs(response)', + }, + typescript: { + method: 'client.transactions.simulateClearing', + example: + "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\nconst response = await client.transactions.simulateClearing({\n token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac',\n});\n\nconsole.log(response.debugging_request_id);", + }, + }, + }, + { + name: 'simulate_return', + endpoint: '/v1/simulate/return', + httpMethod: 'post', + summary: 'Simulate return', + description: + 'Returns, or refunds, an amount back to a card. Returns simulated via this endpoint clear immediately, without prior authorization, and result in a `SETTLED` transaction status.\n', + stainlessPath: '(resource) transactions > (method) simulate_return', + qualified: 'client.transactions.simulateReturn', + params: ['amount: number;', 'descriptor: string;', 'pan: string;'], + response: '{ token?: string; debugging_request_id?: string; }', + markdown: + "## simulate_return\n\n`client.transactions.simulateReturn(amount: number, descriptor: string, pan: string): { token?: string; debugging_request_id?: string; }`\n\n**post** `/v1/simulate/return`\n\nReturns, or refunds, an amount back to a card. Returns simulated via this endpoint clear immediately, without prior authorization, and result in a `SETTLED` transaction status.\n\n\n### Parameters\n\n- `amount: number`\n Amount (in cents) to authorize.\n\n- `descriptor: string`\n Merchant descriptor.\n\n- `pan: string`\n Sixteen digit card number.\n\n### Returns\n\n- `{ token?: string; debugging_request_id?: string; }`\n\n - `token?: string`\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.simulateReturn({\n amount: 3831,\n descriptor: 'COFFEE SHOP',\n pan: '4111111289144142',\n});\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Transactions.SimulateReturn', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Transactions.SimulateReturn(context.TODO(), lithic.TransactionSimulateReturnParams{\n\t\tAmount: lithic.F(int64(3831)),\n\t\tDescriptor: lithic.F("COFFEE SHOP"),\n\t\tPan: lithic.F("4111111289144142"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.DebuggingRequestID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/simulate/return \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "amount": 3831,\n "descriptor": "COFFEE SHOP",\n "pan": "4111111289144142"\n }\'', + }, + java: { + method: 'transactions().simulateReturn', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TransactionSimulateReturnParams;\nimport com.lithic.api.models.TransactionSimulateReturnResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n TransactionSimulateReturnParams params = TransactionSimulateReturnParams.builder()\n .amount(3831L)\n .descriptor("COFFEE SHOP")\n .pan("4111111289144142")\n .build();\n TransactionSimulateReturnResponse response = client.transactions().simulateReturn(params);\n }\n}', + }, + kotlin: { + method: 'transactions().simulateReturn', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TransactionSimulateReturnParams\nimport com.lithic.api.models.TransactionSimulateReturnResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: TransactionSimulateReturnParams = TransactionSimulateReturnParams.builder()\n .amount(3831L)\n .descriptor("COFFEE SHOP")\n .pan("4111111289144142")\n .build()\n val response: TransactionSimulateReturnResponse = client.transactions().simulateReturn(params)\n}', + }, + python: { + method: 'transactions.simulate_return', + example: + '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)\nresponse = client.transactions.simulate_return(\n amount=3831,\n descriptor="COFFEE SHOP",\n pan="4111111289144142",\n)\nprint(response.debugging_request_id)', + }, + ruby: { + method: 'transactions.simulate_return', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.transactions.simulate_return(amount: 3831, descriptor: "COFFEE SHOP", pan: "4111111289144142")\n\nputs(response)', + }, + typescript: { + method: 'client.transactions.simulateReturn', + example: + "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\nconst response = await client.transactions.simulateReturn({\n amount: 3831,\n descriptor: 'COFFEE SHOP',\n pan: '4111111289144142',\n});\n\nconsole.log(response.debugging_request_id);", + }, + }, + }, + { + name: 'simulate_return_reversal', + endpoint: '/v1/simulate/return_reversal', + httpMethod: 'post', + summary: 'Simulate return reversal', + description: + 'Reverses a return, i.e. a credit transaction with a `SETTLED` status. Returns can be financial credit authorizations, or credit authorizations that have cleared.\n', + stainlessPath: '(resource) transactions > (method) simulate_return_reversal', + qualified: 'client.transactions.simulateReturnReversal', + params: ['token: string;'], + response: '{ debugging_request_id?: string; }', + markdown: + "## simulate_return_reversal\n\n`client.transactions.simulateReturnReversal(token: string): { debugging_request_id?: string; }`\n\n**post** `/v1/simulate/return_reversal`\n\nReverses a return, i.e. a credit transaction with a `SETTLED` status. Returns can be financial credit authorizations, or credit authorizations that have cleared.\n\n\n### Parameters\n\n- `token: string`\n The transaction token returned from the /v1/simulate/authorize response.\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.simulateReturnReversal({ token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac' });\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Transactions.SimulateReturnReversal', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Transactions.SimulateReturnReversal(context.TODO(), lithic.TransactionSimulateReturnReversalParams{\n\t\tToken: lithic.F("fabd829d-7f7b-4432-a8f2-07ea4889aaac"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.DebuggingRequestID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/simulate/return_reversal \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "token": "fabd829d-7f7b-4432-a8f2-07ea4889aaac"\n }\'', + }, + java: { + method: 'transactions().simulateReturnReversal', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TransactionSimulateReturnReversalParams;\nimport com.lithic.api.models.TransactionSimulateReturnReversalResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n TransactionSimulateReturnReversalParams params = TransactionSimulateReturnReversalParams.builder()\n .token("fabd829d-7f7b-4432-a8f2-07ea4889aaac")\n .build();\n TransactionSimulateReturnReversalResponse response = client.transactions().simulateReturnReversal(params);\n }\n}', + }, + kotlin: { + method: 'transactions().simulateReturnReversal', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TransactionSimulateReturnReversalParams\nimport com.lithic.api.models.TransactionSimulateReturnReversalResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: TransactionSimulateReturnReversalParams = TransactionSimulateReturnReversalParams.builder()\n .token("fabd829d-7f7b-4432-a8f2-07ea4889aaac")\n .build()\n val response: TransactionSimulateReturnReversalResponse = client.transactions().simulateReturnReversal(params)\n}', + }, + python: { + method: 'transactions.simulate_return_reversal', + example: + '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)\nresponse = client.transactions.simulate_return_reversal(\n token="fabd829d-7f7b-4432-a8f2-07ea4889aaac",\n)\nprint(response.debugging_request_id)', + }, + ruby: { + method: 'transactions.simulate_return_reversal', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.transactions.simulate_return_reversal(token: "fabd829d-7f7b-4432-a8f2-07ea4889aaac")\n\nputs(response)', + }, + typescript: { + method: 'client.transactions.simulateReturnReversal', + example: + "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\nconst response = await client.transactions.simulateReturnReversal({\n token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac',\n});\n\nconsole.log(response.debugging_request_id);", + }, + }, + }, + { + name: 'simulate_void', + endpoint: '/v1/simulate/void', + httpMethod: 'post', + summary: 'Simulate void', + description: + 'Voids a pending authorization. If `amount` is not set, the full amount will be voided. Can be used on partially voided transactions but not partially cleared transactions. _Simulating an authorization expiry on credit authorizations or credit authorization advice is not currently supported but will be added soon._\n', + stainlessPath: '(resource) transactions > (method) simulate_void', + qualified: 'client.transactions.simulateVoid', + params: [ + 'token: string;', + 'amount?: number;', + "type?: 'AUTHORIZATION_EXPIRY' | 'AUTHORIZATION_REVERSAL';", + ], + response: '{ debugging_request_id?: string; }', + markdown: + "## simulate_void\n\n`client.transactions.simulateVoid(token: string, amount?: number, type?: 'AUTHORIZATION_EXPIRY' | 'AUTHORIZATION_REVERSAL'): { debugging_request_id?: string; }`\n\n**post** `/v1/simulate/void`\n\nVoids a pending authorization. If `amount` is not set, the full amount will be voided. Can be used on partially voided transactions but not partially cleared transactions. _Simulating an authorization expiry on credit authorizations or credit authorization advice is not currently supported but will be added soon._\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 void. Typically this will match the amount in the original authorization, but can be less. Applies to authorization reversals only. An authorization expiry will always apply to the full pending amount.\n\n- `type?: 'AUTHORIZATION_EXPIRY' | 'AUTHORIZATION_REVERSAL'`\n Type of event to simulate. Defaults to `AUTHORIZATION_REVERSAL`.\n\n* `AUTHORIZATION_EXPIRY` indicates authorization has expired and been reversed by Lithic.\n* `AUTHORIZATION_REVERSAL` indicates authorization was reversed by the merchant.\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.simulateVoid({ token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac' });\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Transactions.SimulateVoid', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Transactions.SimulateVoid(context.TODO(), lithic.TransactionSimulateVoidParams{\n\t\tToken: lithic.F("fabd829d-7f7b-4432-a8f2-07ea4889aaac"),\n\t\tAmount: lithic.F(int64(100)),\n\t\tType: lithic.F(lithic.TransactionSimulateVoidParamsTypeAuthorizationExpiry),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.DebuggingRequestID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/simulate/void \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "token": "fabd829d-7f7b-4432-a8f2-07ea4889aaac",\n "type": "AUTHORIZATION_EXPIRY"\n }\'', + }, + java: { + method: 'transactions().simulateVoid', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TransactionSimulateVoidParams;\nimport com.lithic.api.models.TransactionSimulateVoidResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n TransactionSimulateVoidParams params = TransactionSimulateVoidParams.builder()\n .token("fabd829d-7f7b-4432-a8f2-07ea4889aaac")\n .build();\n TransactionSimulateVoidResponse response = client.transactions().simulateVoid(params);\n }\n}', + }, + kotlin: { + method: 'transactions().simulateVoid', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TransactionSimulateVoidParams\nimport com.lithic.api.models.TransactionSimulateVoidResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: TransactionSimulateVoidParams = TransactionSimulateVoidParams.builder()\n .token("fabd829d-7f7b-4432-a8f2-07ea4889aaac")\n .build()\n val response: TransactionSimulateVoidResponse = client.transactions().simulateVoid(params)\n}', + }, + python: { + method: 'transactions.simulate_void', + example: + '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)\nresponse = client.transactions.simulate_void(\n token="fabd829d-7f7b-4432-a8f2-07ea4889aaac",\n amount=100,\n type="AUTHORIZATION_EXPIRY",\n)\nprint(response.debugging_request_id)', + }, + ruby: { + method: 'transactions.simulate_void', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.transactions.simulate_void(token: "fabd829d-7f7b-4432-a8f2-07ea4889aaac")\n\nputs(response)', + }, + typescript: { + method: 'client.transactions.simulateVoid', + example: + "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\nconst response = await client.transactions.simulateVoid({\n token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac',\n amount: 100,\n type: 'AUTHORIZATION_EXPIRY',\n});\n\nconsole.log(response.debugging_request_id);", + }, + }, }, { name: 'simulate_credit_authorization', @@ -2071,6 +6322,33 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: '{ token?: string; debugging_request_id?: string; }', markdown: "## simulate_credit_authorization\n\n`client.transactions.simulateCreditAuthorization(amount: number, descriptor: string, pan: string, mcc?: string, merchant_acceptor_city?: string, merchant_acceptor_country?: string, merchant_acceptor_id?: string, merchant_acceptor_state?: string): { token?: string; debugging_request_id?: string; }`\n\n**post** `/v1/simulate/credit_authorization_advice`\n\nSimulates a credit authorization advice from the card network.\nThis message indicates that the network approved a credit authorization on your behalf.\n\n\n### Parameters\n\n- `amount: number`\n Amount (in cents). Any value entered will be converted into a negative amount in the simulated transaction. For example, entering 100 in this field will appear as a -100 amount in the transaction.\n\n- `descriptor: string`\n Merchant descriptor.\n\n- `pan: string`\n Sixteen digit card number.\n\n- `mcc?: string`\n Merchant category code for the transaction to be simulated. A four-digit number listed in ISO 18245.\nSupported merchant category codes can be found [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).\n\n\n- `merchant_acceptor_city?: string`\n Merchant acceptor city\n\n- `merchant_acceptor_country?: string`\n Merchant acceptor country code (ISO 3166-1 alpha-3)\n\n- `merchant_acceptor_id?: string`\n Unique identifier to identify the payment card acceptor.\n\n- `merchant_acceptor_state?: string`\n Merchant acceptor state/province (ISO 3166-2 subdivision code)\n\n### Returns\n\n- `{ token?: string; debugging_request_id?: string; }`\n\n - `token?: string`\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.simulateCreditAuthorization({\n amount: 3831,\n descriptor: 'COFFEE SHOP',\n pan: '4111111289144142',\n});\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Transactions.SimulateCreditAuthorization', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Transactions.SimulateCreditAuthorization(context.TODO(), lithic.TransactionSimulateCreditAuthorizationParams{\n\t\tAmount: lithic.F(int64(3831)),\n\t\tDescriptor: lithic.F("COFFEE SHOP"),\n\t\tPan: lithic.F("4111111289144142"),\n\t\tMerchantAcceptorCity: lithic.F("SEATTLE"),\n\t\tMerchantAcceptorCountry: lithic.F("USA"),\n\t\tMerchantAcceptorID: lithic.F("XRKGDPOWEWQRRWU"),\n\t\tMerchantAcceptorState: lithic.F("WA"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.DebuggingRequestID)\n}\n', + }, + java: { + method: 'transactions().simulateCreditAuthorization', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TransactionSimulateCreditAuthorizationParams;\nimport com.lithic.api.models.TransactionSimulateCreditAuthorizationResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n TransactionSimulateCreditAuthorizationParams params = TransactionSimulateCreditAuthorizationParams.builder()\n .amount(3831L)\n .descriptor("COFFEE SHOP")\n .pan("4111111289144142")\n .build();\n TransactionSimulateCreditAuthorizationResponse response = client.transactions().simulateCreditAuthorization(params);\n }\n}', + }, + kotlin: { + method: 'transactions().simulateCreditAuthorization', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TransactionSimulateCreditAuthorizationParams\nimport com.lithic.api.models.TransactionSimulateCreditAuthorizationResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: TransactionSimulateCreditAuthorizationParams = TransactionSimulateCreditAuthorizationParams.builder()\n .amount(3831L)\n .descriptor("COFFEE SHOP")\n .pan("4111111289144142")\n .build()\n val response: TransactionSimulateCreditAuthorizationResponse = client.transactions().simulateCreditAuthorization(params)\n}', + }, + python: { + method: 'transactions.simulate_credit_authorization', + example: + '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)\nresponse = client.transactions.simulate_credit_authorization(\n amount=3831,\n descriptor="COFFEE SHOP",\n pan="4111111289144142",\n merchant_acceptor_city="SEATTLE",\n merchant_acceptor_country="USA",\n merchant_acceptor_id="XRKGDPOWEWQRRWU",\n merchant_acceptor_state="WA",\n)\nprint(response.debugging_request_id)', + }, + typescript: { + method: 'client.transactions.simulateCreditAuthorization', + example: + "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\nconst response = await client.transactions.simulateCreditAuthorization({\n amount: 3831,\n descriptor: 'COFFEE SHOP',\n pan: '4111111289144142',\n merchant_acceptor_city: 'SEATTLE',\n merchant_acceptor_country: 'USA',\n merchant_acceptor_id: 'XRKGDPOWEWQRRWU',\n merchant_acceptor_state: 'WA',\n});\n\nconsole.log(response.debugging_request_id);", + }, + }, }, { name: 'simulate_credit_authorization_advice', @@ -2094,52 +6372,140 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: '{ token?: string; debugging_request_id?: string; }', markdown: "## simulate_credit_authorization_advice\n\n`client.transactions.simulateCreditAuthorizationAdvice(amount: number, descriptor: string, pan: string, mcc?: string, merchant_acceptor_city?: string, merchant_acceptor_country?: string, merchant_acceptor_id?: string, merchant_acceptor_state?: string): { token?: string; debugging_request_id?: string; }`\n\n**post** `/v1/simulate/credit_authorization_advice`\n\nSimulates a credit authorization advice from the card network.\nThis message indicates that the network approved a credit authorization on your behalf.\n\n\n### Parameters\n\n- `amount: number`\n Amount (in cents). Any value entered will be converted into a negative amount in the simulated transaction. For example, entering 100 in this field will appear as a -100 amount in the transaction.\n\n- `descriptor: string`\n Merchant descriptor.\n\n- `pan: string`\n Sixteen digit card number.\n\n- `mcc?: string`\n Merchant category code for the transaction to be simulated. A four-digit number listed in ISO 18245.\nSupported merchant category codes can be found [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).\n\n\n- `merchant_acceptor_city?: string`\n Merchant acceptor city\n\n- `merchant_acceptor_country?: string`\n Merchant acceptor country code (ISO 3166-1 alpha-3)\n\n- `merchant_acceptor_id?: string`\n Unique identifier to identify the payment card acceptor.\n\n- `merchant_acceptor_state?: string`\n Merchant acceptor state/province (ISO 3166-2 subdivision code)\n\n### Returns\n\n- `{ token?: string; debugging_request_id?: string; }`\n\n - `token?: string`\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.simulateCreditAuthorizationAdvice({\n amount: 3831,\n descriptor: 'COFFEE SHOP',\n pan: '4111111289144142',\n});\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Transactions.SimulateCreditAuthorizationAdvice', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Transactions.SimulateCreditAuthorizationAdvice(context.TODO(), lithic.TransactionSimulateCreditAuthorizationAdviceParams{\n\t\tAmount: lithic.F(int64(3831)),\n\t\tDescriptor: lithic.F("COFFEE SHOP"),\n\t\tPan: lithic.F("4111111289144142"),\n\t\tMerchantAcceptorCity: lithic.F("SEATTLE"),\n\t\tMerchantAcceptorCountry: lithic.F("USA"),\n\t\tMerchantAcceptorID: lithic.F("XRKGDPOWEWQRRWU"),\n\t\tMerchantAcceptorState: lithic.F("WA"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.DebuggingRequestID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/simulate/credit_authorization_advice \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "amount": 3831,\n "descriptor": "COFFEE SHOP",\n "pan": "4111111289144142",\n "mcc": "5812",\n "merchant_acceptor_city": "SEATTLE",\n "merchant_acceptor_country": "USA",\n "merchant_acceptor_id": "XRKGDPOWEWQRRWU",\n "merchant_acceptor_state": "WA"\n }\'', + }, + java: { + method: 'transactions().simulateCreditAuthorizationAdvice', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TransactionSimulateCreditAuthorizationAdviceParams;\nimport com.lithic.api.models.TransactionSimulateCreditAuthorizationAdviceResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n TransactionSimulateCreditAuthorizationAdviceParams params = TransactionSimulateCreditAuthorizationAdviceParams.builder()\n .amount(3831L)\n .descriptor("COFFEE SHOP")\n .pan("4111111289144142")\n .build();\n TransactionSimulateCreditAuthorizationAdviceResponse response = client.transactions().simulateCreditAuthorizationAdvice(params);\n }\n}', + }, + kotlin: { + method: 'transactions().simulateCreditAuthorizationAdvice', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TransactionSimulateCreditAuthorizationAdviceParams\nimport com.lithic.api.models.TransactionSimulateCreditAuthorizationAdviceResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: TransactionSimulateCreditAuthorizationAdviceParams = TransactionSimulateCreditAuthorizationAdviceParams.builder()\n .amount(3831L)\n .descriptor("COFFEE SHOP")\n .pan("4111111289144142")\n .build()\n val response: TransactionSimulateCreditAuthorizationAdviceResponse = client.transactions().simulateCreditAuthorizationAdvice(params)\n}', + }, + python: { + method: 'transactions.simulate_credit_authorization_advice', + example: + '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)\nresponse = client.transactions.simulate_credit_authorization_advice(\n amount=3831,\n descriptor="COFFEE SHOP",\n pan="4111111289144142",\n merchant_acceptor_city="SEATTLE",\n merchant_acceptor_country="USA",\n merchant_acceptor_id="XRKGDPOWEWQRRWU",\n merchant_acceptor_state="WA",\n)\nprint(response.debugging_request_id)', + }, + ruby: { + method: 'transactions.simulate_credit_authorization_advice', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.transactions.simulate_credit_authorization_advice(\n amount: 3831,\n descriptor: "COFFEE SHOP",\n pan: "4111111289144142"\n)\n\nputs(response)', + }, + typescript: { + method: 'client.transactions.simulateCreditAuthorizationAdvice', + example: + "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\nconst response = await client.transactions.simulateCreditAuthorizationAdvice({\n amount: 3831,\n descriptor: 'COFFEE SHOP',\n pan: '4111111289144142',\n merchant_acceptor_city: 'SEATTLE',\n merchant_acceptor_country: 'USA',\n merchant_acceptor_id: 'XRKGDPOWEWQRRWU',\n merchant_acceptor_state: 'WA',\n});\n\nconsole.log(response.debugging_request_id);", + }, + }, }, { - name: 'simulate_return', - endpoint: '/v1/simulate/return', + name: 'simulate_authorization_advice', + endpoint: '/v1/simulate/authorization_advice', httpMethod: 'post', - summary: 'Simulate return', + summary: 'Simulate authorization advice', description: - 'Returns, or refunds, an amount back to a card. Returns simulated via this endpoint clear immediately, without prior authorization, and result in a `SETTLED` transaction status.\n', - stainlessPath: '(resource) transactions > (method) simulate_return', - qualified: 'client.transactions.simulateReturn', - params: ['amount: number;', 'descriptor: string;', 'pan: string;'], + 'Simulates an authorization advice from the card network as if it came from a merchant acquirer. An authorization advice changes the pending amount of the transaction.\n', + stainlessPath: '(resource) transactions > (method) simulate_authorization_advice', + qualified: 'client.transactions.simulateAuthorizationAdvice', + params: ['token: string;', 'amount: number;'], response: '{ token?: string; debugging_request_id?: string; }', markdown: - "## simulate_return\n\n`client.transactions.simulateReturn(amount: number, descriptor: string, pan: string): { token?: string; debugging_request_id?: string; }`\n\n**post** `/v1/simulate/return`\n\nReturns, or refunds, an amount back to a card. Returns simulated via this endpoint clear immediately, without prior authorization, and result in a `SETTLED` transaction status.\n\n\n### Parameters\n\n- `amount: number`\n Amount (in cents) to authorize.\n\n- `descriptor: string`\n Merchant descriptor.\n\n- `pan: string`\n Sixteen digit card number.\n\n### Returns\n\n- `{ token?: string; debugging_request_id?: string; }`\n\n - `token?: string`\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.simulateReturn({\n amount: 3831,\n descriptor: 'COFFEE SHOP',\n pan: '4111111289144142',\n});\n\nconsole.log(response);\n```", - }, - { - name: 'simulate_return_reversal', - endpoint: '/v1/simulate/return_reversal', - httpMethod: 'post', - summary: 'Simulate return reversal', - description: - 'Reverses a return, i.e. a credit transaction with a `SETTLED` status. Returns can be financial credit authorizations, or credit authorizations that have cleared.\n', - stainlessPath: '(resource) transactions > (method) simulate_return_reversal', - qualified: 'client.transactions.simulateReturnReversal', - params: ['token: string;'], - response: '{ debugging_request_id?: string; }', - markdown: - "## simulate_return_reversal\n\n`client.transactions.simulateReturnReversal(token: string): { debugging_request_id?: string; }`\n\n**post** `/v1/simulate/return_reversal`\n\nReverses a return, i.e. a credit transaction with a `SETTLED` status. Returns can be financial credit authorizations, or credit authorizations that have cleared.\n\n\n### Parameters\n\n- `token: string`\n The transaction token returned from the /v1/simulate/authorize response.\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.simulateReturnReversal({ token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac' });\n\nconsole.log(response);\n```", + "## simulate_authorization_advice\n\n`client.transactions.simulateAuthorizationAdvice(token: string, amount: number): { token?: string; debugging_request_id?: string; }`\n\n**post** `/v1/simulate/authorization_advice`\n\nSimulates an authorization advice from the card network as if it came from a merchant acquirer. An authorization advice changes the pending amount of the transaction.\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 authorize. This amount will override the transaction's amount that was originally set by /v1/simulate/authorize.\n\n### Returns\n\n- `{ token?: string; debugging_request_id?: string; }`\n\n - `token?: string`\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.simulateAuthorizationAdvice({ token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac', amount: 3831 });\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Transactions.SimulateAuthorizationAdvice', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Transactions.SimulateAuthorizationAdvice(context.TODO(), lithic.TransactionSimulateAuthorizationAdviceParams{\n\t\tToken: lithic.F("fabd829d-7f7b-4432-a8f2-07ea4889aaac"),\n\t\tAmount: lithic.F(int64(3831)),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.DebuggingRequestID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/simulate/authorization_advice \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "token": "fabd829d-7f7b-4432-a8f2-07ea4889aaac",\n "amount": 3831\n }\'', + }, + java: { + method: 'transactions().simulateAuthorizationAdvice', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TransactionSimulateAuthorizationAdviceParams;\nimport com.lithic.api.models.TransactionSimulateAuthorizationAdviceResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n TransactionSimulateAuthorizationAdviceParams params = TransactionSimulateAuthorizationAdviceParams.builder()\n .token("fabd829d-7f7b-4432-a8f2-07ea4889aaac")\n .amount(3831L)\n .build();\n TransactionSimulateAuthorizationAdviceResponse response = client.transactions().simulateAuthorizationAdvice(params);\n }\n}', + }, + kotlin: { + method: 'transactions().simulateAuthorizationAdvice', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TransactionSimulateAuthorizationAdviceParams\nimport com.lithic.api.models.TransactionSimulateAuthorizationAdviceResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: TransactionSimulateAuthorizationAdviceParams = TransactionSimulateAuthorizationAdviceParams.builder()\n .token("fabd829d-7f7b-4432-a8f2-07ea4889aaac")\n .amount(3831L)\n .build()\n val response: TransactionSimulateAuthorizationAdviceResponse = client.transactions().simulateAuthorizationAdvice(params)\n}', + }, + python: { + method: 'transactions.simulate_authorization_advice', + example: + '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)\nresponse = client.transactions.simulate_authorization_advice(\n token="fabd829d-7f7b-4432-a8f2-07ea4889aaac",\n amount=3831,\n)\nprint(response.debugging_request_id)', + }, + ruby: { + method: 'transactions.simulate_authorization_advice', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.transactions.simulate_authorization_advice(\n token: "fabd829d-7f7b-4432-a8f2-07ea4889aaac",\n amount: 3831\n)\n\nputs(response)', + }, + typescript: { + method: 'client.transactions.simulateAuthorizationAdvice', + example: + "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\nconst response = await client.transactions.simulateAuthorizationAdvice({\n token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac',\n amount: 3831,\n});\n\nconsole.log(response.debugging_request_id);", + }, + }, }, { - name: 'simulate_void', - endpoint: '/v1/simulate/void', + name: 'expire_authorization', + endpoint: '/v1/transactions/{transaction_token}/expire_authorization', httpMethod: 'post', - summary: 'Simulate void', - description: - 'Voids a pending authorization. If `amount` is not set, the full amount will be voided. Can be used on partially voided transactions but not partially cleared transactions. _Simulating an authorization expiry on credit authorizations or credit authorization advice is not currently supported but will be added soon._\n', - stainlessPath: '(resource) transactions > (method) simulate_void', - qualified: 'client.transactions.simulateVoid', - params: [ - 'token: string;', - 'amount?: number;', - "type?: 'AUTHORIZATION_EXPIRY' | 'AUTHORIZATION_REVERSAL';", - ], - response: '{ debugging_request_id?: string; }', + summary: 'Expire an authorization', + description: 'Expire authorization', + stainlessPath: '(resource) transactions > (method) expire_authorization', + qualified: 'client.transactions.expireAuthorization', + params: ['transaction_token: string;'], markdown: - "## simulate_void\n\n`client.transactions.simulateVoid(token: string, amount?: number, type?: 'AUTHORIZATION_EXPIRY' | 'AUTHORIZATION_REVERSAL'): { debugging_request_id?: string; }`\n\n**post** `/v1/simulate/void`\n\nVoids a pending authorization. If `amount` is not set, the full amount will be voided. Can be used on partially voided transactions but not partially cleared transactions. _Simulating an authorization expiry on credit authorizations or credit authorization advice is not currently supported but will be added soon._\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 void. Typically this will match the amount in the original authorization, but can be less. Applies to authorization reversals only. An authorization expiry will always apply to the full pending amount.\n\n- `type?: 'AUTHORIZATION_EXPIRY' | 'AUTHORIZATION_REVERSAL'`\n Type of event to simulate. Defaults to `AUTHORIZATION_REVERSAL`.\n\n* `AUTHORIZATION_EXPIRY` indicates authorization has expired and been reversed by Lithic.\n* `AUTHORIZATION_REVERSAL` indicates authorization was reversed by the merchant.\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.simulateVoid({ token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac' });\n\nconsole.log(response);\n```", + "## expire_authorization\n\n`client.transactions.expireAuthorization(transaction_token: string): void`\n\n**post** `/v1/transactions/{transaction_token}/expire_authorization`\n\nExpire authorization\n\n### Parameters\n\n- `transaction_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.transactions.expireAuthorization('00000000-0000-0000-0000-000000000000')\n```", + perLanguage: { + go: { + method: 'client.Transactions.ExpireAuthorization', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.Transactions.ExpireAuthorization(context.TODO(), "00000000-0000-0000-0000-000000000000")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/transactions/$TRANSACTION_TOKEN/expire_authorization \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'transactions().expireAuthorization', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TransactionExpireAuthorizationParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n client.transactions().expireAuthorization("00000000-0000-0000-0000-000000000000");\n }\n}', + }, + kotlin: { + method: 'transactions().expireAuthorization', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TransactionExpireAuthorizationParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n client.transactions().expireAuthorization("00000000-0000-0000-0000-000000000000")\n}', + }, + python: { + method: 'transactions.expire_authorization', + example: + '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)\nclient.transactions.expire_authorization(\n "00000000-0000-0000-0000-000000000000",\n)', + }, + ruby: { + method: 'transactions.expire_authorization', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.transactions.expire_authorization("00000000-0000-0000-0000-000000000000")\n\nputs(result)', + }, + typescript: { + method: 'client.transactions.expireAuthorization', + example: + "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\nawait client.transactions.expireAuthorization('00000000-0000-0000-0000-000000000000');", + }, + }, }, { name: 'retrieve', @@ -2155,6 +6521,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ data: { token: string; common: object; event_token: string; fleet: object[]; transaction_token: string; }[]; }', markdown: "## retrieve\n\n`client.transactions.enhancedCommercialData.retrieve(transaction_token: string): { data: enhanced_data[]; }`\n\n**get** `/v1/transactions/{transaction_token}/enhanced_commercial_data`\n\nGet all L2/L3 enhanced commercial data associated with a transaction. Not available in sandbox.\n\n### Parameters\n\n- `transaction_token: string`\n\n### Returns\n\n- `{ data: { token: string; common: object; event_token: string; fleet: object[]; transaction_token: string; }[]; }`\n\n - `data: { token: string; common: { line_items: { amount?: string; description?: string; product_code?: string; quantity?: string; }[]; tax: { amount?: number; exempt?: 'TAX_INCLUDED' | 'TAX_NOT_INCLUDED' | 'NOT_SUPPORTED'; merchant_tax_id?: string; }; customer_reference_number?: string; merchant_reference_number?: string; order_date?: string; }; event_token: string; fleet: { amount_totals: { discount?: number; gross_sale?: number; net_sale?: number; }; fuel: { quantity?: string; type?: string; unit_of_measure?: 'GALLONS' | 'LITERS' | 'POUNDS' | 'KILOGRAMS' | 'IMPERIAL_GALLONS' | 'NOT_APPLICABLE' | 'UNKNOWN'; unit_price?: number; }; driver_number?: string; odometer?: number; service_type?: 'UNKNOWN' | 'UNDEFINED' | 'SELF_SERVICE' | 'FULL_SERVICE' | 'NON_FUEL_ONLY'; vehicle_number?: string; }[]; transaction_token: string; }[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst enhancedCommercialData = await client.transactions.enhancedCommercialData.retrieve('00000000-0000-0000-0000-000000000000');\n\nconsole.log(enhancedCommercialData);\n```", + perLanguage: { + go: { + method: 'client.Transactions.EnhancedCommercialData.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tenhancedCommercialData, err := client.Transactions.EnhancedCommercialData.Get(context.TODO(), "00000000-0000-0000-0000-000000000000")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", enhancedCommercialData.Data)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/transactions/$TRANSACTION_TOKEN/enhanced_commercial_data \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'transactions().enhancedCommercialData().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.EnhancedCommercialDataRetrieveResponse;\nimport com.lithic.api.models.TransactionEnhancedCommercialDataRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n EnhancedCommercialDataRetrieveResponse enhancedCommercialData = client.transactions().enhancedCommercialData().retrieve("00000000-0000-0000-0000-000000000000");\n }\n}', + }, + kotlin: { + method: 'transactions().enhancedCommercialData().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.EnhancedCommercialDataRetrieveResponse\nimport com.lithic.api.models.TransactionEnhancedCommercialDataRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val enhancedCommercialData: EnhancedCommercialDataRetrieveResponse = client.transactions().enhancedCommercialData().retrieve("00000000-0000-0000-0000-000000000000")\n}', + }, + python: { + method: 'transactions.enhanced_commercial_data.retrieve', + example: + '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)\nenhanced_commercial_data = client.transactions.enhanced_commercial_data.retrieve(\n "00000000-0000-0000-0000-000000000000",\n)\nprint(enhanced_commercial_data.data)', + }, + ruby: { + method: 'transactions.enhanced_commercial_data.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nenhanced_commercial_data = lithic.transactions.enhanced_commercial_data.retrieve("00000000-0000-0000-0000-000000000000")\n\nputs(enhanced_commercial_data)', + }, + typescript: { + method: 'client.transactions.enhancedCommercialData.retrieve', + example: + "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\nconst enhancedCommercialData = await client.transactions.enhancedCommercialData.retrieve(\n '00000000-0000-0000-0000-000000000000',\n);\n\nconsole.log(enhancedCommercialData.data);", + }, + }, }, { name: 'retrieve', @@ -2170,6 +6572,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; common: { line_items: { amount?: string; description?: string; product_code?: string; quantity?: string; }[]; tax: { amount?: number; exempt?: 'TAX_INCLUDED' | 'TAX_NOT_INCLUDED' | 'NOT_SUPPORTED'; merchant_tax_id?: string; }; customer_reference_number?: string; merchant_reference_number?: string; order_date?: string; }; event_token: string; fleet: { amount_totals: { discount?: number; gross_sale?: number; net_sale?: number; }; fuel: { quantity?: string; type?: string; unit_of_measure?: 'GALLONS' | 'LITERS' | 'POUNDS' | 'KILOGRAMS' | 'IMPERIAL_GALLONS' | 'NOT_APPLICABLE' | 'UNKNOWN'; unit_price?: number; }; driver_number?: string; odometer?: number; service_type?: 'UNKNOWN' | 'UNDEFINED' | 'SELF_SERVICE' | 'FULL_SERVICE' | 'NON_FUEL_ONLY'; vehicle_number?: string; }[]; transaction_token: string; }", markdown: "## retrieve\n\n`client.transactions.events.enhancedCommercialData.retrieve(event_token: string): { token: string; common: object; event_token: string; fleet: object[]; transaction_token: string; }`\n\n**get** `/v1/transactions/events/{event_token}/enhanced_commercial_data`\n\nGet L2/L3 enhanced commercial data associated with a transaction event. Not available in sandbox.\n\n### Parameters\n\n- `event_token: string`\n\n### Returns\n\n- `{ token: string; common: { line_items: { amount?: string; description?: string; product_code?: string; quantity?: string; }[]; tax: { amount?: number; exempt?: 'TAX_INCLUDED' | 'TAX_NOT_INCLUDED' | 'NOT_SUPPORTED'; merchant_tax_id?: string; }; customer_reference_number?: string; merchant_reference_number?: string; order_date?: string; }; event_token: string; fleet: { amount_totals: { discount?: number; gross_sale?: number; net_sale?: number; }; fuel: { quantity?: string; type?: string; unit_of_measure?: 'GALLONS' | 'LITERS' | 'POUNDS' | 'KILOGRAMS' | 'IMPERIAL_GALLONS' | 'NOT_APPLICABLE' | 'UNKNOWN'; unit_price?: number; }; driver_number?: string; odometer?: number; service_type?: 'UNKNOWN' | 'UNDEFINED' | 'SELF_SERVICE' | 'FULL_SERVICE' | 'NON_FUEL_ONLY'; vehicle_number?: string; }[]; transaction_token: string; }`\n\n - `token: string`\n - `common: { line_items: { amount?: string; description?: string; product_code?: string; quantity?: string; }[]; tax: { amount?: number; exempt?: 'TAX_INCLUDED' | 'TAX_NOT_INCLUDED' | 'NOT_SUPPORTED'; merchant_tax_id?: string; }; customer_reference_number?: string; merchant_reference_number?: string; order_date?: string; }`\n - `event_token: string`\n - `fleet: { amount_totals: { discount?: number; gross_sale?: number; net_sale?: number; }; fuel: { quantity?: string; type?: string; unit_of_measure?: 'GALLONS' | 'LITERS' | 'POUNDS' | 'KILOGRAMS' | 'IMPERIAL_GALLONS' | 'NOT_APPLICABLE' | 'UNKNOWN'; unit_price?: number; }; driver_number?: string; odometer?: number; service_type?: 'UNKNOWN' | 'UNDEFINED' | 'SELF_SERVICE' | 'FULL_SERVICE' | 'NON_FUEL_ONLY'; vehicle_number?: string; }[]`\n - `transaction_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst enhancedData = await client.transactions.events.enhancedCommercialData.retrieve('00000000-0000-0000-0000-000000000000');\n\nconsole.log(enhancedData);\n```", + perLanguage: { + go: { + method: 'client.Transactions.Events.EnhancedCommercialData.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tenhancedData, err := client.Transactions.Events.EnhancedCommercialData.Get(context.TODO(), "00000000-0000-0000-0000-000000000000")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", enhancedData.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/transactions/events/$EVENT_TOKEN/enhanced_commercial_data \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'transactions().events().enhancedCommercialData().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.EnhancedData;\nimport com.lithic.api.models.TransactionEventEnhancedCommercialDataRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n EnhancedData enhancedData = client.transactions().events().enhancedCommercialData().retrieve("00000000-0000-0000-0000-000000000000");\n }\n}', + }, + kotlin: { + method: 'transactions().events().enhancedCommercialData().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.EnhancedData\nimport com.lithic.api.models.TransactionEventEnhancedCommercialDataRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val enhancedData: EnhancedData = client.transactions().events().enhancedCommercialData().retrieve("00000000-0000-0000-0000-000000000000")\n}', + }, + python: { + method: 'transactions.events.enhanced_commercial_data.retrieve', + example: + '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)\nenhanced_data = client.transactions.events.enhanced_commercial_data.retrieve(\n "00000000-0000-0000-0000-000000000000",\n)\nprint(enhanced_data.token)', + }, + ruby: { + method: 'transactions.events.enhanced_commercial_data.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nenhanced_data = lithic.transactions.events.enhanced_commercial_data.retrieve("00000000-0000-0000-0000-000000000000")\n\nputs(enhanced_data)', + }, + typescript: { + method: 'client.transactions.events.enhancedCommercialData.retrieve', + example: + "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\nconst enhancedData = await client.transactions.events.enhancedCommercialData.retrieve(\n '00000000-0000-0000-0000-000000000000',\n);\n\nconsole.log(enhancedData.token);", + }, + }, }, { name: 'create', @@ -2186,6 +6624,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: '{ enrolled?: boolean; }', markdown: "## create\n\n`client.responderEndpoints.create(type?: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING', url?: string): { enrolled?: boolean; }`\n\n**post** `/v1/responder_endpoints`\n\nEnroll a responder endpoint\n\n### Parameters\n\n- `type?: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING'`\n The type of the endpoint.\n\n- `url?: string`\n The URL for the responder endpoint (must be http(s)).\n\n### Returns\n\n- `{ enrolled?: boolean; }`\n\n - `enrolled?: boolean`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst responderEndpoint = await client.responderEndpoints.create();\n\nconsole.log(responderEndpoint);\n```", + perLanguage: { + go: { + method: 'client.ResponderEndpoints.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponderEndpoint, err := client.ResponderEndpoints.New(context.TODO(), lithic.ResponderEndpointNewParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", responderEndpoint.Enrolled)\n}\n', + }, + http: { + example: + "curl https://api.lithic.com/v1/responder_endpoints \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", + }, + java: { + method: 'responderEndpoints().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ResponderEndpointCreateParams;\nimport com.lithic.api.models.ResponderEndpointCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ResponderEndpointCreateResponse responderEndpoint = client.responderEndpoints().create();\n }\n}', + }, + kotlin: { + method: 'responderEndpoints().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ResponderEndpointCreateParams\nimport com.lithic.api.models.ResponderEndpointCreateResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val responderEndpoint: ResponderEndpointCreateResponse = client.responderEndpoints().create()\n}', + }, + python: { + method: 'responder_endpoints.create', + example: + '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)\nresponder_endpoint = client.responder_endpoints.create()\nprint(responder_endpoint.enrolled)', + }, + ruby: { + method: 'responder_endpoints.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponder_endpoint = lithic.responder_endpoints.create\n\nputs(responder_endpoint)', + }, + typescript: { + method: 'client.responderEndpoints.create', + example: + "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\nconst responderEndpoint = await client.responderEndpoints.create();\n\nconsole.log(responderEndpoint.enrolled);", + }, + }, }, { name: 'delete', @@ -2198,6 +6672,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ params: ["type: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING';"], markdown: "## delete\n\n`client.responderEndpoints.delete(type: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING'): void`\n\n**delete** `/v1/responder_endpoints`\n\nDisenroll a responder endpoint\n\n### Parameters\n\n- `type: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING'`\n The type of the endpoint.\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.responderEndpoints.delete({ type: 'AUTH_STREAM_ACCESS' })\n```", + perLanguage: { + go: { + method: 'client.ResponderEndpoints.Delete', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.ResponderEndpoints.Delete(context.TODO(), lithic.ResponderEndpointDeleteParams{\n\t\tType: lithic.F(lithic.ResponderEndpointDeleteParamsTypeAuthStreamAccess),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/responder_endpoints \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'responderEndpoints().delete', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ResponderEndpointDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ResponderEndpointDeleteParams params = ResponderEndpointDeleteParams.builder()\n .type(ResponderEndpointDeleteParams.Type.AUTH_STREAM_ACCESS)\n .build();\n client.responderEndpoints().delete(params);\n }\n}', + }, + kotlin: { + method: 'responderEndpoints().delete', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ResponderEndpointDeleteParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: ResponderEndpointDeleteParams = ResponderEndpointDeleteParams.builder()\n .type(ResponderEndpointDeleteParams.Type.AUTH_STREAM_ACCESS)\n .build()\n client.responderEndpoints().delete(params)\n}', + }, + python: { + method: 'responder_endpoints.delete', + example: + '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)\nclient.responder_endpoints.delete(\n type="AUTH_STREAM_ACCESS",\n)', + }, + ruby: { + method: 'responder_endpoints.delete', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.responder_endpoints.delete(type: :AUTH_STREAM_ACCESS)\n\nputs(result)', + }, + typescript: { + method: 'client.responderEndpoints.delete', + example: + "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\nawait client.responderEndpoints.delete({ type: 'AUTH_STREAM_ACCESS' });", + }, + }, }, { name: 'check_status', @@ -2211,6 +6721,102 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: '{ enrolled?: boolean; url?: string; }', markdown: "## check_status\n\n`client.responderEndpoints.checkStatus(type: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING'): { enrolled?: boolean; url?: string; }`\n\n**get** `/v1/responder_endpoints`\n\nCheck the status of a responder endpoint\n\n### Parameters\n\n- `type: 'AUTH_STREAM_ACCESS' | 'THREE_DS_DECISIONING' | 'TOKENIZATION_DECISIONING'`\n The type of the endpoint.\n\n### Returns\n\n- `{ enrolled?: boolean; url?: string; }`\n\n - `enrolled?: boolean`\n - `url?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst responderEndpointStatus = await client.responderEndpoints.checkStatus({ type: 'AUTH_STREAM_ACCESS' });\n\nconsole.log(responderEndpointStatus);\n```", + perLanguage: { + go: { + method: 'client.ResponderEndpoints.CheckStatus', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponderEndpointStatus, err := client.ResponderEndpoints.CheckStatus(context.TODO(), lithic.ResponderEndpointCheckStatusParams{\n\t\tType: lithic.F(lithic.ResponderEndpointCheckStatusParamsTypeAuthStreamAccess),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", responderEndpointStatus.Enrolled)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/responder_endpoints \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'responderEndpoints().checkStatus', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ResponderEndpointCheckStatusParams;\nimport com.lithic.api.models.ResponderEndpointStatus;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ResponderEndpointCheckStatusParams params = ResponderEndpointCheckStatusParams.builder()\n .type(ResponderEndpointCheckStatusParams.Type.AUTH_STREAM_ACCESS)\n .build();\n ResponderEndpointStatus responderEndpointStatus = client.responderEndpoints().checkStatus(params);\n }\n}', + }, + kotlin: { + method: 'responderEndpoints().checkStatus', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ResponderEndpointCheckStatusParams\nimport com.lithic.api.models.ResponderEndpointStatus\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: ResponderEndpointCheckStatusParams = ResponderEndpointCheckStatusParams.builder()\n .type(ResponderEndpointCheckStatusParams.Type.AUTH_STREAM_ACCESS)\n .build()\n val responderEndpointStatus: ResponderEndpointStatus = client.responderEndpoints().checkStatus(params)\n}', + }, + python: { + method: 'responder_endpoints.check_status', + example: + '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)\nresponder_endpoint_status = client.responder_endpoints.check_status(\n type="AUTH_STREAM_ACCESS",\n)\nprint(responder_endpoint_status.enrolled)', + }, + ruby: { + method: 'responder_endpoints.check_status', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponder_endpoint_status = lithic.responder_endpoints.check_status(type: :AUTH_STREAM_ACCESS)\n\nputs(responder_endpoint_status)', + }, + typescript: { + method: 'client.responderEndpoints.checkStatus', + example: + "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\nconst responderEndpointStatus = await client.responderEndpoints.checkStatus({\n type: 'AUTH_STREAM_ACCESS',\n});\n\nconsole.log(responderEndpointStatus.enrolled);", + }, + }, + }, + { + name: 'list', + endpoint: '/v1/external_bank_accounts', + httpMethod: 'get', + summary: 'List external bank accounts', + description: 'List all the external bank accounts for the provided search criteria.', + stainlessPath: '(resource) external_bank_accounts > (method) list', + qualified: 'client.externalBankAccounts.list', + params: [ + 'account_token?: string;', + "account_types?: 'CHECKING' | 'SAVINGS'[];", + 'countries?: string[];', + 'ending_before?: string;', + "owner_types?: 'INDIVIDUAL' | 'BUSINESS'[];", + 'page_size?: number;', + 'starting_after?: string;', + "states?: 'ENABLED' | 'CLOSED' | 'PAUSED'[];", + "verification_states?: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'[];", + ], + response: + "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", + markdown: + "## list\n\n`client.externalBankAccounts.list(account_token?: string, account_types?: 'CHECKING' | 'SAVINGS'[], countries?: string[], ending_before?: string, owner_types?: 'INDIVIDUAL' | 'BUSINESS'[], page_size?: number, starting_after?: string, states?: 'ENABLED' | 'CLOSED' | 'PAUSED'[], verification_states?: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'[]): { token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: external_bank_account_address; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n**get** `/v1/external_bank_accounts`\n\nList all the external bank accounts for the provided search criteria.\n\n### Parameters\n\n- `account_token?: string`\n\n- `account_types?: 'CHECKING' | 'SAVINGS'[]`\n\n- `countries?: 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- `owner_types?: 'INDIVIDUAL' | 'BUSINESS'[]`\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- `states?: 'ENABLED' | 'CLOSED' | 'PAUSED'[]`\n\n- `verification_states?: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'[]`\n\n### Returns\n\n- `{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n - `token: string`\n - `country: string`\n - `created: string`\n - `currency: string`\n - `last_four: string`\n - `owner: string`\n - `owner_type: 'BUSINESS' | 'INDIVIDUAL'`\n - `routing_number: string`\n - `state: 'ENABLED' | 'CLOSED' | 'PAUSED'`\n - `type: 'CHECKING' | 'SAVINGS'`\n - `verification_attempts: number`\n - `verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'`\n - `verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'`\n - `account_token?: string`\n - `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `company_id?: string`\n - `dob?: string`\n - `doing_business_as?: string`\n - `financial_account_token?: string`\n - `name?: string`\n - `user_defined_id?: string`\n - `verification_failed_reason?: 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 externalBankAccountListResponse of client.externalBankAccounts.list()) {\n console.log(externalBankAccountListResponse);\n}\n```", + perLanguage: { + go: { + method: 'client.ExternalBankAccounts.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.ExternalBankAccounts.List(context.TODO(), lithic.ExternalBankAccountListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/external_bank_accounts \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'externalBankAccounts().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ExternalBankAccountListPage;\nimport com.lithic.api.models.ExternalBankAccountListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ExternalBankAccountListPage page = client.externalBankAccounts().list();\n }\n}', + }, + kotlin: { + method: 'externalBankAccounts().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ExternalBankAccountListPage\nimport com.lithic.api.models.ExternalBankAccountListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: ExternalBankAccountListPage = client.externalBankAccounts().list()\n}', + }, + python: { + method: 'external_bank_accounts.list', + example: + '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.external_bank_accounts.list()\npage = page.data[0]\nprint(page.company_id)', + }, + ruby: { + method: 'external_bank_accounts.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.external_bank_accounts.list\n\nputs(page)', + }, + typescript: { + method: 'client.externalBankAccounts.list', + example: + "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 externalBankAccountListResponse of client.externalBankAccounts.list()) {\n console.log(externalBankAccountListResponse.company_id);\n}", + }, + }, }, { name: 'create', @@ -2225,6 +6831,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ ], response: "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", + perLanguage: { + go: { + method: 'client.ExternalBankAccounts.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\texternalBankAccount, err := client.ExternalBankAccounts.New(context.TODO(), lithic.ExternalBankAccountNewParams{\n\t\tBody: lithic.ExternalBankAccountNewParamsBodyBankVerifiedCreateBankAccountAPIRequest{\n\t\t\tAccountNumber: lithic.F("13719713158835300"),\n\t\t\tCountry: lithic.F("USA"),\n\t\t\tCurrency: lithic.F("USD"),\n\t\t\tFinancialAccountToken: lithic.F("dabadb3b-700c-41e3-8801-d5dfc84ebea0"),\n\t\t\tOwner: lithic.F("John Doe"),\n\t\t\tOwnerType: lithic.F(lithic.OwnerTypeBusiness),\n\t\t\tRoutingNumber: lithic.F("011103093"),\n\t\t\tType: lithic.F(lithic.ExternalBankAccountNewParamsBodyBankVerifiedCreateBankAccountAPIRequestTypeChecking),\n\t\t\tVerificationMethod: lithic.F(lithic.VerificationMethodMicroDeposit),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", externalBankAccount.CompanyID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/external_bank_accounts \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "account_number": "12345678901234567",\n "country": "USD",\n "currency": "USD",\n "financial_account_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "owner": "owner",\n "owner_type": "INDIVIDUAL",\n "routing_number": "123456789",\n "type": "CHECKING",\n "verification_method": "MANUAL"\n }\'', + }, + java: { + method: 'externalBankAccounts().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ExternalBankAccountCreateParams;\nimport com.lithic.api.models.ExternalBankAccountCreateResponse;\nimport com.lithic.api.models.OwnerType;\nimport com.lithic.api.models.VerificationMethod;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ExternalBankAccountCreateParams.Body.BankVerifiedCreateBankAccountApiRequest params = ExternalBankAccountCreateParams.Body.BankVerifiedCreateBankAccountApiRequest.builder()\n .accountNumber("13719713158835300")\n .country("USA")\n .currency("USD")\n .financialAccountToken("dabadb3b-700c-41e3-8801-d5dfc84ebea0")\n .owner("John Doe")\n .ownerType(OwnerType.BUSINESS)\n .routingNumber("011103093")\n .type(ExternalBankAccountCreateParams.Body.BankVerifiedCreateBankAccountApiRequest.AccountType.CHECKING)\n .verificationMethod(VerificationMethod.MICRO_DEPOSIT)\n .build();\n ExternalBankAccountCreateResponse externalBankAccount = client.externalBankAccounts().create(params);\n }\n}', + }, + kotlin: { + method: 'externalBankAccounts().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ExternalBankAccountCreateParams\nimport com.lithic.api.models.ExternalBankAccountCreateResponse\nimport com.lithic.api.models.OwnerType\nimport com.lithic.api.models.VerificationMethod\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: ExternalBankAccountCreateParams.Body.BankVerifiedCreateBankAccountApiRequest = ExternalBankAccountCreateParams.Body.BankVerifiedCreateBankAccountApiRequest.builder()\n .accountNumber("13719713158835300")\n .country("USA")\n .currency("USD")\n .financialAccountToken("dabadb3b-700c-41e3-8801-d5dfc84ebea0")\n .owner("John Doe")\n .ownerType(OwnerType.BUSINESS)\n .routingNumber("011103093")\n .type(ExternalBankAccountCreateParams.Body.BankVerifiedCreateBankAccountApiRequest.AccountType.CHECKING)\n .verificationMethod(VerificationMethod.MICRO_DEPOSIT)\n .build()\n val externalBankAccount: ExternalBankAccountCreateResponse = client.externalBankAccounts().create(params)\n}', + }, + python: { + method: 'external_bank_accounts.create', + example: + '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)\nexternal_bank_account = client.external_bank_accounts.create(\n account_number="13719713158835300",\n country="USA",\n currency="USD",\n financial_account_token="dabadb3b-700c-41e3-8801-d5dfc84ebea0",\n owner="John Doe",\n owner_type="BUSINESS",\n routing_number="011103093",\n type="CHECKING",\n verification_method="MICRO_DEPOSIT",\n address={\n "address1": "5 Broad Street",\n "city": "New York",\n "country": "USA",\n "postal_code": "10001",\n "state": "NY",\n },\n name="John Does Checking",\n)\nprint(external_bank_account.company_id)', + }, + ruby: { + method: 'external_bank_accounts.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nexternal_bank_account = lithic.external_bank_accounts.create(\n body: {\n account_number: "13719713158835300",\n country: "USA",\n currency: "USD",\n financial_account_token: "dabadb3b-700c-41e3-8801-d5dfc84ebea0",\n owner: "John Doe",\n owner_type: :BUSINESS,\n routing_number: "011103093",\n type: :CHECKING,\n verification_method: :MICRO_DEPOSIT\n }\n)\n\nputs(external_bank_account)', + }, + typescript: { + method: 'client.externalBankAccounts.create', + example: + "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\nconst externalBankAccount = await client.externalBankAccounts.create({\n account_number: '13719713158835300',\n country: 'USA',\n currency: 'USD',\n financial_account_token: 'dabadb3b-700c-41e3-8801-d5dfc84ebea0',\n owner: 'John Doe',\n owner_type: 'BUSINESS',\n routing_number: '011103093',\n type: 'CHECKING',\n verification_method: 'MICRO_DEPOSIT',\n address: {\n address1: '5 Broad Street',\n city: 'New York',\n country: 'USA',\n postal_code: '10001',\n state: 'NY',\n },\n name: 'John Does Checking',\n});\n\nconsole.log(externalBankAccount.company_id);", + }, + }, }, { name: 'retrieve', @@ -2239,6 +6881,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", markdown: "## retrieve\n\n`client.externalBankAccounts.retrieve(external_bank_account_token: string): { token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: external_bank_account_address; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n**get** `/v1/external_bank_accounts/{external_bank_account_token}`\n\nGet the external bank account by token.\n\n### Parameters\n\n- `external_bank_account_token: string`\n\n### Returns\n\n- `{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n - `token: string`\n - `country: string`\n - `created: string`\n - `currency: string`\n - `last_four: string`\n - `owner: string`\n - `owner_type: 'BUSINESS' | 'INDIVIDUAL'`\n - `routing_number: string`\n - `state: 'ENABLED' | 'CLOSED' | 'PAUSED'`\n - `type: 'CHECKING' | 'SAVINGS'`\n - `verification_attempts: number`\n - `verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'`\n - `verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'`\n - `account_token?: string`\n - `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `company_id?: string`\n - `dob?: string`\n - `doing_business_as?: string`\n - `financial_account_token?: string`\n - `name?: string`\n - `user_defined_id?: string`\n - `verification_failed_reason?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalBankAccount = await client.externalBankAccounts.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(externalBankAccount);\n```", + perLanguage: { + go: { + method: 'client.ExternalBankAccounts.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\texternalBankAccount, err := client.ExternalBankAccounts.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", externalBankAccount.CompanyID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/external_bank_accounts/$EXTERNAL_BANK_ACCOUNT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'externalBankAccounts().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ExternalBankAccountRetrieveParams;\nimport com.lithic.api.models.ExternalBankAccountRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ExternalBankAccountRetrieveResponse externalBankAccount = client.externalBankAccounts().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'externalBankAccounts().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ExternalBankAccountRetrieveParams\nimport com.lithic.api.models.ExternalBankAccountRetrieveResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val externalBankAccount: ExternalBankAccountRetrieveResponse = client.externalBankAccounts().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'external_bank_accounts.retrieve', + example: + '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)\nexternal_bank_account = client.external_bank_accounts.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(external_bank_account.company_id)', + }, + ruby: { + method: 'external_bank_accounts.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nexternal_bank_account = lithic.external_bank_accounts.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(external_bank_account)', + }, + typescript: { + method: 'client.externalBankAccounts.retrieve', + example: + "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\nconst externalBankAccount = await client.externalBankAccounts.retrieve(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(externalBankAccount.company_id);", + }, + }, }, { name: 'update', @@ -2264,30 +6942,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", markdown: "## update\n\n`client.externalBankAccounts.update(external_bank_account_token: string, address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }, company_id?: string, dob?: string, doing_business_as?: string, name?: string, owner?: string, owner_type?: 'INDIVIDUAL' | 'BUSINESS', type?: 'CHECKING' | 'SAVINGS', user_defined_id?: string): { token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: external_bank_account_address; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n**patch** `/v1/external_bank_accounts/{external_bank_account_token}`\n\nUpdate the external bank account by token.\n\n### Parameters\n\n- `external_bank_account_token: string`\n\n- `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n Address\n - `address1: string`\n - `city: string`\n - `country: string`\n - `postal_code: string`\n - `state: string`\n - `address2?: string`\n\n- `company_id?: string`\n Optional field that helps identify bank accounts in receipts\n\n- `dob?: string`\n Date of Birth of the Individual that owns the external bank account\n\n- `doing_business_as?: string`\n Doing Business As\n\n- `name?: string`\n The nickname for this External Bank Account\n\n- `owner?: string`\n Legal Name of the business or individual who owns the external account. This will appear in statements\n\n- `owner_type?: 'INDIVIDUAL' | 'BUSINESS'`\n Owner Type\n\n- `type?: 'CHECKING' | 'SAVINGS'`\n\n- `user_defined_id?: string`\n User Defined ID\n\n### Returns\n\n- `{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n - `token: string`\n - `country: string`\n - `created: string`\n - `currency: string`\n - `last_four: string`\n - `owner: string`\n - `owner_type: 'BUSINESS' | 'INDIVIDUAL'`\n - `routing_number: string`\n - `state: 'ENABLED' | 'CLOSED' | 'PAUSED'`\n - `type: 'CHECKING' | 'SAVINGS'`\n - `verification_attempts: number`\n - `verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'`\n - `verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'`\n - `account_token?: string`\n - `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `company_id?: string`\n - `dob?: string`\n - `doing_business_as?: string`\n - `financial_account_token?: string`\n - `name?: string`\n - `user_defined_id?: string`\n - `verification_failed_reason?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalBankAccount = await client.externalBankAccounts.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(externalBankAccount);\n```", - }, - { - name: 'list', - endpoint: '/v1/external_bank_accounts', - httpMethod: 'get', - summary: 'List external bank accounts', - description: 'List all the external bank accounts for the provided search criteria.', - stainlessPath: '(resource) external_bank_accounts > (method) list', - qualified: 'client.externalBankAccounts.list', - params: [ - 'account_token?: string;', - "account_types?: 'CHECKING' | 'SAVINGS'[];", - 'countries?: string[];', - 'ending_before?: string;', - "owner_types?: 'INDIVIDUAL' | 'BUSINESS'[];", - 'page_size?: number;', - 'starting_after?: string;', - "states?: 'ENABLED' | 'CLOSED' | 'PAUSED'[];", - "verification_states?: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'[];", - ], - response: - "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", - markdown: - "## list\n\n`client.externalBankAccounts.list(account_token?: string, account_types?: 'CHECKING' | 'SAVINGS'[], countries?: string[], ending_before?: string, owner_types?: 'INDIVIDUAL' | 'BUSINESS'[], page_size?: number, starting_after?: string, states?: 'ENABLED' | 'CLOSED' | 'PAUSED'[], verification_states?: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'[]): { token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: external_bank_account_address; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n**get** `/v1/external_bank_accounts`\n\nList all the external bank accounts for the provided search criteria.\n\n### Parameters\n\n- `account_token?: string`\n\n- `account_types?: 'CHECKING' | 'SAVINGS'[]`\n\n- `countries?: 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- `owner_types?: 'INDIVIDUAL' | 'BUSINESS'[]`\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- `states?: 'ENABLED' | 'CLOSED' | 'PAUSED'[]`\n\n- `verification_states?: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'[]`\n\n### Returns\n\n- `{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n - `token: string`\n - `country: string`\n - `created: string`\n - `currency: string`\n - `last_four: string`\n - `owner: string`\n - `owner_type: 'BUSINESS' | 'INDIVIDUAL'`\n - `routing_number: string`\n - `state: 'ENABLED' | 'CLOSED' | 'PAUSED'`\n - `type: 'CHECKING' | 'SAVINGS'`\n - `verification_attempts: number`\n - `verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'`\n - `verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'`\n - `account_token?: string`\n - `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `company_id?: string`\n - `dob?: string`\n - `doing_business_as?: string`\n - `financial_account_token?: string`\n - `name?: string`\n - `user_defined_id?: string`\n - `verification_failed_reason?: 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 externalBankAccountListResponse of client.externalBankAccounts.list()) {\n console.log(externalBankAccountListResponse);\n}\n```", + perLanguage: { + go: { + method: 'client.ExternalBankAccounts.Update', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\texternalBankAccount, err := client.ExternalBankAccounts.Update(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.ExternalBankAccountUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", externalBankAccount.CompanyID)\n}\n', + }, + http: { + example: + "curl https://api.lithic.com/v1/external_bank_accounts/$EXTERNAL_BANK_ACCOUNT_TOKEN \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", + }, + java: { + method: 'externalBankAccounts().update', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ExternalBankAccountUpdateParams;\nimport com.lithic.api.models.ExternalBankAccountUpdateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ExternalBankAccountUpdateResponse externalBankAccount = client.externalBankAccounts().update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'externalBankAccounts().update', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ExternalBankAccountUpdateParams\nimport com.lithic.api.models.ExternalBankAccountUpdateResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val externalBankAccount: ExternalBankAccountUpdateResponse = client.externalBankAccounts().update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'external_bank_accounts.update', + example: + '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)\nexternal_bank_account = client.external_bank_accounts.update(\n external_bank_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(external_bank_account.company_id)', + }, + ruby: { + method: 'external_bank_accounts.update', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nexternal_bank_account = lithic.external_bank_accounts.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(external_bank_account)', + }, + typescript: { + method: 'client.externalBankAccounts.update', + example: + "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\nconst externalBankAccount = await client.externalBankAccounts.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(externalBankAccount.company_id);", + }, + }, }, { name: 'retry_micro_deposits', @@ -2302,6 +6992,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", markdown: "## retry_micro_deposits\n\n`client.externalBankAccounts.retryMicroDeposits(external_bank_account_token: string, financial_account_token?: string): { token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: external_bank_account_address; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n**post** `/v1/external_bank_accounts/{external_bank_account_token}/retry_micro_deposits`\n\nRetry external bank account micro deposit verification.\n\n### Parameters\n\n- `external_bank_account_token: string`\n\n- `financial_account_token?: string`\n\n### Returns\n\n- `{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n - `token: string`\n - `country: string`\n - `created: string`\n - `currency: string`\n - `last_four: string`\n - `owner: string`\n - `owner_type: 'BUSINESS' | 'INDIVIDUAL'`\n - `routing_number: string`\n - `state: 'ENABLED' | 'CLOSED' | 'PAUSED'`\n - `type: 'CHECKING' | 'SAVINGS'`\n - `verification_attempts: number`\n - `verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'`\n - `verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'`\n - `account_token?: string`\n - `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `company_id?: string`\n - `dob?: string`\n - `doing_business_as?: string`\n - `financial_account_token?: string`\n - `name?: string`\n - `user_defined_id?: string`\n - `verification_failed_reason?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.externalBankAccounts.retryMicroDeposits('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.ExternalBankAccounts.RetryMicroDeposits', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.ExternalBankAccounts.RetryMicroDeposits(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.ExternalBankAccountRetryMicroDepositsParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.CompanyID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/external_bank_accounts/$EXTERNAL_BANK_ACCOUNT_TOKEN/retry_micro_deposits \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'externalBankAccounts().retryMicroDeposits', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ExternalBankAccountRetryMicroDepositsParams;\nimport com.lithic.api.models.ExternalBankAccountRetryMicroDepositsResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ExternalBankAccountRetryMicroDepositsResponse response = client.externalBankAccounts().retryMicroDeposits("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'externalBankAccounts().retryMicroDeposits', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ExternalBankAccountRetryMicroDepositsParams\nimport com.lithic.api.models.ExternalBankAccountRetryMicroDepositsResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val response: ExternalBankAccountRetryMicroDepositsResponse = client.externalBankAccounts().retryMicroDeposits("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'external_bank_accounts.retry_micro_deposits', + example: + '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)\nresponse = client.external_bank_accounts.retry_micro_deposits(\n external_bank_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.company_id)', + }, + ruby: { + method: 'external_bank_accounts.retry_micro_deposits', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.external_bank_accounts.retry_micro_deposits("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(response)', + }, + typescript: { + method: 'client.externalBankAccounts.retryMicroDeposits', + example: + "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\nconst response = await client.externalBankAccounts.retryMicroDeposits(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(response.company_id);", + }, + }, }, { name: 'retry_prenote', @@ -2316,6 +7042,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'INDIVIDUAL' | 'BUSINESS'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PRENOTE' | 'EXTERNALLY_VERIFIED' | 'UNVERIFIED'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", markdown: "## retry_prenote\n\n`client.externalBankAccounts.retryPrenote(external_bank_account_token: string, financial_account_token?: string): { token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: owner_type; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: verification_method; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: external_bank_account_address; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n**post** `/v1/external_bank_accounts/{external_bank_account_token}/retry_prenote`\n\nRetry external bank account prenote verification.\n\n### Parameters\n\n- `external_bank_account_token: string`\n\n- `financial_account_token?: string`\n\n### Returns\n\n- `{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'INDIVIDUAL' | 'BUSINESS'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PRENOTE' | 'EXTERNALLY_VERIFIED' | 'UNVERIFIED'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n - `token: string`\n - `country: string`\n - `created: string`\n - `currency: string`\n - `last_four: string`\n - `owner: string`\n - `owner_type: 'INDIVIDUAL' | 'BUSINESS'`\n - `routing_number: string`\n - `state: 'ENABLED' | 'CLOSED' | 'PAUSED'`\n - `type: 'CHECKING' | 'SAVINGS'`\n - `verification_attempts: number`\n - `verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PRENOTE' | 'EXTERNALLY_VERIFIED' | 'UNVERIFIED'`\n - `verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'`\n - `account_token?: string`\n - `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `company_id?: string`\n - `dob?: string`\n - `doing_business_as?: string`\n - `financial_account_token?: string`\n - `name?: string`\n - `user_defined_id?: string`\n - `verification_failed_reason?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalBankAccount = await client.externalBankAccounts.retryPrenote('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(externalBankAccount);\n```", + perLanguage: { + go: { + method: 'client.ExternalBankAccounts.RetryPrenote', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\texternalBankAccount, err := client.ExternalBankAccounts.RetryPrenote(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.ExternalBankAccountRetryPrenoteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", externalBankAccount.CompanyID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/external_bank_accounts/$EXTERNAL_BANK_ACCOUNT_TOKEN/retry_prenote \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'externalBankAccounts().retryPrenote', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ExternalBankAccount;\nimport com.lithic.api.models.ExternalBankAccountRetryPrenoteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ExternalBankAccount externalBankAccount = client.externalBankAccounts().retryPrenote("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'externalBankAccounts().retryPrenote', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ExternalBankAccount\nimport com.lithic.api.models.ExternalBankAccountRetryPrenoteParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val externalBankAccount: ExternalBankAccount = client.externalBankAccounts().retryPrenote("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'external_bank_accounts.retry_prenote', + example: + '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)\nexternal_bank_account = client.external_bank_accounts.retry_prenote(\n external_bank_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(external_bank_account.company_id)', + }, + ruby: { + method: 'external_bank_accounts.retry_prenote', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nexternal_bank_account = lithic.external_bank_accounts.retry_prenote("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(external_bank_account)', + }, + typescript: { + method: 'client.externalBankAccounts.retryPrenote', + example: + "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\nconst externalBankAccount = await client.externalBankAccounts.retryPrenote(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(externalBankAccount.company_id);", + }, + }, }, { name: 'unpause', @@ -2330,6 +7092,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'INDIVIDUAL' | 'BUSINESS'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PRENOTE' | 'EXTERNALLY_VERIFIED' | 'UNVERIFIED'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", markdown: "## unpause\n\n`client.externalBankAccounts.unpause(external_bank_account_token: string): { token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: owner_type; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: verification_method; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: external_bank_account_address; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n**post** `/v1/external_bank_accounts/{external_bank_account_token}/unpause`\n\nUnpause an external bank account\n\n\n### Parameters\n\n- `external_bank_account_token: string`\n\n### Returns\n\n- `{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'INDIVIDUAL' | 'BUSINESS'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PRENOTE' | 'EXTERNALLY_VERIFIED' | 'UNVERIFIED'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n - `token: string`\n - `country: string`\n - `created: string`\n - `currency: string`\n - `last_four: string`\n - `owner: string`\n - `owner_type: 'INDIVIDUAL' | 'BUSINESS'`\n - `routing_number: string`\n - `state: 'ENABLED' | 'CLOSED' | 'PAUSED'`\n - `type: 'CHECKING' | 'SAVINGS'`\n - `verification_attempts: number`\n - `verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PRENOTE' | 'EXTERNALLY_VERIFIED' | 'UNVERIFIED'`\n - `verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'`\n - `account_token?: string`\n - `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `company_id?: string`\n - `dob?: string`\n - `doing_business_as?: string`\n - `financial_account_token?: string`\n - `name?: string`\n - `user_defined_id?: string`\n - `verification_failed_reason?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalBankAccount = await client.externalBankAccounts.unpause('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(externalBankAccount);\n```", + perLanguage: { + go: { + method: 'client.ExternalBankAccounts.Unpause', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\texternalBankAccount, err := client.ExternalBankAccounts.Unpause(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", externalBankAccount.CompanyID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/external_bank_accounts/$EXTERNAL_BANK_ACCOUNT_TOKEN/unpause \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'externalBankAccounts().unpause', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ExternalBankAccount;\nimport com.lithic.api.models.ExternalBankAccountUnpauseParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ExternalBankAccount externalBankAccount = client.externalBankAccounts().unpause("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'externalBankAccounts().unpause', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ExternalBankAccount\nimport com.lithic.api.models.ExternalBankAccountUnpauseParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val externalBankAccount: ExternalBankAccount = client.externalBankAccounts().unpause("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'external_bank_accounts.unpause', + example: + '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)\nexternal_bank_account = client.external_bank_accounts.unpause(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(external_bank_account.company_id)', + }, + ruby: { + method: 'external_bank_accounts.unpause', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nexternal_bank_account = lithic.external_bank_accounts.unpause("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(external_bank_account)', + }, + typescript: { + method: 'client.externalBankAccounts.unpause', + example: + "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\nconst externalBankAccount = await client.externalBankAccounts.unpause(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(externalBankAccount.company_id);", + }, + }, }, { name: 'create', @@ -2344,6 +7142,103 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }", markdown: "## create\n\n`client.externalBankAccounts.microDeposits.create(external_bank_account_token: string, micro_deposits: number[]): { token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: external_bank_account_address; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n**post** `/v1/external_bank_accounts/{external_bank_account_token}/micro_deposits`\n\nVerify the external bank account by providing the micro deposit amounts.\n\n### Parameters\n\n- `external_bank_account_token: string`\n\n- `micro_deposits: number[]`\n\n### Returns\n\n- `{ token: string; country: string; created: string; currency: string; last_four: string; owner: string; owner_type: 'BUSINESS' | 'INDIVIDUAL'; routing_number: string; state: 'ENABLED' | 'CLOSED' | 'PAUSED'; type: 'CHECKING' | 'SAVINGS'; verification_attempts: number; verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'; verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'; account_token?: string; address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }; company_id?: string; dob?: string; doing_business_as?: string; financial_account_token?: string; name?: string; user_defined_id?: string; verification_failed_reason?: string; }`\n\n - `token: string`\n - `country: string`\n - `created: string`\n - `currency: string`\n - `last_four: string`\n - `owner: string`\n - `owner_type: 'BUSINESS' | 'INDIVIDUAL'`\n - `routing_number: string`\n - `state: 'ENABLED' | 'CLOSED' | 'PAUSED'`\n - `type: 'CHECKING' | 'SAVINGS'`\n - `verification_attempts: number`\n - `verification_method: 'MANUAL' | 'MICRO_DEPOSIT' | 'PLAID' | 'PRENOTE'`\n - `verification_state: 'PENDING' | 'ENABLED' | 'FAILED_VERIFICATION' | 'INSUFFICIENT_FUNDS'`\n - `account_token?: string`\n - `address?: { address1: string; city: string; country: string; postal_code: string; state: string; address2?: string; }`\n - `company_id?: string`\n - `dob?: string`\n - `doing_business_as?: string`\n - `financial_account_token?: string`\n - `name?: string`\n - `user_defined_id?: string`\n - `verification_failed_reason?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst microDeposit = await client.externalBankAccounts.microDeposits.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { micro_deposits: [0, 0] });\n\nconsole.log(microDeposit);\n```", + perLanguage: { + go: { + method: 'client.ExternalBankAccounts.MicroDeposits.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tmicroDeposit, err := client.ExternalBankAccounts.MicroDeposits.New(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.ExternalBankAccountMicroDepositNewParams{\n\t\t\tMicroDeposits: lithic.F([]int64{int64(0), int64(0)}),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", microDeposit.CompanyID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/external_bank_accounts/$EXTERNAL_BANK_ACCOUNT_TOKEN/micro_deposits \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "micro_deposits": [\n 0,\n 0\n ]\n }\'', + }, + java: { + method: 'externalBankAccounts().microDeposits().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ExternalBankAccountMicroDepositCreateParams;\nimport com.lithic.api.models.MicroDepositCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ExternalBankAccountMicroDepositCreateParams params = ExternalBankAccountMicroDepositCreateParams.builder()\n .externalBankAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .addMicroDeposit(0L)\n .addMicroDeposit(0L)\n .build();\n MicroDepositCreateResponse microDeposit = client.externalBankAccounts().microDeposits().create(params);\n }\n}', + }, + kotlin: { + method: 'externalBankAccounts().microDeposits().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ExternalBankAccountMicroDepositCreateParams\nimport com.lithic.api.models.MicroDepositCreateResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: ExternalBankAccountMicroDepositCreateParams = ExternalBankAccountMicroDepositCreateParams.builder()\n .externalBankAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .addMicroDeposit(0L)\n .addMicroDeposit(0L)\n .build()\n val microDeposit: MicroDepositCreateResponse = client.externalBankAccounts().microDeposits().create(params)\n}', + }, + python: { + method: 'external_bank_accounts.micro_deposits.create', + example: + '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)\nmicro_deposit = client.external_bank_accounts.micro_deposits.create(\n external_bank_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n micro_deposits=[0, 0],\n)\nprint(micro_deposit.company_id)', + }, + ruby: { + method: 'external_bank_accounts.micro_deposits.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nmicro_deposit = lithic.external_bank_accounts.micro_deposits.create(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n micro_deposits: [0, 0]\n)\n\nputs(micro_deposit)', + }, + typescript: { + method: 'client.externalBankAccounts.microDeposits.create', + example: + "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\nconst microDeposit = await client.externalBankAccounts.microDeposits.create(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { micro_deposits: [0, 0] },\n);\n\nconsole.log(microDeposit.company_id);", + }, + }, + }, + { + name: 'list', + endpoint: '/v1/payments', + httpMethod: 'get', + summary: 'List payments', + description: 'List all the payments for the provided search criteria.', + stainlessPath: '(resource) payments > (method) list', + qualified: 'client.payments.list', + params: [ + 'account_token?: string;', + 'begin?: string;', + 'business_account_token?: string;', + "category?: 'ACH';", + 'end?: string;', + 'ending_before?: string;', + 'financial_account_token?: string;', + 'page_size?: number;', + "result?: 'APPROVED' | 'DECLINED';", + 'starting_after?: string;', + "status?: 'DECLINED' | 'PENDING' | 'RETURNED' | 'SETTLED';", + ], + response: + "{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }", + markdown: + "## list\n\n`client.payments.list(account_token?: string, begin?: string, business_account_token?: string, category?: 'ACH', end?: string, ending_before?: string, financial_account_token?: string, page_size?: number, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'DECLINED' | 'PENDING' | 'RETURNED' | 'SETTLED'): { token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n\n**get** `/v1/payments`\n\nList all the payments for the provided search criteria.\n\n### Parameters\n\n- `account_token?: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `business_account_token?: string`\n\n- `category?: 'ACH'`\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `financial_account_token?: string`\n\n- `page_size?: number`\n Page size (for pagination).\n\n- `result?: 'APPROVED' | 'DECLINED'`\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- `status?: 'DECLINED' | 'PENDING' | 'RETURNED' | 'SETTLED'`\n\n### Returns\n\n- `{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: object; debtor?: object; message_id?: string; remittance_information?: string; }; pending_amount: number; related_account_tokens: { account_token: string; business_account_token: string; }; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n Payment transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `descriptor: string`\n - `direction: 'CREDIT' | 'DEBIT'`\n - `events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]`\n - `family: 'PAYMENT'`\n - `financial_account_token: string`\n - `method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'`\n - `method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: { account_number?: string; agent_id?: string; agent_name?: string; name?: string; }; debtor?: { account_number?: string; agent_id?: string; agent_name?: string; name?: string; }; message_id?: string; remittance_information?: string; }`\n - `pending_amount: number`\n - `related_account_tokens: { account_token: string; business_account_token: string; }`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `currency?: string`\n - `expected_release_date?: string`\n - `external_bank_account_token?: string`\n - `type?: string`\n - `user_defined_id?: 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 payment of client.payments.list()) {\n console.log(payment);\n}\n```", + perLanguage: { + go: { + method: 'client.Payments.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Payments.List(context.TODO(), lithic.PaymentListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v1/payments \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'payments().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.PaymentListPage;\nimport com.lithic.api.models.PaymentListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n PaymentListPage page = client.payments().list();\n }\n}', + }, + kotlin: { + method: 'payments().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.PaymentListPage\nimport com.lithic.api.models.PaymentListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: PaymentListPage = client.payments().list()\n}', + }, + python: { + method: 'payments.list', + example: + '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.payments.list()\npage = page.data[0]\nprint(page.user_defined_id)', + }, + ruby: { + method: 'payments.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.payments.list\n\nputs(page)', + }, + typescript: { + method: 'client.payments.list', + example: + "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 payment of client.payments.list()) {\n console.log(payment.user_defined_id);\n}", + }, + }, }, { name: 'create', @@ -2369,6 +7264,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }", markdown: "## create\n\n`client.payments.create(amount: number, external_bank_account_token: string, financial_account_token: string, method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY', method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB'; ach_hold_period?: number; addenda?: string; override_company_name?: string; }, type: 'COLLECTION' | 'PAYMENT', token?: string, hold?: { token: string; }, memo?: string, user_defined_id?: string): object`\n\n**post** `/v1/payments`\n\nInitiates a payment between a financial account and an external bank account.\n\n### Parameters\n\n- `amount: number`\n\n- `external_bank_account_token: string`\n\n- `financial_account_token: string`\n\n- `method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY'`\n\n- `method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB'; ach_hold_period?: number; addenda?: string; override_company_name?: string; }`\n - `sec_code: 'CCD' | 'PPD' | 'WEB'`\n - `ach_hold_period?: number`\n Number of days to hold the ACH payment\n - `addenda?: string`\n - `override_company_name?: string`\n Value to override the configured company name with. Can only be used if allowed to override\n\n- `type: 'COLLECTION' | 'PAYMENT'`\n\n- `token?: string`\n Customer-provided token that will serve as an idempotency token. This token will become the transaction token.\n\n- `hold?: { token: string; }`\n Optional hold to settle when this payment is initiated.\n - `token: string`\n Token of the hold to settle when this payment is initiated.\n\n- `memo?: string`\n\n- `user_defined_id?: string`\n\n### Returns\n\n- `{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: wire_party_details; debtor?: wire_party_details; message_id?: string; remittance_information?: string; }; pending_amount: number; related_account_tokens: { account_token: string; business_account_token: string; }; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n Payment transaction\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst payment = await client.payments.create({\n amount: 1,\n external_bank_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n method: 'ACH_NEXT_DAY',\n method_attributes: { sec_code: 'CCD' },\n type: 'COLLECTION',\n});\n\nconsole.log(payment);\n```", + perLanguage: { + go: { + method: 'client.Payments.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpayment, err := client.Payments.New(context.TODO(), lithic.PaymentNewParams{\n\t\tAmount: lithic.F(int64(1)),\n\t\tExternalBankAccountToken: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),\n\t\tFinancialAccountToken: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),\n\t\tMethod: lithic.F(lithic.PaymentNewParamsMethodACHNextDay),\n\t\tMethodAttributes: lithic.F(lithic.PaymentNewParamsMethodAttributes{\n\t\t\tSecCode: lithic.F(lithic.PaymentNewParamsMethodAttributesSecCodeCcd),\n\t\t}),\n\t\tType: lithic.F(lithic.PaymentNewParamsTypeCollection),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", payment)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/payments \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "amount": 1,\n "external_bank_account_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "financial_account_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "method": "ACH_NEXT_DAY",\n "method_attributes": {\n "sec_code": "CCD"\n },\n "type": "COLLECTION"\n }\'', + }, + java: { + method: 'payments().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.PaymentCreateParams;\nimport com.lithic.api.models.PaymentCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n PaymentCreateParams params = PaymentCreateParams.builder()\n .amount(1L)\n .externalBankAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .method(PaymentCreateParams.Method.ACH_NEXT_DAY)\n .methodAttributes(PaymentCreateParams.PaymentMethodRequestAttributes.builder()\n .secCode(PaymentCreateParams.PaymentMethodRequestAttributes.SecCode.CCD)\n .build())\n .type(PaymentCreateParams.Type.COLLECTION)\n .build();\n PaymentCreateResponse payment = client.payments().create(params);\n }\n}', + }, + kotlin: { + method: 'payments().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.PaymentCreateParams\nimport com.lithic.api.models.PaymentCreateResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: PaymentCreateParams = PaymentCreateParams.builder()\n .amount(1L)\n .externalBankAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .method(PaymentCreateParams.Method.ACH_NEXT_DAY)\n .methodAttributes(PaymentCreateParams.PaymentMethodRequestAttributes.builder()\n .secCode(PaymentCreateParams.PaymentMethodRequestAttributes.SecCode.CCD)\n .build())\n .type(PaymentCreateParams.Type.COLLECTION)\n .build()\n val payment: PaymentCreateResponse = client.payments().create(params)\n}', + }, + python: { + method: 'payments.create', + example: + '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)\npayment = client.payments.create(\n amount=1,\n external_bank_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n method="ACH_NEXT_DAY",\n method_attributes={\n "sec_code": "CCD"\n },\n type="COLLECTION",\n)\nprint(payment)', + }, + ruby: { + method: 'payments.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npayment = lithic.payments.create(\n amount: 1,\n external_bank_account_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n financial_account_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n method_: :ACH_NEXT_DAY,\n method_attributes: {sec_code: :CCD},\n type: :COLLECTION\n)\n\nputs(payment)', + }, + typescript: { + method: 'client.payments.create', + example: + "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\nconst payment = await client.payments.create({\n amount: 1,\n external_bank_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n method: 'ACH_NEXT_DAY',\n method_attributes: { sec_code: 'CCD' },\n type: 'COLLECTION',\n});\n\nconsole.log(payment);", + }, + }, }, { name: 'retrieve', @@ -2383,32 +7314,142 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }", markdown: "## retrieve\n\n`client.payments.retrieve(payment_token: string): { token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n\n**get** `/v1/payments/{payment_token}`\n\nGet the payment by token.\n\n### Parameters\n\n- `payment_token: string`\n\n### Returns\n\n- `{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: object; debtor?: object; message_id?: string; remittance_information?: string; }; pending_amount: number; related_account_tokens: { account_token: string; business_account_token: string; }; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n Payment transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `descriptor: string`\n - `direction: 'CREDIT' | 'DEBIT'`\n - `events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]`\n - `family: 'PAYMENT'`\n - `financial_account_token: string`\n - `method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'`\n - `method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: { account_number?: string; agent_id?: string; agent_name?: string; name?: string; }; debtor?: { account_number?: string; agent_id?: string; agent_name?: string; name?: string; }; message_id?: string; remittance_information?: string; }`\n - `pending_amount: number`\n - `related_account_tokens: { account_token: string; business_account_token: string; }`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `currency?: string`\n - `expected_release_date?: string`\n - `external_bank_account_token?: string`\n - `type?: string`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst payment = await client.payments.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(payment);\n```", + perLanguage: { + go: { + method: 'client.Payments.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpayment, err := client.Payments.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", payment.UserDefinedID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/payments/$PAYMENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'payments().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Payment;\nimport com.lithic.api.models.PaymentRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n Payment payment = client.payments().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'payments().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Payment\nimport com.lithic.api.models.PaymentRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val payment: Payment = client.payments().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'payments.retrieve', + example: + '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)\npayment = client.payments.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(payment.user_defined_id)', + }, + ruby: { + method: 'payments.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npayment = lithic.payments.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(payment)', + }, + typescript: { + method: 'client.payments.retrieve', + example: + "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\nconst payment = await client.payments.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(payment.user_defined_id);", + }, + }, }, { - name: 'list', - endpoint: '/v1/payments', - httpMethod: 'get', - summary: 'List payments', - description: 'List all the payments for the provided search criteria.', - stainlessPath: '(resource) payments > (method) list', - qualified: 'client.payments.list', - params: [ - 'account_token?: string;', - 'begin?: string;', - 'business_account_token?: string;', - "category?: 'ACH';", - 'end?: string;', - 'ending_before?: string;', - 'financial_account_token?: string;', - 'page_size?: number;', - "result?: 'APPROVED' | 'DECLINED';", - 'starting_after?: string;', - "status?: 'DECLINED' | 'PENDING' | 'RETURNED' | 'SETTLED';", - ], + name: 'simulate_release', + endpoint: '/v1/simulate/payments/release', + httpMethod: 'post', + summary: 'Simulate release payment', + description: 'Simulates a release of a Payment.', + stainlessPath: '(resource) payments > (method) simulate_release', + qualified: 'client.payments.simulateRelease', + params: ['payment_token: string;'], response: - "{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }", + "{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }", markdown: - "## list\n\n`client.payments.list(account_token?: string, begin?: string, business_account_token?: string, category?: 'ACH', end?: string, ending_before?: string, financial_account_token?: string, page_size?: number, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'DECLINED' | 'PENDING' | 'RETURNED' | 'SETTLED'): { token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n\n**get** `/v1/payments`\n\nList all the payments for the provided search criteria.\n\n### Parameters\n\n- `account_token?: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `business_account_token?: string`\n\n- `category?: 'ACH'`\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `financial_account_token?: string`\n\n- `page_size?: number`\n Page size (for pagination).\n\n- `result?: 'APPROVED' | 'DECLINED'`\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- `status?: 'DECLINED' | 'PENDING' | 'RETURNED' | 'SETTLED'`\n\n### Returns\n\n- `{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: object; debtor?: object; message_id?: string; remittance_information?: string; }; pending_amount: number; related_account_tokens: { account_token: string; business_account_token: string; }; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n Payment transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `descriptor: string`\n - `direction: 'CREDIT' | 'DEBIT'`\n - `events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]`\n - `family: 'PAYMENT'`\n - `financial_account_token: string`\n - `method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'`\n - `method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: { account_number?: string; agent_id?: string; agent_name?: string; name?: string; }; debtor?: { account_number?: string; agent_id?: string; agent_name?: string; name?: string; }; message_id?: string; remittance_information?: string; }`\n - `pending_amount: number`\n - `related_account_tokens: { account_token: string; business_account_token: string; }`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `currency?: string`\n - `expected_release_date?: string`\n - `external_bank_account_token?: string`\n - `type?: string`\n - `user_defined_id?: 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 payment of client.payments.list()) {\n console.log(payment);\n}\n```", + "## simulate_release\n\n`client.payments.simulateRelease(payment_token: string): { debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n**post** `/v1/simulate/payments/release`\n\nSimulates a release of a Payment.\n\n### Parameters\n\n- `payment_token: string`\n Payment Token\n\n### Returns\n\n- `{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n - `debugging_request_id: string`\n - `result: 'APPROVED' | 'DECLINED'`\n - `transaction_event_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.payments.simulateRelease({ payment_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Payments.SimulateRelease', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Payments.SimulateRelease(context.TODO(), lithic.PaymentSimulateReleaseParams{\n\t\tPaymentToken: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.DebuggingRequestID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/simulate/payments/release \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "payment_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }\'', + }, + java: { + method: 'payments().simulateRelease', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.PaymentSimulateReleaseParams;\nimport com.lithic.api.models.PaymentSimulateReleaseResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n PaymentSimulateReleaseParams params = PaymentSimulateReleaseParams.builder()\n .paymentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n PaymentSimulateReleaseResponse response = client.payments().simulateRelease(params);\n }\n}', + }, + kotlin: { + method: 'payments().simulateRelease', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.PaymentSimulateReleaseParams\nimport com.lithic.api.models.PaymentSimulateReleaseResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: PaymentSimulateReleaseParams = PaymentSimulateReleaseParams.builder()\n .paymentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build()\n val response: PaymentSimulateReleaseResponse = client.payments().simulateRelease(params)\n}', + }, + python: { + method: 'payments.simulate_release', + example: + '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)\nresponse = client.payments.simulate_release(\n payment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.debugging_request_id)', + }, + ruby: { + method: 'payments.simulate_release', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.payments.simulate_release(payment_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(response)', + }, + typescript: { + method: 'client.payments.simulateRelease', + example: + "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\nconst response = await client.payments.simulateRelease({\n payment_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(response.debugging_request_id);", + }, + }, + }, + { + name: 'simulate_return', + endpoint: '/v1/simulate/payments/return', + httpMethod: 'post', + summary: 'Simulate return payment', + description: 'Simulates a return of a Payment.', + stainlessPath: '(resource) payments > (method) simulate_return', + qualified: 'client.payments.simulateReturn', + params: ['payment_token: string;', 'return_reason_code?: string;'], + response: + "{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }", + markdown: + "## simulate_return\n\n`client.payments.simulateReturn(payment_token: string, return_reason_code?: string): { debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n**post** `/v1/simulate/payments/return`\n\nSimulates a return of a Payment.\n\n### Parameters\n\n- `payment_token: string`\n Payment Token\n\n- `return_reason_code?: string`\n Return Reason Code\n\n### Returns\n\n- `{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n - `debugging_request_id: string`\n - `result: 'APPROVED' | 'DECLINED'`\n - `transaction_event_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.payments.simulateReturn({ payment_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Payments.SimulateReturn', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Payments.SimulateReturn(context.TODO(), lithic.PaymentSimulateReturnParams{\n\t\tPaymentToken: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.DebuggingRequestID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/simulate/payments/return \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "payment_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "return_reason_code": "R12"\n }\'', + }, + java: { + method: 'payments().simulateReturn', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.PaymentSimulateReturnParams;\nimport com.lithic.api.models.PaymentSimulateReturnResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n PaymentSimulateReturnParams params = PaymentSimulateReturnParams.builder()\n .paymentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n PaymentSimulateReturnResponse response = client.payments().simulateReturn(params);\n }\n}', + }, + kotlin: { + method: 'payments().simulateReturn', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.PaymentSimulateReturnParams\nimport com.lithic.api.models.PaymentSimulateReturnResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: PaymentSimulateReturnParams = PaymentSimulateReturnParams.builder()\n .paymentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build()\n val response: PaymentSimulateReturnResponse = client.payments().simulateReturn(params)\n}', + }, + python: { + method: 'payments.simulate_return', + example: + '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)\nresponse = client.payments.simulate_return(\n payment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.debugging_request_id)', + }, + ruby: { + method: 'payments.simulate_return', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.payments.simulate_return(payment_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(response)', + }, + typescript: { + method: 'client.payments.simulateReturn', + example: + "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\nconst response = await client.payments.simulateReturn({\n payment_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(response.debugging_request_id);", + }, + }, }, { name: 'retry', @@ -2423,6 +7464,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }", markdown: "## retry\n\n`client.payments.retry(payment_token: string): object`\n\n**post** `/v1/payments/{payment_token}/retry`\n\nRetry an origination which has been returned.\n\n### Parameters\n\n- `payment_token: string`\n\n### Returns\n\n- `{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: wire_party_details; debtor?: wire_party_details; message_id?: string; remittance_information?: string; }; pending_amount: number; related_account_tokens: { account_token: string; business_account_token: string; }; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n Payment transaction\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.payments.retry('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Payments.Retry', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Payments.Retry(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/payments/$PAYMENT_TOKEN/retry \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'payments().retry', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.PaymentRetryParams;\nimport com.lithic.api.models.PaymentRetryResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n PaymentRetryResponse response = client.payments().retry("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'payments().retry', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.PaymentRetryParams\nimport com.lithic.api.models.PaymentRetryResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val response: PaymentRetryResponse = client.payments().retry("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'payments.retry', + example: + '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)\nresponse = client.payments.retry(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response)', + }, + ruby: { + method: 'payments.retry_', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.payments.retry_("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(response)', + }, + typescript: { + method: 'client.payments.retry', + example: + "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\nconst response = await client.payments.retry('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);", + }, + }, }, { name: 'return', @@ -2445,27 +7522,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }", markdown: "## return\n\n`client.payments.return(payment_token: string, financial_account_token: string, return_reason_code: string, addenda?: string, date_of_death?: string, memo?: string): { token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: object[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: object | object; pending_amount: number; related_account_tokens: object; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n\n**post** `/v1/payments/{payment_token}/return`\n\nReturn an ACH payment with a specified return reason code. Returns must be initiated\nwithin the time window specified by NACHA rules for each return code (typically 2 banking\ndays for most codes, 60 calendar days for unauthorized debits). For a complete list of\nreturn codes and their meanings, see the [ACH Return Reasons documentation](https://docs.lithic.com/docs/ach-overview#ach-return-reasons).\n\nNote:\n * This endpoint does not modify the state of the financial account associated with the payment. If you would like to change the account state, use the [Update financial account status](https://docs.lithic.com/reference/updatefinancialaccountstatus) endpoint.\n * By default this endpoint is not enabled for your account. Please contact your implementations manager to enable this feature.\n\n\n### Parameters\n\n- `payment_token: string`\n\n- `financial_account_token: string`\n Globally unique identifier for the financial account\n\n- `return_reason_code: string`\n ACH return reason code indicating the reason for returning the payment. Supported codes include R01-R53 and R80-R85. For a complete list of return codes and their meanings, see [ACH Return Reasons](https://docs.lithic.com/docs/ach-overview#ach-return-reasons)\n\n- `addenda?: string`\n Optional additional information about the return. Limited to 44 characters\n\n- `date_of_death?: string`\n Date of death in YYYY-MM-DD format. Required when using return codes **R14** (representative payee deceased) or **R15** (beneficiary or account holder deceased)\n\n- `memo?: string`\n Optional memo for the return. Limited to 10 characters\n\n### Returns\n\n- `{ token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: object; debtor?: object; message_id?: string; remittance_information?: string; }; pending_amount: number; related_account_tokens: { account_token: string; business_account_token: string; }; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; }`\n Payment transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `descriptor: string`\n - `direction: 'CREDIT' | 'DEBIT'`\n - `events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]`\n - `family: 'PAYMENT'`\n - `financial_account_token: string`\n - `method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'`\n - `method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: { account_number?: string; agent_id?: string; agent_name?: string; name?: string; }; debtor?: { account_number?: string; agent_id?: string; agent_name?: string; name?: string; }; message_id?: string; remittance_information?: string; }`\n - `pending_amount: number`\n - `related_account_tokens: { account_token: string; business_account_token: string; }`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `currency?: string`\n - `expected_release_date?: string`\n - `external_bank_account_token?: string`\n - `type?: string`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst payment = await client.payments.return('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', return_reason_code: 'R01' });\n\nconsole.log(payment);\n```", - }, - { - name: 'simulate_action', - endpoint: '/v1/simulate/payments/{payment_token}/action', - httpMethod: 'post', - summary: 'Simulate payment lifecycle event', - description: 'Simulate payment lifecycle event', - stainlessPath: '(resource) payments > (method) simulate_action', - qualified: 'client.payments.simulateAction', - params: [ - 'payment_token: string;', - 'event_type: string;', - 'date_of_death?: string;', - 'decline_reason?: string;', - 'return_addenda?: string;', - 'return_reason_code?: string;', - ], - response: - "{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }", - markdown: - "## simulate_action\n\n`client.payments.simulateAction(payment_token: string, event_type: string, date_of_death?: string, decline_reason?: string, return_addenda?: string, return_reason_code?: string): { debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n**post** `/v1/simulate/payments/{payment_token}/action`\n\nSimulate payment lifecycle event\n\n### Parameters\n\n- `payment_token: string`\n\n- `event_type: string`\n Event Type\n\n- `date_of_death?: string`\n Date of Death for ACH Return\n\n- `decline_reason?: string`\n Decline reason\n\n- `return_addenda?: string`\n Return Addenda\n\n- `return_reason_code?: string`\n Return Reason Code\n\n### Returns\n\n- `{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n - `debugging_request_id: string`\n - `result: 'APPROVED' | 'DECLINED'`\n - `transaction_event_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.payments.simulateAction('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { event_type: 'ACH_ORIGINATION_REVIEWED' });\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Payments.Return', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpayment, err := client.Payments.Return(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.PaymentReturnParams{\n\t\t\tFinancialAccountToken: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),\n\t\t\tReturnReasonCode: lithic.F("R01"),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", payment.UserDefinedID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/payments/$PAYMENT_TOKEN/return \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "financial_account_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "return_reason_code": "R01",\n "date_of_death": "2025-01-15"\n }\'', + }, + java: { + method: 'payments().return_', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Payment;\nimport com.lithic.api.models.PaymentReturnParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n PaymentReturnParams params = PaymentReturnParams.builder()\n .paymentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .returnReasonCode("R01")\n .build();\n Payment payment = client.payments().return_(params);\n }\n}', + }, + kotlin: { + method: 'payments().return_', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Payment\nimport com.lithic.api.models.PaymentReturnParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: PaymentReturnParams = PaymentReturnParams.builder()\n .paymentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .returnReasonCode("R01")\n .build()\n val payment: Payment = client.payments().return_(params)\n}', + }, + python: { + method: 'payments.return_', + example: + '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)\npayment = client.payments.return_(\n payment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n return_reason_code="R01",\n)\nprint(payment.user_defined_id)', + }, + ruby: { + method: 'payments.return_', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npayment = lithic.payments.return_(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n financial_account_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n return_reason_code: "R01"\n)\n\nputs(payment)', + }, + typescript: { + method: 'client.payments.return', + example: + "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\nconst payment = await client.payments.return('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n return_reason_code: 'R01',\n});\n\nconsole.log(payment.user_defined_id);", + }, + }, }, { name: 'simulate_receipt', @@ -2486,34 +7578,99 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }", markdown: "## simulate_receipt\n\n`client.payments.simulateReceipt(token: string, amount: number, financial_account_token: string, receipt_type: 'RECEIPT_CREDIT' | 'RECEIPT_DEBIT', memo?: string): { debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n**post** `/v1/simulate/payments/receipt`\n\nSimulates a receipt of a Payment.\n\n### Parameters\n\n- `token: string`\n Customer-generated payment token used to uniquely identify the simulated payment\n\n- `amount: number`\n Amount\n\n- `financial_account_token: string`\n Financial Account Token\n\n- `receipt_type: 'RECEIPT_CREDIT' | 'RECEIPT_DEBIT'`\n Receipt Type\n\n- `memo?: string`\n Memo\n\n### Returns\n\n- `{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n - `debugging_request_id: string`\n - `result: 'APPROVED' | 'DECLINED'`\n - `transaction_event_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.payments.simulateReceipt({\n token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n amount: 0,\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n receipt_type: 'RECEIPT_CREDIT',\n});\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Payments.SimulateReceipt', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Payments.SimulateReceipt(context.TODO(), lithic.PaymentSimulateReceiptParams{\n\t\tToken: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),\n\t\tAmount: lithic.F(int64(0)),\n\t\tFinancialAccountToken: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),\n\t\tReceiptType: lithic.F(lithic.PaymentSimulateReceiptParamsReceiptTypeReceiptCredit),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.DebuggingRequestID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/simulate/payments/receipt \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "amount": 0,\n "financial_account_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "receipt_type": "RECEIPT_CREDIT"\n }\'', + }, + java: { + method: 'payments().simulateReceipt', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.PaymentSimulateReceiptParams;\nimport com.lithic.api.models.PaymentSimulateReceiptResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n PaymentSimulateReceiptParams params = PaymentSimulateReceiptParams.builder()\n .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .amount(0L)\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .receiptType(PaymentSimulateReceiptParams.ReceiptType.RECEIPT_CREDIT)\n .build();\n PaymentSimulateReceiptResponse response = client.payments().simulateReceipt(params);\n }\n}', + }, + kotlin: { + method: 'payments().simulateReceipt', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.PaymentSimulateReceiptParams\nimport com.lithic.api.models.PaymentSimulateReceiptResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: PaymentSimulateReceiptParams = PaymentSimulateReceiptParams.builder()\n .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .amount(0L)\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .receiptType(PaymentSimulateReceiptParams.ReceiptType.RECEIPT_CREDIT)\n .build()\n val response: PaymentSimulateReceiptResponse = client.payments().simulateReceipt(params)\n}', + }, + python: { + method: 'payments.simulate_receipt', + example: + '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)\nresponse = client.payments.simulate_receipt(\n token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n amount=0,\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n receipt_type="RECEIPT_CREDIT",\n)\nprint(response.debugging_request_id)', + }, + ruby: { + method: 'payments.simulate_receipt', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.payments.simulate_receipt(\n token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n amount: 0,\n financial_account_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n receipt_type: :RECEIPT_CREDIT\n)\n\nputs(response)', + }, + typescript: { + method: 'client.payments.simulateReceipt', + example: + "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\nconst response = await client.payments.simulateReceipt({\n token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n amount: 0,\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n receipt_type: 'RECEIPT_CREDIT',\n});\n\nconsole.log(response.debugging_request_id);", + }, + }, }, { - name: 'simulate_release', - endpoint: '/v1/simulate/payments/release', - httpMethod: 'post', - summary: 'Simulate release payment', - description: 'Simulates a release of a Payment.', - stainlessPath: '(resource) payments > (method) simulate_release', - qualified: 'client.payments.simulateRelease', - params: ['payment_token: string;'], - response: - "{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }", - markdown: - "## simulate_release\n\n`client.payments.simulateRelease(payment_token: string): { debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n**post** `/v1/simulate/payments/release`\n\nSimulates a release of a Payment.\n\n### Parameters\n\n- `payment_token: string`\n Payment Token\n\n### Returns\n\n- `{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n - `debugging_request_id: string`\n - `result: 'APPROVED' | 'DECLINED'`\n - `transaction_event_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.payments.simulateRelease({ payment_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(response);\n```", - }, - { - name: 'simulate_return', - endpoint: '/v1/simulate/payments/return', + name: 'simulate_action', + endpoint: '/v1/simulate/payments/{payment_token}/action', httpMethod: 'post', - summary: 'Simulate return payment', - description: 'Simulates a return of a Payment.', - stainlessPath: '(resource) payments > (method) simulate_return', - qualified: 'client.payments.simulateReturn', - params: ['payment_token: string;', 'return_reason_code?: string;'], + summary: 'Simulate payment lifecycle event', + description: 'Simulate payment lifecycle event', + stainlessPath: '(resource) payments > (method) simulate_action', + qualified: 'client.payments.simulateAction', + params: [ + 'payment_token: string;', + 'event_type: string;', + 'date_of_death?: string;', + 'decline_reason?: string;', + 'return_addenda?: string;', + 'return_reason_code?: string;', + ], response: "{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }", markdown: - "## simulate_return\n\n`client.payments.simulateReturn(payment_token: string, return_reason_code?: string): { debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n**post** `/v1/simulate/payments/return`\n\nSimulates a return of a Payment.\n\n### Parameters\n\n- `payment_token: string`\n Payment Token\n\n- `return_reason_code?: string`\n Return Reason Code\n\n### Returns\n\n- `{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n - `debugging_request_id: string`\n - `result: 'APPROVED' | 'DECLINED'`\n - `transaction_event_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.payments.simulateReturn({ payment_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(response);\n```", + "## simulate_action\n\n`client.payments.simulateAction(payment_token: string, event_type: string, date_of_death?: string, decline_reason?: string, return_addenda?: string, return_reason_code?: string): { debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n**post** `/v1/simulate/payments/{payment_token}/action`\n\nSimulate payment lifecycle event\n\n### Parameters\n\n- `payment_token: string`\n\n- `event_type: string`\n Event Type\n\n- `date_of_death?: string`\n Date of Death for ACH Return\n\n- `decline_reason?: string`\n Decline reason\n\n- `return_addenda?: string`\n Return Addenda\n\n- `return_reason_code?: string`\n Return Reason Code\n\n### Returns\n\n- `{ debugging_request_id: string; result: 'APPROVED' | 'DECLINED'; transaction_event_token: string; }`\n\n - `debugging_request_id: string`\n - `result: 'APPROVED' | 'DECLINED'`\n - `transaction_event_token: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.payments.simulateAction('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { event_type: 'ACH_ORIGINATION_REVIEWED' });\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Payments.SimulateAction', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Payments.SimulateAction(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.PaymentSimulateActionParams{\n\t\t\tEventType: lithic.F(lithic.PaymentSimulateActionParamsEventTypeACHOriginationReviewed),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.DebuggingRequestID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/simulate/payments/$PAYMENT_TOKEN/action \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "event_type": "ACH_ORIGINATION_REVIEWED"\n }\'', + }, + java: { + method: 'payments().simulateAction', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.PaymentSimulateActionParams;\nimport com.lithic.api.models.PaymentSimulateActionResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n PaymentSimulateActionParams params = PaymentSimulateActionParams.builder()\n .paymentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .eventType(PaymentSimulateActionParams.SupportedSimulationTypes.ACH_ORIGINATION_REVIEWED)\n .build();\n PaymentSimulateActionResponse response = client.payments().simulateAction(params);\n }\n}', + }, + kotlin: { + method: 'payments().simulateAction', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.PaymentSimulateActionParams\nimport com.lithic.api.models.PaymentSimulateActionResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: PaymentSimulateActionParams = PaymentSimulateActionParams.builder()\n .paymentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .eventType(PaymentSimulateActionParams.SupportedSimulationTypes.ACH_ORIGINATION_REVIEWED)\n .build()\n val response: PaymentSimulateActionResponse = client.payments().simulateAction(params)\n}', + }, + python: { + method: 'payments.simulate_action', + example: + '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)\nresponse = client.payments.simulate_action(\n payment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n event_type="ACH_ORIGINATION_REVIEWED",\n)\nprint(response.debugging_request_id)', + }, + ruby: { + method: 'payments.simulate_action', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.payments.simulate_action(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n event_type: :ACH_ORIGINATION_REVIEWED\n)\n\nputs(response)', + }, + typescript: { + method: 'client.payments.simulateAction', + example: + "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\nconst response = await client.payments.simulateAction('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n event_type: 'ACH_ORIGINATION_REVIEWED',\n});\n\nconsole.log(response.debugging_request_id);", + }, + }, }, { name: 'retrieve', @@ -2528,6 +7685,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_type: 'CREDIT' | 'DEBIT' | 'NOT_APPLICABLE'; authentication_result: 'DECLINE' | 'SUCCESS' | 'PENDING_CHALLENGE' | 'PENDING_DECISION'; card_expiry_check: 'MATCH' | 'MISMATCH' | 'NOT_PRESENT'; card_token: string; cardholder: object; channel: 'APP_BASED' | 'BROWSER' | 'THREE_DS_REQUESTOR_INITIATED'; created: string; merchant: object; message_category: 'NON_PAYMENT_AUTHENTICATION' | 'PAYMENT_AUTHENTICATION'; three_ds_requestor_challenge_indicator: string; additional_data?: object; app?: object; authentication_request_type?: string; browser?: object; challenge_metadata?: object; challenge_orchestrated_by?: 'LITHIC' | 'CUSTOMER' | 'NO_CHALLENGE'; decision_made_by?: 'LITHIC_RULES' | 'LITHIC_DEFAULT' | 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'NETWORK' | 'UNKNOWN'; three_ri_request_type?: string; transaction?: object; }", markdown: "## retrieve\n\n`client.threeDS.authentication.retrieve(three_ds_authentication_token: string): { token: string; account_type: 'CREDIT' | 'DEBIT' | 'NOT_APPLICABLE'; authentication_result: 'DECLINE' | 'SUCCESS' | 'PENDING_CHALLENGE' | 'PENDING_DECISION'; card_expiry_check: 'MATCH' | 'MISMATCH' | 'NOT_PRESENT'; card_token: string; cardholder: object; channel: 'APP_BASED' | 'BROWSER' | 'THREE_DS_REQUESTOR_INITIATED'; created: string; merchant: object; message_category: 'NON_PAYMENT_AUTHENTICATION' | 'PAYMENT_AUTHENTICATION'; three_ds_requestor_challenge_indicator: string; additional_data?: object; app?: object; authentication_request_type?: string; browser?: object; challenge_metadata?: object; challenge_orchestrated_by?: 'LITHIC' | 'CUSTOMER' | 'NO_CHALLENGE'; decision_made_by?: 'LITHIC_RULES' | 'LITHIC_DEFAULT' | 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'NETWORK' | 'UNKNOWN'; three_ri_request_type?: string; transaction?: object; }`\n\n**get** `/v1/three_ds_authentication/{three_ds_authentication_token}`\n\nGet 3DS Authentication by token\n\n### Parameters\n\n- `three_ds_authentication_token: string`\n\n### Returns\n\n- `{ token: string; account_type: 'CREDIT' | 'DEBIT' | 'NOT_APPLICABLE'; authentication_result: 'DECLINE' | 'SUCCESS' | 'PENDING_CHALLENGE' | 'PENDING_DECISION'; card_expiry_check: 'MATCH' | 'MISMATCH' | 'NOT_PRESENT'; card_token: string; cardholder: { address_match?: boolean; address_on_file_match?: 'MATCH' | 'MATCH_ADDRESS_ONLY' | 'MATCH_ZIP_ONLY' | 'MISMATCH' | 'NOT_PRESENT'; billing_address?: { address1?: string; address2?: string; address3?: string; city?: string; country?: string; postal_code?: string; }; email?: string; name?: string; phone_number_home?: string; phone_number_mobile?: string; phone_number_work?: string; shipping_address?: { address1?: string; address2?: string; address3?: string; city?: string; country?: string; postal_code?: string; }; }; channel: 'APP_BASED' | 'BROWSER' | 'THREE_DS_REQUESTOR_INITIATED'; created: string; merchant: { risk_indicator: { delivery_email_address?: string; delivery_time_frame?: 'ELECTRONIC_DELIVERY' | 'OVERNIGHT_SHIPPING' | 'SAME_DAY_SHIPPING' | 'TWO_DAY_OR_MORE_SHIPPING'; gift_card_amount?: number; gift_card_count?: number; gift_card_currency?: string; order_availability?: 'FUTURE_AVAILABILITY' | 'MERCHANDISE_AVAILABLE'; pre_order_available_date?: string; reorder_items?: 'FIRST_TIME_ORDERED' | 'REORDERED'; shipping_method?: string; }; id?: string; country?: string; mcc?: string; name?: string; }; message_category: 'NON_PAYMENT_AUTHENTICATION' | 'PAYMENT_AUTHENTICATION'; three_ds_requestor_challenge_indicator: string; additional_data?: { network_decision?: 'LOW_RISK' | 'NOT_LOW_RISK'; network_risk_score?: number; }; app?: { device?: string; device_info?: string; ip?: string; latitude?: number; locale?: string; longitude?: number; os?: string; platform?: string; screen_height?: number; screen_width?: number; time_zone?: string; }; authentication_request_type?: string; browser?: { accept_header?: string; ip?: string; java_enabled?: boolean; javascript_enabled?: boolean; language?: string; time_zone?: string; user_agent?: string; }; challenge_metadata?: { method_type: 'SMS_OTP' | 'OUT_OF_BAND'; status: string; phone_number?: string; }; challenge_orchestrated_by?: 'LITHIC' | 'CUSTOMER' | 'NO_CHALLENGE'; decision_made_by?: 'LITHIC_RULES' | 'LITHIC_DEFAULT' | 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'NETWORK' | 'UNKNOWN'; three_ri_request_type?: string; transaction?: { amount: number; cardholder_amount: number; currency: string; currency_exponent: number; date_time: string; type: string; }; }`\n Represents a 3DS authentication\n\n - `token: string`\n - `account_type: 'CREDIT' | 'DEBIT' | 'NOT_APPLICABLE'`\n - `authentication_result: 'DECLINE' | 'SUCCESS' | 'PENDING_CHALLENGE' | 'PENDING_DECISION'`\n - `card_expiry_check: 'MATCH' | 'MISMATCH' | 'NOT_PRESENT'`\n - `card_token: string`\n - `cardholder: { address_match?: boolean; address_on_file_match?: 'MATCH' | 'MATCH_ADDRESS_ONLY' | 'MATCH_ZIP_ONLY' | 'MISMATCH' | 'NOT_PRESENT'; billing_address?: { address1?: string; address2?: string; address3?: string; city?: string; country?: string; postal_code?: string; }; email?: string; name?: string; phone_number_home?: string; phone_number_mobile?: string; phone_number_work?: string; shipping_address?: { address1?: string; address2?: string; address3?: string; city?: string; country?: string; postal_code?: string; }; }`\n - `channel: 'APP_BASED' | 'BROWSER' | 'THREE_DS_REQUESTOR_INITIATED'`\n - `created: string`\n - `merchant: { risk_indicator: { delivery_email_address?: string; delivery_time_frame?: 'ELECTRONIC_DELIVERY' | 'OVERNIGHT_SHIPPING' | 'SAME_DAY_SHIPPING' | 'TWO_DAY_OR_MORE_SHIPPING'; gift_card_amount?: number; gift_card_count?: number; gift_card_currency?: string; order_availability?: 'FUTURE_AVAILABILITY' | 'MERCHANDISE_AVAILABLE'; pre_order_available_date?: string; reorder_items?: 'FIRST_TIME_ORDERED' | 'REORDERED'; shipping_method?: string; }; id?: string; country?: string; mcc?: string; name?: string; }`\n - `message_category: 'NON_PAYMENT_AUTHENTICATION' | 'PAYMENT_AUTHENTICATION'`\n - `three_ds_requestor_challenge_indicator: string`\n - `additional_data?: { network_decision?: 'LOW_RISK' | 'NOT_LOW_RISK'; network_risk_score?: number; }`\n - `app?: { device?: string; device_info?: string; ip?: string; latitude?: number; locale?: string; longitude?: number; os?: string; platform?: string; screen_height?: number; screen_width?: number; time_zone?: string; }`\n - `authentication_request_type?: string`\n - `browser?: { accept_header?: string; ip?: string; java_enabled?: boolean; javascript_enabled?: boolean; language?: string; time_zone?: string; user_agent?: string; }`\n - `challenge_metadata?: { method_type: 'SMS_OTP' | 'OUT_OF_BAND'; status: string; phone_number?: string; }`\n - `challenge_orchestrated_by?: 'LITHIC' | 'CUSTOMER' | 'NO_CHALLENGE'`\n - `decision_made_by?: 'LITHIC_RULES' | 'LITHIC_DEFAULT' | 'CUSTOMER_RULES' | 'CUSTOMER_ENDPOINT' | 'NETWORK' | 'UNKNOWN'`\n - `three_ri_request_type?: string`\n - `transaction?: { amount: number; cardholder_amount: number; currency: string; currency_exponent: number; date_time: string; type: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst threeDSAuthentication = await client.threeDS.authentication.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(threeDSAuthentication);\n```", + perLanguage: { + go: { + method: 'client.ThreeDS.Authentication.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tthreeDSAuthentication, err := client.ThreeDS.Authentication.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", threeDSAuthentication.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/three_ds_authentication/$THREE_DS_AUTHENTICATION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'threeDS().authentication().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ThreeDSAuthentication;\nimport com.lithic.api.models.ThreeDSAuthenticationRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ThreeDSAuthentication threeDSAuthentication = client.threeDS().authentication().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'threeDS().authentication().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ThreeDSAuthentication\nimport com.lithic.api.models.ThreeDSAuthenticationRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val threeDSAuthentication: ThreeDSAuthentication = client.threeDS().authentication().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'three_ds.authentication.retrieve', + example: + '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)\nthree_ds_authentication = client.three_ds.authentication.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(three_ds_authentication.token)', + }, + ruby: { + method: 'three_ds.authentication.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nthree_ds_authentication = lithic.three_ds.authentication.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(three_ds_authentication)', + }, + typescript: { + method: 'client.threeDS.authentication.retrieve', + example: + "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\nconst threeDSAuthentication = await client.threeDS.authentication.retrieve(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(threeDSAuthentication.token);", + }, + }, }, { name: 'simulate', @@ -2547,6 +7740,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: '{ token?: string; }', markdown: "## simulate\n\n`client.threeDS.authentication.simulate(merchant: { id: string; country: string; mcc: string; name: string; }, pan: string, transaction: { amount: number; currency: string; }, card_expiry_check?: 'MATCH' | 'MISMATCH' | 'NOT_PRESENT'): { token?: string; }`\n\n**post** `/v1/three_ds_authentication/simulate`\n\nSimulates a 3DS authentication request from the payment network as if it came from an ACS. If you're configured for 3DS Customer Decisioning, simulating authentications requires your customer decisioning endpoint to be set up properly (respond with a valid JSON). If the authentication decision is to challenge, ensure that the account holder associated with the card transaction has a valid phone number configured to receive the OTP code via SMS. \n\n### Parameters\n\n- `merchant: { id: string; country: string; mcc: string; name: string; }`\n Merchant information for the simulated transaction\n - `id: string`\n Unique identifier to identify the payment card acceptor. Corresponds to `merchant_acceptor_id` in authorization.\n - `country: string`\n Country of the address provided by the cardholder in ISO 3166-1 alpha-3 format (e.g. USA)\n - `mcc: string`\n Merchant category code for the transaction to be simulated. A four-digit number listed in ISO 18245. Supported merchant category codes can be found [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).\n - `name: string`\n Merchant descriptor, corresponds to `descriptor` in authorization. If CHALLENGE keyword is included, Lithic will trigger a challenge.\n\n- `pan: string`\n Sixteen digit card number.\n\n- `transaction: { amount: number; currency: string; }`\n Transaction details for the simulation\n - `amount: number`\n Amount (in cents) to authenticate.\n - `currency: string`\n 3-character alphabetic ISO 4217 currency code.\n\n- `card_expiry_check?: 'MATCH' | 'MISMATCH' | 'NOT_PRESENT'`\n When set will use the following values as part of the Simulated Authentication. When not set defaults to MATCH\n\n### Returns\n\n- `{ token?: string; }`\n\n - `token?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.threeDS.authentication.simulate({\n merchant: {\n id: 'OODKZAPJVN4YS7O',\n country: 'USA',\n mcc: '5812',\n name: 'COFFEE SHOP',\n},\n pan: '4111111289144142',\n transaction: { amount: 0, currency: 'GBP' },\n});\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.ThreeDS.Authentication.Simulate', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.ThreeDS.Authentication.Simulate(context.TODO(), lithic.ThreeDSAuthenticationSimulateParams{\n\t\tMerchant: lithic.F(lithic.ThreeDSAuthenticationSimulateParamsMerchant{\n\t\t\tID: lithic.F("OODKZAPJVN4YS7O"),\n\t\t\tCountry: lithic.F("USA"),\n\t\t\tMcc: lithic.F("5812"),\n\t\t\tName: lithic.F("COFFEE SHOP"),\n\t\t}),\n\t\tPan: lithic.F("4111111289144142"),\n\t\tTransaction: lithic.F(lithic.ThreeDSAuthenticationSimulateParamsTransaction{\n\t\t\tAmount: lithic.F(int64(0)),\n\t\t\tCurrency: lithic.F("GBP"),\n\t\t}),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/three_ds_authentication/simulate \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "merchant": {\n "id": "OODKZAPJVN4YS7O",\n "country": "USA",\n "mcc": "5812",\n "name": "COFFEE SHOP"\n },\n "pan": "4111111289144142",\n "transaction": {\n "amount": 0,\n "currency": "GBP"\n }\n }\'', + }, + java: { + method: 'threeDS().authentication().simulate', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AuthenticationSimulateResponse;\nimport com.lithic.api.models.ThreeDSAuthenticationSimulateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ThreeDSAuthenticationSimulateParams params = ThreeDSAuthenticationSimulateParams.builder()\n .merchant(ThreeDSAuthenticationSimulateParams.Merchant.builder()\n .id("OODKZAPJVN4YS7O")\n .country("USA")\n .mcc("5812")\n .name("COFFEE SHOP")\n .build())\n .pan("4111111289144142")\n .transaction(ThreeDSAuthenticationSimulateParams.Transaction.builder()\n .amount(0L)\n .currency("GBP")\n .build())\n .build();\n AuthenticationSimulateResponse response = client.threeDS().authentication().simulate(params);\n }\n}', + }, + kotlin: { + method: 'threeDS().authentication().simulate', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AuthenticationSimulateResponse\nimport com.lithic.api.models.ThreeDSAuthenticationSimulateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: ThreeDSAuthenticationSimulateParams = ThreeDSAuthenticationSimulateParams.builder()\n .merchant(ThreeDSAuthenticationSimulateParams.Merchant.builder()\n .id("OODKZAPJVN4YS7O")\n .country("USA")\n .mcc("5812")\n .name("COFFEE SHOP")\n .build())\n .pan("4111111289144142")\n .transaction(ThreeDSAuthenticationSimulateParams.Transaction.builder()\n .amount(0L)\n .currency("GBP")\n .build())\n .build()\n val response: AuthenticationSimulateResponse = client.threeDS().authentication().simulate(params)\n}', + }, + python: { + method: 'three_ds.authentication.simulate', + example: + '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)\nresponse = client.three_ds.authentication.simulate(\n merchant={\n "id": "OODKZAPJVN4YS7O",\n "country": "USA",\n "mcc": "5812",\n "name": "COFFEE SHOP",\n },\n pan="4111111289144142",\n transaction={\n "amount": 0,\n "currency": "GBP",\n },\n)\nprint(response.token)', + }, + ruby: { + method: 'three_ds.authentication.simulate', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.three_ds.authentication.simulate(\n merchant: {id: "OODKZAPJVN4YS7O", country: "USA", mcc: "5812", name: "COFFEE SHOP"},\n pan: "4111111289144142",\n transaction: {amount: 0, currency: "GBP"}\n)\n\nputs(response)', + }, + typescript: { + method: 'client.threeDS.authentication.simulate', + example: + "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\nconst response = await client.threeDS.authentication.simulate({\n merchant: {\n id: 'OODKZAPJVN4YS7O',\n country: 'USA',\n mcc: '5812',\n name: 'COFFEE SHOP',\n },\n pan: '4111111289144142',\n transaction: { amount: 0, currency: 'GBP' },\n});\n\nconsole.log(response.token);", + }, + }, }, { name: 'simulate_otp_entry', @@ -2560,19 +7789,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ params: ['token: string;', 'otp: string;'], markdown: "## simulate_otp_entry\n\n`client.threeDS.authentication.simulateOtpEntry(token: string, otp: string): void`\n\n**post** `/v1/three_ds_decisioning/simulate/enter_otp`\n\nEndpoint for simulating entering OTP into 3DS Challenge UI. A call to [/v1/three_ds_authentication/simulate](https://docs.lithic.com/reference/postsimulateauthentication) that resulted in triggered SMS-OTP challenge must precede. Only a single attempt is supported; upon entering OTP, the challenge is either approved or declined.\n\n### Parameters\n\n- `token: string`\n A unique token returned as part of a /v1/three_ds_authentication/simulate call that resulted in PENDING_CHALLENGE authentication result.\n\n- `otp: string`\n The OTP entered by the cardholder\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.threeDS.authentication.simulateOtpEntry({ token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac', otp: '123456' })\n```", - }, - { - name: 'challenge_response', - endpoint: '/v1/three_ds_decisioning/challenge_response', - httpMethod: 'post', - summary: 'Respond to a Challenge Request', - description: - "Card program's response to a 3DS Challenge Request.\nChallenge Request is emitted as a webhook [three_ds_authentication.challenge](https://docs.lithic.com/reference/post_three-ds-authentication-challenge) and your Card Program needs to be configured with Out of Band (OOB) Challenges in order to receive it (see https://docs.lithic.com/docs/3ds-challenge-flow for more information).", - stainlessPath: '(resource) three_ds.decisioning > (method) challenge_response', - qualified: 'client.threeDS.decisioning.challengeResponse', - params: ['token: string;', "challenge_response: 'APPROVE' | 'DECLINE_BY_CUSTOMER';"], - markdown: - "## challenge_response\n\n`client.threeDS.decisioning.challengeResponse(token: string, challenge_response: 'APPROVE' | 'DECLINE_BY_CUSTOMER'): void`\n\n**post** `/v1/three_ds_decisioning/challenge_response`\n\nCard program's response to a 3DS Challenge Request.\nChallenge Request is emitted as a webhook [three_ds_authentication.challenge](https://docs.lithic.com/reference/post_three-ds-authentication-challenge) and your Card Program needs to be configured with Out of Band (OOB) Challenges in order to receive it (see https://docs.lithic.com/docs/3ds-challenge-flow for more information).\n\n### Parameters\n\n- `token: string`\n Globally unique identifier for 3DS Authentication that resulted in PENDING_CHALLENGE authentication result.\n\n- `challenge_response: 'APPROVE' | 'DECLINE_BY_CUSTOMER'`\n Whether the Cardholder has approved or declined the issued Challenge\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.threeDS.decisioning.challengeResponse({ token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', challenge_response: 'APPROVE' })\n```", + perLanguage: { + go: { + method: 'client.ThreeDS.Authentication.SimulateOtpEntry', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.ThreeDS.Authentication.SimulateOtpEntry(context.TODO(), lithic.ThreeDSAuthenticationSimulateOtpEntryParams{\n\t\tToken: lithic.F("fabd829d-7f7b-4432-a8f2-07ea4889aaac"),\n\t\tOtp: lithic.F("123456"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/three_ds_decisioning/simulate/enter_otp \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "token": "fabd829d-7f7b-4432-a8f2-07ea4889aaac",\n "otp": "123456"\n }\'', + }, + java: { + method: 'threeDS().authentication().simulateOtpEntry', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ThreeDSAuthenticationSimulateOtpEntryParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ThreeDSAuthenticationSimulateOtpEntryParams params = ThreeDSAuthenticationSimulateOtpEntryParams.builder()\n .token("fabd829d-7f7b-4432-a8f2-07ea4889aaac")\n .otp("123456")\n .build();\n client.threeDS().authentication().simulateOtpEntry(params);\n }\n}', + }, + kotlin: { + method: 'threeDS().authentication().simulateOtpEntry', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ThreeDSAuthenticationSimulateOtpEntryParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: ThreeDSAuthenticationSimulateOtpEntryParams = ThreeDSAuthenticationSimulateOtpEntryParams.builder()\n .token("fabd829d-7f7b-4432-a8f2-07ea4889aaac")\n .otp("123456")\n .build()\n client.threeDS().authentication().simulateOtpEntry(params)\n}', + }, + python: { + method: 'three_ds.authentication.simulate_otp_entry', + example: + '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)\nclient.three_ds.authentication.simulate_otp_entry(\n token="fabd829d-7f7b-4432-a8f2-07ea4889aaac",\n otp="123456",\n)', + }, + ruby: { + method: 'three_ds.authentication.simulate_otp_entry', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.three_ds.authentication.simulate_otp_entry(\n token: "fabd829d-7f7b-4432-a8f2-07ea4889aaac",\n otp: "123456"\n)\n\nputs(result)', + }, + typescript: { + method: 'client.threeDS.authentication.simulateOtpEntry', + example: + "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\nawait client.threeDS.authentication.simulateOtpEntry({\n token: 'fabd829d-7f7b-4432-a8f2-07ea4889aaac',\n otp: '123456',\n});", + }, + }, }, { name: 'retrieve_secret', @@ -2586,6 +7838,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: '{ secret?: string; }', markdown: "## retrieve_secret\n\n`client.threeDS.decisioning.retrieveSecret(): { secret?: string; }`\n\n**get** `/v1/three_ds_decisioning/secret`\n\nRetrieve the 3DS Decisioning HMAC secret key. If one does not exist for your program yet, calling this endpoint will create one for you. The headers (which you can use to verify 3DS Decisioning requests) will begin appearing shortly after calling this endpoint for the first time. See [this page](https://docs.lithic.com/docs/3ds-decisioning#3ds-decisioning-hmac-secrets) for more detail about verifying 3DS Decisioning requests.\n\n\n### Returns\n\n- `{ secret?: string; }`\n\n - `secret?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.threeDS.decisioning.retrieveSecret();\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.ThreeDS.Decisioning.GetSecret', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.ThreeDS.Decisioning.GetSecret(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Secret)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/three_ds_decisioning/secret \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'threeDS().decisioning().retrieveSecret', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.DecisioningRetrieveSecretResponse;\nimport com.lithic.api.models.ThreeDSDecisioningRetrieveSecretParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n DecisioningRetrieveSecretResponse response = client.threeDS().decisioning().retrieveSecret();\n }\n}', + }, + kotlin: { + method: 'threeDS().decisioning().retrieveSecret', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.DecisioningRetrieveSecretResponse\nimport com.lithic.api.models.ThreeDSDecisioningRetrieveSecretParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val response: DecisioningRetrieveSecretResponse = client.threeDS().decisioning().retrieveSecret()\n}', + }, + python: { + method: 'three_ds.decisioning.retrieve_secret', + example: + '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)\nresponse = client.three_ds.decisioning.retrieve_secret()\nprint(response.secret)', + }, + ruby: { + method: 'three_ds.decisioning.retrieve_secret', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.three_ds.decisioning.retrieve_secret\n\nputs(response)', + }, + typescript: { + method: 'client.threeDS.decisioning.retrieveSecret', + example: + "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\nconst response = await client.threeDS.decisioning.retrieveSecret();\n\nconsole.log(response.secret);", + }, + }, }, { name: 'rotate_secret', @@ -2598,6 +7886,91 @@ const EMBEDDED_METHODS: MethodEntry[] = [ qualified: 'client.threeDS.decisioning.rotateSecret', markdown: "## rotate_secret\n\n`client.threeDS.decisioning.rotateSecret(): void`\n\n**post** `/v1/three_ds_decisioning/secret/rotate`\n\nGenerate a new 3DS Decisioning HMAC secret key. The old secret key will be deactivated 24 hours after a successful request to this endpoint. Make a [`GET /three_ds_decisioning/secret`](https://docs.lithic.com/reference/getthreedsdecisioningsecret) request to retrieve the new secret key.\n\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.threeDS.decisioning.rotateSecret()\n```", + perLanguage: { + go: { + method: 'client.ThreeDS.Decisioning.RotateSecret', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.ThreeDS.Decisioning.RotateSecret(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/three_ds_decisioning/secret/rotate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'threeDS().decisioning().rotateSecret', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ThreeDSDecisioningRotateSecretParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n client.threeDS().decisioning().rotateSecret();\n }\n}', + }, + kotlin: { + method: 'threeDS().decisioning().rotateSecret', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ThreeDSDecisioningRotateSecretParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n client.threeDS().decisioning().rotateSecret()\n}', + }, + python: { + method: 'three_ds.decisioning.rotate_secret', + example: + '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)\nclient.three_ds.decisioning.rotate_secret()', + }, + ruby: { + method: 'three_ds.decisioning.rotate_secret', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.three_ds.decisioning.rotate_secret\n\nputs(result)', + }, + typescript: { + method: 'client.threeDS.decisioning.rotateSecret', + example: + "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\nawait client.threeDS.decisioning.rotateSecret();", + }, + }, + }, + { + name: 'challenge_response', + endpoint: '/v1/three_ds_decisioning/challenge_response', + httpMethod: 'post', + summary: 'Respond to a Challenge Request', + description: + "Card program's response to a 3DS Challenge Request.\nChallenge Request is emitted as a webhook [three_ds_authentication.challenge](https://docs.lithic.com/reference/post_three-ds-authentication-challenge) and your Card Program needs to be configured with Out of Band (OOB) Challenges in order to receive it (see https://docs.lithic.com/docs/3ds-challenge-flow for more information).", + stainlessPath: '(resource) three_ds.decisioning > (method) challenge_response', + qualified: 'client.threeDS.decisioning.challengeResponse', + params: ['token: string;', "challenge_response: 'APPROVE' | 'DECLINE_BY_CUSTOMER';"], + markdown: + "## challenge_response\n\n`client.threeDS.decisioning.challengeResponse(token: string, challenge_response: 'APPROVE' | 'DECLINE_BY_CUSTOMER'): void`\n\n**post** `/v1/three_ds_decisioning/challenge_response`\n\nCard program's response to a 3DS Challenge Request.\nChallenge Request is emitted as a webhook [three_ds_authentication.challenge](https://docs.lithic.com/reference/post_three-ds-authentication-challenge) and your Card Program needs to be configured with Out of Band (OOB) Challenges in order to receive it (see https://docs.lithic.com/docs/3ds-challenge-flow for more information).\n\n### Parameters\n\n- `token: string`\n Globally unique identifier for 3DS Authentication that resulted in PENDING_CHALLENGE authentication result.\n\n- `challenge_response: 'APPROVE' | 'DECLINE_BY_CUSTOMER'`\n Whether the Cardholder has approved or declined the issued Challenge\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.threeDS.decisioning.challengeResponse({ token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', challenge_response: 'APPROVE' })\n```", + perLanguage: { + go: { + method: 'client.ThreeDS.Decisioning.ChallengeResponse', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.ThreeDS.Decisioning.ChallengeResponse(context.TODO(), lithic.ThreeDSDecisioningChallengeResponseParams{\n\t\tChallengeResponse: lithic.ChallengeResponseParam{\n\t\t\tToken: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),\n\t\t\tChallengeResponse: lithic.F(lithic.ChallengeResultApprove),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/three_ds_decisioning/challenge_response \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "challenge_response": "APPROVE"\n }\'', + }, + java: { + method: 'threeDS().decisioning().challengeResponse', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ChallengeResponse;\nimport com.lithic.api.models.ChallengeResult;\nimport com.lithic.api.models.ThreeDSDecisioningChallengeResponseParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ChallengeResponse params = ChallengeResponse.builder()\n .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .challengeResponse(ChallengeResult.APPROVE)\n .build();\n client.threeDS().decisioning().challengeResponse(params);\n }\n}', + }, + kotlin: { + method: 'threeDS().decisioning().challengeResponse', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ChallengeResponse\nimport com.lithic.api.models.ChallengeResult\nimport com.lithic.api.models.ThreeDSDecisioningChallengeResponseParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: ChallengeResponse = ChallengeResponse.builder()\n .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .challengeResponse(ChallengeResult.APPROVE)\n .build()\n client.threeDS().decisioning().challengeResponse(params)\n}', + }, + python: { + method: 'three_ds.decisioning.challenge_response', + example: + '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)\nclient.three_ds.decisioning.challenge_response(\n token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n challenge_response="APPROVE",\n)', + }, + ruby: { + method: 'three_ds.decisioning.challenge_response', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.three_ds.decisioning.challenge_response(\n token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n challenge_response: :APPROVE\n)\n\nputs(result)', + }, + typescript: { + method: 'client.threeDS.decisioning.challengeResponse', + example: + "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\nawait client.threeDS.decisioning.challengeResponse({\n token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n challenge_response: 'APPROVE',\n});", + }, + }, }, { name: 'list_details', @@ -2617,6 +7990,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; account_token: string; card_program_token: string; card_token: string; created: string; currency: string; disputes_gross_amount: number; event_tokens: string[]; institution: string; interchange_fee_extended_precision: number; interchange_gross_amount: number; network: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; other_fees_details: { ISA?: number; }; other_fees_gross_amount: number; report_date: string; settlement_date: string; transaction_token: string; transactions_gross_amount: number; type: string; updated: string; fee_description?: string; }", markdown: "## list_details\n\n`client.reports.settlement.listDetails(report_date: string, ending_before?: string, page_size?: number, starting_after?: string): { token: string; account_token: string; card_program_token: string; card_token: string; created: string; currency: string; disputes_gross_amount: number; event_tokens: string[]; institution: string; interchange_fee_extended_precision: number; interchange_gross_amount: number; network: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; other_fees_details: object; other_fees_gross_amount: number; report_date: string; settlement_date: string; transaction_token: string; transactions_gross_amount: number; type: string; updated: string; fee_description?: string; }`\n\n**get** `/v1/reports/settlement/details/{report_date}`\n\nList details.\n\n### Parameters\n\n- `report_date: 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 Number of records per page.\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; card_program_token: string; card_token: string; created: string; currency: string; disputes_gross_amount: number; event_tokens: string[]; institution: string; interchange_fee_extended_precision: number; interchange_gross_amount: number; network: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; other_fees_details: { ISA?: number; }; other_fees_gross_amount: number; report_date: string; settlement_date: string; transaction_token: string; transactions_gross_amount: number; type: string; updated: string; fee_description?: string; }`\n\n - `token: string`\n - `account_token: string`\n - `card_program_token: string`\n - `card_token: string`\n - `created: string`\n - `currency: string`\n - `disputes_gross_amount: number`\n - `event_tokens: string[]`\n - `institution: string`\n - `interchange_fee_extended_precision: number`\n - `interchange_gross_amount: number`\n - `network: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'`\n - `other_fees_details: { ISA?: number; }`\n - `other_fees_gross_amount: number`\n - `report_date: string`\n - `settlement_date: string`\n - `transaction_token: string`\n - `transactions_gross_amount: number`\n - `type: string`\n - `updated: string`\n - `fee_description?: 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 settlementDetail of client.reports.settlement.listDetails('2023-09-01')) {\n console.log(settlementDetail);\n}\n```", + perLanguage: { + go: { + method: 'client.Reports.Settlement.ListDetails', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Reports.Settlement.ListDetails(\n\t\tcontext.TODO(),\n\t\ttime.Now(),\n\t\tlithic.ReportSettlementListDetailsParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/reports/settlement/details/$REPORT_DATE \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'reports().settlement().listDetails', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ReportSettlementListDetailsPage;\nimport com.lithic.api.models.ReportSettlementListDetailsParams;\nimport java.time.LocalDate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ReportSettlementListDetailsPage page = client.reports().settlement().listDetails(LocalDate.parse("2023-09-01"));\n }\n}', + }, + kotlin: { + method: 'reports().settlement().listDetails', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ReportSettlementListDetailsPage\nimport com.lithic.api.models.ReportSettlementListDetailsParams\nimport java.time.LocalDate\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: ReportSettlementListDetailsPage = client.reports().settlement().listDetails(LocalDate.parse("2023-09-01"))\n}', + }, + python: { + method: 'reports.settlement.list_details', + example: + 'import os\nfrom datetime import date\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.reports.settlement.list_details(\n report_date=date.fromisoformat("2023-09-01"),\n)\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'reports.settlement.list_details', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.reports.settlement.list_details("2023-09-01")\n\nputs(page)', + }, + typescript: { + method: 'client.reports.settlement.listDetails', + example: + "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 settlementDetail of client.reports.settlement.listDetails('2023-09-01')) {\n console.log(settlementDetail.token);\n}", + }, + }, }, { name: 'summary', @@ -2631,20 +8040,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ created: string; currency: string; details: { currency?: string; disputes_gross_amount?: number; institution?: string; interchange_gross_amount?: number; network?: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; other_fees_gross_amount?: number; settled_net_amount?: number; transactions_gross_amount?: number; }[]; disputes_gross_amount: number; interchange_gross_amount: number; is_complete: boolean; other_fees_gross_amount: number; report_date: string; settled_net_amount: number; transactions_gross_amount: number; updated: string; }", markdown: "## summary\n\n`client.reports.settlement.summary(report_date: string): { created: string; currency: string; details: settlement_summary_details[]; disputes_gross_amount: number; interchange_gross_amount: number; is_complete: boolean; other_fees_gross_amount: number; report_date: string; settled_net_amount: number; transactions_gross_amount: number; updated: string; }`\n\n**get** `/v1/reports/settlement/summary/{report_date}`\n\nGet the settlement report for a specified report date. Not available in sandbox.\n\n### Parameters\n\n- `report_date: string`\n\n### Returns\n\n- `{ created: string; currency: string; details: { currency?: string; disputes_gross_amount?: number; institution?: string; interchange_gross_amount?: number; network?: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; other_fees_gross_amount?: number; settled_net_amount?: number; transactions_gross_amount?: number; }[]; disputes_gross_amount: number; interchange_gross_amount: number; is_complete: boolean; other_fees_gross_amount: number; report_date: string; settled_net_amount: number; transactions_gross_amount: number; updated: string; }`\n\n - `created: string`\n - `currency: string`\n - `details: { currency?: string; disputes_gross_amount?: number; institution?: string; interchange_gross_amount?: number; network?: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; other_fees_gross_amount?: number; settled_net_amount?: number; transactions_gross_amount?: number; }[]`\n - `disputes_gross_amount: number`\n - `interchange_gross_amount: number`\n - `is_complete: boolean`\n - `other_fees_gross_amount: number`\n - `report_date: string`\n - `settled_net_amount: number`\n - `transactions_gross_amount: number`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst settlementReport = await client.reports.settlement.summary('2023-09-01');\n\nconsole.log(settlementReport);\n```", - }, - { - name: 'retrieve', - endpoint: '/v1/reports/settlement/network_totals/{token}', - httpMethod: 'get', - summary: 'Get network total', - description: 'Retrieve a specific network total record by token. Not available in sandbox.', - stainlessPath: '(resource) reports.settlement.network_totals > (method) retrieve', - qualified: 'client.reports.settlement.networkTotals.retrieve', - params: ['token: string;'], - response: - "{ token: string; amounts: { gross_settlement: number; interchange_fees: number; net_settlement: number; visa_charges?: number; }; created: string; currency: string; institution_id: string; is_complete: boolean; network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; report_date: string; settlement_institution_id: string; settlement_service: string; updated: string; cycle?: number; }", - markdown: - "## retrieve\n\n`client.reports.settlement.networkTotals.retrieve(token: string): { token: string; amounts: object; created: string; currency: string; institution_id: string; is_complete: boolean; network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; report_date: string; settlement_institution_id: string; settlement_service: string; updated: string; cycle?: number; }`\n\n**get** `/v1/reports/settlement/network_totals/{token}`\n\nRetrieve a specific network total record by token. Not available in sandbox.\n\n### Parameters\n\n- `token: string`\n\n### Returns\n\n- `{ token: string; amounts: { gross_settlement: number; interchange_fees: number; net_settlement: number; visa_charges?: number; }; created: string; currency: string; institution_id: string; is_complete: boolean; network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; report_date: string; settlement_institution_id: string; settlement_service: string; updated: string; cycle?: number; }`\n\n - `token: string`\n - `amounts: { gross_settlement: number; interchange_fees: number; net_settlement: number; visa_charges?: number; }`\n - `created: string`\n - `currency: string`\n - `institution_id: string`\n - `is_complete: boolean`\n - `network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'`\n - `report_date: string`\n - `settlement_institution_id: string`\n - `settlement_service: string`\n - `updated: string`\n - `cycle?: number`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst networkTotal = await client.reports.settlement.networkTotals.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(networkTotal);\n```", + perLanguage: { + go: { + method: 'client.Reports.Settlement.Summary', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tsettlementReport, err := client.Reports.Settlement.Summary(context.TODO(), time.Now())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", settlementReport.Created)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/reports/settlement/summary/$REPORT_DATE \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'reports().settlement().summary', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ReportSettlementSummaryParams;\nimport com.lithic.api.models.SettlementReport;\nimport java.time.LocalDate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n SettlementReport settlementReport = client.reports().settlement().summary(LocalDate.parse("2023-09-01"));\n }\n}', + }, + kotlin: { + method: 'reports().settlement().summary', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ReportSettlementSummaryParams\nimport com.lithic.api.models.SettlementReport\nimport java.time.LocalDate\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val settlementReport: SettlementReport = client.reports().settlement().summary(LocalDate.parse("2023-09-01"))\n}', + }, + python: { + method: 'reports.settlement.summary', + example: + 'import os\nfrom datetime import date\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)\nsettlement_report = client.reports.settlement.summary(\n date.fromisoformat("2023-09-01"),\n)\nprint(settlement_report.created)', + }, + ruby: { + method: 'reports.settlement.summary', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nsettlement_report = lithic.reports.settlement.summary("2023-09-01")\n\nputs(settlement_report)', + }, + typescript: { + method: 'client.reports.settlement.summary', + example: + "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\nconst settlementReport = await client.reports.settlement.summary('2023-09-01');\n\nconsole.log(settlementReport.created);", + }, + }, }, { name: 'list', @@ -2671,6 +8102,141 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; amounts: { gross_settlement: number; interchange_fees: number; net_settlement: number; visa_charges?: number; }; created: string; currency: string; institution_id: string; is_complete: boolean; network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; report_date: string; settlement_institution_id: string; settlement_service: string; updated: string; cycle?: number; }", markdown: "## list\n\n`client.reports.settlement.networkTotals.list(begin?: string, end?: string, ending_before?: string, institution_id?: string, network?: 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK', page_size?: number, report_date?: string, report_date_begin?: string, report_date_end?: string, settlement_institution_id?: string, starting_after?: string): { token: string; amounts: object; created: string; currency: string; institution_id: string; is_complete: boolean; network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; report_date: string; settlement_institution_id: string; settlement_service: string; updated: string; cycle?: number; }`\n\n**get** `/v1/reports/settlement/network_totals`\n\nList network total records with optional filters. Not available in sandbox.\n\n### Parameters\n\n- `begin?: string`\n Datetime in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Datetime in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `institution_id?: string`\n Institution ID to filter on.\n\n- `network?: 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'`\n Network to filter on.\n\n- `page_size?: number`\n Number of records per page.\n\n- `report_date?: string`\n Singular report date to filter on (YYYY-MM-DD). Cannot be populated in conjunction with report_date_begin or report_date_end.\n\n- `report_date_begin?: string`\n Earliest report date to filter on, inclusive (YYYY-MM-DD).\n\n- `report_date_end?: string`\n Latest report date to filter on, inclusive (YYYY-MM-DD).\n\n- `settlement_institution_id?: string`\n Settlement institution ID to filter on.\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; amounts: { gross_settlement: number; interchange_fees: number; net_settlement: number; visa_charges?: number; }; created: string; currency: string; institution_id: string; is_complete: boolean; network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; report_date: string; settlement_institution_id: string; settlement_service: string; updated: string; cycle?: number; }`\n\n - `token: string`\n - `amounts: { gross_settlement: number; interchange_fees: number; net_settlement: number; visa_charges?: number; }`\n - `created: string`\n - `currency: string`\n - `institution_id: string`\n - `is_complete: boolean`\n - `network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'`\n - `report_date: string`\n - `settlement_institution_id: string`\n - `settlement_service: string`\n - `updated: string`\n - `cycle?: number`\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 networkTotal of client.reports.settlement.networkTotals.list()) {\n console.log(networkTotal);\n}\n```", + perLanguage: { + go: { + method: 'client.Reports.Settlement.NetworkTotals.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Reports.Settlement.NetworkTotals.List(context.TODO(), lithic.ReportSettlementNetworkTotalListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/reports/settlement/network_totals \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'reports().settlement().networkTotals().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ReportSettlementNetworkTotalListPage;\nimport com.lithic.api.models.ReportSettlementNetworkTotalListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ReportSettlementNetworkTotalListPage page = client.reports().settlement().networkTotals().list();\n }\n}', + }, + kotlin: { + method: 'reports().settlement().networkTotals().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ReportSettlementNetworkTotalListPage\nimport com.lithic.api.models.ReportSettlementNetworkTotalListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: ReportSettlementNetworkTotalListPage = client.reports().settlement().networkTotals().list()\n}', + }, + python: { + method: 'reports.settlement.network_totals.list', + example: + '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.reports.settlement.network_totals.list()\npage = page.data[0]\nprint(page.institution_id)', + }, + ruby: { + method: 'reports.settlement.network_totals.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.reports.settlement.network_totals.list\n\nputs(page)', + }, + typescript: { + method: 'client.reports.settlement.networkTotals.list', + example: + "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 networkTotal of client.reports.settlement.networkTotals.list()) {\n console.log(networkTotal.institution_id);\n}", + }, + }, + }, + { + name: 'retrieve', + endpoint: '/v1/reports/settlement/network_totals/{token}', + httpMethod: 'get', + summary: 'Get network total', + description: 'Retrieve a specific network total record by token. Not available in sandbox.', + stainlessPath: '(resource) reports.settlement.network_totals > (method) retrieve', + qualified: 'client.reports.settlement.networkTotals.retrieve', + params: ['token: string;'], + response: + "{ token: string; amounts: { gross_settlement: number; interchange_fees: number; net_settlement: number; visa_charges?: number; }; created: string; currency: string; institution_id: string; is_complete: boolean; network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; report_date: string; settlement_institution_id: string; settlement_service: string; updated: string; cycle?: number; }", + markdown: + "## retrieve\n\n`client.reports.settlement.networkTotals.retrieve(token: string): { token: string; amounts: object; created: string; currency: string; institution_id: string; is_complete: boolean; network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; report_date: string; settlement_institution_id: string; settlement_service: string; updated: string; cycle?: number; }`\n\n**get** `/v1/reports/settlement/network_totals/{token}`\n\nRetrieve a specific network total record by token. Not available in sandbox.\n\n### Parameters\n\n- `token: string`\n\n### Returns\n\n- `{ token: string; amounts: { gross_settlement: number; interchange_fees: number; net_settlement: number; visa_charges?: number; }; created: string; currency: string; institution_id: string; is_complete: boolean; network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; report_date: string; settlement_institution_id: string; settlement_service: string; updated: string; cycle?: number; }`\n\n - `token: string`\n - `amounts: { gross_settlement: number; interchange_fees: number; net_settlement: number; visa_charges?: number; }`\n - `created: string`\n - `currency: string`\n - `institution_id: string`\n - `is_complete: boolean`\n - `network: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'`\n - `report_date: string`\n - `settlement_institution_id: string`\n - `settlement_service: string`\n - `updated: string`\n - `cycle?: number`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst networkTotal = await client.reports.settlement.networkTotals.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(networkTotal);\n```", + perLanguage: { + go: { + method: 'client.Reports.Settlement.NetworkTotals.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tnetworkTotal, err := client.Reports.Settlement.NetworkTotals.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", networkTotal.InstitutionID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/reports/settlement/network_totals/$TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'reports().settlement().networkTotals().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.NetworkTotal;\nimport com.lithic.api.models.ReportSettlementNetworkTotalRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n NetworkTotal networkTotal = client.reports().settlement().networkTotals().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'reports().settlement().networkTotals().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.NetworkTotal\nimport com.lithic.api.models.ReportSettlementNetworkTotalRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val networkTotal: NetworkTotal = client.reports().settlement().networkTotals().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'reports.settlement.network_totals.retrieve', + example: + '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)\nnetwork_total = client.reports.settlement.network_totals.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(network_total.institution_id)', + }, + ruby: { + method: 'reports.settlement.network_totals.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nnetwork_total = lithic.reports.settlement.network_totals.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(network_total)', + }, + typescript: { + method: 'client.reports.settlement.networkTotals.retrieve', + example: + "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\nconst networkTotal = await client.reports.settlement.networkTotals.retrieve(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(networkTotal.institution_id);", + }, + }, + }, + { + name: 'list', + endpoint: '/v1/card_programs', + httpMethod: 'get', + summary: 'List card programs', + description: 'List card programs.', + stainlessPath: '(resource) card_programs > (method) list', + qualified: 'client.cardPrograms.list', + params: ['ending_before?: string;', 'page_size?: number;', 'starting_after?: string;'], + response: + '{ token: string; account_level_management_enabled: boolean; created: string; name: string; pan_range_end: string; pan_range_start: string; cardholder_currency?: string; settlement_currencies?: string[]; }', + markdown: + "## list\n\n`client.cardPrograms.list(ending_before?: string, page_size?: number, starting_after?: string): { token: string; account_level_management_enabled: boolean; created: string; name: string; pan_range_end: string; pan_range_start: string; cardholder_currency?: string; settlement_currencies?: string[]; }`\n\n**get** `/v1/card_programs`\n\nList card programs.\n\n### Parameters\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_level_management_enabled: boolean; created: string; name: string; pan_range_end: string; pan_range_start: string; cardholder_currency?: string; settlement_currencies?: string[]; }`\n\n - `token: string`\n - `account_level_management_enabled: boolean`\n - `created: string`\n - `name: string`\n - `pan_range_end: string`\n - `pan_range_start: string`\n - `cardholder_currency?: string`\n - `settlement_currencies?: 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 cardProgram of client.cardPrograms.list()) {\n console.log(cardProgram);\n}\n```", + perLanguage: { + go: { + method: 'client.CardPrograms.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.CardPrograms.List(context.TODO(), lithic.CardProgramListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v1/card_programs \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'cardPrograms().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.CardProgramListPage;\nimport com.lithic.api.models.CardProgramListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardProgramListPage page = client.cardPrograms().list();\n }\n}', + }, + kotlin: { + method: 'cardPrograms().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.CardProgramListPage\nimport com.lithic.api.models.CardProgramListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: CardProgramListPage = client.cardPrograms().list()\n}', + }, + python: { + method: 'card_programs.list', + example: + '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.card_programs.list()\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'card_programs.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.card_programs.list\n\nputs(page)', + }, + typescript: { + method: 'client.cardPrograms.list', + example: + "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 cardProgram of client.cardPrograms.list()) {\n console.log(cardProgram.token);\n}", + }, + }, }, { name: 'retrieve', @@ -2685,20 +8251,92 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ token: string; account_level_management_enabled: boolean; created: string; name: string; pan_range_end: string; pan_range_start: string; cardholder_currency?: string; settlement_currencies?: string[]; }', markdown: "## retrieve\n\n`client.cardPrograms.retrieve(card_program_token: string): { token: string; account_level_management_enabled: boolean; created: string; name: string; pan_range_end: string; pan_range_start: string; cardholder_currency?: string; settlement_currencies?: string[]; }`\n\n**get** `/v1/card_programs/{card_program_token}`\n\nGet card program.\n\n### Parameters\n\n- `card_program_token: string`\n\n### Returns\n\n- `{ token: string; account_level_management_enabled: boolean; created: string; name: string; pan_range_end: string; pan_range_start: string; cardholder_currency?: string; settlement_currencies?: string[]; }`\n\n - `token: string`\n - `account_level_management_enabled: boolean`\n - `created: string`\n - `name: string`\n - `pan_range_end: string`\n - `pan_range_start: string`\n - `cardholder_currency?: string`\n - `settlement_currencies?: string[]`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst cardProgram = await client.cardPrograms.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(cardProgram);\n```", + perLanguage: { + go: { + method: 'client.CardPrograms.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tcardProgram, err := client.CardPrograms.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", cardProgram.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/card_programs/$CARD_PROGRAM_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'cardPrograms().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.CardProgram;\nimport com.lithic.api.models.CardProgramRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CardProgram cardProgram = client.cardPrograms().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'cardPrograms().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.CardProgram\nimport com.lithic.api.models.CardProgramRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val cardProgram: CardProgram = client.cardPrograms().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'card_programs.retrieve', + example: + '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)\ncard_program = client.card_programs.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(card_program.token)', + }, + ruby: { + method: 'card_programs.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ncard_program = lithic.card_programs.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(card_program)', + }, + typescript: { + method: 'client.cardPrograms.retrieve', + example: + "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\nconst cardProgram = await client.cardPrograms.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(cardProgram.token);", + }, + }, }, { name: 'list', - endpoint: '/v1/card_programs', + endpoint: '/v1/digital_card_art', httpMethod: 'get', - summary: 'List card programs', - description: 'List card programs.', - stainlessPath: '(resource) card_programs > (method) list', - qualified: 'client.cardPrograms.list', + summary: 'List digital card art', + description: 'List digital card art.', + stainlessPath: '(resource) digital_card_art > (method) list', + qualified: 'client.digitalCardArt.list', params: ['ending_before?: string;', 'page_size?: number;', 'starting_after?: string;'], response: - '{ token: string; account_level_management_enabled: boolean; created: string; name: string; pan_range_end: string; pan_range_start: string; cardholder_currency?: string; settlement_currencies?: string[]; }', + "{ token: string; card_program_token: string; created: string; description: string; is_enabled: boolean; network: 'MASTERCARD' | 'VISA'; is_card_program_default?: boolean; }", markdown: - "## list\n\n`client.cardPrograms.list(ending_before?: string, page_size?: number, starting_after?: string): { token: string; account_level_management_enabled: boolean; created: string; name: string; pan_range_end: string; pan_range_start: string; cardholder_currency?: string; settlement_currencies?: string[]; }`\n\n**get** `/v1/card_programs`\n\nList card programs.\n\n### Parameters\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_level_management_enabled: boolean; created: string; name: string; pan_range_end: string; pan_range_start: string; cardholder_currency?: string; settlement_currencies?: string[]; }`\n\n - `token: string`\n - `account_level_management_enabled: boolean`\n - `created: string`\n - `name: string`\n - `pan_range_end: string`\n - `pan_range_start: string`\n - `cardholder_currency?: string`\n - `settlement_currencies?: 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 cardProgram of client.cardPrograms.list()) {\n console.log(cardProgram);\n}\n```", + "## list\n\n`client.digitalCardArt.list(ending_before?: string, page_size?: number, starting_after?: string): { token: string; card_program_token: string; created: string; description: string; is_enabled: boolean; network: 'MASTERCARD' | 'VISA'; is_card_program_default?: boolean; }`\n\n**get** `/v1/digital_card_art`\n\nList digital card art.\n\n### Parameters\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; card_program_token: string; created: string; description: string; is_enabled: boolean; network: 'MASTERCARD' | 'VISA'; is_card_program_default?: boolean; }`\n\n - `token: string`\n - `card_program_token: string`\n - `created: string`\n - `description: string`\n - `is_enabled: boolean`\n - `network: 'MASTERCARD' | 'VISA'`\n - `is_card_program_default?: boolean`\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 digitalCardArt of client.digitalCardArt.list()) {\n console.log(digitalCardArt);\n}\n```", + perLanguage: { + go: { + method: 'client.DigitalCardArt.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.DigitalCardArt.List(context.TODO(), lithic.DigitalCardArtListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/digital_card_art \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'digitalCardArt().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.DigitalCardArtListPage;\nimport com.lithic.api.models.DigitalCardArtListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n DigitalCardArtListPage page = client.digitalCardArt().list();\n }\n}', + }, + kotlin: { + method: 'digitalCardArt().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.DigitalCardArtListPage\nimport com.lithic.api.models.DigitalCardArtListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: DigitalCardArtListPage = client.digitalCardArt().list()\n}', + }, + python: { + method: 'digital_card_art.list', + example: + '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.digital_card_art.list()\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'digital_card_art.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.digital_card_art.list\n\nputs(page)', + }, + typescript: { + method: 'client.digitalCardArt.list', + example: + "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 digitalCardArt of client.digitalCardArt.list()) {\n console.log(digitalCardArt.token);\n}", + }, + }, }, { name: 'retrieve', @@ -2713,20 +8351,103 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; card_program_token: string; created: string; description: string; is_enabled: boolean; network: 'MASTERCARD' | 'VISA'; is_card_program_default?: boolean; }", markdown: "## retrieve\n\n`client.digitalCardArt.retrieve(digital_card_art_token: string): { token: string; card_program_token: string; created: string; description: string; is_enabled: boolean; network: 'MASTERCARD' | 'VISA'; is_card_program_default?: boolean; }`\n\n**get** `/v1/digital_card_art/{digital_card_art_token}`\n\nGet digital card art by token.\n\n### Parameters\n\n- `digital_card_art_token: string`\n\n### Returns\n\n- `{ token: string; card_program_token: string; created: string; description: string; is_enabled: boolean; network: 'MASTERCARD' | 'VISA'; is_card_program_default?: boolean; }`\n\n - `token: string`\n - `card_program_token: string`\n - `created: string`\n - `description: string`\n - `is_enabled: boolean`\n - `network: 'MASTERCARD' | 'VISA'`\n - `is_card_program_default?: boolean`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst digitalCardArt = await client.digitalCardArt.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(digitalCardArt);\n```", + perLanguage: { + go: { + method: 'client.DigitalCardArt.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tdigitalCardArt, err := client.DigitalCardArt.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", digitalCardArt.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/digital_card_art/$DIGITAL_CARD_ART_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'digitalCardArt().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.DigitalCardArt;\nimport com.lithic.api.models.DigitalCardArtRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n DigitalCardArt digitalCardArt = client.digitalCardArt().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'digitalCardArt().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.DigitalCardArt\nimport com.lithic.api.models.DigitalCardArtRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val digitalCardArt: DigitalCardArt = client.digitalCardArt().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'digital_card_art.retrieve', + example: + '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)\ndigital_card_art = client.digital_card_art.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(digital_card_art.token)', + }, + ruby: { + method: 'digital_card_art.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ndigital_card_art = lithic.digital_card_art.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(digital_card_art)', + }, + typescript: { + method: 'client.digitalCardArt.retrieve', + example: + "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\nconst digitalCardArt = await client.digitalCardArt.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(digitalCardArt.token);", + }, + }, }, { name: 'list', - endpoint: '/v1/digital_card_art', + endpoint: '/v1/book_transfers', httpMethod: 'get', - summary: 'List digital card art', - description: 'List digital card art.', - stainlessPath: '(resource) digital_card_art > (method) list', - qualified: 'client.digitalCardArt.list', - params: ['ending_before?: string;', 'page_size?: number;', 'starting_after?: string;'], + summary: 'List book transfers', + description: 'List book transfers', + stainlessPath: '(resource) book_transfers > (method) list', + qualified: 'client.bookTransfers.list', + params: [ + 'account_token?: string;', + 'begin?: string;', + 'business_account_token?: string;', + 'category?: string;', + 'end?: string;', + 'ending_before?: string;', + 'financial_account_token?: string;', + 'page_size?: number;', + "result?: 'APPROVED' | 'DECLINED';", + 'starting_after?: string;', + "status?: 'DECLINED' | 'SETTLED';", + ], response: - "{ token: string; card_program_token: string; created: string; description: string; is_enabled: boolean; network: 'MASTERCARD' | 'VISA'; is_card_program_default?: boolean; }", + "{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }", markdown: - "## list\n\n`client.digitalCardArt.list(ending_before?: string, page_size?: number, starting_after?: string): { token: string; card_program_token: string; created: string; description: string; is_enabled: boolean; network: 'MASTERCARD' | 'VISA'; is_card_program_default?: boolean; }`\n\n**get** `/v1/digital_card_art`\n\nList digital card art.\n\n### Parameters\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; card_program_token: string; created: string; description: string; is_enabled: boolean; network: 'MASTERCARD' | 'VISA'; is_card_program_default?: boolean; }`\n\n - `token: string`\n - `card_program_token: string`\n - `created: string`\n - `description: string`\n - `is_enabled: boolean`\n - `network: 'MASTERCARD' | 'VISA'`\n - `is_card_program_default?: boolean`\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 digitalCardArt of client.digitalCardArt.list()) {\n console.log(digitalCardArt);\n}\n```", + "## list\n\n`client.bookTransfers.list(account_token?: string, begin?: string, business_account_token?: string, category?: string, end?: string, ending_before?: string, financial_account_token?: string, page_size?: number, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'DECLINED' | 'SETTLED'): { token: string; category: string; created: string; currency: string; events: object[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: external_resource; transaction_series?: object; }`\n\n**get** `/v1/book_transfers`\n\nList book transfers\n\n### Parameters\n\n- `account_token?: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `business_account_token?: string`\n\n- `category?: string`\n Book Transfer category to be returned.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `financial_account_token?: string`\n Globally unique identifier for the financial account or card that will send the funds. Accepted type dependent on the program's use case.\n\n- `page_size?: number`\n Page size (for pagination).\n\n- `result?: 'APPROVED' | 'DECLINED'`\n Book transfer result to be returned.\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- `status?: 'DECLINED' | 'SETTLED'`\n Book transfer status to be returned.\n\n### Returns\n\n- `{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }`\n Book transfer transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `currency: string`\n - `events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]`\n - `family: 'TRANSFER'`\n - `from_financial_account_token: string`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `to_financial_account_token: string`\n - `updated: string`\n - `external_id?: string`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: 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 bookTransferResponse of client.bookTransfers.list()) {\n console.log(bookTransferResponse);\n}\n```", + perLanguage: { + go: { + method: 'client.BookTransfers.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.BookTransfers.List(context.TODO(), lithic.BookTransferListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v1/book_transfers \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'bookTransfers().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.BookTransferListPage;\nimport com.lithic.api.models.BookTransferListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n BookTransferListPage page = client.bookTransfers().list();\n }\n}', + }, + kotlin: { + method: 'bookTransfers().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.BookTransferListPage\nimport com.lithic.api.models.BookTransferListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: BookTransferListPage = client.bookTransfers().list()\n}', + }, + python: { + method: 'book_transfers.list', + example: + '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.book_transfers.list()\npage = page.data[0]\nprint(page.external_id)', + }, + ruby: { + method: 'book_transfers.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.book_transfers.list\n\nputs(page)', + }, + typescript: { + method: 'client.bookTransfers.list', + example: + "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 bookTransferResponse of client.bookTransfers.list()) {\n console.log(bookTransferResponse.external_id);\n}", + }, + }, }, { name: 'create', @@ -2753,6 +8474,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }", markdown: "## create\n\n`client.bookTransfers.create(amount: number, category: string, from_financial_account_token: string, subtype: string, to_financial_account_token: string, type: string, token?: string, external_id?: string, hold_token?: string, memo?: string, on_closed_account?: 'FAIL' | 'USE_SUSPENSE'): { token: string; category: string; created: string; currency: string; events: object[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: external_resource; transaction_series?: object; }`\n\n**post** `/v1/book_transfers`\n\nBook transfer funds between two financial accounts or between a financial account and card\n\n### Parameters\n\n- `amount: number`\n Amount to be transferred in the currency's smallest unit (e.g., cents for USD). This should always be a positive value.\n\n- `category: string`\n\n- `from_financial_account_token: string`\n Globally unique identifier for the financial account or card that will send the funds. Accepted type dependent on the program's use case.\n\n- `subtype: string`\n The program specific subtype code for the specified category/type.\n\n- `to_financial_account_token: string`\n Globally unique identifier for the financial account or card that will receive the funds. Accepted type dependent on the program's use case.\n\n- `type: string`\n Type of the book transfer\n\n- `token?: string`\n Customer-provided token that will serve as an idempotency token. This token will become the transaction token.\n\n- `external_id?: string`\n External ID defined by the customer\n\n- `hold_token?: string`\n Token of an existing hold to settle when this transfer is initiated\n\n- `memo?: string`\n Optional descriptor for the transfer.\n\n- `on_closed_account?: 'FAIL' | 'USE_SUSPENSE'`\n What to do if the financial account is closed when posting an operation\n\n### Returns\n\n- `{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }`\n Book transfer transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `currency: string`\n - `events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]`\n - `family: 'TRANSFER'`\n - `from_financial_account_token: string`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `to_financial_account_token: string`\n - `updated: string`\n - `external_id?: string`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst bookTransferResponse = await client.bookTransfers.create({\n amount: 1,\n category: 'ADJUSTMENT',\n from_financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n subtype: 'subtype',\n to_financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n type: 'ATM_BALANCE_INQUIRY',\n});\n\nconsole.log(bookTransferResponse);\n```", + perLanguage: { + go: { + method: 'client.BookTransfers.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tbookTransferResponse, err := client.BookTransfers.New(context.TODO(), lithic.BookTransferNewParams{\n\t\tAmount: lithic.F(int64(1)),\n\t\tCategory: lithic.F(lithic.BookTransferNewParamsCategoryAdjustment),\n\t\tFromFinancialAccountToken: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),\n\t\tSubtype: lithic.F("subtype"),\n\t\tToFinancialAccountToken: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),\n\t\tType: lithic.F(lithic.BookTransferNewParamsTypeAtmBalanceInquiry),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", bookTransferResponse.ExternalID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/book_transfers \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "amount": 1,\n "category": "ADJUSTMENT",\n "from_financial_account_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "subtype": "subtype",\n "to_financial_account_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "type": "ATM_BALANCE_INQUIRY"\n }\'', + }, + java: { + method: 'bookTransfers().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.BookTransferCreateParams;\nimport com.lithic.api.models.BookTransferResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n BookTransferCreateParams params = BookTransferCreateParams.builder()\n .amount(1L)\n .category(BookTransferCreateParams.BookTransferCategory.ADJUSTMENT)\n .fromFinancialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .subtype("subtype")\n .toFinancialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .type(BookTransferCreateParams.BookTransferType.ATM_BALANCE_INQUIRY)\n .build();\n BookTransferResponse bookTransferResponse = client.bookTransfers().create(params);\n }\n}', + }, + kotlin: { + method: 'bookTransfers().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.BookTransferCreateParams\nimport com.lithic.api.models.BookTransferResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: BookTransferCreateParams = BookTransferCreateParams.builder()\n .amount(1L)\n .category(BookTransferCreateParams.BookTransferCategory.ADJUSTMENT)\n .fromFinancialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .subtype("subtype")\n .toFinancialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .type(BookTransferCreateParams.BookTransferType.ATM_BALANCE_INQUIRY)\n .build()\n val bookTransferResponse: BookTransferResponse = client.bookTransfers().create(params)\n}', + }, + python: { + method: 'book_transfers.create', + example: + '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)\nbook_transfer_response = client.book_transfers.create(\n amount=1,\n category="ADJUSTMENT",\n from_financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n subtype="subtype",\n to_financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n type="ATM_BALANCE_INQUIRY",\n)\nprint(book_transfer_response.external_id)', + }, + ruby: { + method: 'book_transfers.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nbook_transfer_response = lithic.book_transfers.create(\n amount: 1,\n category: :ADJUSTMENT,\n from_financial_account_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n subtype: "subtype",\n to_financial_account_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n type: :ATM_BALANCE_INQUIRY\n)\n\nputs(book_transfer_response)', + }, + typescript: { + method: 'client.bookTransfers.create', + example: + "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\nconst bookTransferResponse = await client.bookTransfers.create({\n amount: 1,\n category: 'ADJUSTMENT',\n from_financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n subtype: 'subtype',\n to_financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n type: 'ATM_BALANCE_INQUIRY',\n});\n\nconsole.log(bookTransferResponse.external_id);", + }, + }, }, { name: 'retrieve', @@ -2767,32 +8524,92 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }", markdown: "## retrieve\n\n`client.bookTransfers.retrieve(book_transfer_token: string): { token: string; category: string; created: string; currency: string; events: object[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: external_resource; transaction_series?: object; }`\n\n**get** `/v1/book_transfers/{book_transfer_token}`\n\nGet book transfer by token\n\n### Parameters\n\n- `book_transfer_token: string`\n\n### Returns\n\n- `{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }`\n Book transfer transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `currency: string`\n - `events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]`\n - `family: 'TRANSFER'`\n - `from_financial_account_token: string`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `to_financial_account_token: string`\n - `updated: string`\n - `external_id?: string`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst bookTransferResponse = await client.bookTransfers.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(bookTransferResponse);\n```", + perLanguage: { + go: { + method: 'client.BookTransfers.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tbookTransferResponse, err := client.BookTransfers.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", bookTransferResponse.ExternalID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/book_transfers/$BOOK_TRANSFER_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'bookTransfers().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.BookTransferResponse;\nimport com.lithic.api.models.BookTransferRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n BookTransferResponse bookTransferResponse = client.bookTransfers().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'bookTransfers().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.BookTransferResponse\nimport com.lithic.api.models.BookTransferRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val bookTransferResponse: BookTransferResponse = client.bookTransfers().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'book_transfers.retrieve', + example: + '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)\nbook_transfer_response = client.book_transfers.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(book_transfer_response.external_id)', + }, + ruby: { + method: 'book_transfers.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nbook_transfer_response = lithic.book_transfers.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(book_transfer_response)', + }, + typescript: { + method: 'client.bookTransfers.retrieve', + example: + "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\nconst bookTransferResponse = await client.bookTransfers.retrieve(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(bookTransferResponse.external_id);", + }, + }, }, { - name: 'list', - endpoint: '/v1/book_transfers', - httpMethod: 'get', - summary: 'List book transfers', - description: 'List book transfers', - stainlessPath: '(resource) book_transfers > (method) list', - qualified: 'client.bookTransfers.list', - params: [ - 'account_token?: string;', - 'begin?: string;', - 'business_account_token?: string;', - 'category?: string;', - 'end?: string;', - 'ending_before?: string;', - 'financial_account_token?: string;', - 'page_size?: number;', - "result?: 'APPROVED' | 'DECLINED';", - 'starting_after?: string;', - "status?: 'DECLINED' | 'SETTLED';", - ], + name: 'reverse', + endpoint: '/v1/book_transfers/{book_transfer_token}/reverse', + httpMethod: 'post', + summary: 'Reverse book transfer', + description: 'Reverse a book transfer', + stainlessPath: '(resource) book_transfers > (method) reverse', + qualified: 'client.bookTransfers.reverse', + params: ['book_transfer_token: string;', 'memo?: string;'], response: "{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }", markdown: - "## list\n\n`client.bookTransfers.list(account_token?: string, begin?: string, business_account_token?: string, category?: string, end?: string, ending_before?: string, financial_account_token?: string, page_size?: number, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'DECLINED' | 'SETTLED'): { token: string; category: string; created: string; currency: string; events: object[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: external_resource; transaction_series?: object; }`\n\n**get** `/v1/book_transfers`\n\nList book transfers\n\n### Parameters\n\n- `account_token?: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `business_account_token?: string`\n\n- `category?: string`\n Book Transfer category to be returned.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `financial_account_token?: string`\n Globally unique identifier for the financial account or card that will send the funds. Accepted type dependent on the program's use case.\n\n- `page_size?: number`\n Page size (for pagination).\n\n- `result?: 'APPROVED' | 'DECLINED'`\n Book transfer result to be returned.\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- `status?: 'DECLINED' | 'SETTLED'`\n Book transfer status to be returned.\n\n### Returns\n\n- `{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }`\n Book transfer transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `currency: string`\n - `events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]`\n - `family: 'TRANSFER'`\n - `from_financial_account_token: string`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `to_financial_account_token: string`\n - `updated: string`\n - `external_id?: string`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: 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 bookTransferResponse of client.bookTransfers.list()) {\n console.log(bookTransferResponse);\n}\n```", + "## reverse\n\n`client.bookTransfers.reverse(book_transfer_token: string, memo?: string): { token: string; category: string; created: string; currency: string; events: object[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: external_resource; transaction_series?: object; }`\n\n**post** `/v1/book_transfers/{book_transfer_token}/reverse`\n\nReverse a book transfer\n\n### Parameters\n\n- `book_transfer_token: string`\n\n- `memo?: string`\n Optional descriptor for the reversal.\n\n### Returns\n\n- `{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }`\n Book transfer transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `currency: string`\n - `events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]`\n - `family: 'TRANSFER'`\n - `from_financial_account_token: string`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `to_financial_account_token: string`\n - `updated: string`\n - `external_id?: string`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst bookTransferResponse = await client.bookTransfers.reverse('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(bookTransferResponse);\n```", + perLanguage: { + go: { + method: 'client.BookTransfers.Reverse', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tbookTransferResponse, err := client.BookTransfers.Reverse(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.BookTransferReverseParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", bookTransferResponse.ExternalID)\n}\n', + }, + http: { + example: + "curl https://api.lithic.com/v1/book_transfers/$BOOK_TRANSFER_TOKEN/reverse \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", + }, + java: { + method: 'bookTransfers().reverse', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.BookTransferResponse;\nimport com.lithic.api.models.BookTransferReverseParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n BookTransferResponse bookTransferResponse = client.bookTransfers().reverse("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'bookTransfers().reverse', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.BookTransferResponse\nimport com.lithic.api.models.BookTransferReverseParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val bookTransferResponse: BookTransferResponse = client.bookTransfers().reverse("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'book_transfers.reverse', + example: + '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)\nbook_transfer_response = client.book_transfers.reverse(\n book_transfer_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(book_transfer_response.external_id)', + }, + ruby: { + method: 'book_transfers.reverse', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nbook_transfer_response = lithic.book_transfers.reverse("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(book_transfer_response)', + }, + typescript: { + method: 'client.bookTransfers.reverse', + example: + "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\nconst bookTransferResponse = await client.bookTransfers.reverse(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(bookTransferResponse.external_id);", + }, + }, }, { name: 'retry', @@ -2807,20 +8624,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }", markdown: "## retry\n\n`client.bookTransfers.retry(book_transfer_token: string, retry_token: string): { token: string; category: string; created: string; currency: string; events: object[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: external_resource; transaction_series?: object; }`\n\n**post** `/v1/book_transfers/{book_transfer_token}/retry`\n\nRetry a book transfer that has been declined\n\n### Parameters\n\n- `book_transfer_token: string`\n\n- `retry_token: string`\n Customer-provided token that will serve as an idempotency token. This token will become the transaction token.\n\n### Returns\n\n- `{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }`\n Book transfer transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `currency: string`\n - `events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]`\n - `family: 'TRANSFER'`\n - `from_financial_account_token: string`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `to_financial_account_token: string`\n - `updated: string`\n - `external_id?: string`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst bookTransferResponse = await client.bookTransfers.retry('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { retry_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(bookTransferResponse);\n```", - }, - { - name: 'reverse', - endpoint: '/v1/book_transfers/{book_transfer_token}/reverse', - httpMethod: 'post', - summary: 'Reverse book transfer', - description: 'Reverse a book transfer', - stainlessPath: '(resource) book_transfers > (method) reverse', - qualified: 'client.bookTransfers.reverse', - params: ['book_transfer_token: string;', 'memo?: string;'], - response: - "{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }", - markdown: - "## reverse\n\n`client.bookTransfers.reverse(book_transfer_token: string, memo?: string): { token: string; category: string; created: string; currency: string; events: object[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: external_resource; transaction_series?: object; }`\n\n**post** `/v1/book_transfers/{book_transfer_token}/reverse`\n\nReverse a book transfer\n\n### Parameters\n\n- `book_transfer_token: string`\n\n- `memo?: string`\n Optional descriptor for the reversal.\n\n### Returns\n\n- `{ token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; }`\n Book transfer transaction\n\n - `token: string`\n - `category: string`\n - `created: string`\n - `currency: string`\n - `events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]`\n - `family: 'TRANSFER'`\n - `from_financial_account_token: string`\n - `pending_amount: number`\n - `result: 'APPROVED' | 'DECLINED'`\n - `settled_amount: number`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `to_financial_account_token: string`\n - `updated: string`\n - `external_id?: string`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst bookTransferResponse = await client.bookTransfers.reverse('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(bookTransferResponse);\n```", + perLanguage: { + go: { + method: 'client.BookTransfers.Retry', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tbookTransferResponse, err := client.BookTransfers.Retry(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.BookTransferRetryParams{\n\t\t\tRetryToken: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", bookTransferResponse.ExternalID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/book_transfers/$BOOK_TRANSFER_TOKEN/retry \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "retry_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }\'', + }, + java: { + method: 'bookTransfers().retry', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.BookTransferResponse;\nimport com.lithic.api.models.BookTransferRetryParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n BookTransferRetryParams params = BookTransferRetryParams.builder()\n .bookTransferToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .retryToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n BookTransferResponse bookTransferResponse = client.bookTransfers().retry(params);\n }\n}', + }, + kotlin: { + method: 'bookTransfers().retry', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.BookTransferResponse\nimport com.lithic.api.models.BookTransferRetryParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: BookTransferRetryParams = BookTransferRetryParams.builder()\n .bookTransferToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .retryToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build()\n val bookTransferResponse: BookTransferResponse = client.bookTransfers().retry(params)\n}', + }, + python: { + method: 'book_transfers.retry', + example: + '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)\nbook_transfer_response = client.book_transfers.retry(\n book_transfer_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n retry_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(book_transfer_response.external_id)', + }, + ruby: { + method: 'book_transfers.retry_', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nbook_transfer_response = lithic.book_transfers.retry_(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n retry_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n)\n\nputs(book_transfer_response)', + }, + typescript: { + method: 'client.bookTransfers.retry', + example: + "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\nconst bookTransferResponse = await client.bookTransfers.retry(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { retry_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n);\n\nconsole.log(bookTransferResponse.external_id);", + }, + }, }, { name: 'retrieve', @@ -2833,7 +8672,92 @@ const EMBEDDED_METHODS: MethodEntry[] = [ params: ['credit_product_token: string;'], response: '{ credit_extended: number; }', markdown: - "## retrieve\n\n`client.creditProducts.extendedCredit.retrieve(credit_product_token: string): { credit_extended: number; }`\n\n**get** `/v1/credit_products/{credit_product_token}/extended_credit`\n\nGet the extended credit for a given credit product under a program\n\n### Parameters\n\n- `credit_product_token: string`\n\n### Returns\n\n- `{ credit_extended: number; }`\n\n - `credit_extended: number`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst extendedCredit = await client.creditProducts.extendedCredit.retrieve('credit_product_token');\n\nconsole.log(extendedCredit);\n```", + "## retrieve\n\n`client.creditProducts.extendedCredit.retrieve(credit_product_token: string): { credit_extended: number; }`\n\n**get** `/v1/credit_products/{credit_product_token}/extended_credit`\n\nGet the extended credit for a given credit product under a program\n\n### Parameters\n\n- `credit_product_token: string`\n\n### Returns\n\n- `{ credit_extended: number; }`\n\n - `credit_extended: number`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst extendedCredit = await client.creditProducts.extendedCredit.retrieve('credit_product_token');\n\nconsole.log(extendedCredit);\n```", + perLanguage: { + go: { + method: 'client.CreditProducts.ExtendedCredit.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\textendedCredit, err := client.CreditProducts.ExtendedCredit.Get(context.TODO(), "credit_product_token")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", extendedCredit.CreditExtended)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/credit_products/$CREDIT_PRODUCT_TOKEN/extended_credit \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'creditProducts().extendedCredit().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.CreditProductExtendedCreditRetrieveParams;\nimport com.lithic.api.models.ExtendedCredit;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ExtendedCredit extendedCredit = client.creditProducts().extendedCredit().retrieve("credit_product_token");\n }\n}', + }, + kotlin: { + method: 'creditProducts().extendedCredit().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.CreditProductExtendedCreditRetrieveParams\nimport com.lithic.api.models.ExtendedCredit\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val extendedCredit: ExtendedCredit = client.creditProducts().extendedCredit().retrieve("credit_product_token")\n}', + }, + python: { + method: 'credit_products.extended_credit.retrieve', + example: + '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)\nextended_credit = client.credit_products.extended_credit.retrieve(\n "credit_product_token",\n)\nprint(extended_credit.credit_extended)', + }, + ruby: { + method: 'credit_products.extended_credit.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nextended_credit = lithic.credit_products.extended_credit.retrieve("credit_product_token")\n\nputs(extended_credit)', + }, + typescript: { + method: 'client.creditProducts.extendedCredit.retrieve', + example: + "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\nconst extendedCredit = await client.creditProducts.extendedCredit.retrieve('credit_product_token');\n\nconsole.log(extendedCredit.credit_extended);", + }, + }, + }, + { + name: 'retrieve', + endpoint: '/v1/credit_products/{credit_product_token}/prime_rates', + httpMethod: 'get', + summary: 'Get Credit Product Prime Rates', + description: 'Get Credit Product Prime Rates', + stainlessPath: '(resource) credit_products.prime_rates > (method) retrieve', + qualified: 'client.creditProducts.primeRates.retrieve', + params: ['credit_product_token: string;', 'ending_before?: string;', 'starting_after?: string;'], + response: '{ data: { effective_date: string; rate: string; }[]; has_more: boolean; }', + markdown: + "## retrieve\n\n`client.creditProducts.primeRates.retrieve(credit_product_token: string, ending_before?: string, starting_after?: string): { data: object[]; has_more: boolean; }`\n\n**get** `/v1/credit_products/{credit_product_token}/prime_rates`\n\nGet Credit Product Prime Rates\n\n### Parameters\n\n- `credit_product_token: string`\n Globally unique identifier for credit products.\n\n- `ending_before?: string`\n The effective date that the prime rates ends before\n\n- `starting_after?: string`\n The effective date that the prime rate starts after\n\n### Returns\n\n- `{ data: { effective_date: string; rate: string; }[]; has_more: boolean; }`\n\n - `data: { effective_date: string; rate: string; }[]`\n - `has_more: boolean`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst primeRate = await client.creditProducts.primeRates.retrieve('credit_product_token');\n\nconsole.log(primeRate);\n```", + perLanguage: { + go: { + method: 'client.CreditProducts.PrimeRates.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tprimeRate, err := client.CreditProducts.PrimeRates.Get(\n\t\tcontext.TODO(),\n\t\t"credit_product_token",\n\t\tlithic.CreditProductPrimeRateGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", primeRate.Data)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/credit_products/$CREDIT_PRODUCT_TOKEN/prime_rates \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'creditProducts().primeRates().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.CreditProductPrimeRateRetrieveParams;\nimport com.lithic.api.models.PrimeRateRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n PrimeRateRetrieveResponse primeRate = client.creditProducts().primeRates().retrieve("credit_product_token");\n }\n}', + }, + kotlin: { + method: 'creditProducts().primeRates().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.CreditProductPrimeRateRetrieveParams\nimport com.lithic.api.models.PrimeRateRetrieveResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val primeRate: PrimeRateRetrieveResponse = client.creditProducts().primeRates().retrieve("credit_product_token")\n}', + }, + python: { + method: 'credit_products.prime_rates.retrieve', + example: + '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)\nprime_rate = client.credit_products.prime_rates.retrieve(\n credit_product_token="credit_product_token",\n)\nprint(prime_rate.data)', + }, + ruby: { + method: 'credit_products.prime_rates.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nprime_rate = lithic.credit_products.prime_rates.retrieve("credit_product_token")\n\nputs(prime_rate)', + }, + typescript: { + method: 'client.creditProducts.primeRates.retrieve', + example: + "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\nconst primeRate = await client.creditProducts.primeRates.retrieve('credit_product_token');\n\nconsole.log(primeRate.data);", + }, + }, }, { name: 'create', @@ -2846,19 +8770,103 @@ const EMBEDDED_METHODS: MethodEntry[] = [ params: ['credit_product_token: string;', 'effective_date: string;', 'rate: string;'], markdown: "## create\n\n`client.creditProducts.primeRates.create(credit_product_token: string, effective_date: string, rate: string): void`\n\n**post** `/v1/credit_products/{credit_product_token}/prime_rates`\n\nPost Credit Product Prime Rate\n\n### Parameters\n\n- `credit_product_token: string`\n Globally unique identifier for credit products.\n\n- `effective_date: string`\n Date the rate goes into effect\n\n- `rate: string`\n The rate in decimal format\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nawait client.creditProducts.primeRates.create('credit_product_token', { effective_date: '2019-12-27', rate: 'rate' })\n```", + perLanguage: { + go: { + method: 'client.CreditProducts.PrimeRates.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"time"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.CreditProducts.PrimeRates.New(\n\t\tcontext.TODO(),\n\t\t"credit_product_token",\n\t\tlithic.CreditProductPrimeRateNewParams{\n\t\t\tEffectiveDate: lithic.F(time.Now()),\n\t\t\tRate: lithic.F("rate"),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/credit_products/$CREDIT_PRODUCT_TOKEN/prime_rates \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "effective_date": "2019-12-27",\n "rate": "rate"\n }\'', + }, + java: { + method: 'creditProducts().primeRates().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.CreditProductPrimeRateCreateParams;\nimport java.time.LocalDate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n CreditProductPrimeRateCreateParams params = CreditProductPrimeRateCreateParams.builder()\n .creditProductToken("credit_product_token")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .rate("rate")\n .build();\n client.creditProducts().primeRates().create(params);\n }\n}', + }, + kotlin: { + method: 'creditProducts().primeRates().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.CreditProductPrimeRateCreateParams\nimport java.time.LocalDate\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: CreditProductPrimeRateCreateParams = CreditProductPrimeRateCreateParams.builder()\n .creditProductToken("credit_product_token")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .rate("rate")\n .build()\n client.creditProducts().primeRates().create(params)\n}', + }, + python: { + method: 'credit_products.prime_rates.create', + example: + 'import os\nfrom datetime import date\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)\nclient.credit_products.prime_rates.create(\n credit_product_token="credit_product_token",\n effective_date=date.fromisoformat("2019-12-27"),\n rate="rate",\n)', + }, + ruby: { + method: 'credit_products.prime_rates.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.credit_products.prime_rates.create(\n "credit_product_token",\n effective_date: "2019-12-27",\n rate: "rate"\n)\n\nputs(result)', + }, + typescript: { + method: 'client.creditProducts.primeRates.create', + example: + "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\nawait client.creditProducts.primeRates.create('credit_product_token', {\n effective_date: '2019-12-27',\n rate: 'rate',\n});", + }, + }, }, { - name: 'retrieve', - endpoint: '/v1/credit_products/{credit_product_token}/prime_rates', + name: 'list', + endpoint: '/v1/external_payments', httpMethod: 'get', - summary: 'Get Credit Product Prime Rates', - description: 'Get Credit Product Prime Rates', - stainlessPath: '(resource) credit_products.prime_rates > (method) retrieve', - qualified: 'client.creditProducts.primeRates.retrieve', - params: ['credit_product_token: string;', 'ending_before?: string;', 'starting_after?: string;'], - response: '{ data: { effective_date: string; rate: string; }[]; has_more: boolean; }', + summary: 'List external payments', + description: 'List external payments', + stainlessPath: '(resource) external_payments > (method) list', + qualified: 'client.externalPayments.list', + params: [ + 'begin?: string;', + 'business_account_token?: string;', + 'category?: string;', + 'end?: string;', + 'ending_before?: string;', + 'financial_account_token?: string;', + 'page_size?: number;', + "result?: 'APPROVED' | 'DECLINED';", + 'starting_after?: string;', + "status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED';", + ], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }", markdown: - "## retrieve\n\n`client.creditProducts.primeRates.retrieve(credit_product_token: string, ending_before?: string, starting_after?: string): { data: object[]; has_more: boolean; }`\n\n**get** `/v1/credit_products/{credit_product_token}/prime_rates`\n\nGet Credit Product Prime Rates\n\n### Parameters\n\n- `credit_product_token: string`\n Globally unique identifier for credit products.\n\n- `ending_before?: string`\n The effective date that the prime rates ends before\n\n- `starting_after?: string`\n The effective date that the prime rate starts after\n\n### Returns\n\n- `{ data: { effective_date: string; rate: string; }[]; has_more: boolean; }`\n\n - `data: { effective_date: string; rate: string; }[]`\n - `has_more: boolean`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst primeRate = await client.creditProducts.primeRates.retrieve('credit_product_token');\n\nconsole.log(primeRate);\n```", + "## list\n\n`client.externalPayments.list(begin?: string, business_account_token?: string, category?: string, end?: string, ending_before?: string, financial_account_token?: string, page_size?: number, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**get** `/v1/external_payments`\n\nList external payments\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `business_account_token?: string`\n\n- `category?: string`\n External Payment category to be returned.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `financial_account_token?: string`\n Globally unique identifier for the financial account or card that will send the funds. Accepted type dependent on the program's use case.\n\n- `page_size?: number`\n Page size (for pagination).\n\n- `result?: 'APPROVED' | 'DECLINED'`\n External Payment result to be returned.\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- `status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n Book transfer status to be returned.\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: 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 externalPayment of client.externalPayments.list()) {\n console.log(externalPayment);\n}\n```", + perLanguage: { + go: { + method: 'client.ExternalPayments.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.ExternalPayments.List(context.TODO(), lithic.ExternalPaymentListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/external_payments \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'externalPayments().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ExternalPaymentListPage;\nimport com.lithic.api.models.ExternalPaymentListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ExternalPaymentListPage page = client.externalPayments().list();\n }\n}', + }, + kotlin: { + method: 'externalPayments().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ExternalPaymentListPage\nimport com.lithic.api.models.ExternalPaymentListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: ExternalPaymentListPage = client.externalPayments().list()\n}', + }, + python: { + method: 'external_payments.list', + example: + '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.external_payments.list()\npage = page.data[0]\nprint(page.user_defined_id)', + }, + ruby: { + method: 'external_payments.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.external_payments.list\n\nputs(page)', + }, + typescript: { + method: 'client.externalPayments.list', + example: + "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 externalPayment of client.externalPayments.list()) {\n console.log(externalPayment.user_defined_id);\n}", + }, + }, }, { name: 'create', @@ -2883,6 +8891,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }", markdown: "## create\n\n`client.externalPayments.create(amount: number, category: string, effective_date: string, financial_account_token: string, payment_type: 'DEPOSIT' | 'WITHDRAWAL', token?: string, memo?: string, progress_to?: 'SETTLED' | 'RELEASED', user_defined_id?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**post** `/v1/external_payments`\n\nCreate external payment\n\n### Parameters\n\n- `amount: number`\n\n- `category: string`\n\n- `effective_date: string`\n\n- `financial_account_token: string`\n\n- `payment_type: 'DEPOSIT' | 'WITHDRAWAL'`\n\n- `token?: string`\n Customer-provided token that will serve as an idempotency token. This token will become the transaction token.\n\n- `memo?: string`\n\n- `progress_to?: 'SETTLED' | 'RELEASED'`\n\n- `user_defined_id?: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalPayment = await client.externalPayments.create({\n amount: 0,\n category: 'EXTERNAL_WIRE',\n effective_date: '2019-12-27',\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n payment_type: 'DEPOSIT',\n});\n\nconsole.log(externalPayment);\n```", + perLanguage: { + go: { + method: 'client.ExternalPayments.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\texternalPayment, err := client.ExternalPayments.New(context.TODO(), lithic.ExternalPaymentNewParams{\n\t\tAmount: lithic.F(int64(0)),\n\t\tCategory: lithic.F(lithic.ExternalPaymentNewParamsCategoryExternalWire),\n\t\tEffectiveDate: lithic.F(time.Now()),\n\t\tFinancialAccountToken: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),\n\t\tPaymentType: lithic.F(lithic.ExternalPaymentNewParamsPaymentTypeDeposit),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", externalPayment.UserDefinedID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/external_payments \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "amount": 0,\n "category": "EXTERNAL_WIRE",\n "effective_date": "2019-12-27",\n "financial_account_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "payment_type": "DEPOSIT"\n }\'', + }, + java: { + method: 'externalPayments().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ExternalPayment;\nimport com.lithic.api.models.ExternalPaymentCreateParams;\nimport java.time.LocalDate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ExternalPaymentCreateParams params = ExternalPaymentCreateParams.builder()\n .amount(0L)\n .category(ExternalPaymentCreateParams.ExternalPaymentCategory.EXTERNAL_WIRE)\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .paymentType(ExternalPaymentCreateParams.ExternalPaymentDirection.DEPOSIT)\n .build();\n ExternalPayment externalPayment = client.externalPayments().create(params);\n }\n}', + }, + kotlin: { + method: 'externalPayments().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ExternalPayment\nimport com.lithic.api.models.ExternalPaymentCreateParams\nimport java.time.LocalDate\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: ExternalPaymentCreateParams = ExternalPaymentCreateParams.builder()\n .amount(0L)\n .category(ExternalPaymentCreateParams.ExternalPaymentCategory.EXTERNAL_WIRE)\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .paymentType(ExternalPaymentCreateParams.ExternalPaymentDirection.DEPOSIT)\n .build()\n val externalPayment: ExternalPayment = client.externalPayments().create(params)\n}', + }, + python: { + method: 'external_payments.create', + example: + 'import os\nfrom datetime import date\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)\nexternal_payment = client.external_payments.create(\n amount=0,\n category="EXTERNAL_WIRE",\n effective_date=date.fromisoformat("2019-12-27"),\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n payment_type="DEPOSIT",\n)\nprint(external_payment.user_defined_id)', + }, + ruby: { + method: 'external_payments.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nexternal_payment = lithic.external_payments.create(\n amount: 0,\n category: :EXTERNAL_WIRE,\n effective_date: "2019-12-27",\n financial_account_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n payment_type: :DEPOSIT\n)\n\nputs(external_payment)', + }, + typescript: { + method: 'client.externalPayments.create', + example: + "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\nconst externalPayment = await client.externalPayments.create({\n amount: 0,\n category: 'EXTERNAL_WIRE',\n effective_date: '2019-12-27',\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n payment_type: 'DEPOSIT',\n});\n\nconsole.log(externalPayment.user_defined_id);", + }, + }, }, { name: 'retrieve', @@ -2897,45 +8941,97 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }", markdown: "## retrieve\n\n`client.externalPayments.retrieve(external_payment_token: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**get** `/v1/external_payments/{external_payment_token}`\n\nGet external payment\n\n### Parameters\n\n- `external_payment_token: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalPayment = await client.externalPayments.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(externalPayment);\n```", + perLanguage: { + go: { + method: 'client.ExternalPayments.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\texternalPayment, err := client.ExternalPayments.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", externalPayment.UserDefinedID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/external_payments/$EXTERNAL_PAYMENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'externalPayments().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ExternalPayment;\nimport com.lithic.api.models.ExternalPaymentRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ExternalPayment externalPayment = client.externalPayments().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'externalPayments().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ExternalPayment\nimport com.lithic.api.models.ExternalPaymentRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val externalPayment: ExternalPayment = client.externalPayments().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'external_payments.retrieve', + example: + '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)\nexternal_payment = client.external_payments.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(external_payment.user_defined_id)', + }, + ruby: { + method: 'external_payments.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nexternal_payment = lithic.external_payments.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(external_payment)', + }, + typescript: { + method: 'client.externalPayments.retrieve', + example: + "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\nconst externalPayment = await client.externalPayments.retrieve(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(externalPayment.user_defined_id);", + }, + }, }, { - name: 'list', - endpoint: '/v1/external_payments', - httpMethod: 'get', - summary: 'List external payments', - description: 'List external payments', - stainlessPath: '(resource) external_payments > (method) list', - qualified: 'client.externalPayments.list', + name: 'settle', + endpoint: '/v1/external_payments/{external_payment_token}/settle', + httpMethod: 'post', + summary: 'Settle external payment', + description: 'Settle external payment', + stainlessPath: '(resource) external_payments > (method) settle', + qualified: 'client.externalPayments.settle', params: [ - 'begin?: string;', - 'business_account_token?: string;', - 'category?: string;', - 'end?: string;', - 'ending_before?: string;', - 'financial_account_token?: string;', - 'page_size?: number;', - "result?: 'APPROVED' | 'DECLINED';", - 'starting_after?: string;', - "status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED';", + 'external_payment_token: string;', + 'effective_date: string;', + 'memo?: string;', + "progress_to?: 'SETTLED' | 'RELEASED';", ], response: "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }", markdown: - "## list\n\n`client.externalPayments.list(begin?: string, business_account_token?: string, category?: string, end?: string, ending_before?: string, financial_account_token?: string, page_size?: number, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**get** `/v1/external_payments`\n\nList external payments\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `business_account_token?: string`\n\n- `category?: string`\n External Payment category to be returned.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `financial_account_token?: string`\n Globally unique identifier for the financial account or card that will send the funds. Accepted type dependent on the program's use case.\n\n- `page_size?: number`\n Page size (for pagination).\n\n- `result?: 'APPROVED' | 'DECLINED'`\n External Payment result to be returned.\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- `status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n Book transfer status to be returned.\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: 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 externalPayment of client.externalPayments.list()) {\n console.log(externalPayment);\n}\n```", - }, - { - name: 'cancel', - endpoint: '/v1/external_payments/{external_payment_token}/cancel', - httpMethod: 'post', - summary: 'Cancel external payment', - description: 'Cancel external payment', - stainlessPath: '(resource) external_payments > (method) cancel', - qualified: 'client.externalPayments.cancel', - params: ['external_payment_token: string;', 'effective_date: string;', 'memo?: string;'], - response: - "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }", - markdown: - "## cancel\n\n`client.externalPayments.cancel(external_payment_token: string, effective_date: string, memo?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**post** `/v1/external_payments/{external_payment_token}/cancel`\n\nCancel external payment\n\n### Parameters\n\n- `external_payment_token: string`\n\n- `effective_date: string`\n\n- `memo?: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalPayment = await client.externalPayments.cancel('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { effective_date: '2019-12-27' });\n\nconsole.log(externalPayment);\n```", + "## settle\n\n`client.externalPayments.settle(external_payment_token: string, effective_date: string, memo?: string, progress_to?: 'SETTLED' | 'RELEASED'): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**post** `/v1/external_payments/{external_payment_token}/settle`\n\nSettle external payment\n\n### Parameters\n\n- `external_payment_token: string`\n\n- `effective_date: string`\n\n- `memo?: string`\n\n- `progress_to?: 'SETTLED' | 'RELEASED'`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalPayment = await client.externalPayments.settle('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { effective_date: '2019-12-27' });\n\nconsole.log(externalPayment);\n```", + perLanguage: { + go: { + method: 'client.ExternalPayments.Settle', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\texternalPayment, err := client.ExternalPayments.Settle(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.ExternalPaymentSettleParams{\n\t\t\tEffectiveDate: lithic.F(time.Now()),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", externalPayment.UserDefinedID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/external_payments/$EXTERNAL_PAYMENT_TOKEN/settle \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "effective_date": "2019-12-27"\n }\'', + }, + java: { + method: 'externalPayments().settle', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ExternalPayment;\nimport com.lithic.api.models.ExternalPaymentSettleParams;\nimport java.time.LocalDate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ExternalPaymentSettleParams params = ExternalPaymentSettleParams.builder()\n .externalPaymentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build();\n ExternalPayment externalPayment = client.externalPayments().settle(params);\n }\n}', + }, + kotlin: { + method: 'externalPayments().settle', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ExternalPayment\nimport com.lithic.api.models.ExternalPaymentSettleParams\nimport java.time.LocalDate\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: ExternalPaymentSettleParams = ExternalPaymentSettleParams.builder()\n .externalPaymentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build()\n val externalPayment: ExternalPayment = client.externalPayments().settle(params)\n}', + }, + python: { + method: 'external_payments.settle', + example: + 'import os\nfrom datetime import date\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)\nexternal_payment = client.external_payments.settle(\n external_payment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n effective_date=date.fromisoformat("2019-12-27"),\n)\nprint(external_payment.user_defined_id)', + }, + ruby: { + method: 'external_payments.settle', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nexternal_payment = lithic.external_payments.settle("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", effective_date: "2019-12-27")\n\nputs(external_payment)', + }, + typescript: { + method: 'client.externalPayments.settle', + example: + "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\nconst externalPayment = await client.externalPayments.settle(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { effective_date: '2019-12-27' },\n);\n\nconsole.log(externalPayment.user_defined_id);", + }, + }, }, { name: 'release', @@ -2950,6 +9046,92 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }", markdown: "## release\n\n`client.externalPayments.release(external_payment_token: string, effective_date: string, memo?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**post** `/v1/external_payments/{external_payment_token}/release`\n\nRelease external payment\n\n### Parameters\n\n- `external_payment_token: string`\n\n- `effective_date: string`\n\n- `memo?: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalPayment = await client.externalPayments.release('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { effective_date: '2019-12-27' });\n\nconsole.log(externalPayment);\n```", + perLanguage: { + go: { + method: 'client.ExternalPayments.Release', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\texternalPayment, err := client.ExternalPayments.Release(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.ExternalPaymentReleaseParams{\n\t\t\tEffectiveDate: lithic.F(time.Now()),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", externalPayment.UserDefinedID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/external_payments/$EXTERNAL_PAYMENT_TOKEN/release \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "effective_date": "2019-12-27"\n }\'', + }, + java: { + method: 'externalPayments().release', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ExternalPayment;\nimport com.lithic.api.models.ExternalPaymentReleaseParams;\nimport java.time.LocalDate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ExternalPaymentReleaseParams params = ExternalPaymentReleaseParams.builder()\n .externalPaymentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build();\n ExternalPayment externalPayment = client.externalPayments().release(params);\n }\n}', + }, + kotlin: { + method: 'externalPayments().release', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ExternalPayment\nimport com.lithic.api.models.ExternalPaymentReleaseParams\nimport java.time.LocalDate\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: ExternalPaymentReleaseParams = ExternalPaymentReleaseParams.builder()\n .externalPaymentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build()\n val externalPayment: ExternalPayment = client.externalPayments().release(params)\n}', + }, + python: { + method: 'external_payments.release', + example: + 'import os\nfrom datetime import date\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)\nexternal_payment = client.external_payments.release(\n external_payment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n effective_date=date.fromisoformat("2019-12-27"),\n)\nprint(external_payment.user_defined_id)', + }, + ruby: { + method: 'external_payments.release', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nexternal_payment = lithic.external_payments.release("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", effective_date: "2019-12-27")\n\nputs(external_payment)', + }, + typescript: { + method: 'client.externalPayments.release', + example: + "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\nconst externalPayment = await client.externalPayments.release(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { effective_date: '2019-12-27' },\n);\n\nconsole.log(externalPayment.user_defined_id);", + }, + }, + }, + { + name: 'cancel', + endpoint: '/v1/external_payments/{external_payment_token}/cancel', + httpMethod: 'post', + summary: 'Cancel external payment', + description: 'Cancel external payment', + stainlessPath: '(resource) external_payments > (method) cancel', + qualified: 'client.externalPayments.cancel', + params: ['external_payment_token: string;', 'effective_date: string;', 'memo?: string;'], + response: + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }", + markdown: + "## cancel\n\n`client.externalPayments.cancel(external_payment_token: string, effective_date: string, memo?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**post** `/v1/external_payments/{external_payment_token}/cancel`\n\nCancel external payment\n\n### Parameters\n\n- `external_payment_token: string`\n\n- `effective_date: string`\n\n- `memo?: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalPayment = await client.externalPayments.cancel('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { effective_date: '2019-12-27' });\n\nconsole.log(externalPayment);\n```", + perLanguage: { + go: { + method: 'client.ExternalPayments.Cancel', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\texternalPayment, err := client.ExternalPayments.Cancel(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.ExternalPaymentCancelParams{\n\t\t\tEffectiveDate: lithic.F(time.Now()),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", externalPayment.UserDefinedID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/external_payments/$EXTERNAL_PAYMENT_TOKEN/cancel \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "effective_date": "2019-12-27"\n }\'', + }, + java: { + method: 'externalPayments().cancel', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ExternalPayment;\nimport com.lithic.api.models.ExternalPaymentCancelParams;\nimport java.time.LocalDate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ExternalPaymentCancelParams params = ExternalPaymentCancelParams.builder()\n .externalPaymentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build();\n ExternalPayment externalPayment = client.externalPayments().cancel(params);\n }\n}', + }, + kotlin: { + method: 'externalPayments().cancel', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ExternalPayment\nimport com.lithic.api.models.ExternalPaymentCancelParams\nimport java.time.LocalDate\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: ExternalPaymentCancelParams = ExternalPaymentCancelParams.builder()\n .externalPaymentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build()\n val externalPayment: ExternalPayment = client.externalPayments().cancel(params)\n}', + }, + python: { + method: 'external_payments.cancel', + example: + 'import os\nfrom datetime import date\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)\nexternal_payment = client.external_payments.cancel(\n external_payment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n effective_date=date.fromisoformat("2019-12-27"),\n)\nprint(external_payment.user_defined_id)', + }, + ruby: { + method: 'external_payments.cancel', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nexternal_payment = lithic.external_payments.cancel("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", effective_date: "2019-12-27")\n\nputs(external_payment)', + }, + typescript: { + method: 'client.externalPayments.cancel', + example: + "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\nconst externalPayment = await client.externalPayments.cancel(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { effective_date: '2019-12-27' },\n);\n\nconsole.log(externalPayment.user_defined_id);", + }, + }, }, { name: 'reverse', @@ -2964,25 +9146,102 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }", markdown: "## reverse\n\n`client.externalPayments.reverse(external_payment_token: string, effective_date: string, memo?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**post** `/v1/external_payments/{external_payment_token}/reverse`\n\nReverse external payment\n\n### Parameters\n\n- `external_payment_token: string`\n\n- `effective_date: string`\n\n- `memo?: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalPayment = await client.externalPayments.reverse('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { effective_date: '2019-12-27' });\n\nconsole.log(externalPayment);\n```", + perLanguage: { + go: { + method: 'client.ExternalPayments.Reverse', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\texternalPayment, err := client.ExternalPayments.Reverse(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.ExternalPaymentReverseParams{\n\t\t\tEffectiveDate: lithic.F(time.Now()),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", externalPayment.UserDefinedID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/external_payments/$EXTERNAL_PAYMENT_TOKEN/reverse \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "effective_date": "2019-12-27"\n }\'', + }, + java: { + method: 'externalPayments().reverse', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ExternalPayment;\nimport com.lithic.api.models.ExternalPaymentReverseParams;\nimport java.time.LocalDate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ExternalPaymentReverseParams params = ExternalPaymentReverseParams.builder()\n .externalPaymentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build();\n ExternalPayment externalPayment = client.externalPayments().reverse(params);\n }\n}', + }, + kotlin: { + method: 'externalPayments().reverse', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ExternalPayment\nimport com.lithic.api.models.ExternalPaymentReverseParams\nimport java.time.LocalDate\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: ExternalPaymentReverseParams = ExternalPaymentReverseParams.builder()\n .externalPaymentToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build()\n val externalPayment: ExternalPayment = client.externalPayments().reverse(params)\n}', + }, + python: { + method: 'external_payments.reverse', + example: + 'import os\nfrom datetime import date\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)\nexternal_payment = client.external_payments.reverse(\n external_payment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n effective_date=date.fromisoformat("2019-12-27"),\n)\nprint(external_payment.user_defined_id)', + }, + ruby: { + method: 'external_payments.reverse', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nexternal_payment = lithic.external_payments.reverse("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", effective_date: "2019-12-27")\n\nputs(external_payment)', + }, + typescript: { + method: 'client.externalPayments.reverse', + example: + "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\nconst externalPayment = await client.externalPayments.reverse(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { effective_date: '2019-12-27' },\n);\n\nconsole.log(externalPayment.user_defined_id);", + }, + }, }, { - name: 'settle', - endpoint: '/v1/external_payments/{external_payment_token}/settle', - httpMethod: 'post', - summary: 'Settle external payment', - description: 'Settle external payment', - stainlessPath: '(resource) external_payments > (method) settle', - qualified: 'client.externalPayments.settle', + name: 'list', + endpoint: '/v1/management_operations', + httpMethod: 'get', + summary: 'List management operations', + description: 'List management operations', + stainlessPath: '(resource) management_operations > (method) list', + qualified: 'client.managementOperations.list', params: [ - 'external_payment_token: string;', - 'effective_date: string;', - 'memo?: string;', - "progress_to?: 'SETTLED' | 'RELEASED';", + 'begin?: string;', + 'business_account_token?: string;', + 'category?: string;', + 'end?: string;', + 'ending_before?: string;', + 'financial_account_token?: string;', + 'page_size?: number;', + 'starting_after?: string;', + "status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED';", ], response: - "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }", + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }", markdown: - "## settle\n\n`client.externalPayments.settle(external_payment_token: string, effective_date: string, memo?: string, progress_to?: 'SETTLED' | 'RELEASED'): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: object[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n**post** `/v1/external_payments/{external_payment_token}/settle`\n\nSettle external payment\n\n### Parameters\n\n- `external_payment_token: string`\n\n- `effective_date: string`\n\n- `memo?: string`\n\n- `progress_to?: 'SETTLED' | 'RELEASED'`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]`\n - `family?: 'EXTERNAL_PAYMENT'`\n - `financial_account_token?: string`\n - `payment_type?: 'DEPOSIT' | 'WITHDRAWAL'`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst externalPayment = await client.externalPayments.settle('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { effective_date: '2019-12-27' });\n\nconsole.log(externalPayment);\n```", + "## list\n\n`client.managementOperations.list(begin?: string, business_account_token?: string, category?: string, end?: string, ending_before?: string, financial_account_token?: string, page_size?: number, starting_after?: string, status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: object[]; external_resource?: external_resource; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: object; user_defined_id?: string; }`\n\n**get** `/v1/management_operations`\n\nList management operations\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `business_account_token?: string`\n\n- `category?: string`\n Management operation category to be returned.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `financial_account_token?: string`\n Globally unique identifier for the financial account. Accepted type dependent on the program's use case.\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- `status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n Management operation status to be returned.\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `direction?: 'CREDIT' | 'DEBIT'`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `family?: 'MANAGEMENT_OPERATION'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n - `user_defined_id?: 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 managementOperationTransaction of client.managementOperations.list()) {\n console.log(managementOperationTransaction);\n}\n```", + perLanguage: { + go: { + method: 'client.ManagementOperations.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.ManagementOperations.List(context.TODO(), lithic.ManagementOperationListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/management_operations \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'managementOperations().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ManagementOperationListPage;\nimport com.lithic.api.models.ManagementOperationListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ManagementOperationListPage page = client.managementOperations().list();\n }\n}', + }, + kotlin: { + method: 'managementOperations().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ManagementOperationListPage\nimport com.lithic.api.models.ManagementOperationListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: ManagementOperationListPage = client.managementOperations().list()\n}', + }, + python: { + method: 'management_operations.list', + example: + '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.management_operations.list()\npage = page.data[0]\nprint(page.user_defined_id)', + }, + ruby: { + method: 'management_operations.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.management_operations.list\n\nputs(page)', + }, + typescript: { + method: 'client.managementOperations.list', + example: + "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 managementOperationTransaction of client.managementOperations.list()) {\n console.log(managementOperationTransaction.user_defined_id);\n}", + }, + }, }, { name: 'create', @@ -3009,6 +9268,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }", markdown: "## create\n\n`client.managementOperations.create(amount: number, category: string, direction: 'CREDIT' | 'DEBIT', effective_date: string, event_type: string, financial_account_token: string, token?: string, memo?: string, on_closed_account?: 'FAIL' | 'USE_SUSPENSE', subtype?: string, user_defined_id?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: object[]; external_resource?: external_resource; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: object; user_defined_id?: string; }`\n\n**post** `/v1/management_operations`\n\nCreate management operation\n\n### Parameters\n\n- `amount: number`\n\n- `category: string`\n\n- `direction: 'CREDIT' | 'DEBIT'`\n\n- `effective_date: string`\n\n- `event_type: string`\n\n- `financial_account_token: string`\n\n- `token?: string`\n Customer-provided token that will serve as an idempotency token. This token will become the transaction token.\n\n- `memo?: string`\n\n- `on_closed_account?: 'FAIL' | 'USE_SUSPENSE'`\n What to do if the financial account is closed when posting an operation\n\n- `subtype?: string`\n\n- `user_defined_id?: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `direction?: 'CREDIT' | 'DEBIT'`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `family?: 'MANAGEMENT_OPERATION'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst managementOperationTransaction = await client.managementOperations.create({\n amount: 1,\n category: 'MANAGEMENT_FEE',\n direction: 'CREDIT',\n effective_date: '2019-12-27',\n event_type: 'LOSS_WRITE_OFF',\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(managementOperationTransaction);\n```", + perLanguage: { + go: { + method: 'client.ManagementOperations.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tmanagementOperationTransaction, err := client.ManagementOperations.New(context.TODO(), lithic.ManagementOperationNewParams{\n\t\tAmount: lithic.F(int64(1)),\n\t\tCategory: lithic.F(lithic.ManagementOperationNewParamsCategoryManagementFee),\n\t\tDirection: lithic.F(lithic.ManagementOperationNewParamsDirectionCredit),\n\t\tEffectiveDate: lithic.F(time.Now()),\n\t\tEventType: lithic.F(lithic.ManagementOperationNewParamsEventTypeLossWriteOff),\n\t\tFinancialAccountToken: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", managementOperationTransaction.UserDefinedID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/management_operations \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "amount": 1,\n "category": "MANAGEMENT_FEE",\n "direction": "CREDIT",\n "effective_date": "2019-12-27",\n "event_type": "LOSS_WRITE_OFF",\n "financial_account_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }\'', + }, + java: { + method: 'managementOperations().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ManagementOperationCreateParams;\nimport com.lithic.api.models.ManagementOperationTransaction;\nimport java.time.LocalDate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ManagementOperationCreateParams params = ManagementOperationCreateParams.builder()\n .amount(1L)\n .category(ManagementOperationCreateParams.ManagementOperationCategory.MANAGEMENT_FEE)\n .direction(ManagementOperationCreateParams.ManagementOperationDirection.CREDIT)\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .eventType(ManagementOperationCreateParams.ManagementOperationEventType.LOSS_WRITE_OFF)\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n ManagementOperationTransaction managementOperationTransaction = client.managementOperations().create(params);\n }\n}', + }, + kotlin: { + method: 'managementOperations().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ManagementOperationCreateParams\nimport com.lithic.api.models.ManagementOperationTransaction\nimport java.time.LocalDate\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: ManagementOperationCreateParams = ManagementOperationCreateParams.builder()\n .amount(1L)\n .category(ManagementOperationCreateParams.ManagementOperationCategory.MANAGEMENT_FEE)\n .direction(ManagementOperationCreateParams.ManagementOperationDirection.CREDIT)\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .eventType(ManagementOperationCreateParams.ManagementOperationEventType.LOSS_WRITE_OFF)\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build()\n val managementOperationTransaction: ManagementOperationTransaction = client.managementOperations().create(params)\n}', + }, + python: { + method: 'management_operations.create', + example: + 'import os\nfrom datetime import date\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)\nmanagement_operation_transaction = client.management_operations.create(\n amount=1,\n category="MANAGEMENT_FEE",\n direction="CREDIT",\n effective_date=date.fromisoformat("2019-12-27"),\n event_type="LOSS_WRITE_OFF",\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(management_operation_transaction.user_defined_id)', + }, + ruby: { + method: 'management_operations.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nmanagement_operation_transaction = lithic.management_operations.create(\n amount: 1,\n category: :MANAGEMENT_FEE,\n direction: :CREDIT,\n effective_date: "2019-12-27",\n event_type: :LOSS_WRITE_OFF,\n financial_account_token: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n)\n\nputs(management_operation_transaction)', + }, + typescript: { + method: 'client.managementOperations.create', + example: + "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\nconst managementOperationTransaction = await client.managementOperations.create({\n amount: 1,\n category: 'MANAGEMENT_FEE',\n direction: 'CREDIT',\n effective_date: '2019-12-27',\n event_type: 'LOSS_WRITE_OFF',\n financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(managementOperationTransaction.user_defined_id);", + }, + }, }, { name: 'retrieve', @@ -3023,30 +9318,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }", markdown: "## retrieve\n\n`client.managementOperations.retrieve(management_operation_token: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: object[]; external_resource?: external_resource; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: object; user_defined_id?: string; }`\n\n**get** `/v1/management_operations/{management_operation_token}`\n\nGet management operation\n\n### Parameters\n\n- `management_operation_token: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `direction?: 'CREDIT' | 'DEBIT'`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `family?: 'MANAGEMENT_OPERATION'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst managementOperationTransaction = await client.managementOperations.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(managementOperationTransaction);\n```", - }, - { - name: 'list', - endpoint: '/v1/management_operations', - httpMethod: 'get', - summary: 'List management operations', - description: 'List management operations', - stainlessPath: '(resource) management_operations > (method) list', - qualified: 'client.managementOperations.list', - params: [ - 'begin?: string;', - 'business_account_token?: string;', - 'category?: string;', - 'end?: string;', - 'ending_before?: string;', - 'financial_account_token?: string;', - 'page_size?: number;', - 'starting_after?: string;', - "status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED';", - ], - response: - "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }", - markdown: - "## list\n\n`client.managementOperations.list(begin?: string, business_account_token?: string, category?: string, end?: string, ending_before?: string, financial_account_token?: string, page_size?: number, starting_after?: string, status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: object[]; external_resource?: external_resource; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: object; user_defined_id?: string; }`\n\n**get** `/v1/management_operations`\n\nList management operations\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `business_account_token?: string`\n\n- `category?: string`\n Management operation category to be returned.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `financial_account_token?: string`\n Globally unique identifier for the financial account. Accepted type dependent on the program's use case.\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- `status?: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n Management operation status to be returned.\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `direction?: 'CREDIT' | 'DEBIT'`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `family?: 'MANAGEMENT_OPERATION'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n - `user_defined_id?: 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 managementOperationTransaction of client.managementOperations.list()) {\n console.log(managementOperationTransaction);\n}\n```", + perLanguage: { + go: { + method: 'client.ManagementOperations.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tmanagementOperationTransaction, err := client.ManagementOperations.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", managementOperationTransaction.UserDefinedID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/management_operations/$MANAGEMENT_OPERATION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'managementOperations().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ManagementOperationRetrieveParams;\nimport com.lithic.api.models.ManagementOperationTransaction;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ManagementOperationTransaction managementOperationTransaction = client.managementOperations().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'managementOperations().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ManagementOperationRetrieveParams\nimport com.lithic.api.models.ManagementOperationTransaction\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val managementOperationTransaction: ManagementOperationTransaction = client.managementOperations().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'management_operations.retrieve', + example: + '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)\nmanagement_operation_transaction = client.management_operations.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(management_operation_transaction.user_defined_id)', + }, + ruby: { + method: 'management_operations.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nmanagement_operation_transaction = lithic.management_operations.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(management_operation_transaction)', + }, + typescript: { + method: 'client.managementOperations.retrieve', + example: + "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\nconst managementOperationTransaction = await client.managementOperations.retrieve(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(managementOperationTransaction.user_defined_id);", + }, + }, }, { name: 'reverse', @@ -3061,20 +9368,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }", markdown: "## reverse\n\n`client.managementOperations.reverse(management_operation_token: string, effective_date: string, memo?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: object[]; external_resource?: external_resource; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: object; user_defined_id?: string; }`\n\n**post** `/v1/management_operations/{management_operation_token}/reverse`\n\nReverse a management operation\n\n### Parameters\n\n- `management_operation_token: string`\n\n- `effective_date: string`\n\n- `memo?: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: { external_resource_token: string; external_resource_type: external_resource_type; external_resource_sub_token?: string; }; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; }`\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `category?: string`\n - `currency?: string`\n - `direction?: 'CREDIT' | 'DEBIT'`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]`\n - `external_resource?: { external_resource_token: string; external_resource_type: 'STATEMENT' | 'COLLECTION' | 'DISPUTE' | 'UNKNOWN'; external_resource_sub_token?: string; }`\n - `family?: 'MANAGEMENT_OPERATION'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `settled_amount?: number`\n - `transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst managementOperationTransaction = await client.managementOperations.reverse('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { effective_date: '2019-12-27' });\n\nconsole.log(managementOperationTransaction);\n```", - }, - { - name: 'retrieve', - endpoint: '/v1/funding_events/{funding_event_token}', - httpMethod: 'get', - summary: 'Get funding event by ID', - description: 'Get funding event for program by id', - stainlessPath: '(resource) funding_events > (method) retrieve', - qualified: 'client.fundingEvents.retrieve', - params: ['funding_event_token: string;'], - response: - "{ token: string; collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'; collection_tokens: string[]; created: string; high_watermark: string; network_settlement_summary: { network_settlement_date: string; settled_gross_amount: number; }[]; previous_high_watermark: string; updated: string; }", - markdown: - "## retrieve\n\n`client.fundingEvents.retrieve(funding_event_token: string): { token: string; collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'; collection_tokens: string[]; created: string; high_watermark: string; network_settlement_summary: object[]; previous_high_watermark: string; updated: string; }`\n\n**get** `/v1/funding_events/{funding_event_token}`\n\nGet funding event for program by id\n\n### Parameters\n\n- `funding_event_token: string`\n\n### Returns\n\n- `{ token: string; collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'; collection_tokens: string[]; created: string; high_watermark: string; network_settlement_summary: { network_settlement_date: string; settled_gross_amount: number; }[]; previous_high_watermark: string; updated: string; }`\n\n - `token: string`\n - `collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'`\n - `collection_tokens: string[]`\n - `created: string`\n - `high_watermark: string`\n - `network_settlement_summary: { network_settlement_date: string; settled_gross_amount: number; }[]`\n - `previous_high_watermark: string`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst fundingEvent = await client.fundingEvents.retrieve('funding_event_token');\n\nconsole.log(fundingEvent);\n```", + perLanguage: { + go: { + method: 'client.ManagementOperations.Reverse', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tmanagementOperationTransaction, err := client.ManagementOperations.Reverse(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.ManagementOperationReverseParams{\n\t\t\tEffectiveDate: lithic.F(time.Now()),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", managementOperationTransaction.UserDefinedID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/management_operations/$MANAGEMENT_OPERATION_TOKEN/reverse \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "effective_date": "2019-12-27"\n }\'', + }, + java: { + method: 'managementOperations().reverse', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.ManagementOperationReverseParams;\nimport com.lithic.api.models.ManagementOperationTransaction;\nimport java.time.LocalDate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n ManagementOperationReverseParams params = ManagementOperationReverseParams.builder()\n .managementOperationToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build();\n ManagementOperationTransaction managementOperationTransaction = client.managementOperations().reverse(params);\n }\n}', + }, + kotlin: { + method: 'managementOperations().reverse', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.ManagementOperationReverseParams\nimport com.lithic.api.models.ManagementOperationTransaction\nimport java.time.LocalDate\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: ManagementOperationReverseParams = ManagementOperationReverseParams.builder()\n .managementOperationToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .effectiveDate(LocalDate.parse("2019-12-27"))\n .build()\n val managementOperationTransaction: ManagementOperationTransaction = client.managementOperations().reverse(params)\n}', + }, + python: { + method: 'management_operations.reverse', + example: + 'import os\nfrom datetime import date\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)\nmanagement_operation_transaction = client.management_operations.reverse(\n management_operation_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n effective_date=date.fromisoformat("2019-12-27"),\n)\nprint(management_operation_transaction.user_defined_id)', + }, + ruby: { + method: 'management_operations.reverse', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nmanagement_operation_transaction = lithic.management_operations.reverse("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", effective_date: "2019-12-27")\n\nputs(management_operation_transaction)', + }, + typescript: { + method: 'client.managementOperations.reverse', + example: + "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\nconst managementOperationTransaction = await client.managementOperations.reverse(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { effective_date: '2019-12-27' },\n);\n\nconsole.log(managementOperationTransaction.user_defined_id);", + }, + }, }, { name: 'list', @@ -3089,6 +9418,91 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'; collection_tokens: string[]; created: string; high_watermark: string; network_settlement_summary: { network_settlement_date: string; settled_gross_amount: number; }[]; previous_high_watermark: string; updated: string; }", markdown: "## list\n\n`client.fundingEvents.list(ending_before?: string, page_size?: number, starting_after?: string): { token: string; collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'; collection_tokens: string[]; created: string; high_watermark: string; network_settlement_summary: object[]; previous_high_watermark: string; updated: string; }`\n\n**get** `/v1/funding_events`\n\nGet all funding events for program\n\n### Parameters\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; collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'; collection_tokens: string[]; created: string; high_watermark: string; network_settlement_summary: { network_settlement_date: string; settled_gross_amount: number; }[]; previous_high_watermark: string; updated: string; }`\n\n - `token: string`\n - `collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'`\n - `collection_tokens: string[]`\n - `created: string`\n - `high_watermark: string`\n - `network_settlement_summary: { network_settlement_date: string; settled_gross_amount: number; }[]`\n - `previous_high_watermark: string`\n - `updated: 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 fundingEvent of client.fundingEvents.list()) {\n console.log(fundingEvent);\n}\n```", + perLanguage: { + go: { + method: 'client.FundingEvents.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.FundingEvents.List(context.TODO(), lithic.FundingEventListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v1/funding_events \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'fundingEvents().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FundingEventListPage;\nimport com.lithic.api.models.FundingEventListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FundingEventListPage page = client.fundingEvents().list();\n }\n}', + }, + kotlin: { + method: 'fundingEvents().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FundingEventListPage\nimport com.lithic.api.models.FundingEventListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: FundingEventListPage = client.fundingEvents().list()\n}', + }, + python: { + method: 'funding_events.list', + example: + '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.funding_events.list()\npage = page.data[0]\nprint(page.token)', + }, + ruby: { + method: 'funding_events.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.funding_events.list\n\nputs(page)', + }, + typescript: { + method: 'client.fundingEvents.list', + example: + "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 fundingEvent of client.fundingEvents.list()) {\n console.log(fundingEvent.token);\n}", + }, + }, + }, + { + name: 'retrieve', + endpoint: '/v1/funding_events/{funding_event_token}', + httpMethod: 'get', + summary: 'Get funding event by ID', + description: 'Get funding event for program by id', + stainlessPath: '(resource) funding_events > (method) retrieve', + qualified: 'client.fundingEvents.retrieve', + params: ['funding_event_token: string;'], + response: + "{ token: string; collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'; collection_tokens: string[]; created: string; high_watermark: string; network_settlement_summary: { network_settlement_date: string; settled_gross_amount: number; }[]; previous_high_watermark: string; updated: string; }", + markdown: + "## retrieve\n\n`client.fundingEvents.retrieve(funding_event_token: string): { token: string; collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'; collection_tokens: string[]; created: string; high_watermark: string; network_settlement_summary: object[]; previous_high_watermark: string; updated: string; }`\n\n**get** `/v1/funding_events/{funding_event_token}`\n\nGet funding event for program by id\n\n### Parameters\n\n- `funding_event_token: string`\n\n### Returns\n\n- `{ token: string; collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'; collection_tokens: string[]; created: string; high_watermark: string; network_settlement_summary: { network_settlement_date: string; settled_gross_amount: number; }[]; previous_high_watermark: string; updated: string; }`\n\n - `token: string`\n - `collection_resource_type: 'BOOK_TRANSFER' | 'PAYMENT'`\n - `collection_tokens: string[]`\n - `created: string`\n - `high_watermark: string`\n - `network_settlement_summary: { network_settlement_date: string; settled_gross_amount: number; }[]`\n - `previous_high_watermark: string`\n - `updated: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst fundingEvent = await client.fundingEvents.retrieve('funding_event_token');\n\nconsole.log(fundingEvent);\n```", + perLanguage: { + go: { + method: 'client.FundingEvents.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tfundingEvent, err := client.FundingEvents.Get(context.TODO(), "funding_event_token")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", fundingEvent.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/funding_events/$FUNDING_EVENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'fundingEvents().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FundingEvent;\nimport com.lithic.api.models.FundingEventRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FundingEvent fundingEvent = client.fundingEvents().retrieve("funding_event_token");\n }\n}', + }, + kotlin: { + method: 'fundingEvents().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FundingEvent\nimport com.lithic.api.models.FundingEventRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val fundingEvent: FundingEvent = client.fundingEvents().retrieve("funding_event_token")\n}', + }, + python: { + method: 'funding_events.retrieve', + example: + '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)\nfunding_event = client.funding_events.retrieve(\n "funding_event_token",\n)\nprint(funding_event.token)', + }, + ruby: { + method: 'funding_events.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nfunding_event = lithic.funding_events.retrieve("funding_event_token")\n\nputs(funding_event)', + }, + typescript: { + method: 'client.fundingEvents.retrieve', + example: + "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\nconst fundingEvent = await client.fundingEvents.retrieve('funding_event_token');\n\nconsole.log(fundingEvent.token);", + }, + }, }, { name: 'retrieve_details', @@ -3102,6 +9516,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: '{ token: string; settlement_details_url: string; settlement_summary_url: string; }', markdown: "## retrieve_details\n\n`client.fundingEvents.retrieveDetails(funding_event_token: string): { token: string; settlement_details_url: string; settlement_summary_url: string; }`\n\n**get** `/v1/funding_events/{funding_event_token}/details`\n\nGet funding event details by id\n\n### Parameters\n\n- `funding_event_token: string`\n\n### Returns\n\n- `{ token: string; settlement_details_url: string; settlement_summary_url: string; }`\n\n - `token: string`\n - `settlement_details_url: string`\n - `settlement_summary_url: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.fundingEvents.retrieveDetails('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.FundingEvents.GetDetails', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.FundingEvents.GetDetails(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Token)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/funding_events/$FUNDING_EVENT_TOKEN/details \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'fundingEvents().retrieveDetails', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FundingEventRetrieveDetailsParams;\nimport com.lithic.api.models.FundingEventRetrieveDetailsResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FundingEventRetrieveDetailsResponse response = client.fundingEvents().retrieveDetails("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'fundingEvents().retrieveDetails', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FundingEventRetrieveDetailsParams\nimport com.lithic.api.models.FundingEventRetrieveDetailsResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val response: FundingEventRetrieveDetailsResponse = client.fundingEvents().retrieveDetails("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'funding_events.retrieve_details', + example: + '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)\nresponse = client.funding_events.retrieve_details(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.token)', + }, + ruby: { + method: 'funding_events.retrieve_details', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.funding_events.retrieve_details("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(response)', + }, + typescript: { + method: 'client.fundingEvents.retrieveDetails', + example: + "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\nconst response = await client.fundingEvents.retrieveDetails('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.token);", + }, + }, }, { name: 'retrieve', @@ -3117,6 +9567,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT' | 'NO_REPORTED_FRAUD'; transaction_token: string; comment?: string; created_at?: string; fraud_type?: string; updated_at?: string; }", markdown: "## retrieve\n\n`client.fraud.transactions.retrieve(transaction_token: string): { fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT' | 'NO_REPORTED_FRAUD'; transaction_token: string; comment?: string; created_at?: string; fraud_type?: string; updated_at?: string; }`\n\n**get** `/v1/fraud/transactions/{transaction_token}`\n\nRetrieve a fraud report for a specific transaction identified by its unique transaction token.\n\n\n### Parameters\n\n- `transaction_token: string`\n\n### Returns\n\n- `{ fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT' | 'NO_REPORTED_FRAUD'; transaction_token: string; comment?: string; created_at?: string; fraud_type?: string; updated_at?: string; }`\n\n - `fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT' | 'NO_REPORTED_FRAUD'`\n - `transaction_token: string`\n - `comment?: string`\n - `created_at?: string`\n - `fraud_type?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst transaction = await client.fraud.transactions.retrieve('00000000-0000-0000-0000-000000000000');\n\nconsole.log(transaction);\n```", + perLanguage: { + go: { + method: 'client.Fraud.Transactions.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\ttransaction, err := client.Fraud.Transactions.Get(context.TODO(), "00000000-0000-0000-0000-000000000000")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", transaction.FraudStatus)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/fraud/transactions/$TRANSACTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'fraud().transactions().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FraudTransactionRetrieveParams;\nimport com.lithic.api.models.TransactionRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n TransactionRetrieveResponse transaction = client.fraud().transactions().retrieve("00000000-0000-0000-0000-000000000000");\n }\n}', + }, + kotlin: { + method: 'fraud().transactions().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FraudTransactionRetrieveParams\nimport com.lithic.api.models.TransactionRetrieveResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val transaction: TransactionRetrieveResponse = client.fraud().transactions().retrieve("00000000-0000-0000-0000-000000000000")\n}', + }, + python: { + method: 'fraud.transactions.retrieve', + example: + '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)\ntransaction = client.fraud.transactions.retrieve(\n "00000000-0000-0000-0000-000000000000",\n)\nprint(transaction.fraud_status)', + }, + ruby: { + method: 'fraud.transactions.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\ntransaction = lithic.fraud.transactions.retrieve("00000000-0000-0000-0000-000000000000")\n\nputs(transaction)', + }, + typescript: { + method: 'client.fraud.transactions.retrieve', + example: + "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\nconst transaction = await client.fraud.transactions.retrieve(\n '00000000-0000-0000-0000-000000000000',\n);\n\nconsole.log(transaction.fraud_status);", + }, + }, }, { name: 'report', @@ -3137,6 +9623,92 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT' | 'NO_REPORTED_FRAUD'; transaction_token: string; comment?: string; created_at?: string; fraud_type?: string; updated_at?: string; }", markdown: "## report\n\n`client.fraud.transactions.report(transaction_token: string, fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT', comment?: string, fraud_type?: string): { fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT' | 'NO_REPORTED_FRAUD'; transaction_token: string; comment?: string; created_at?: string; fraud_type?: string; updated_at?: string; }`\n\n**post** `/v1/fraud/transactions/{transaction_token}`\n\nReport fraud for a specific transaction token by providing details such as fraud type, fraud status, and any additional comments.\n\n\n### Parameters\n\n- `transaction_token: string`\n\n- `fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT'`\n The fraud status of the transaction, string (enum) supporting the following values:\n\n - `SUSPECTED_FRAUD`: The transaction is suspected to be fraudulent, but this hasn’t been confirmed.\n - `FRAUDULENT`: The transaction is confirmed to be fraudulent. A transaction may immediately be moved into this state, or be graduated into this state from the `SUSPECTED_FRAUD` state.\n - `NOT_FRAUDULENT`: The transaction is (explicitly) marked as not fraudulent. A transaction may immediately be moved into this state, or be graduated into this state from the `SUSPECTED_FRAUD` state.\n\n- `comment?: string`\n Optional field providing additional information or context about why the transaction is considered fraudulent.\n\n- `fraud_type?: string`\n Specifies the type or category of fraud that the transaction is suspected or confirmed to involve, string (enum) supporting the following values:\n\n - `FIRST_PARTY_FRAUD`: First-party fraud occurs when a legitimate account or cardholder intentionally misuses financial services for personal gain. This includes actions such as disputing legitimate transactions to obtain a refund, abusing return policies, or defaulting on credit obligations without intent to repay.\n - `ACCOUNT_TAKEOVER`: Account takeover fraud occurs when a fraudster gains unauthorized access to an existing account, modifies account settings, and carries out fraudulent transactions.\n - `CARD_COMPROMISED`: Card compromised fraud occurs when a fraudster gains access to card details without taking over the account, such as through physical card theft, cloning, or online data breaches.\n - `IDENTITY_THEFT`: Identity theft fraud occurs when a fraudster uses stolen personal information, such as Social Security numbers or addresses, to open accounts, apply for loans, or conduct financial transactions in someone's name.\n - `CARDHOLDER_MANIPULATION`: This type of fraud occurs when a fraudster manipulates or coerces a legitimate cardholder into unauthorized transactions, often through social engineering tactics.\n\n### Returns\n\n- `{ fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT' | 'NO_REPORTED_FRAUD'; transaction_token: string; comment?: string; created_at?: string; fraud_type?: string; updated_at?: string; }`\n\n - `fraud_status: 'SUSPECTED_FRAUD' | 'FRAUDULENT' | 'NOT_FRAUDULENT' | 'NO_REPORTED_FRAUD'`\n - `transaction_token: string`\n - `comment?: string`\n - `created_at?: string`\n - `fraud_type?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.fraud.transactions.report('00000000-0000-0000-0000-000000000000', { fraud_status: 'SUSPECTED_FRAUD' });\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.Fraud.Transactions.Report', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.Fraud.Transactions.Report(\n\t\tcontext.TODO(),\n\t\t"00000000-0000-0000-0000-000000000000",\n\t\tlithic.FraudTransactionReportParams{\n\t\t\tFraudStatus: lithic.F(lithic.FraudTransactionReportParamsFraudStatusSuspectedFraud),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.FraudStatus)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/fraud/transactions/$TRANSACTION_TOKEN \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "fraud_status": "SUSPECTED_FRAUD"\n }\'', + }, + java: { + method: 'fraud().transactions().report', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.FraudTransactionReportParams;\nimport com.lithic.api.models.TransactionReportResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n FraudTransactionReportParams params = FraudTransactionReportParams.builder()\n .transactionToken("00000000-0000-0000-0000-000000000000")\n .fraudStatus(FraudTransactionReportParams.FraudStatus.SUSPECTED_FRAUD)\n .build();\n TransactionReportResponse response = client.fraud().transactions().report(params);\n }\n}', + }, + kotlin: { + method: 'fraud().transactions().report', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.FraudTransactionReportParams\nimport com.lithic.api.models.TransactionReportResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: FraudTransactionReportParams = FraudTransactionReportParams.builder()\n .transactionToken("00000000-0000-0000-0000-000000000000")\n .fraudStatus(FraudTransactionReportParams.FraudStatus.SUSPECTED_FRAUD)\n .build()\n val response: TransactionReportResponse = client.fraud().transactions().report(params)\n}', + }, + python: { + method: 'fraud.transactions.report', + example: + '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)\nresponse = client.fraud.transactions.report(\n transaction_token="00000000-0000-0000-0000-000000000000",\n fraud_status="SUSPECTED_FRAUD",\n)\nprint(response.fraud_status)', + }, + ruby: { + method: 'fraud.transactions.report', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.fraud.transactions.report("00000000-0000-0000-0000-000000000000", fraud_status: :SUSPECTED_FRAUD)\n\nputs(response)', + }, + typescript: { + method: 'client.fraud.transactions.report', + example: + "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\nconst response = await client.fraud.transactions.report('00000000-0000-0000-0000-000000000000', {\n fraud_status: 'SUSPECTED_FRAUD',\n});\n\nconsole.log(response.fraud_status);", + }, + }, + }, + { + name: 'list', + endpoint: '/v1/network_programs', + httpMethod: 'get', + summary: 'List network programs', + description: 'List network programs.', + stainlessPath: '(resource) network_programs > (method) list', + qualified: 'client.networkPrograms.list', + params: ['begin?: string;', 'end?: string;', 'page_size?: number;'], + response: + '{ token: string; default_product_code: string; name: string; registered_program_identification_number: string; }', + markdown: + "## list\n\n`client.networkPrograms.list(begin?: string, end?: string, page_size?: number): { token: string; default_product_code: string; name: string; registered_program_identification_number: string; }`\n\n**get** `/v1/network_programs`\n\nList network programs.\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\n\n- `page_size?: number`\n Page size (for pagination).\n\n### Returns\n\n- `{ token: string; default_product_code: string; name: string; registered_program_identification_number: string; }`\n\n - `token: string`\n - `default_product_code: string`\n - `name: string`\n - `registered_program_identification_number: 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 networkProgram of client.networkPrograms.list()) {\n console.log(networkProgram);\n}\n```", + perLanguage: { + go: { + method: 'client.NetworkPrograms.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.NetworkPrograms.List(context.TODO(), lithic.NetworkProgramListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/network_programs \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'networkPrograms().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.NetworkProgramListPage;\nimport com.lithic.api.models.NetworkProgramListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n NetworkProgramListPage page = client.networkPrograms().list();\n }\n}', + }, + kotlin: { + method: 'networkPrograms().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.NetworkProgramListPage\nimport com.lithic.api.models.NetworkProgramListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: NetworkProgramListPage = client.networkPrograms().list()\n}', + }, + python: { + method: 'network_programs.list', + example: + '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.network_programs.list()\npage = page.data[0]\nprint(page.registered_program_identification_number)', + }, + ruby: { + method: 'network_programs.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.network_programs.list\n\nputs(page)', + }, + typescript: { + method: 'client.networkPrograms.list', + example: + "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 networkProgram of client.networkPrograms.list()) {\n console.log(networkProgram.registered_program_identification_number);\n}", + }, + }, }, { name: 'retrieve', @@ -3151,20 +9723,100 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ token: string; default_product_code: string; name: string; registered_program_identification_number: string; }', markdown: "## retrieve\n\n`client.networkPrograms.retrieve(network_program_token: string): { token: string; default_product_code: string; name: string; registered_program_identification_number: string; }`\n\n**get** `/v1/network_programs/{network_program_token}`\n\nGet network program.\n\n### Parameters\n\n- `network_program_token: string`\n\n### Returns\n\n- `{ token: string; default_product_code: string; name: string; registered_program_identification_number: string; }`\n\n - `token: string`\n - `default_product_code: string`\n - `name: string`\n - `registered_program_identification_number: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst networkProgram = await client.networkPrograms.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(networkProgram);\n```", + perLanguage: { + go: { + method: 'client.NetworkPrograms.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tnetworkProgram, err := client.NetworkPrograms.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", networkProgram.RegisteredProgramIdentificationNumber)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/network_programs/$NETWORK_PROGRAM_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'networkPrograms().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.NetworkProgram;\nimport com.lithic.api.models.NetworkProgramRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n NetworkProgram networkProgram = client.networkPrograms().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'networkPrograms().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.NetworkProgram\nimport com.lithic.api.models.NetworkProgramRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val networkProgram: NetworkProgram = client.networkPrograms().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'network_programs.retrieve', + example: + '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)\nnetwork_program = client.network_programs.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(network_program.registered_program_identification_number)', + }, + ruby: { + method: 'network_programs.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nnetwork_program = lithic.network_programs.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(network_program)', + }, + typescript: { + method: 'client.networkPrograms.retrieve', + example: + "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\nconst networkProgram = await client.networkPrograms.retrieve(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(networkProgram.registered_program_identification_number);", + }, + }, }, { name: 'list', - endpoint: '/v1/network_programs', + endpoint: '/v1/financial_accounts/{financial_account_token}/holds', httpMethod: 'get', - summary: 'List network programs', - description: 'List network programs.', - stainlessPath: '(resource) network_programs > (method) list', - qualified: 'client.networkPrograms.list', - params: ['begin?: string;', 'end?: string;', 'page_size?: number;'], + summary: 'List holds', + description: 'List holds for a financial account.', + stainlessPath: '(resource) holds > (method) list', + qualified: 'client.holds.list', + params: [ + 'financial_account_token: string;', + 'begin?: string;', + 'end?: string;', + 'ending_before?: string;', + 'page_size?: number;', + 'starting_after?: string;', + "status?: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED';", + ], response: - '{ token: string; default_product_code: string; name: string; registered_program_identification_number: string; }', + "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }", markdown: - "## list\n\n`client.networkPrograms.list(begin?: string, end?: string, page_size?: number): { token: string; default_product_code: string; name: string; registered_program_identification_number: string; }`\n\n**get** `/v1/network_programs`\n\nList network programs.\n\n### Parameters\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\n\n- `page_size?: number`\n Page size (for pagination).\n\n### Returns\n\n- `{ token: string; default_product_code: string; name: string; registered_program_identification_number: string; }`\n\n - `token: string`\n - `default_product_code: string`\n - `name: string`\n - `registered_program_identification_number: 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 networkProgram of client.networkPrograms.list()) {\n console.log(networkProgram);\n}\n```", + "## list\n\n`client.holds.list(financial_account_token: string, begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string, status?: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED'): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: hold_event[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/holds`\n\nList holds for a financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `status?: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED'`\n Hold status to filter by.\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n A hold transaction representing reserved funds on a financial account. Holds move funds from available to pending balance in anticipation of future payments. They can be resolved via settlement (linked to payment), manual release, or expiration.\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]`\n - `expiration_datetime?: string`\n - `family?: 'HOLD'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `user_defined_id?: 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 hold of client.holds.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(hold);\n}\n```", + perLanguage: { + go: { + method: 'client.Holds.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.Holds.List(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.HoldListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/holds \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'holds().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.HoldListPage;\nimport com.lithic.api.models.HoldListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n HoldListPage page = client.holds().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'holds().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.HoldListPage\nimport com.lithic.api.models.HoldListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: HoldListPage = client.holds().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'holds.list', + example: + '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.holds.list(\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\npage = page.data[0]\nprint(page.user_defined_id)', + }, + ruby: { + method: 'holds.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.holds.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(page)', + }, + typescript: { + method: 'client.holds.list', + example: + "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 hold of client.holds.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(hold.user_defined_id);\n}", + }, + }, }, { name: 'create', @@ -3187,6 +9839,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }", markdown: "## create\n\n`client.holds.create(financial_account_token: string, amount: number, token?: string, expiration_datetime?: string, memo?: string, user_defined_id?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: hold_event[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n\n**post** `/v1/financial_accounts/{financial_account_token}/holds`\n\nCreate a hold on a financial account. Holds reserve funds by moving them\nfrom available to pending balance. They can be resolved via settlement\n(linked to a payment or book transfer), voiding, or expiration.\n\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `amount: number`\n Amount to hold in cents\n\n- `token?: string`\n Customer-provided token for idempotency. Becomes the hold token.\n\n- `expiration_datetime?: string`\n When the hold should auto-expire\n\n- `memo?: string`\n Reason for the hold\n\n- `user_defined_id?: string`\n User-provided identifier for the hold\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n A hold transaction representing reserved funds on a financial account. Holds move funds from available to pending balance in anticipation of future payments. They can be resolved via settlement (linked to payment), manual release, or expiration.\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]`\n - `expiration_datetime?: string`\n - `family?: 'HOLD'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst hold = await client.holds.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { amount: 1 });\n\nconsole.log(hold);\n```", + perLanguage: { + go: { + method: 'client.Holds.New', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\thold, err := client.Holds.New(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.HoldNewParams{\n\t\t\tAmount: lithic.F(int64(1)),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", hold.UserDefinedID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/holds \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "amount": 1\n }\'', + }, + java: { + method: 'holds().create', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Hold;\nimport com.lithic.api.models.HoldCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n HoldCreateParams params = HoldCreateParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .amount(1L)\n .build();\n Hold hold = client.holds().create(params);\n }\n}', + }, + kotlin: { + method: 'holds().create', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Hold\nimport com.lithic.api.models.HoldCreateParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: HoldCreateParams = HoldCreateParams.builder()\n .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .amount(1L)\n .build()\n val hold: Hold = client.holds().create(params)\n}', + }, + python: { + method: 'holds.create', + example: + '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)\nhold = client.holds.create(\n financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n amount=1,\n)\nprint(hold.user_defined_id)', + }, + ruby: { + method: 'holds.create', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nhold = lithic.holds.create("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", amount: 1)\n\nputs(hold)', + }, + typescript: { + method: 'client.holds.create', + example: + "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\nconst hold = await client.holds.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { amount: 1 });\n\nconsole.log(hold.user_defined_id);", + }, + }, }, { name: 'retrieve', @@ -3201,28 +9889,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }", markdown: "## retrieve\n\n`client.holds.retrieve(hold_token: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: hold_event[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n\n**get** `/v1/holds/{hold_token}`\n\nGet hold by token.\n\n### Parameters\n\n- `hold_token: string`\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n A hold transaction representing reserved funds on a financial account. Holds move funds from available to pending balance in anticipation of future payments. They can be resolved via settlement (linked to payment), manual release, or expiration.\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]`\n - `expiration_datetime?: string`\n - `family?: 'HOLD'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst hold = await client.holds.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(hold);\n```", - }, - { - name: 'list', - endpoint: '/v1/financial_accounts/{financial_account_token}/holds', - httpMethod: 'get', - summary: 'List holds', - description: 'List holds for a financial account.', - stainlessPath: '(resource) holds > (method) list', - qualified: 'client.holds.list', - params: [ - 'financial_account_token: string;', - 'begin?: string;', - 'end?: string;', - 'ending_before?: string;', - 'page_size?: number;', - 'starting_after?: string;', - "status?: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED';", - ], - response: - "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }", - markdown: - "## list\n\n`client.holds.list(financial_account_token: string, begin?: string, end?: string, ending_before?: string, page_size?: number, starting_after?: string, status?: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED'): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: hold_event[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/holds`\n\nList holds for a financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `status?: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED'`\n Hold status to filter by.\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n A hold transaction representing reserved funds on a financial account. Holds move funds from available to pending balance in anticipation of future payments. They can be resolved via settlement (linked to payment), manual release, or expiration.\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]`\n - `expiration_datetime?: string`\n - `family?: 'HOLD'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `user_defined_id?: 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 hold of client.holds.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(hold);\n}\n```", + perLanguage: { + go: { + method: 'client.Holds.Get', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\thold, err := client.Holds.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", hold.UserDefinedID)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/holds/$HOLD_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'holds().retrieve', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Hold;\nimport com.lithic.api.models.HoldRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n Hold hold = client.holds().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'holds().retrieve', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Hold\nimport com.lithic.api.models.HoldRetrieveParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val hold: Hold = client.holds().retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'holds.retrieve', + example: + '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)\nhold = client.holds.retrieve(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(hold.user_defined_id)', + }, + ruby: { + method: 'holds.retrieve', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nhold = lithic.holds.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(hold)', + }, + typescript: { + method: 'client.holds.retrieve', + example: + "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\nconst hold = await client.holds.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(hold.user_defined_id);", + }, + }, }, { name: 'void', @@ -3238,6 +9940,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }", markdown: "## void\n\n`client.holds.void(hold_token: string, memo?: string): { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: hold_event[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n\n**post** `/v1/holds/{hold_token}/void`\n\nVoid an active hold. This returns the held funds from pending back to\navailable balance. Only holds in PENDING status can be voided.\n\n\n### Parameters\n\n- `hold_token: string`\n\n- `memo?: string`\n Reason for voiding the hold\n\n### Returns\n\n- `{ token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n A hold transaction representing reserved funds on a financial account. Holds move funds from available to pending balance in anticipation of future payments. They can be resolved via settlement (linked to payment), manual release, or expiration.\n\n - `token: string`\n - `created: string`\n - `status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'`\n - `updated: string`\n - `currency?: string`\n - `events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; memo: string; result: 'APPROVED' | 'DECLINED'; settling_transaction_token: string; type: 'HOLD_INITIATED' | 'HOLD_VOIDED' | 'HOLD_EXPIRED' | 'HOLD_SETTLED'; }[]`\n - `expiration_datetime?: string`\n - `family?: 'HOLD'`\n - `financial_account_token?: string`\n - `pending_amount?: number`\n - `result?: 'APPROVED' | 'DECLINED'`\n - `user_defined_id?: string`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst hold = await client.holds.void('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(hold);\n```", + perLanguage: { + go: { + method: 'client.Holds.Void', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\thold, err := client.Holds.Void(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.HoldVoidParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", hold.UserDefinedID)\n}\n', + }, + http: { + example: + "curl https://api.lithic.com/v1/holds/$HOLD_TOKEN/void \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", + }, + java: { + method: 'holds().void_', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Hold;\nimport com.lithic.api.models.HoldVoidParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n Hold hold = client.holds().void_("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'holds().void', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Hold\nimport com.lithic.api.models.HoldVoidParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val hold: Hold = client.holds().void("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'holds.void', + example: + '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)\nhold = client.holds.void(\n hold_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(hold.user_defined_id)', + }, + ruby: { + method: 'holds.void', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nhold = lithic.holds.void("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(hold)', + }, + typescript: { + method: 'client.holds.void', + example: + "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\nconst hold = await client.holds.void('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(hold.user_defined_id);", + }, + }, }, { name: 'list', @@ -3264,6 +10002,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; category: string; created: string; currency: string; descriptor: string; events: financial_event[]; family: 'INTERNAL'; financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; } | object | object | object | object | object | object", markdown: "## list\n\n`client.accountActivity.list(account_token?: string, begin?: string, business_account_token?: string, category?: string, end?: string, ending_before?: string, financial_account_token?: string, page_size?: number, result?: 'APPROVED' | 'DECLINED', starting_after?: string, status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'REVERSED' | 'SETTLED' | 'VOIDED'): { token: string; category: string; created: string; currency: string; descriptor: string; events: financial_event[]; family: 'INTERNAL'; financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; } | object | object | object | object | object | object`\n\n**get** `/v1/account_activity`\n\nRetrieve a list of transactions across all public accounts.\n\n### Parameters\n\n- `account_token?: string`\n Filter by account token\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified time will be included. UTC time zone.\n\n- `business_account_token?: string`\n Filter by business account token\n\n- `category?: string`\n Filter by transaction category\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified time will be included. UTC time zone.\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- `financial_account_token?: string`\n Filter by financial account token\n\n- `page_size?: number`\n Page size (for pagination).\n\n- `result?: 'APPROVED' | 'DECLINED'`\n Filter by transaction result\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- `status?: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'RETURNED' | 'REVERSED' | 'SETTLED' | 'VOIDED'`\n Filter by transaction status\n\n### Returns\n\n- `{ token: string; category: string; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; family: 'INTERNAL'; financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; } | { token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: object; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; } | { token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: { cardholder: object; hold: object; merchant: object; settlement: object; }; authorization_amount: number; authorization_code: string; avs: { address: string; zipcode: string; }; card_token: string; cardholder_authentication: object; created: string; financial_account_token: string; merchant: object; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: { entry_mode: object; terminal: object; }; result: string; service_location: { city: string; country: string; postal_code: string; state: string; street_address: string; }; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: object; updated: string; events?: { token: string; amount: number; amounts: object; created: string; detailed_results: string[]; effective_polarity: 'CREDIT' | 'DEBIT'; network_info: object; result: string; rule_results: object[]; type: string; account_type?: 'CHECKING' | 'SAVINGS'; network_specific_data?: object; }[]; } | { token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: wire_party_details; debtor?: wire_party_details; message_id?: string; remittance_information?: string; }; pending_amount: number; related_account_tokens: { account_token: string; business_account_token: string; }; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; } | { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; } | { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: object; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; } | { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: object[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n Response containing multiple transaction types. The `family` field determines which transaction type is returned: INTERNAL returns FinancialTransaction, TRANSFER returns BookTransferTransaction, CARD returns CardTransaction, PAYMENT returns PaymentTransaction, EXTERNAL_PAYMENT returns ExternalPaymentResponse, MANAGEMENT_OPERATION returns ManagementOperationTransaction, and HOLD returns HoldTransaction\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 accountActivityListResponse of client.accountActivity.list()) {\n console.log(accountActivityListResponse);\n}\n```", + perLanguage: { + go: { + method: 'client.AccountActivity.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.AccountActivity.List(context.TODO(), lithic.AccountActivityListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/account_activity \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'accountActivity().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AccountActivityListPage;\nimport com.lithic.api.models.AccountActivityListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AccountActivityListPage page = client.accountActivity().list();\n }\n}', + }, + kotlin: { + method: 'accountActivity().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AccountActivityListPage\nimport com.lithic.api.models.AccountActivityListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: AccountActivityListPage = client.accountActivity().list()\n}', + }, + python: { + method: 'account_activity.list', + example: + '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.account_activity.list()\npage = page.data[0]\nprint(page)', + }, + ruby: { + method: 'account_activity.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.account_activity.list\n\nputs(page)', + }, + typescript: { + method: 'client.accountActivity.list', + example: + "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 accountActivityListResponse of client.accountActivity.list()) {\n console.log(accountActivityListResponse);\n}", + }, + }, }, { name: 'retrieve_transaction', @@ -3278,6 +10052,42 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "{ token: string; category: string; created: string; currency: string; descriptor: string; events: financial_event[]; family: 'INTERNAL'; financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; } | object | object | object | object | object | object", markdown: "## retrieve_transaction\n\n`client.accountActivity.retrieveTransaction(transaction_token: string): { token: string; category: string; created: string; currency: string; descriptor: string; events: financial_event[]; family: 'INTERNAL'; financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; } | object | object | object | object | object | object`\n\n**get** `/v1/account_activity/{transaction_token}`\n\nRetrieve a single transaction\n\n### Parameters\n\n- `transaction_token: string`\n\n### Returns\n\n- `{ token: string; category: string; created: string; currency: string; descriptor: string; events: { token?: string; amount?: number; created?: string; result?: 'APPROVED' | 'DECLINED'; type?: string; }[]; family: 'INTERNAL'; financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; } | { token: string; category: string; created: string; currency: string; events: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'FUNDS_INSUFFICIENT'[]; memo: string; result: 'APPROVED' | 'DECLINED'; subtype: string; type: string; }[]; family: 'TRANSFER'; from_financial_account_token: string; pending_amount: number; result: 'APPROVED' | 'DECLINED'; settled_amount: number; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; to_financial_account_token: string; updated: string; external_id?: string; external_resource?: object; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; } | { token: string; account_token: string; acquirer_fee: number; acquirer_reference_number: string; amount: number; amounts: { cardholder: object; hold: object; merchant: object; settlement: object; }; authorization_amount: number; authorization_code: string; avs: { address: string; zipcode: string; }; card_token: string; cardholder_authentication: object; created: string; financial_account_token: string; merchant: object; merchant_amount: number; merchant_authorization_amount: number; merchant_currency: string; network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; network_risk_score: number; pos: { entry_mode: object; terminal: object; }; result: string; service_location: { city: string; country: string; postal_code: string; state: string; street_address: string; }; settled_amount: number; status: 'DECLINED' | 'EXPIRED' | 'PENDING' | 'SETTLED' | 'VOIDED'; tags: object; token_info: object; updated: string; events?: { token: string; amount: number; amounts: object; created: string; detailed_results: string[]; effective_polarity: 'CREDIT' | 'DEBIT'; network_info: object; result: string; rule_results: object[]; type: string; account_type?: 'CHECKING' | 'SAVINGS'; network_specific_data?: object; }[]; } | { token: string; category: string; created: string; descriptor: string; direction: 'CREDIT' | 'DEBIT'; events: { token: string; amount: number; created: string; result: 'APPROVED' | 'DECLINED'; type: string; detailed_results?: string[]; external_id?: string; }[]; family: 'PAYMENT'; financial_account_token: string; method: 'ACH_NEXT_DAY' | 'ACH_SAME_DAY' | 'WIRE'; method_attributes: { sec_code: 'CCD' | 'PPD' | 'WEB' | 'TEL' | 'CIE' | 'CTX'; ach_hold_period?: number; addenda?: string; company_id?: string; override_company_name?: string; receipt_routing_number?: string; retries?: number; return_reason_code?: string; trace_numbers?: string[]; } | { wire_message_type: string; wire_network: 'FEDWIRE' | 'SWIFT'; creditor?: wire_party_details; debtor?: wire_party_details; message_id?: string; remittance_information?: string; }; pending_amount: number; related_account_tokens: { account_token: string; business_account_token: string; }; result: 'APPROVED' | 'DECLINED'; settled_amount: number; source: 'LITHIC' | 'EXTERNAL' | 'CUSTOMER'; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; expected_release_date?: string; external_bank_account_token?: string; type?: string; user_defined_id?: string; } | { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; }[]; family?: 'EXTERNAL_PAYMENT'; financial_account_token?: string; payment_type?: 'DEPOSIT' | 'WITHDRAWAL'; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; user_defined_id?: string; } | { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; category?: string; currency?: string; direction?: 'CREDIT' | 'DEBIT'; events?: { token: string; amount: number; created: string; detailed_results: 'APPROVED' | 'INSUFFICIENT_FUNDS'[]; effective_date: string; memo: string; result: 'APPROVED' | 'DECLINED'; type: string; subtype?: string; }[]; external_resource?: object; family?: 'MANAGEMENT_OPERATION'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; settled_amount?: number; transaction_series?: { related_transaction_event_token: string; related_transaction_token: string; type: string; }; user_defined_id?: string; } | { token: string; created: string; status: 'PENDING' | 'SETTLED' | 'EXPIRED' | 'VOIDED' | 'DECLINED' | 'REVERSED' | 'CANCELED' | 'RETURNED'; updated: string; currency?: string; events?: object[]; expiration_datetime?: string; family?: 'HOLD'; financial_account_token?: string; pending_amount?: number; result?: 'APPROVED' | 'DECLINED'; user_defined_id?: string; }`\n Response containing multiple transaction types. The `family` field determines which transaction type is returned: INTERNAL returns FinancialTransaction, TRANSFER returns BookTransferTransaction, CARD returns CardTransaction, PAYMENT returns PaymentTransaction, EXTERNAL_PAYMENT returns ExternalPaymentResponse, MANAGEMENT_OPERATION returns ManagementOperationTransaction, and HOLD returns HoldTransaction\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst response = await client.accountActivity.retrieveTransaction('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", + perLanguage: { + go: { + method: 'client.AccountActivity.GetTransaction', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tresponse, err := client.AccountActivity.GetTransaction(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n', + }, + http: { + example: + 'curl https://api.lithic.com/v1/account_activity/$TRANSACTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'accountActivity().retrieveTransaction', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.AccountActivityRetrieveTransactionParams;\nimport com.lithic.api.models.AccountActivityRetrieveTransactionResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n AccountActivityRetrieveTransactionResponse response = client.accountActivity().retrieveTransaction("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', + }, + kotlin: { + method: 'accountActivity().retrieveTransaction', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.AccountActivityRetrieveTransactionParams\nimport com.lithic.api.models.AccountActivityRetrieveTransactionResponse\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val response: AccountActivityRetrieveTransactionResponse = client.accountActivity().retrieveTransaction("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n}', + }, + python: { + method: 'account_activity.retrieve_transaction', + example: + '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)\nresponse = client.account_activity.retrieve_transaction(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response)', + }, + ruby: { + method: 'account_activity.retrieve_transaction', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresponse = lithic.account_activity.retrieve_transaction("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\nputs(response)', + }, + typescript: { + method: 'client.accountActivity.retrieveTransaction', + example: + "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\nconst response = await client.accountActivity.retrieveTransaction(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(response);", + }, + }, }, { name: 'list', @@ -3292,10 +10102,120 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '{ company_id: string; daily_limit: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }; date: string; is_fbo: boolean; monthly_limit: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }; program_limit_per_transaction: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }; }', markdown: "## list\n\n`client.transferLimits.list(date?: string): { company_id: string; daily_limit: { credit: object; debit: object; }; date: string; is_fbo: boolean; monthly_limit: { credit: object; debit: object; }; program_limit_per_transaction: { credit: object; debit: object; }; }`\n\n**get** `/v1/transfer_limits`\n\nGet transfer limits for a specified date\n\n### Parameters\n\n- `date?: string`\n Date for which to retrieve transfer limits (ISO 8601 format)\n\n### Returns\n\n- `{ company_id: string; daily_limit: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }; date: string; is_fbo: boolean; monthly_limit: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }; program_limit_per_transaction: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }; }`\n\n - `company_id: string`\n - `daily_limit: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }`\n - `date: string`\n - `is_fbo: boolean`\n - `monthly_limit: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }`\n - `program_limit_per_transaction: { credit: { limit: number; amount_originated?: number; }; debit: { limit: number; amount_originated?: number; }; }`\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 transferLimit of client.transferLimits.list()) {\n console.log(transferLimit);\n}\n```", + perLanguage: { + go: { + method: 'client.TransferLimits.List', + example: + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\tpage, err := client.TransferLimits.List(context.TODO(), lithic.TransferLimitListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + }, + http: { + example: 'curl https://api.lithic.com/v1/transfer_limits \\\n -H "Authorization: $LITHIC_API_KEY"', + }, + java: { + method: 'transferLimits().list', + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.TransferLimitListPage;\nimport com.lithic.api.models.TransferLimitListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n TransferLimitListPage page = client.transferLimits().list();\n }\n}', + }, + kotlin: { + method: 'transferLimits().list', + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.TransferLimitListPage\nimport com.lithic.api.models.TransferLimitListParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val page: TransferLimitListPage = client.transferLimits().list()\n}', + }, + python: { + method: 'transfer_limits.list', + example: + '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.transfer_limits.list()\npage = page.data[0]\nprint(page.company_id)', + }, + ruby: { + method: 'transfer_limits.list', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\npage = lithic.transfer_limits.list\n\nputs(page)', + }, + typescript: { + method: 'client.transferLimits.list', + example: + "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 transferLimit of client.transferLimits.list()) {\n console.log(transferLimit.company_id);\n}", + }, + }, + }, + { + name: 'parsed', + endpoint: '', + httpMethod: '', + summary: '', + description: '', + stainlessPath: '(resource) webhooks > (method) parsed', + qualified: 'client.webhooks.parsed', + perLanguage: { + go: { + method: 'client.Webhooks.Parsed', + example: + 'package main\n\nimport (\n\t"context"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"),\n\t)\n\terr := client.Webhooks.Parsed(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', + }, + java: { + example: + 'package com.lithic.api.example;\n\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.WebhookParsedParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LithicClient client = LithicOkHttpClient.fromEnv();\n\n client.webhooks().parsed();\n }\n}', + }, + kotlin: { + example: + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.WebhookParsedParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n client.webhooks().parsed()\n}', + }, + python: { + method: 'webhooks.parsed', + example: + '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)\nclient.webhooks.parsed()', + }, + ruby: { + method: 'webhooks.parsed', + example: + 'require "lithic"\n\nlithic = Lithic::Client.new(\n api_key: "My Lithic API Key",\n environment: "sandbox" # defaults to "production"\n)\n\nresult = lithic.webhooks.parsed\n\nputs(result)', + }, + typescript: { + method: 'client.webhooks.parsed', + example: + "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\nawait client.webhooks.parsed();", + }, + }, }, ]; -const EMBEDDED_READMES: { language: string; content: string }[] = []; +const EMBEDDED_READMES: { language: string; content: string }[] = [ + { + language: 'python', + content: + '# Lithic Python API library\n\n\n[![PyPI version](https://img.shields.io/pypi/v/lithic.svg?label=pypi%20(stable))](https://pypi.org/project/lithic/)\n\nThe Lithic Python library provides convenient access to the Lithic REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\n\n\n\n\n\n## MCP Server\n\nUse the Lithic MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJuYW1lIjoibGl0aGljLW1jcCIsInRyYW5zcG9ydCI6Imh0dHAiLCJ1cmwiOiJodHRwczovL2xpdGhpYy5zdGxtY3AuY29tIiwiaGVhZGVycyI6eyJ4LWxpdGhpYy1hcGkta2V5IjoiTXkgTGl0aGljIEFQSSBLZXkifX0)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Flithic.stlmcp.com%22%2C%22headers%22%3A%7B%22x-lithic-api-key%22%3A%22My%20Lithic%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nThe REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from PyPI\npip install lithic\n```\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nimport 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 # defaults to "production".\n environment="sandbox",\n)\n\ncard = client.cards.create(\n type="SINGLE_USE",\n)\nprint(card.token)\n```\n\nWhile you can provide an `api_key` keyword argument,\nwe recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)\nto add `LITHIC_API_KEY="My Lithic API Key"` to your `.env` file\nso that your API Key is not stored in source control.\n\n## Async usage\n\nSimply import `AsyncLithic` instead of `Lithic` and use `await` with each API call:\n\n```python\nimport os\nimport asyncio\nfrom lithic import AsyncLithic\n\nclient = AsyncLithic(\n api_key=os.environ.get("LITHIC_API_KEY"), # This is the default and can be omitted\n # defaults to "production".\n environment="sandbox",\n)\n\nasync def main() -> None:\n card = await client.cards.create(\n type="SINGLE_USE",\n )\n print(card.token)\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from PyPI\npip install lithic[aiohttp]\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport os\nimport asyncio\nfrom lithic import DefaultAioHttpClient\nfrom lithic import AsyncLithic\n\nasync def main() -> None:\n async with AsyncLithic(\n api_key=os.environ.get("LITHIC_API_KEY"), # This is the default and can be omitted\n http_client=DefaultAioHttpClient(),\n) as client:\n card = await client.cards.create(\n type="SINGLE_USE",\n )\n print(card.token)\n\nasyncio.run(main())\n```\n\n\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n## Pagination\n\nList methods in the Lithic API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```python\nfrom lithic import Lithic\n\nclient = Lithic()\n\nall_cards = []\n# Automatically fetches more pages as needed.\nfor card in client.cards.list():\n # Do something with card here\n all_cards.append(card)\nprint(all_cards)\n```\n\nOr, asynchronously:\n\n```python\nimport asyncio\nfrom lithic import AsyncLithic\n\nclient = AsyncLithic()\n\nasync def main() -> None:\n all_cards = []\n # Iterate through items across all pages, issuing requests as needed.\n async for card in client.cards.list():\n all_cards.append(card)\n print(all_cards)\n\nasyncio.run(main())\n```\n\nAlternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:\n\n```python\nfirst_page = await client.cards.list()\nif first_page.has_next_page():\n print(f"will fetch next page using these details: {first_page.next_page_info()}")\n next_page = await first_page.get_next_page()\n print(f"number of items we just fetched: {len(next_page.data)}")\n\n# Remove `await` for non-async usage.\n```\n\nOr just work directly with the returned data:\n\n```python\nfirst_page = await client.cards.list()\n\nprint(f"next page cursor: {first_page.starting_after}") # => "next page cursor: ..."\nfor card in first_page.data:\n print(card.product_id)\n\n# Remove `await` for non-async usage.\n```\n\n## Nested params\n\nNested parameters are dictionaries, typed using `TypedDict`, for example:\n\n```python\nfrom lithic import Lithic\n\nclient = Lithic()\n\ncard = client.cards.create(\n type="PHYSICAL",\n shipping_address={\n "address1": "123",\n "city": "NEW YORK",\n "country": "USA",\n "first_name": "Johnny",\n "last_name": "Appleseed",\n "postal_code": "10001",\n "state": "NY",\n },\n)\n```\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `lithic.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `lithic.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `lithic.APIError`.\n\n```python\nimport lithic\nfrom lithic import Lithic\n\nclient = Lithic()\n\ntry:\n client.cards.create(\n type="MERCHANT_LOCKED",\n )\nexcept lithic.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept lithic.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept lithic.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom lithic import Lithic\n\n# Configure the default for all requests:\nclient = Lithic(\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).cards.list(\n page_size=10,\n)\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom lithic import Lithic\n\n# Configure the default for all requests:\nclient = Lithic(\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = Lithic(\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).cards.list(\n page_size=10,\n)\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `LITHIC_LOG` to `info`.\n\n```shell\n$ export LITHIC_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom lithic import Lithic\n\nclient = Lithic()\nresponse = client.cards.with_raw_response.create(\n type="SINGLE_USE",\n)\nprint(response.headers.get(\'X-My-Header\'))\n\ncard = response.parse() # get the object that `cards.create()` would have returned\nprint(card.token)\n```\n\nThese methods return a [`LegacyAPIResponse`](https://github.com/lithic-com/lithic-python/tree/main/src/lithic/_legacy_response.py) object. This is a legacy class as we\'re changing it slightly in the next major version.\n\nFor the sync client this will mostly be the same with the exception\nof `content` & `text` will be methods instead of properties. In the\nasync client, all methods will be async.\n\nA migration script will be provided & the migration in general should\nbe smooth.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\nAs such, `.with_streaming_response` methods return a different [`APIResponse`](https://github.com/lithic-com/lithic-python/tree/main/src/lithic/_response.py) object, and the async client returns an [`AsyncAPIResponse`](https://github.com/lithic-com/lithic-python/tree/main/src/lithic/_response.py) object.\n\n```python\nwith client.cards.with_streaming_response.create(\n type="SINGLE_USE",\n) as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom lithic import Lithic, DefaultHttpxClient\n\nclient = Lithic(\n # Or use the `LITHIC_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom lithic import Lithic\n\nwith Lithic() as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## Versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/lithic-com/lithic-python/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport lithic\nprint(lithic.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n', + }, + { + language: 'go', + content: + '# Lithic Go API Library\n\nGo Reference\n\nThe Lithic Go library provides convenient access to the [Lithic REST API](https://docs.lithic.com)\nfrom applications written in Go.\n\n\n\n## MCP Server\n\nUse the Lithic MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJuYW1lIjoibGl0aGljLW1jcCIsInRyYW5zcG9ydCI6Imh0dHAiLCJ1cmwiOiJodHRwczovL2xpdGhpYy5zdGxtY3AuY29tIiwiaGVhZGVycyI6eyJ4LWxpdGhpYy1hcGkta2V5IjoiTXkgTGl0aGljIEFQSSBLZXkifX0)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Flithic.stlmcp.com%22%2C%22headers%22%3A%7B%22x-lithic-api-key%22%3A%22My%20Lithic%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n\n\n```go\nimport (\n\t"github.com/lithic-com/lithic-go" // imported as SDK_PackageName\n)\n```\n\n\n\nOr to pin the version:\n\n\n\n```sh\ngo get -u \'github.com/lithic-com/lithic-go@v0.0.1\'\n```\n\n\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/lithic-com/lithic-go"\n\t"github.com/lithic-com/lithic-go/option"\n)\n\nfunc main() {\n\tclient := lithic.NewClient(\n\t\toption.WithAPIKey("My Lithic API Key"), // defaults to os.LookupEnv("LITHIC_API_KEY")\n\t\toption.WithEnvironmentSandbox(), // defaults to option.WithEnvironmentProduction()\n\t)\n\tcard, err := client.Cards.New(context.TODO(), lithic.CardNewParams{\n\t\tType: lithic.F(lithic.CardNewParamsTypeSingleUse),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", card.Token)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.Cards.New(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/lithic-com/lithic-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.Cards.ListAutoPaging(context.TODO(), lithic.CardListParams{})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tnonPCICard := iter.Current()\n\tfmt.Printf("%+v\\n", nonPCICard)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.Cards.List(context.TODO(), lithic.CardListParams{})\nfor page != nil {\n\tfor _, card := range page.Data {\n\t\tfmt.Printf("%+v\\n", card)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.Cards.New(context.TODO(), lithic.CardNewParams{\n\tType: lithic.F(lithic.CardNewParamsTypeMerchantLocked),\n})\nif err != nil {\n\tvar apierr *lithic.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t\tprintln(apierr.Message) // Invalid parameter(s): type\n\t\tprintln(apierr.DebuggingRequestID) // 94d5e915-xxxx-4cee-a4f5-2xd6ebd279ac\n\t}\n\tpanic(err.Error()) // GET "/v1/cards": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.Cards.List(\n\tctx,\n\tlithic.CardListParams{\n\t\tPageSize: lithic.F(int64(10)),\n\t},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := lithic.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Cards.List(\n\tcontext.TODO(),\n\tlithic.CardListParams{\n\t\tPageSize: lithic.F(int64(10)),\n\t},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\ncard, err := client.Cards.New(\n\tcontext.TODO(),\n\tlithic.CardNewParams{\n\t\tType: lithic.F(lithic.CardNewParamsTypeSingleUse),\n\t},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", card)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/lithic-com/lithic-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n', + }, + { + language: 'terraform', + content: + '# Lithic Terraform Provider\n\nThe [Lithic Terraform provider](https://registry.terraform.io/providers/stainless-sdks/lithic/latest/docs) provides convenient access to\nthe [Lithic REST API](https://docs.lithic.com) from Terraform.\n\n\n\n## Requirements\n\nThis provider requires Terraform CLI 1.0 or later. You can [install it for your system](https://developer.hashicorp.com/terraform/install)\non Hashicorp\'s website.\n\n## Usage\n\nAdd the following to your `main.tf` file:\n\n\n\n```hcl\n# Declare the provider and version\nterraform {\n required_providers {\n SDK_ProviderTypeName = {\n source = "stainless-sdks/lithic"\n version = "~> 0.0.1"\n }\n }\n}\n\n# Initialize the provider\nprovider "lithic" {\n api_key = "My Lithic API Key" # or set LITHIC_API_KEY env variable\n webhook_secret = "My Webhook Secret" # or set LITHIC_WEBHOOK_SECRET env variable\n}\n\n# Configure a resource\nresource "lithic_event_subscription" "example_event_subscription" {\n url = "https://example.com"\n description = "description"\n disabled = true\n event_types = ["account_holder_document.updated"]\n}\n```\n\n\n\nInitialize your project by running `terraform init` in the directory.\n\nAdditional examples can be found in the [./examples](./examples) folder within this repository, and you can\nrefer to the full documentation on [the Terraform Registry](https://registry.terraform.io/providers/stainless-sdks/lithic/latest/docs).\n\n### Provider Options\nWhen you initialize the provider, the following options are supported. It is recommended to use environment variables for sensitive values like access tokens.\nIf an environment variable is provided, then the option does not need to be set in the terraform source.\n\n| Property | Environment variable | Required | Default value |\n| -------------- | ----------------------- | -------- | ------------- |\n| api_key | `LITHIC_API_KEY` | true | — |\n| webhook_secret | `LITHIC_WEBHOOK_SECRET` | false | — |\n\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/lithic-terraform/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n', + }, + { + language: 'typescript', + content: + "# Lithic TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/lithic.svg?label=npm%20(stable))](https://npmjs.org/package/lithic) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/lithic)\n\nThis library provides convenient access to the Lithic REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). The full API of this library can be found in [api.md](api.md).\n\n\n\n## MCP Server\n\nUse the Lithic MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJuYW1lIjoibGl0aGljLW1jcCIsInRyYW5zcG9ydCI6Imh0dHAiLCJ1cmwiOiJodHRwczovL2xpdGhpYy5zdGxtY3AuY29tIiwiaGVhZGVycyI6eyJ4LWxpdGhpYy1hcGkta2V5IjoiTXkgTGl0aGljIEFQSSBLZXkifX0)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Flithic.stlmcp.com%22%2C%22headers%22%3A%7B%22x-lithic-api-key%22%3A%22My%20Lithic%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install lithic\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n\n```js\nimport Lithic from 'lithic';\n\nconst client = new Lithic({\n apiKey: process.env['LITHIC_API_KEY'], // This is the default and can be omitted\n environment: 'sandbox', // defaults to 'production'\n});\n\nconst card = await client.cards.create({ type: 'SINGLE_USE' });\n\nconsole.log(card.token);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n\n```ts\nimport Lithic from 'lithic';\n\nconst client = new Lithic({\n apiKey: process.env['LITHIC_API_KEY'], // This is the default and can be omitted\n environment: 'sandbox', // defaults to 'production'\n});\n\nconst params: Lithic.CardCreateParams = { type: 'SINGLE_USE' };\nconst card: Lithic.Card = await client.cards.create(params);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n\n```ts\nconst card = await client.cards.create({ type: 'MERCHANT_LOCKED' }).catch(async (err) => {\n if (err instanceof Lithic.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.error?.message); // Invalid parameter(s): type\n console.log(err.error?.debugging_request_id); // 94d5e915-xxxx-4cee-a4f5-2xd6ebd279ac\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n});\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n\n```js\n// Configure the default for all requests:\nconst client = new Lithic({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.cards.list({ page_size: 10 }, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n\n```ts\n// Configure the default for all requests:\nconst client = new Lithic({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.cards.list({ page_size: 10 }, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n## Auto-pagination\n\nList methods in the Lithic API are paginated.\nYou can use the `for await … of` syntax to iterate through items across all pages:\n\n```ts\nasync function fetchAllNonPCICards(params) {\n const allNonPCICards = [];\n // Automatically fetches more pages as needed.\n for await (const nonPCICard of client.cards.list()) {\n allNonPCICards.push(nonPCICard);\n }\n return allNonPCICards;\n}\n```\n\nAlternatively, you can request a single page at a time:\n\n```ts\nlet page = await client.cards.list();\nfor (const nonPCICard of page.data) {\n console.log(nonPCICard);\n}\n\n// Convenience methods are provided for manually paginating:\nwhile (page.hasNextPage()) {\n page = await page.getNextPage();\n // ...\n}\n```\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n\n```ts\nconst client = new Lithic();\n\nconst response = await client.cards.create({ type: 'SINGLE_USE' }).asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: card, response: raw } = await client.cards\n .create({ type: 'SINGLE_USE' })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(card.token);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `LITHIC_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport Lithic from 'lithic';\n\nconst client = new Lithic({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport Lithic from 'lithic';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new Lithic({\n logger: logger.child({ name: 'Lithic' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.cards.create({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport Lithic from 'lithic';\nimport fetch from 'my-fetch';\n\nconst client = new Lithic({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport Lithic from 'lithic';\n\nconst client = new Lithic({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n **Node** [[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]\n\n```ts\nimport Lithic from 'lithic';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new Lithic({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n **Bun** [[docs](https://bun.sh/guides/http/proxy)]\n\n```ts\nimport Lithic from 'lithic';\n\nconst client = new Lithic({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n **Deno** [[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]\n\n```ts\nimport Lithic from 'npm:lithic';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new Lithic({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/lithic-com/lithic-node/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n", + }, + { + language: 'ruby', + content: + '# Lithic Ruby API library\n\nThe Lithic Ruby library provides convenient access to the Lithic REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/lithic-com/lithic-ruby#Sorbet) for usage with Sorbet. The standard library\'s `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.\n\n\n\n\n\n## MCP Server\n\nUse the Lithic MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJuYW1lIjoibGl0aGljLW1jcCIsInRyYW5zcG9ydCI6Imh0dHAiLCJ1cmwiOiJodHRwczovL2xpdGhpYy5zdGxtY3AuY29tIiwiaGVhZGVycyI6eyJ4LWxpdGhpYy1hcGkta2V5IjoiTXkgTGl0aGljIEFQSSBLZXkifX0)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Flithic.stlmcp.com%22%2C%22headers%22%3A%7B%22x-lithic-api-key%22%3A%22My%20Lithic%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nDocumentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/lithic).\n\nThe REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com).\n\n## Installation\n\nTo use this gem, install via Bundler by adding the following to your application\'s `Gemfile`:\n\n\n\n```ruby\ngem "lithic", "~> 0.0.1"\n```\n\n\n\n## Usage\n\n```ruby\nrequire "bundler/setup"\nrequire "lithic"\n\nlithic = Lithic::Client.new(\n api_key: ENV["LITHIC_API_KEY"], # This is the default and can be omitted\n environment: "sandbox" # defaults to "production"\n)\n\ncard = lithic.cards.create(type: "SINGLE_USE")\n\nputs(card.token)\n```\n\n\n\n### Pagination\n\nList methods in the Lithic API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```ruby\npage = lithic.cards.list\n\n# Fetch single item from page.\ncard = page.data[0]\nputs(card.product_id)\n\n# Automatically fetches more pages as needed.\npage.auto_paging_each do |card|\n puts(card.product_id)\nend\n```\n\nAlternatively, you can use the `#next_page?` and `#next_page` methods for more granular control working with pages.\n\n```ruby\nif page.next_page?\n new_page = page.next_page\n puts(new_page.data[0].product_id)\nend\n```\n\n\n\n### Handling errors\n\nWhen the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `Lithic::Errors::APIError` will be thrown:\n\n```ruby\nbegin\n card = lithic.cards.create(type: "MERCHANT_LOCKED")\nrescue Lithic::Errors::APIConnectionError => e\n puts("The server could not be reached")\n puts(e.cause) # an underlying Exception, likely raised within `net/http`\nrescue Lithic::Errors::RateLimitError => e\n puts("A 429 status code was received; we should back off a bit.")\nrescue Lithic::Errors::APIStatusError => e\n puts("Another non-200-range status code was received")\n puts(e.status)\nend\n```\n\nError codes are as follows:\n\n| Cause | Error Type |\n| ---------------- | -------------------------- |\n| HTTP 400 | `BadRequestError` |\n| HTTP 401 | `AuthenticationError` |\n| HTTP 403 | `PermissionDeniedError` |\n| HTTP 404 | `NotFoundError` |\n| HTTP 409 | `ConflictError` |\n| HTTP 422 | `UnprocessableEntityError` |\n| HTTP 429 | `RateLimitError` |\n| HTTP >= 500 | `InternalServerError` |\n| Other HTTP error | `APIStatusError` |\n| Timeout | `APITimeoutError` |\n| Network error | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\n\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, >=500 Internal errors, and timeouts will all be retried by default.\n\nYou can use the `max_retries` option to configure or disable this:\n\n```ruby\n# Configure the default for all requests:\nlithic = Lithic::Client.new(\n max_retries: 0 # default is 2\n)\n\n# Or, configure per-request:\nlithic.cards.list(page_size: 10, request_options: {max_retries: 5})\n```\n\n### Timeouts\n\nBy default, requests will time out after 60 seconds. You can use the timeout option to configure or disable this:\n\n```ruby\n# Configure the default for all requests:\nlithic = Lithic::Client.new(\n timeout: nil # default is 60\n)\n\n# Or, configure per-request:\nlithic.cards.list(page_size: 10, request_options: {timeout: 5})\n```\n\nOn timeout, `Lithic::Errors::APITimeoutError` is raised.\n\nNote that requests that time out are retried by default.\n\n## Advanced concepts\n\n### BaseModel\n\nAll parameter and response objects inherit from `Lithic::Internal::Type::BaseModel`, which provides several conveniences, including:\n\n1. All fields, including unknown ones, are accessible with `obj[:prop]` syntax, and can be destructured with `obj => {prop: prop}` or pattern-matching syntax.\n\n2. Structural equivalence for equality; if two API calls return the same values, comparing the responses with == will return true.\n\n3. Both instances and the classes themselves can be pretty-printed.\n\n4. Helpers such as `#to_h`, `#deep_to_h`, `#to_json`, and `#to_yaml`.\n\n### Making custom or undocumented requests\n\n#### Undocumented properties\n\nYou can send undocumented parameters to any endpoint, and read undocumented response properties, like so:\n\nNote: the `extra_` parameters of the same name overrides the documented parameters.\n\n```ruby\npage =\n lithic.cards.list(\n page_size: 10,\n request_options: {\n extra_query: {my_query_parameter: value},\n extra_body: {my_body_parameter: value},\n extra_headers: {"my-header": value}\n }\n )\n\nputs(page[:my_undocumented_property])\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request, as seen in the examples above.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints while retaining the benefit of auth, retries, and so on, you can make requests using `client.request`, like so:\n\n```ruby\nresponse = client.request(\n method: :post,\n path: \'/undocumented/endpoint\',\n query: {"dog": "woof"},\n headers: {"useful-header": "interesting-value"},\n body: {"hello": "world"}\n)\n```\n\n### Concurrency & connection pooling\n\nThe `Lithic::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.\n\nEach instance of `Lithic::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings.\n\nWhen all available connections from the pool are checked out, requests wait for a new connection to become available, with queue time counting towards the request timeout.\n\nUnless otherwise specified, other classes in the SDK do not have locks protecting their underlying data structure.\n\n## Sorbet\n\nThis library provides comprehensive [RBI](https://sorbet.org/docs/rbi) definitions, and has no dependency on sorbet-runtime.\n\nYou can provide typesafe request parameters like so:\n\n```ruby\nlithic.cards.create(type: "SINGLE_USE")\n```\n\nOr, equivalently:\n\n```ruby\n# Hashes work, but are not typesafe:\nlithic.cards.create(type: "SINGLE_USE")\n\n# You can also splat a full Params class:\nparams = Lithic::CardCreateParams.new(type: "SINGLE_USE")\nlithic.cards.create(**params)\n```\n\n### Enums\n\nSince this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:\n\n```ruby\n# :ACTIVE\nputs(Lithic::AccountUpdateParams::State::ACTIVE)\n\n# Revealed type: `T.all(Lithic::AccountUpdateParams::State, Symbol)`\nT.reveal_type(Lithic::AccountUpdateParams::State::ACTIVE)\n```\n\nEnum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:\n\n```ruby\n# Using the enum constants preserves the tagged type information:\nlithic.accounts.update(\n state: Lithic::AccountUpdateParams::State::ACTIVE,\n # …\n)\n\n# Literal values are also permissible:\nlithic.accounts.update(\n state: :ACTIVE,\n # …\n)\n```\n\n## Versioning\n\nThis package follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions. As the library is in initial development and has a major version of `0`, APIs may change at any time.\n\nThis package considers improvements to the (non-runtime) `*.rbi` and `*.rbs` type definitions to be non-breaking changes.\n\n## Requirements\n\nRuby 3.2.0 or higher.\n\n## Contributing\n\nSee [the contributing documentation](https://github.com/lithic-com/lithic-ruby/tree/main/CONTRIBUTING.md).\n', + }, + { + language: 'java', + content: + '# Lithic Java API Library\n\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.0.1)\n[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.0.1)\n\n\nThe Lithic Java SDK provides convenient access to the [Lithic REST API](https://docs.lithic.com) from applications written in Java.\n\nThe Lithic Java SDK is similar to the Lithic Kotlin SDK but with minor differences that make it more ergonomic for use in Java, such as `Optional` instead of nullable values, `Stream` instead of `Sequence`, and `CompletableFuture` instead of suspend functions.\n\n\n\n## MCP Server\n\nUse the Lithic MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJuYW1lIjoibGl0aGljLW1jcCIsInRyYW5zcG9ydCI6Imh0dHAiLCJ1cmwiOiJodHRwczovL2xpdGhpYy5zdGxtY3AuY29tIiwiaGVhZGVycyI6eyJ4LWxpdGhpYy1hcGkta2V5IjoiTXkgTGl0aGljIEFQSSBLZXkifX0)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Flithic.stlmcp.com%22%2C%22headers%22%3A%7B%22x-lithic-api-key%22%3A%22My%20Lithic%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n\n\nThe REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.0.1).\n\n\n\n## Installation\n\n\n\n### Gradle\n\n~~~kotlin\nimplementation("com.lithic.api:lithic-java:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n\n com.lithic.api\n lithic-java\n 0.0.1\n\n~~~\n\n\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```java\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Card;\nimport com.lithic.api.models.CardCreateParams;\n\n// Configures using the `lithic.apiKey`, `lithic.webhookSecret` and `lithic.baseUrl` system properties\n// Or configures using the `LITHIC_API_KEY`, `LITHIC_WEBHOOK_SECRET` and `LITHIC_BASE_URL` environment variables\nLithicClient client = LithicOkHttpClient.fromEnv();\n\nCardCreateParams params = CardCreateParams.builder()\n .type(CardCreateParams.Type.SINGLE_USE)\n .build();\nCard card = client.cards().create(params);\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```java\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\n\n// Configures using the `lithic.apiKey`, `lithic.webhookSecret` and `lithic.baseUrl` system properties\n// Or configures using the `LITHIC_API_KEY`, `LITHIC_WEBHOOK_SECRET` and `LITHIC_BASE_URL` environment variables\nLithicClient client = LithicOkHttpClient.fromEnv();\n```\n\nOr manually:\n\n```java\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\n\nLithicClient client = LithicOkHttpClient.builder()\n .apiKey("My Lithic API Key")\n .build();\n```\n\nOr using a combination of the two approaches:\n\n```java\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\n\nLithicClient client = LithicOkHttpClient.builder()\n // Configures using the `lithic.apiKey`, `lithic.webhookSecret` and `lithic.baseUrl` system properties\n // Or configures using the `LITHIC_API_KEY`, `LITHIC_WEBHOOK_SECRET` and `LITHIC_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My Lithic API Key")\n .build();\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| --------------- | ---------------------- | ----------------------- | -------- | -------------------------- |\n| `apiKey` | `lithic.apiKey` | `LITHIC_API_KEY` | true | - |\n| `webhookSecret` | `lithic.webhookSecret` | `LITHIC_WEBHOOK_SECRET` | false | - |\n| `baseUrl` | `lithic.baseUrl` | `LITHIC_BASE_URL` | true | `"https://api.lithic.com"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```java\nimport com.lithic.api.client.LithicClient;\n\nLithicClient clientWithOptions = client.withOptions(optionsBuilder -> {\n optionsBuilder.baseUrl("https://example.com");\n optionsBuilder.maxRetries(42);\n});\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Lithic API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Java class.\n\nFor example, `client.cards().create(...)` should be called with an instance of `CardCreateParams`, and it will return an instance of `Card`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```java\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.models.Card;\nimport com.lithic.api.models.CardCreateParams;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `lithic.apiKey`, `lithic.webhookSecret` and `lithic.baseUrl` system properties\n// Or configures using the `LITHIC_API_KEY`, `LITHIC_WEBHOOK_SECRET` and `LITHIC_BASE_URL` environment variables\nLithicClient client = LithicOkHttpClient.fromEnv();\n\nCardCreateParams params = CardCreateParams.builder()\n .type(CardCreateParams.Type.SINGLE_USE)\n .build();\nCompletableFuture card = client.async().cards().create(params);\n```\n\nOr create an asynchronous client from the beginning:\n\n```java\nimport com.lithic.api.client.LithicClientAsync;\nimport com.lithic.api.client.okhttp.LithicOkHttpClientAsync;\nimport com.lithic.api.models.Card;\nimport com.lithic.api.models.CardCreateParams;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `lithic.apiKey`, `lithic.webhookSecret` and `lithic.baseUrl` system properties\n// Or configures using the `LITHIC_API_KEY`, `LITHIC_WEBHOOK_SECRET` and `LITHIC_BASE_URL` environment variables\nLithicClientAsync client = LithicOkHttpClientAsync.fromEnv();\n\nCardCreateParams params = CardCreateParams.builder()\n .type(CardCreateParams.Type.SINGLE_USE)\n .build();\nCompletableFuture card = client.cards().create(params);\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods return `CompletableFuture`s.\n\n\n\n\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Java classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```java\nimport com.lithic.api.core.http.Headers;\nimport com.lithic.api.core.http.HttpResponseFor;\nimport com.lithic.api.models.Card;\nimport com.lithic.api.models.CardCreateParams;\n\nCardCreateParams params = CardCreateParams.builder()\n .type(CardCreateParams.Type.SINGLE_USE)\n .build();\nHttpResponseFor card = client.cards().withRawResponse().create(params);\n\nint statusCode = card.statusCode();\nHeaders headers = card.headers();\n```\n\nYou can still deserialize the response into an instance of a Java class if needed:\n\n```java\nimport com.lithic.api.models.Card;\n\nCard parsedCard = card.parse();\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`LithicServiceException`](lithic-java-core/src/main/kotlin/com/lithic/api/errors/LithicServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](lithic-java-core/src/main/kotlin/com/lithic/api/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](lithic-java-core/src/main/kotlin/com/lithic/api/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](lithic-java-core/src/main/kotlin/com/lithic/api/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](lithic-java-core/src/main/kotlin/com/lithic/api/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](lithic-java-core/src/main/kotlin/com/lithic/api/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](lithic-java-core/src/main/kotlin/com/lithic/api/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](lithic-java-core/src/main/kotlin/com/lithic/api/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](lithic-java-core/src/main/kotlin/com/lithic/api/errors/UnexpectedStatusCodeException.kt) |\n\n- [`LithicIoException`](lithic-java-core/src/main/kotlin/com/lithic/api/errors/LithicIoException.kt): I/O networking errors.\n\n- [`LithicRetryableException`](lithic-java-core/src/main/kotlin/com/lithic/api/errors/LithicRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`LithicInvalidDataException`](lithic-java-core/src/main/kotlin/com/lithic/api/errors/LithicInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`LithicException`](lithic-java-core/src/main/kotlin/com/lithic/api/errors/LithicException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns an [`Iterable`](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html)\n\n```java\nimport com.lithic.api.models.CardListPage;\nimport com.lithic.api.models.NonPciCard;\n\nCardListPage page = client.cards().list();\n\n// Process as an Iterable\nfor (NonPciCard card : page.autoPager()) {\n System.out.println(card);\n}\n\n// Process as a Stream\npage.autoPager()\n .stream()\n .limit(50)\n .forEach(card -> System.out.println(card));\n```\n\nWhen using the asynchronous client, the method returns an [`AsyncStreamResponse`](lithic-java-core/src/main/kotlin/com/lithic/api/core/http/AsyncStreamResponse.kt):\n\n```java\nimport com.lithic.api.core.http.AsyncStreamResponse;\nimport com.lithic.api.models.CardListPageAsync;\nimport com.lithic.api.models.NonPciCard;\nimport java.util.Optional;\nimport java.util.concurrent.CompletableFuture;\n\nCompletableFuture pageFuture = client.async().cards().list();\n\npageFuture.thenRun(page -> page.autoPager().subscribe(card -> {\n System.out.println(card);\n}));\n\n// If you need to handle errors or completion of the stream\npageFuture.thenRun(page -> page.autoPager().subscribe(new AsyncStreamResponse.Handler<>() {\n @Override\n public void onNext(NonPciCard card) {\n System.out.println(card);\n }\n\n @Override\n public void onComplete(Optional error) {\n if (error.isPresent()) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error.get());\n } else {\n System.out.println("No more!");\n }\n }\n}));\n\n// Or use futures\npageFuture.thenRun(page -> page.autoPager()\n .subscribe(card -> {\n System.out.println(card);\n })\n .onCompleteFuture()\n .whenComplete((unused, error) -> {\n if (error != null) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error);\n } else {\n System.out.println("No more!");\n }\n }));\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```java\nimport com.lithic.api.models.CardListPage;\nimport com.lithic.api.models.NonPciCard;\n\nCardListPage page = client.cards().list();\nwhile (true) {\n for (NonPciCard card : page.items()) {\n System.out.println(card);\n }\n\n if (!page.hasNextPage()) {\n break;\n }\n\n page = page.nextPage();\n}\n```\n\n## Logging\n\nThe SDK uses the standard [OkHttp logging interceptor](https://github.com/square/okhttp/tree/master/okhttp-logging-interceptor).\n\nEnable logging by setting the `LITHIC_LOG` environment variable to `info`:\n\n```sh\nexport LITHIC_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport LITHIC_LOG=debug\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `lithic-java-core` is published with a [configuration file](lithic-java-core/src/main/resources/META-INF/proguard/lithic-java-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`LithicOkHttpClient`](lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt) or [`LithicOkHttpClientAsync`](lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```java\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\n\nLithicClient client = LithicOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build();\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```java\nimport com.lithic.api.models.CardListPage;\n\nCardListPage page = client.cards().list(RequestOptions.builder().timeout(Duration.ofSeconds(30)).build());\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport java.time.Duration;\n\nLithicClient client = LithicOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build();\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```java\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport java.net.InetSocketAddress;\nimport java.net.Proxy;\n\nLithicClient client = LithicOkHttpClient.builder()\n .fromEnv()\n .proxy(new Proxy(\n Proxy.Type.HTTP, new InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build();\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```java\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport java.time.Duration;\n\nLithicClient client = LithicOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build();\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```java\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\n\nLithicClient client = LithicOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build();\n```\n\n### Environments\n\nThe SDK sends requests to the production by default. To send requests to a different environment, configure the client like so:\n\n```java\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\n\nLithicClient client = LithicOkHttpClient.builder()\n .fromEnv()\n .sandbox()\n .build();\n```\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `lithic-java-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`LithicClient`](lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClient.kt), [`LithicClientAsync`](lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt), [`LithicClientImpl`](lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt), and [`LithicClientAsyncImpl`](lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt), all of which can work with any HTTP client\n- `lithic-java-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`LithicOkHttpClient`](lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt) and [`LithicOkHttpClientAsync`](lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt), which provide a way to construct [`LithicClientImpl`](lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt) and [`LithicClientAsyncImpl`](lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt), respectively, using OkHttp\n- `lithic-java`\n - Depends on and exposes the APIs of both `lithic-java-core` and `lithic-java-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`lithic-java` dependency](#installation) with `lithic-java-core`\n2. Copy `lithic-java-client-okhttp`\'s [`OkHttpClient`](lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`LithicClientImpl`](lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt) or [`LithicClientAsyncImpl`](lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt), similarly to [`LithicOkHttpClient`](lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt) or [`LithicOkHttpClientAsync`](lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`lithic-java` dependency](#installation) with `lithic-java-core`\n2. Write a class that implements the [`HttpClient`](lithic-java-core/src/main/kotlin/com/lithic/api/core/http/HttpClient.kt) interface\n3. Construct [`LithicClientImpl`](lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt) or [`LithicClientAsyncImpl`](lithic-java-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt), similarly to [`LithicOkHttpClient`](lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt) or [`LithicOkHttpClientAsync`](lithic-java-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```java\nimport com.lithic.api.core.JsonValue;\nimport com.lithic.api.models.CardCreateParams;\n\nCardCreateParams params = CardCreateParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build();\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set undocumented parameters on _nested_ headers, query params, or body classes, call the `putAdditionalProperty` method on the nested class:\n\n```java\nimport com.lithic.api.core.JsonValue;\nimport com.lithic.api.models.CardCreateParams;\nimport com.lithic.api.models.ShippingAddress;\n\nCardCreateParams params = CardCreateParams.builder()\n .shippingAddress(ShippingAddress.builder()\n .putAdditionalProperty("secretProperty", JsonValue.from("42"))\n .build())\n .build();\n```\n\nThese properties can be accessed on the nested built object later using the `_additionalProperties()` method.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](lithic-java-core/src/main/kotlin/com/lithic/api/core/Values.kt) object to its setter:\n\n```java\nimport com.lithic.api.core.JsonValue;\nimport com.lithic.api.models.CardCreateParams;\n\nCardCreateParams params = CardCreateParams.builder()\n .type(JsonValue.from(42))\n .build();\n```\n\nThe most straightforward way to create a [`JsonValue`](lithic-java-core/src/main/kotlin/com/lithic/api/core/Values.kt) is using its `from(...)` method:\n\n```java\nimport com.lithic.api.core.JsonValue;\nimport java.util.List;\nimport java.util.Map;\n\n// Create primitive JSON values\nJsonValue nullValue = JsonValue.from(null);\nJsonValue booleanValue = JsonValue.from(true);\nJsonValue numberValue = JsonValue.from(42);\nJsonValue stringValue = JsonValue.from("Hello World!");\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nJsonValue arrayValue = JsonValue.from(List.of(\n "Hello", "World"\n));\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nJsonValue objectValue = JsonValue.from(Map.of(\n "a", 1,\n "b", 2\n));\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nJsonValue complexValue = JsonValue.from(Map.of(\n "a", List.of(\n 1, 2\n ),\n "b", List.of(\n 3, 4\n )\n));\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](lithic-java-core/src/main/kotlin/com/lithic/api/core/Values.kt):\n\n```java\nimport com.lithic.api.core.JsonMissing;\nimport com.lithic.api.models.CardCreateParams;\n\nCardCreateParams params = CardCreateParams.builder()\n .type(JsonMissing.of())\n .build();\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```java\nimport com.lithic.api.core.JsonValue;\nimport java.util.Map;\n\nMap additionalProperties = client.cards().create(params)._additionalProperties();\nJsonValue secretPropertyValue = additionalProperties.get("secretProperty");\n\nString result = secretPropertyValue.accept(new JsonValue.Visitor<>() {\n @Override\n public String visitNull() {\n return "It\'s null!";\n }\n\n @Override\n public String visitBoolean(boolean value) {\n return "It\'s a boolean!";\n }\n\n @Override\n public String visitNumber(Number value) {\n return "It\'s a number!";\n }\n\n // Other methods include `visitMissing`, `visitString`, `visitArray`, and `visitObject`\n // The default implementation of each unimplemented method delegates to `visitDefault`, which throws by default, but can also be overridden\n});\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```java\nimport com.lithic.api.core.JsonField;\nimport com.lithic.api.models.CardCreateParams;\nimport java.util.Optional;\n\nJsonField type = client.cards().create(params)._type();\n\nif (type.isMissing()) {\n // The property is absent from the JSON response\n} else if (type.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n Optional jsonString = type.asString();\n\n // Try to deserialize into a custom type\n MyClass myObject = type.asUnknown().orElseThrow().convert(MyClass.class);\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`LithicInvalidDataException`](lithic-java-core/src/main/kotlin/com/lithic/api/errors/LithicInvalidDataException.kt) only if you directly access the property.\n\nIf you would prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```java\nimport com.lithic.api.models.Card;\n\nCard card = client.cards().create(params).validate();\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```java\nimport com.lithic.api.models.Card;\n\nCard card = client.cards().create(\n params, RequestOptions.builder().responseValidation(true).build()\n);\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\n\nLithicClient client = LithicOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build();\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nJava `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField` instead of just plain `T`?\n\nUsing `JsonField` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/lithic-com/lithic-java/issues) with questions, bugs, or suggestions.\n', + }, + { + language: 'kotlin', + content: + '# Lithic Kotlin API Library\n\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-kotlin)](https://central.sonatype.com/artifact/com.lithic.api/lithic-kotlin/0.0.1)\n[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-kotlin/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-kotlin/0.0.1)\n\n\nThe Lithic Kotlin SDK provides convenient access to the [Lithic REST API](https://docs.lithic.com) from applications written in Kotlin.\n\nThe Lithic Kotlin SDK is similar to the Lithic Java SDK but with minor differences that make it more ergonomic for use in Kotlin, such as nullable values instead of `Optional`, `Sequence` instead of `Stream`, and suspend functions instead of `CompletableFuture`.\n\n\n\n## MCP Server\n\nUse the Lithic MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJuYW1lIjoibGl0aGljLW1jcCIsInRyYW5zcG9ydCI6Imh0dHAiLCJ1cmwiOiJodHRwczovL2xpdGhpYy5zdGxtY3AuY29tIiwiaGVhZGVycyI6eyJ4LWxpdGhpYy1hcGkta2V5IjoiTXkgTGl0aGljIEFQSSBLZXkifX0)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Flithic.stlmcp.com%22%2C%22headers%22%3A%7B%22x-lithic-api-key%22%3A%22My%20Lithic%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n\n\nThe REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). KDocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-kotlin/0.0.1).\n\n\n\n## Installation\n\n\n\n### Gradle\n\n~~~kotlin\nimplementation("com.lithic.api:lithic-kotlin:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n\n com.lithic.api\n lithic-kotlin\n 0.0.1\n\n~~~\n\n\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```kotlin\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Card\nimport com.lithic.api.models.CardCreateParams\n\n// Configures using the `lithic.apiKey`, `lithic.webhookSecret` and `lithic.baseUrl` system properties\n// Or configures using the `LITHIC_API_KEY`, `LITHIC_WEBHOOK_SECRET` and `LITHIC_BASE_URL` environment variables\nval client: LithicClient = LithicOkHttpClient.fromEnv()\n\nval params: CardCreateParams = CardCreateParams.builder()\n .type(CardCreateParams.Type.SINGLE_USE)\n .build()\nval card: Card = client.cards().create(params)\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```kotlin\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\n\n// Configures using the `lithic.apiKey`, `lithic.webhookSecret` and `lithic.baseUrl` system properties\n// Or configures using the `LITHIC_API_KEY`, `LITHIC_WEBHOOK_SECRET` and `LITHIC_BASE_URL` environment variables\nval client: LithicClient = LithicOkHttpClient.fromEnv()\n```\n\nOr manually:\n\n```kotlin\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\n\nval client: LithicClient = LithicOkHttpClient.builder()\n .apiKey("My Lithic API Key")\n .build()\n```\n\nOr using a combination of the two approaches:\n\n```kotlin\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\n\nval client: LithicClient = LithicOkHttpClient.builder()\n // Configures using the `lithic.apiKey`, `lithic.webhookSecret` and `lithic.baseUrl` system properties\n // Or configures using the `LITHIC_API_KEY`, `LITHIC_WEBHOOK_SECRET` and `LITHIC_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My Lithic API Key")\n .build()\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| --------------- | ---------------------- | ----------------------- | -------- | -------------------------- |\n| `apiKey` | `lithic.apiKey` | `LITHIC_API_KEY` | true | - |\n| `webhookSecret` | `lithic.webhookSecret` | `LITHIC_WEBHOOK_SECRET` | false | - |\n| `baseUrl` | `lithic.baseUrl` | `LITHIC_BASE_URL` | true | `"https://api.lithic.com"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```kotlin\nimport com.lithic.api.client.LithicClient\n\nval clientWithOptions: LithicClient = client.withOptions {\n it.baseUrl("https://example.com")\n it.maxRetries(42)\n}\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Lithic API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Kotlin class.\n\nFor example, `client.cards().create(...)` should be called with an instance of `CardCreateParams`, and it will return an instance of `Card`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```kotlin\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.models.Card\nimport com.lithic.api.models.CardCreateParams\n\n// Configures using the `lithic.apiKey`, `lithic.webhookSecret` and `lithic.baseUrl` system properties\n// Or configures using the `LITHIC_API_KEY`, `LITHIC_WEBHOOK_SECRET` and `LITHIC_BASE_URL` environment variables\nval client: LithicClient = LithicOkHttpClient.fromEnv()\n\nval params: CardCreateParams = CardCreateParams.builder()\n .type(CardCreateParams.Type.SINGLE_USE)\n .build()\nval card: Card = client.async().cards().create(params)\n```\n\nOr create an asynchronous client from the beginning:\n\n```kotlin\nimport com.lithic.api.client.LithicClientAsync\nimport com.lithic.api.client.okhttp.LithicOkHttpClientAsync\nimport com.lithic.api.models.Card\nimport com.lithic.api.models.CardCreateParams\n\n// Configures using the `lithic.apiKey`, `lithic.webhookSecret` and `lithic.baseUrl` system properties\n// Or configures using the `LITHIC_API_KEY`, `LITHIC_WEBHOOK_SECRET` and `LITHIC_BASE_URL` environment variables\nval client: LithicClientAsync = LithicOkHttpClientAsync.fromEnv()\n\nval params: CardCreateParams = CardCreateParams.builder()\n .type(CardCreateParams.Type.SINGLE_USE)\n .build()\nval card: Card = client.cards().create(params)\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods are [suspending](https://kotlinlang.org/docs/coroutines-guide.html).\n\n\n\n\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Kotlin classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```kotlin\nimport com.lithic.api.core.http.Headers\nimport com.lithic.api.core.http.HttpResponseFor\nimport com.lithic.api.models.Card\nimport com.lithic.api.models.CardCreateParams\n\nval params: CardCreateParams = CardCreateParams.builder()\n .type(CardCreateParams.Type.SINGLE_USE)\n .build()\nval card: HttpResponseFor = client.cards().withRawResponse().create(params)\n\nval statusCode: Int = card.statusCode()\nval headers: Headers = card.headers()\n```\n\nYou can still deserialize the response into an instance of a Kotlin class if needed:\n\n```kotlin\nimport com.lithic.api.models.Card\n\nval parsedCard: Card = card.parse()\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`LithicServiceException`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/LithicServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/UnexpectedStatusCodeException.kt) |\n\n- [`LithicIoException`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/LithicIoException.kt): I/O networking errors.\n\n- [`LithicRetryableException`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/LithicRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`LithicInvalidDataException`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/LithicInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`LithicException`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/LithicException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns a [`Sequence`](https://kotlinlang.org/docs/sequences.html)\n\n```kotlin\nimport com.lithic.api.models.CardListPage\n\nval page: CardListPage = client.cards().list()\npage.autoPager()\n .take(50)\n .forEach { card -> println(card) }\n```\n\nWhen using the asynchronous client, the method returns a [`Flow`](https://kotlinlang.org/docs/flow.html):\n\n```kotlin\nimport com.lithic.api.models.CardListPageAsync\n\nval page: CardListPageAsync = client.async().cards().list()\npage.autoPager()\n .take(50)\n .forEach { card -> println(card) }\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```kotlin\nimport com.lithic.api.models.CardListPage\nimport com.lithic.api.models.NonPciCard\n\nval page: CardListPage = client.cards().list()\nwhile (true) {\n for (card in page.items()) {\n println(card)\n }\n\n if (!page.hasNextPage()) {\n break\n }\n\n page = page.nextPage()\n}\n```\n\n## Logging\n\nThe SDK uses the standard [OkHttp logging interceptor](https://github.com/square/okhttp/tree/master/okhttp-logging-interceptor).\n\nEnable logging by setting the `LITHIC_LOG` environment variable to `info`:\n\n```sh\nexport LITHIC_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport LITHIC_LOG=debug\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `lithic-kotlin-core` is published with a [configuration file](lithic-kotlin-core/src/main/resources/META-INF/proguard/lithic-kotlin-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`LithicOkHttpClient`](lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt) or [`LithicOkHttpClientAsync`](lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```kotlin\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\n\nval client: LithicClient = LithicOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build()\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```kotlin\nimport com.lithic.api.models.CardListPage\n\nval page: CardListPage = client.cards().list(RequestOptions.builder().timeout(Duration.ofSeconds(30)).build())\n```\n\nOr configure the default for all method calls at the client level:\n\n```kotlin\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport java.time.Duration\n\nval client: LithicClient = LithicOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build()\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```kotlin\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport java.net.InetSocketAddress\nimport java.net.Proxy\n\nval client: LithicClient = LithicOkHttpClient.builder()\n .fromEnv()\n .proxy(Proxy(\n Proxy.Type.HTTP, InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build()\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```kotlin\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport java.time.Duration\n\nval client: LithicClient = LithicOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build()\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```kotlin\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\n\nval client: LithicClient = LithicOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build()\n```\n\n### Environments\n\nThe SDK sends requests to the production by default. To send requests to a different environment, configure the client like so:\n\n```kotlin\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\n\nval client: LithicClient = LithicOkHttpClient.builder()\n .fromEnv()\n .sandbox()\n .build()\n```\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `lithic-kotlin-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`LithicClient`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClient.kt), [`LithicClientAsync`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientAsync.kt), [`LithicClientImpl`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt), and [`LithicClientAsyncImpl`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt), all of which can work with any HTTP client\n- `lithic-kotlin-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`LithicOkHttpClient`](lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt) and [`LithicOkHttpClientAsync`](lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt), which provide a way to construct [`LithicClientImpl`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt) and [`LithicClientAsyncImpl`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt), respectively, using OkHttp\n- `lithic-kotlin`\n - Depends on and exposes the APIs of both `lithic-kotlin-core` and `lithic-kotlin-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`lithic-kotlin` dependency](#installation) with `lithic-kotlin-core`\n2. Copy `lithic-kotlin-client-okhttp`\'s [`OkHttpClient`](lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`LithicClientImpl`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt) or [`LithicClientAsyncImpl`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt), similarly to [`LithicOkHttpClient`](lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt) or [`LithicOkHttpClientAsync`](lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`lithic-kotlin` dependency](#installation) with `lithic-kotlin-core`\n2. Write a class that implements the [`HttpClient`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/http/HttpClient.kt) interface\n3. Construct [`LithicClientImpl`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientImpl.kt) or [`LithicClientAsyncImpl`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/client/LithicClientAsyncImpl.kt), similarly to [`LithicOkHttpClient`](lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClient.kt) or [`LithicOkHttpClientAsync`](lithic-kotlin-client-okhttp/src/main/kotlin/com/lithic/api/client/okhttp/LithicOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```kotlin\nimport com.lithic.api.core.JsonValue\nimport com.lithic.api.models.CardCreateParams\n\nval params: CardCreateParams = CardCreateParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build()\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set undocumented parameters on _nested_ headers, query params, or body classes, call the `putAdditionalProperty` method on the nested class:\n\n```kotlin\nimport com.lithic.api.core.JsonValue\nimport com.lithic.api.models.CardCreateParams\nimport com.lithic.api.models.ShippingAddress\n\nval params: CardCreateParams = CardCreateParams.builder()\n .shippingAddress(ShippingAddress.builder()\n .putAdditionalProperty("secretProperty", JsonValue.from("42"))\n .build())\n .build()\n```\n\nThese properties can be accessed on the nested built object later using the `_additionalProperties()` method.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/Values.kt) object to its setter:\n\n```kotlin\nimport com.lithic.api.core.JsonValue\nimport com.lithic.api.models.CardCreateParams\n\nval params: CardCreateParams = CardCreateParams.builder()\n .type(JsonValue.from(42))\n .build()\n```\n\nThe most straightforward way to create a [`JsonValue`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/Values.kt) is using its `from(...)` method:\n\n```kotlin\nimport com.lithic.api.core.JsonValue\n\n// Create primitive JSON values\nval nullValue: JsonValue = JsonValue.from(null)\nval booleanValue: JsonValue = JsonValue.from(true)\nval numberValue: JsonValue = JsonValue.from(42)\nval stringValue: JsonValue = JsonValue.from("Hello World!")\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nval arrayValue: JsonValue = JsonValue.from(listOf(\n "Hello", "World"\n))\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nval objectValue: JsonValue = JsonValue.from(mapOf(\n "a" to 1, "b" to 2\n))\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nval complexValue: JsonValue = JsonValue.from(mapOf(\n "a" to listOf(\n 1, 2\n ), "b" to listOf(\n 3, 4\n )\n))\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/Values.kt):\n\n```kotlin\nimport com.lithic.api.core.JsonMissing\nimport com.lithic.api.models.CardCreateParams\n\nval params: CardCreateParams = CardCreateParams.builder()\n .type(JsonMissing.of())\n .build()\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```kotlin\nimport com.lithic.api.core.JsonBoolean\nimport com.lithic.api.core.JsonNull\nimport com.lithic.api.core.JsonNumber\nimport com.lithic.api.core.JsonValue\n\nval additionalProperties: Map = client.cards().create(params)._additionalProperties()\nval secretPropertyValue: JsonValue = additionalProperties.get("secretProperty")\n\nval result = when (secretPropertyValue) {\n is JsonNull -> "It\'s null!"\n is JsonBoolean -> "It\'s a boolean!"\n is JsonNumber -> "It\'s a number!"\n // Other types include `JsonMissing`, `JsonString`, `JsonArray`, and `JsonObject`\n else -> "It\'s something else!"\n}\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```kotlin\nimport com.lithic.api.core.JsonField\nimport com.lithic.api.models.CardCreateParams\n\nval type: JsonField = client.cards().create(params)._type()\n\nif (type.isMissing()) {\n // The property is absent from the JSON response\n} else if (type.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n val jsonString: String? = type.asString();\n\n // Try to deserialize into a custom type\n val myObject: MyClass = type.asUnknown()!!.convert(MyClass::class.java)\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`LithicInvalidDataException`](lithic-kotlin-core/src/main/kotlin/com/lithic/api/errors/LithicInvalidDataException.kt) only if you directly access the property.\n\nIf you would prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```kotlin\nimport com.lithic.api.models.Card\n\nval card: Card = client.cards().create(params).validate()\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```kotlin\nimport com.lithic.api.models.Card\n\nval card: Card = client.cards().create(\n params, RequestOptions.builder().responseValidation(true).build()\n)\n```\n\nOr configure the default for all method calls at the client level:\n\n```kotlin\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\n\nval client: LithicClient = LithicOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build()\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nKotlin `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField` instead of just plain `T`?\n\nUsing `JsonField` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/lithic-com/lithic-kotlin/issues) with questions, bugs, or suggestions.\n', + }, +]; const INDEX_OPTIONS = { fields: [ From 08c0b61957f3be0c9c52196cf5af017b136d64ee Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 17:58:55 +0000 Subject: [PATCH 12/17] fix(internal): gitignore generated `oidc` dir --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b7d4f6b9..ae4aa20e 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ dist-deno .eslintcache dist-bundle *.mcpb +oidc From d004ede97fda3a5840c8843a648fe5a3977d2d30 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 21:08:41 +0000 Subject: [PATCH 13/17] feat(api): add decline count attributes to auth-rules v2 --- .stats.yml | 4 ++-- src/resources/auth-rules/v2/v2.ts | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f20dc054..d11f292a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 190 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-eb2cf51467f505a1d29c3ca40b9595ecbf6d6a3743f53bc42a52c8135a252ff0.yml -openapi_spec_hash: 2fbd71b69d71138b3e54432a38d759ed +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-27d13d3d5226c710b07f9fc954fa53a8e6923e74d90d3f587d96399c1baf4de3.yml +openapi_spec_hash: 99a60cbd91f32b25617a9536fadebf07 config_hash: edbdfefeb0d3d927c2f9fe3402793215 diff --git a/src/resources/auth-rules/v2/v2.ts b/src/resources/auth-rules/v2/v2.ts index 6925e18d..076bf9ea 100644 --- a/src/resources/auth-rules/v2/v2.ts +++ b/src/resources/auth-rules/v2/v2.ts @@ -766,6 +766,12 @@ export namespace ConditionalAuthorizationActionParameters { * trailing hour up and until the authorization. * - `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the * trailing 24 hours up and until the authorization. + * - `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in + * the trailing 15 minutes before the authorization. + * - `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in + * the trailing hour up and until the authorization. + * - `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in + * the trailing 24 hours up and until the authorization. * - `CARD_STATE`: The current state of the card associated with the transaction. * Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, * `PENDING_FULFILLMENT`. @@ -807,6 +813,9 @@ export namespace ConditionalAuthorizationActionParameters { | 'CARD_TRANSACTION_COUNT_15M' | 'CARD_TRANSACTION_COUNT_1H' | 'CARD_TRANSACTION_COUNT_24H' + | 'CARD_DECLINE_COUNT_15M' + | 'CARD_DECLINE_COUNT_1H' + | 'CARD_DECLINE_COUNT_24H' | 'CARD_STATE' | 'PIN_ENTERED' | 'PIN_STATUS' From 4f94af4683c5c6116e230e95388685066063483b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 16:01:26 +0000 Subject: [PATCH 14/17] chore(internal): support type annotations when running MCP in local execution mode --- packages/mcp-server/src/code-tool-worker.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/mcp-server/src/code-tool-worker.ts b/packages/mcp-server/src/code-tool-worker.ts index e3230a71..764db35b 100644 --- a/packages/mcp-server/src/code-tool-worker.ts +++ b/packages/mcp-server/src/code-tool-worker.ts @@ -7,6 +7,10 @@ import ts from 'typescript'; import { WorkerOutput } from './code-tool-types'; import { Lithic, ClientOptions } from 'lithic'; +async function tseval(code: string) { + return import('data:application/typescript;charset=utf-8;base64,' + Buffer.from(code).toString('base64')); +} + function getRunFunctionSource(code: string): { type: 'declaration' | 'expression'; client: string | undefined; @@ -428,7 +432,9 @@ const fetch = async (req: Request): Promise => { const log_lines: string[] = []; const err_lines: string[] = []; - const console = { + const originalConsole = globalThis.console; + globalThis.console = { + ...originalConsole, log: (...args: unknown[]) => { log_lines.push(util.format(...args)); }, @@ -438,7 +444,7 @@ const fetch = async (req: Request): Promise => { }; try { let run_ = async (client: any) => {}; - eval(`${code}\nrun_ = run;`); + run_ = (await tseval(`${code}\nexport default run;`)).default; const result = await run_(makeSdkProxy(client, { path: ['client'] })); return Response.json({ is_error: false, @@ -456,6 +462,8 @@ const fetch = async (req: Request): Promise => { } satisfies WorkerOutput, { status: 400, statusText: 'Code execution error' }, ); + } finally { + globalThis.console = originalConsole; } }; From 2e1174ac9aa88945719d45758ea713ebc5c8eaa8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 12:37:45 +0000 Subject: [PATCH 15/17] chore(mcp-server): log client info --- packages/mcp-server/src/http.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/mcp-server/src/http.ts b/packages/mcp-server/src/http.ts index 39d193a4..c07709d6 100644 --- a/packages/mcp-server/src/http.ts +++ b/packages/mcp-server/src/http.ts @@ -69,6 +69,11 @@ const newServer = async ({ } } + const mcpClientInfo = + typeof req.body?.params?.clientInfo?.name === 'string' ? + { name: req.body.params.clientInfo.name, version: String(req.body.params.clientInfo.version ?? '') } + : undefined; + await initMcpServer({ server: server, mcpOptions: effectiveMcpOptions, @@ -79,12 +84,13 @@ const newServer = async ({ stainlessApiKey: stainlessApiKey, upstreamClientEnvs, mcpSessionId: (req as any).mcpSessionId, - mcpClientInfo: - typeof req.body?.params?.clientInfo?.name === 'string' ? - { name: req.body.params.clientInfo.name, version: String(req.body.params.clientInfo.version ?? '') } - : undefined, + mcpClientInfo, }); + if (mcpClientInfo) { + getLogger().info({ mcpSessionId: (req as any).mcpSessionId, mcpClientInfo }, 'MCP client connected'); + } + return server; }; @@ -154,6 +160,9 @@ export const streamableHTTPApp = ({ app.use( pinoHttp({ logger: getLogger(), + customProps: (req) => ({ + mcpSessionId: (req as any).mcpSessionId, + }), customLogLevel: (req, res) => { if (res.statusCode >= 500) { return 'error'; From e3813f70cf8e408de65ec058a39b137cd74c2dfe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 13:41:48 +0000 Subject: [PATCH 16/17] feat(api): add statement_totals field to Statement response --- .stats.yml | 4 ++-- packages/mcp-server/src/local-docs-search.ts | 8 ++++---- src/resources/financial-accounts/statements/statements.ts | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index d11f292a..0f37c1b0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 190 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-27d13d3d5226c710b07f9fc954fa53a8e6923e74d90d3f587d96399c1baf4de3.yml -openapi_spec_hash: 99a60cbd91f32b25617a9536fadebf07 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-bf54d7063b11e1b1656e00d02438f34f87938a9fdbdd5b980fce3cfae3dabffa.yml +openapi_spec_hash: c6efbc9d3105fa48f76ebb095b887e08 config_hash: edbdfefeb0d3d927c2f9fe3402793215 diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index 623baa13..adc00842 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -5350,9 +5350,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 'starting_after?: string;', ], response: - "{ token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; }", + "{ token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; statement_totals?: statement_totals; }", markdown: - "## list\n\n`client.financialAccounts.statements.list(financial_account_token: string, begin?: string, end?: string, ending_before?: string, include_initial_statements?: boolean, page_size?: number, starting_after?: string): { token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/statements`\n\nList the statements for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified date will be included.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified date will be included.\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- `include_initial_statements?: boolean`\n Whether to include the initial statement. It is not included by default.\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_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }; amount_due: { amount: number; past_due: number; }; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; interest_details?: { actual_interest_charged: number; daily_balance_amounts: object; effective_apr: object; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: object; prime_rate: string; minimum_interest_charged?: number; }; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }; }`\n\n - `token: string`\n - `account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }`\n - `amount_due: { amount: number; past_due: number; }`\n - `available_credit: number`\n - `created: string`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `days_in_billing_cycle: number`\n - `ending_balance: number`\n - `financial_account_token: string`\n - `payment_due_date: string`\n - `period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `starting_balance: number`\n - `statement_end_date: string`\n - `statement_start_date: string`\n - `statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'`\n - `updated: string`\n - `ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `interest_details?: { actual_interest_charged: number; daily_balance_amounts: { balance_transfers: string; cash_advances: string; purchases: string; }; effective_apr: { balance_transfers: string; cash_advances: string; purchases: string; }; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: { balance_transfers: string; cash_advances: string; purchases: string; }; prime_rate: string; minimum_interest_charged?: number; }`\n - `next_payment_due_date?: string`\n - `next_statement_end_date?: string`\n - `payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }`\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 statement of client.financialAccounts.statements.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(statement);\n}\n```", + "## list\n\n`client.financialAccounts.statements.list(financial_account_token: string, begin?: string, end?: string, ending_before?: string, include_initial_statements?: boolean, page_size?: number, starting_after?: string): { token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; statement_totals?: statement_totals; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/statements`\n\nList the statements for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n- `begin?: string`\n Date string in RFC 3339 format. Only entries created after the specified date will be included.\n\n- `end?: string`\n Date string in RFC 3339 format. Only entries created before the specified date will be included.\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- `include_initial_statements?: boolean`\n Whether to include the initial statement. It is not included by default.\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_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }; amount_due: { amount: number; past_due: number; }; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; interest_details?: { actual_interest_charged: number; daily_balance_amounts: object; effective_apr: object; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: object; prime_rate: string; minimum_interest_charged?: number; }; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }; statement_totals?: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; }`\n\n - `token: string`\n - `account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }`\n - `amount_due: { amount: number; past_due: number; }`\n - `available_credit: number`\n - `created: string`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `days_in_billing_cycle: number`\n - `ending_balance: number`\n - `financial_account_token: string`\n - `payment_due_date: string`\n - `period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `starting_balance: number`\n - `statement_end_date: string`\n - `statement_start_date: string`\n - `statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'`\n - `updated: string`\n - `ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `interest_details?: { actual_interest_charged: number; daily_balance_amounts: { balance_transfers: string; cash_advances: string; purchases: string; }; effective_apr: { balance_transfers: string; cash_advances: string; purchases: string; }; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: { balance_transfers: string; cash_advances: string; purchases: string; }; prime_rate: string; minimum_interest_charged?: number; }`\n - `next_payment_due_date?: string`\n - `next_statement_end_date?: string`\n - `payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }`\n - `statement_totals?: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\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 statement of client.financialAccounts.statements.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(statement);\n}\n```", perLanguage: { go: { method: 'client.FinancialAccounts.Statements.List', @@ -5400,9 +5400,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [ qualified: 'client.financialAccounts.statements.retrieve', params: ['financial_account_token: string;', 'statement_token: string;'], response: - "{ token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; }", + "{ token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; statement_totals?: statement_totals; }", markdown: - "## retrieve\n\n`client.financialAccounts.statements.retrieve(financial_account_token: string, statement_token: string): { token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/statements/{statement_token}`\n\nGet a specific statement for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n- `statement_token: string`\n Globally unique identifier for statements.\n\n### Returns\n\n- `{ token: string; account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }; amount_due: { amount: number; past_due: number; }; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; interest_details?: { actual_interest_charged: number; daily_balance_amounts: object; effective_apr: object; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: object; prime_rate: string; minimum_interest_charged?: number; }; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }; }`\n\n - `token: string`\n - `account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }`\n - `amount_due: { amount: number; past_due: number; }`\n - `available_credit: number`\n - `created: string`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `days_in_billing_cycle: number`\n - `ending_balance: number`\n - `financial_account_token: string`\n - `payment_due_date: string`\n - `period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `starting_balance: number`\n - `statement_end_date: string`\n - `statement_start_date: string`\n - `statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'`\n - `updated: string`\n - `ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `interest_details?: { actual_interest_charged: number; daily_balance_amounts: { balance_transfers: string; cash_advances: string; purchases: string; }; effective_apr: { balance_transfers: string; cash_advances: string; purchases: string; }; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: { balance_transfers: string; cash_advances: string; purchases: string; }; prime_rate: string; minimum_interest_charged?: number; }`\n - `next_payment_due_date?: string`\n - `next_statement_end_date?: string`\n - `payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst statement = await client.financialAccounts.statements.retrieve('statement_token', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(statement);\n```", + "## retrieve\n\n`client.financialAccounts.statements.retrieve(financial_account_token: string, statement_token: string): { token: string; account_standing: object; amount_due: object; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: statement_totals; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: statement_totals; interest_details?: object; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: object; statement_totals?: statement_totals; }`\n\n**get** `/v1/financial_accounts/{financial_account_token}/statements/{statement_token}`\n\nGet a specific statement for a given financial account.\n\n### Parameters\n\n- `financial_account_token: string`\n Globally unique identifier for financial account.\n\n- `statement_token: string`\n Globally unique identifier for statements.\n\n### Returns\n\n- `{ token: string; account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }; amount_due: { amount: number; past_due: number; }; available_credit: number; created: string; credit_limit: number; credit_product_token: string; days_in_billing_cycle: number; ending_balance: number; financial_account_token: string; payment_due_date: string; period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; starting_balance: number; statement_end_date: string; statement_start_date: string; statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'; updated: string; ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; interest_details?: { actual_interest_charged: number; daily_balance_amounts: object; effective_apr: object; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: object; prime_rate: string; minimum_interest_charged?: number; }; next_payment_due_date?: string; next_statement_end_date?: string; payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }; statement_totals?: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }; }`\n\n - `token: string`\n - `account_standing: { consecutive_full_payments_made: number; consecutive_minimum_payments_made: number; consecutive_minimum_payments_missed: number; days_past_due: number; financial_account_state: { status: 'OPEN' | 'CLOSED' | 'SUSPENDED' | 'PENDING'; substatus?: string; }; has_grace: boolean; period_number: number; period_state: 'STANDARD' | 'PROMO' | 'PENALTY'; }`\n - `amount_due: { amount: number; past_due: number; }`\n - `available_credit: number`\n - `created: string`\n - `credit_limit: number`\n - `credit_product_token: string`\n - `days_in_billing_cycle: number`\n - `ending_balance: number`\n - `financial_account_token: string`\n - `payment_due_date: string`\n - `period_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `starting_balance: number`\n - `statement_end_date: string`\n - `statement_start_date: string`\n - `statement_type: 'INITIAL' | 'PERIOD_END' | 'FINAL'`\n - `updated: string`\n - `ytd_totals: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n - `interest_details?: { actual_interest_charged: number; daily_balance_amounts: { balance_transfers: string; cash_advances: string; purchases: string; }; effective_apr: { balance_transfers: string; cash_advances: string; purchases: string; }; interest_calculation_method: 'DAILY' | 'AVERAGE_DAILY'; interest_for_period: { balance_transfers: string; cash_advances: string; purchases: string; }; prime_rate: string; minimum_interest_charged?: number; }`\n - `next_payment_due_date?: string`\n - `next_statement_end_date?: string`\n - `payoff_details?: { minimum_payment_months: string; minimum_payment_total: string; payoff_period_length_months: number; payoff_period_monthly_payment_amount: number; payoff_period_payment_total: number; }`\n - `statement_totals?: { balance_transfers: number; cash_advances: number; credits: number; debits: number; fees: number; interest: number; payments: number; purchases: number; credit_details?: object; debit_details?: object; payment_details?: object; }`\n\n### Example\n\n```typescript\nimport Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst statement = await client.financialAccounts.statements.retrieve('statement_token', { financial_account_token: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(statement);\n```", perLanguage: { go: { method: 'client.FinancialAccounts.Statements.Get', diff --git a/src/resources/financial-accounts/statements/statements.ts b/src/resources/financial-accounts/statements/statements.ts index 7ed7769d..10ee9371 100644 --- a/src/resources/financial-accounts/statements/statements.ts +++ b/src/resources/financial-accounts/statements/statements.ts @@ -172,6 +172,8 @@ export interface Statement { * Details on number and size of payments to pay off balance */ payoff_details?: Statement.PayoffDetails | null; + + statement_totals?: FinancialAccountsAPI.StatementTotals; } export namespace Statement { From 2ab987bc66cefb5d45e316a0c675101fe9c6cd11 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 13:42:21 +0000 Subject: [PATCH 17/17] release: 0.136.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 34 +++++++++++++++++++++++++++++++ package.json | 2 +- packages/mcp-server/manifest.json | 2 +- packages/mcp-server/package.json | 2 +- packages/mcp-server/src/server.ts | 2 +- src/version.ts | 2 +- 7 files changed, 40 insertions(+), 6 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3799cbc2..d62785c5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.135.0" + ".": "0.136.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d9ef74c..982aecc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,39 @@ # Changelog +## 0.136.0 (2026-04-02) + +Full Changelog: [v0.135.0...v0.136.0](https://github.com/lithic-com/lithic-node/compare/v0.135.0...v0.136.0) + +### Features + +* **api:** add decline count attributes to auth-rules v2 ([d004ede](https://github.com/lithic-com/lithic-node/commit/d004ede97fda3a5840c8843a648fe5a3977d2d30)) +* **api:** add override_company_name parameter to payments ACH ([954b27e](https://github.com/lithic-com/lithic-node/commit/954b27e3fb8dd7b8c55ea57b42d878094efbe3d8)) +* **api:** add statement_totals field to Statement response ([e3813f7](https://github.com/lithic-com/lithic-node/commit/e3813f70cf8e408de65ec058a39b137cd74c2dfe)) + + +### Bug Fixes + +* **internal:** gitignore generated `oidc` dir ([08c0b61](https://github.com/lithic-com/lithic-node/commit/08c0b61957f3be0c9c52196cf5af017b136d64ee)) + + +### Chores + +* **ci:** escape input path in publish-npm workflow ([699d85e](https://github.com/lithic-com/lithic-node/commit/699d85e576bdb3d6c25f868c5b6bba2e3772598b)) +* **ci:** skip lint on metadata-only changes ([10dfba6](https://github.com/lithic-com/lithic-node/commit/10dfba6a8f96b1df7d76885f0a762f50b2ada322)) +* **internal:** codegen related update ([827a434](https://github.com/lithic-com/lithic-node/commit/827a4344ef5a4e6a47a58564a69373d1135dedcf)) +* **internal:** improve local docs search for MCP servers ([f3658af](https://github.com/lithic-com/lithic-node/commit/f3658af5dfea2fa5b42c9471054945481153ef99)) +* **internal:** improve local docs search for MCP servers ([231f6a0](https://github.com/lithic-com/lithic-node/commit/231f6a037beea43f90512f3eb6bee560a0233a45)) +* **internal:** support custom-instructions-path flag in MCP servers ([21854f4](https://github.com/lithic-com/lithic-node/commit/21854f4bfde44d17f4f22a0f25913f7e91d87c21)) +* **internal:** support local docs search in MCP servers ([c7f9b6a](https://github.com/lithic-com/lithic-node/commit/c7f9b6a3ef5ebd16763c7f17b9c93b407e32a4b2)) +* **internal:** support type annotations when running MCP in local execution mode ([4f94af4](https://github.com/lithic-com/lithic-node/commit/4f94af4683c5c6116e230e95388685066063483b)) +* **mcp-server:** add support for session id, forward client info ([9f3f1cb](https://github.com/lithic-com/lithic-node/commit/9f3f1cbbb34756d4d92ef000e9554a7580a775d8)) +* **mcp-server:** log client info ([2e1174a](https://github.com/lithic-com/lithic-node/commit/2e1174ac9aa88945719d45758ea713ebc5c8eaa8)) + + +### Documentation + +* **api:** clarify nature_of_business and qr_code_url field constraints ([c36c997](https://github.com/lithic-com/lithic-node/commit/c36c99779ede1d40967ed1763e5124e2f38c3db1)) + ## 0.135.0 (2026-03-23) Full Changelog: [v0.134.0...v0.135.0](https://github.com/lithic-com/lithic-node/compare/v0.134.0...v0.135.0) diff --git a/package.json b/package.json index 9c4285a8..0b9492b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lithic", - "version": "0.135.0", + "version": "0.136.0", "description": "The official TypeScript library for the Lithic API", "author": "Lithic ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/manifest.json b/packages/mcp-server/manifest.json index 93cd73d1..9b1ce86c 100644 --- a/packages/mcp-server/manifest.json +++ b/packages/mcp-server/manifest.json @@ -1,7 +1,7 @@ { "dxt_version": "0.2", "name": "lithic-mcp", - "version": "0.135.0", + "version": "0.136.0", "description": "The official MCP Server for the Lithic API", "author": { "name": "Lithic", diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 98904894..68b4a6b6 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -1,6 +1,6 @@ { "name": "lithic-mcp", - "version": "0.135.0", + "version": "0.136.0", "description": "The official MCP Server for the Lithic API", "author": "Lithic ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index fd781e91..708528d0 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -29,7 +29,7 @@ export const newMcpServer = async ({ new McpServer( { name: 'lithic_api', - version: '0.135.0', + version: '0.136.0', }, { instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }), diff --git a/src/version.ts b/src/version.ts index b35cd532..23d9082b 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.135.0'; // x-release-please-version +export const VERSION = '0.136.0'; // x-release-please-version