From c5475ef1525294e6a50e47637e3479ae5b4c6866 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 19:11:33 +0000 Subject: [PATCH 01/22] fix(types): make fields nullable in account-holders, accounts, and cards --- .stats.yml | 4 ++-- src/resources/account-holders/account-holders.ts | 6 +++--- src/resources/accounts.ts | 6 ++++-- src/resources/cards/cards.ts | 15 ++++++++------- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1a1957f0..ccbfde87 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d29b68bb85936070878d8badaa8a7c5991313285e70a990bc812c838eba85373.yml -openapi_spec_hash: 54b44da68df22eb0ea99f2bc564667a2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-dc8aacc11d74a1e25c95ba549dd0f4a4e735cbf7562fc6b17b0c81d62fd5475c.yml +openapi_spec_hash: 1906583f260a3e9ace5ae38fd2254763 config_hash: ac8326134e692f3f3bdec82396bbec80 diff --git a/src/resources/account-holders/account-holders.ts b/src/resources/account-holders/account-holders.ts index 246e076a..f3bb224c 100644 --- a/src/resources/account-holders/account-holders.ts +++ b/src/resources/account-holders/account-holders.ts @@ -1284,7 +1284,7 @@ export namespace AccountHolderUpdateResponse { email?: string; /** - * The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + * The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account * holder is not KYC-Exempt. */ exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; @@ -1839,10 +1839,10 @@ export interface AccountHolderSimulateEnrollmentReviewResponse { email?: string; /** - * The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + * The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account * holder is not KYC-Exempt. */ - exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER'; + exemption_type?: 'AUTHORIZED_USER' | 'PREPAID_CARD_USER' | null; /** * Customer-provided token that indicates a relationship with an object outside of diff --git a/src/resources/accounts.ts b/src/resources/accounts.ts index b73824ca..5468f897 100644 --- a/src/resources/accounts.ts +++ b/src/resources/accounts.ts @@ -172,7 +172,8 @@ export interface Account { | 'ISSUER_REQUEST' | 'NOT_ACTIVE' | 'INTERNAL_REVIEW' - | 'OTHER'; + | 'OTHER' + | null; /** * @deprecated @@ -406,7 +407,8 @@ export interface AccountUpdateParams { | 'ISSUER_REQUEST' | 'NOT_ACTIVE' | 'INTERNAL_REVIEW' - | 'OTHER'; + | 'OTHER' + | null; /** * @deprecated Address used during Address Verification Service (AVS) checks during diff --git a/src/resources/cards/cards.ts b/src/resources/cards/cards.ts index 0ba3ba9b..0cf91fe7 100644 --- a/src/resources/cards/cards.ts +++ b/src/resources/cards/cards.ts @@ -524,9 +524,9 @@ export interface NonPCICard { created: string; /** - * Deprecated: Funding account for the card. + * Funding account for a card */ - funding: NonPCICard.Funding; + funding: NonPCICard.Funding | null; /** * Last four digits of the card number. @@ -611,7 +611,7 @@ export interface NonPCICard { * after tokenization. This artwork must be approved by Mastercard and configured * by Lithic to use. */ - digital_card_art_token?: string; + digital_card_art_token?: string | null; /** * Two digit (MM) expiry month. @@ -652,7 +652,7 @@ export interface NonPCICard { * before use. Specifies the configuration (i.e., physical card art) that the card * should be manufactured with. */ - product_id?: string; + product_id?: string | null; /** * If the card is a replacement for another card, the globally unique identifier @@ -693,12 +693,13 @@ export interface NonPCICard { | 'INTERNAL_REVIEW' | 'EXPIRED' | 'UNDELIVERABLE' - | 'OTHER'; + | 'OTHER' + | null; } export namespace NonPCICard { /** - * Deprecated: Funding account for the card. + * Funding account for a card */ export interface Funding { /** @@ -740,7 +741,7 @@ export namespace NonPCICard { /** * The nickname given to the `FundingAccount` or `null` if it has no nickname. */ - nickname?: string; + nickname?: string | null; } } From 5e2ba1b3dcf640c0e8938193c12a32689d444ad5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 19:35:18 +0000 Subject: [PATCH 02/22] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ccbfde87..a0da8756 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-dc8aacc11d74a1e25c95ba549dd0f4a4e735cbf7562fc6b17b0c81d62fd5475c.yml -openapi_spec_hash: 1906583f260a3e9ace5ae38fd2254763 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-599dd2ac665b09566a84c4871ffb3b7313f6b40d0808b8ab4df63bec608b4f9f.yml +openapi_spec_hash: 429e0ad5e3aae4f63935859c2ac64fdc config_hash: ac8326134e692f3f3bdec82396bbec80 From bb95c1f529a85c3e04eab6783b1f7301e6085670 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 10:32:10 +0000 Subject: [PATCH 03/22] chore(internal): update docs ordering --- packages/mcp-server/src/local-docs-search.ts | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index 553f80bd..8efb6988 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -10236,24 +10236,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [ const EMBEDDED_READMES: { language: string; content: string }[] = [ { - language: 'python', + language: 'go', 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', + '# 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: 'go', + language: 'java', 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', + '# 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: 'terraform', + language: 'kotlin', 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', + '# 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', }, { - language: 'typescript', + language: 'python', 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", + '# 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: 'ruby', @@ -10261,14 +10261,14 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [ '# 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', + language: 'terraform', 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', + '# 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: 'kotlin', + language: 'typescript', 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', + "# 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", }, ]; From eb0bf7c3e099e87bca8f2997d582fdb10a2b796c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 13:58:17 +0000 Subject: [PATCH 04/22] chore(internal): more robust bootstrap script --- scripts/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bootstrap b/scripts/bootstrap index a8b69ff3..2e315f53 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,7 +4,7 @@ set -e cd "$(dirname "$0")/.." -if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { echo -n "==> Install Homebrew dependencies? (y/N): " read -r response From f64d75431f41bef55ed246bf3da3d8a1183fd327 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 13:31:18 +0000 Subject: [PATCH 05/22] chore: restructure docs search code --- packages/mcp-server/src/local-docs-search.ts | 4288 +++++++++--------- 1 file changed, 2144 insertions(+), 2144 deletions(-) diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index 8efb6988..46f02084 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -62,13 +62,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "import Lithic from 'lithic';\n\nconst client = new Lithic();\n\nconst apiStatus = await client.apiStatus();\n\nconsole.log(apiStatus.message);", }, - http: { - example: 'curl https://api.lithic.com/v1/status \\\n -H "Authorization: $LITHIC_API_KEY"', + python: { + method: 'api_status', + example: + 'from lithic import Lithic\n\nclient = Lithic()\napi_status = client.api_status()\nprint(api_status.message)', }, java: { method: 'apiStatus', @@ -80,20 +82,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.APIStatus', example: - 'from lithic import Lithic\n\nclient = Lithic()\napi_status = client.api_status()\nprint(api_status.message)', + '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', }, 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);", + http: { + example: 'curl https://api.lithic.com/v1/status \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -117,13 +117,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { - example: 'curl https://api.lithic.com/v1/accounts \\\n -H "Authorization: $LITHIC_API_KEY"', + 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)', }, java: { method: 'accounts().list', @@ -135,20 +137,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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}", + http: { + example: 'curl https://api.lithic.com/v1/accounts \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -166,14 +166,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.accounts.retrieve', 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', + "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);", }, - http: { + python: { + method: 'accounts.retrieve', example: - 'curl https://api.lithic.com/v1/accounts/$ACCOUNT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'accounts().retrieve', @@ -185,20 +186,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Accounts.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/accounts/$ACCOUNT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -226,14 +226,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Accounts.Update', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'accounts.update', 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 '{}'", + '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)', }, java: { method: 'accounts().update', @@ -245,20 +246,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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);", + "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 '{}'", }, }, }, @@ -277,14 +277,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.accounts.retrieveSpendLimits', 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', + "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);", }, - http: { + python: { + method: 'accounts.retrieve_spend_limits', example: - 'curl https://api.lithic.com/v1/accounts/$ACCOUNT_TOKEN/spend_limits \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'accounts().retrieveSpendLimits', @@ -296,20 +297,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Accounts.GetSpendLimits', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/accounts/$ACCOUNT_TOKEN/spend_limits \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -328,14 +328,15 @@ 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[]; }[]; }", perLanguage: { - go: { - method: 'client.AccountHolders.New', + typescript: { + method: 'client.accountHolders.create', 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', + "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);", }, - http: { + python: { + method: 'account_holders.create', 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 }\'', + '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)', }, java: { method: 'accountHolders().create', @@ -347,20 +348,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AccountHolders.New', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -380,14 +380,15 @@ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'account_holders.update', 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 }\'', + '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)', }, java: { method: 'accountHolders().update', @@ -399,20 +400,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AccountHolders.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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -430,14 +430,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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.Get', + typescript: { + method: 'client.accountHolders.retrieve', 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', + "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);", }, - http: { + python: { + method: 'account_holders.retrieve', example: - 'curl https://api.lithic.com/v1/account_holders/$ACCOUNT_HOLDER_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'accountHolders().retrieve', @@ -449,20 +450,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AccountHolders.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/account_holders/$ACCOUNT_HOLDER_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -481,14 +481,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'account_holders.upload_document', 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 }\'', + '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)', }, java: { method: 'accountHolders().uploadDocument', @@ -500,20 +501,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AccountHolders.UploadDocument', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -532,14 +532,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'account_holders.list_documents', example: - 'curl https://api.lithic.com/v1/account_holders/$ACCOUNT_HOLDER_TOKEN/documents \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'accountHolders().listDocuments', @@ -551,20 +552,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AccountHolders.ListDocuments', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/account_holders/$ACCOUNT_HOLDER_TOKEN/documents \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -583,14 +583,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.accountHolders.retrieveDocument', 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', + "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);", }, - http: { + python: { + method: 'account_holders.retrieve_document', example: - 'curl https://api.lithic.com/v1/account_holders/$ACCOUNT_HOLDER_TOKEN/documents/$DOCUMENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'accountHolders().retrieveDocument', @@ -602,20 +603,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AccountHolders.GetDocument', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/account_holders/$ACCOUNT_HOLDER_TOKEN/documents/$DOCUMENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -646,15 +646,17 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.AccountHolders.List', + typescript: { + 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"', + "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}", }, - java: { + 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)', + }, + 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}', @@ -664,20 +666,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AccountHolders.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)', + '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', }, 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}", + http: { + example: 'curl https://api.lithic.com/v1/account_holders \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -700,14 +700,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'account_holders.simulate_enrollment_review', 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 '{}'", + '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)', }, java: { method: 'accountHolders().simulateEnrollmentReview', @@ -719,20 +720,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AccountHolders.SimulateEnrollmentReview', 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)', + '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', }, 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', + http: { 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);", + "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 '{}'", }, }, }, @@ -755,14 +755,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.AccountHolders.SimulateEnrollmentDocumentReview', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'account_holders.simulate_enrollment_document_review', 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 }\'', + '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)', }, java: { method: 'accountHolders().simulateEnrollmentDocumentReview', @@ -774,20 +775,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AccountHolders.SimulateEnrollmentDocumentReview', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -816,14 +816,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.accountHolders.entities.create', 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', + "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);", }, - http: { + python: { + method: 'account_holders.entities.create', 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 }\'', + '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)', }, java: { method: 'accountHolders().entities().create', @@ -835,20 +836,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AccountHolders.Entities.New', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -867,14 +867,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'account_holders.entities.delete', example: - 'curl https://api.lithic.com/v1/account_holders/$ACCOUNT_HOLDER_TOKEN/entities/$ENTITY_TOKEN \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'accountHolders().entities().delete', @@ -886,20 +887,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AccountHolders.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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/account_holders/$ACCOUNT_HOLDER_TOKEN/entities/$ENTITY_TOKEN \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -917,14 +917,15 @@ 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', + typescript: { + method: 'client.authRules.v2.create', 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', + "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);", }, - http: { + python: { + method: 'auth_rules.v2.create', 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 }\'', + '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)', }, java: { method: 'authRules().v2().create', @@ -936,20 +937,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AuthRules.V2.New', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -977,13 +977,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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; parameters?: object; }[]; } | { 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 | 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; parameters?: object; }[]; } | { 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 | 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', + typescript: { + 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', + "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}", }, - http: { - example: 'curl https://api.lithic.com/v2/auth_rules \\\n -H "Authorization: $LITHIC_API_KEY"', + 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)', }, java: { method: 'authRules().v2().list', @@ -995,20 +997,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AuthRules.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)', + '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', }, 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}", + http: { + example: 'curl https://api.lithic.com/v2/auth_rules \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -1026,14 +1026,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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; parameters?: object; }[]; } | { 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 | 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; parameters?: object; }[]; } | { 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 | 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', + typescript: { + method: 'client.authRules.v2.retrieve', 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', + "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);", }, - http: { + python: { + method: 'auth_rules.v2.retrieve', example: - 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'authRules().v2().retrieve', @@ -1045,20 +1046,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AuthRules.V2.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -1078,14 +1078,15 @@ 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.Update', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'auth_rules.v2.update', 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 '{}'", + '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)', }, java: { method: 'authRules().v2().update', @@ -1097,20 +1098,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AuthRules.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)', + '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', }, 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', + http: { 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);", + "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 '{}'", }, }, }, @@ -1126,14 +1126,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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');", }, - http: { + python: { + method: 'auth_rules.v2.delete', example: - 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'authRules().v2().delete', @@ -1145,20 +1146,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AuthRules.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)', + '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', }, 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', + http: { 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');", + 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -1180,14 +1180,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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; parameters?: { interval?: 'LIFETIME' | '7D' | '30D' | '90D'; scope?: 'CARD' | 'ACCOUNT' | 'BUSINESS_ACCOUNT'; }; }[]; } | { 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; } | { scope: 'CARD' | 'ACCOUNT' | 'BUSINESS_ACCOUNT'; type: 'TRANSACTION_HISTORY_SIGNALS'; 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; parameters?: object; }[]; } | { 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 | 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; parameters?: object; }[]; } | { 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 | 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```", perLanguage: { - go: { - method: 'client.AuthRules.V2.Draft', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'auth_rules.v2.draft', 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 '{}'", + '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)', }, java: { method: 'authRules().v2().draft', @@ -1199,20 +1200,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AuthRules.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)', + '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', }, 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', + http: { 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);", + "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 '{}'", }, }, }, @@ -1230,14 +1230,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'auth_rules.v2.list_versions', example: - 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/versions \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'authRules().v2().listVersions', @@ -1249,20 +1250,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AuthRules.V2.ListVersions', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/versions \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -1281,14 +1281,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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; parameters?: object; }[]; } | { 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 | 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; parameters?: object; }[]; } | { 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 | 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'auth_rules.v2.promote', example: - 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/promote \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'authRules().v2().promote', @@ -1300,20 +1301,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AuthRules.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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/promote \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -1332,14 +1332,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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: { date: string; versions: object[]; }[]; end: string; }`\n\n - `auth_rule_token: string`\n - `begin: string`\n - `daily_statistics: { date: string; versions: { action_counts: object; examples: { actions: object | object | object | object | object | object | object[]; event_token: string; timestamp: string; transaction_token?: 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', + typescript: { + method: 'client.authRules.v2.retrieveReport', 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', + "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);", }, - http: { + python: { + method: 'auth_rules.v2.retrieve_report', example: - 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/report \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'authRules().v2().retrieveReport', @@ -1351,20 +1352,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AuthRules.V2.GetReport', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/report \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -1383,14 +1383,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.authRules.v2.retrieveFeatures', 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', + "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);", }, - http: { + python: { + method: 'auth_rules.v2.retrieve_features', example: - 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/features \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'authRules().v2().retrieveFeatures', @@ -1402,20 +1403,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AuthRules.V2.GetFeatures', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/features \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -1443,14 +1443,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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; transaction_token: string; } | { 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; transaction_token: string; } | { token: string; actions: object | object[]; auth_rule_token: string; evaluation_time: string; event_stream: 'TOKENIZATION'; event_token: string; mode: 'ACTIVE' | 'INACTIVE'; rule_version: number; transaction_token: string; } | { 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; transaction_token: string; }`\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; transaction_token: string; } | { 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; transaction_token: string; } | { 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; transaction_token: string; } | { 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; transaction_token: string; }`\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', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'auth_rules.v2.list_results', example: - 'curl https://api.lithic.com/v2/auth_rules/results \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'authRules().v2().listResults', @@ -1462,20 +1463,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AuthRules.V2.ListResults', 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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v2/auth_rules/results \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -1493,14 +1493,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.authRules.v2.backtests.create', 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', + "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);", }, - http: { + python: { + method: 'auth_rules.v2.backtests.create', 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 '{}'", + '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)', }, java: { method: 'authRules().v2().backtests().create', @@ -1512,20 +1513,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AuthRules.V2.Backtests.New', 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)', + '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', }, 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', + http: { 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);", + "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 '{}'", }, }, }, @@ -1544,14 +1544,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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; transaction_token?: string; }[]; version?: number; }; draft_version?: { approved?: number; challenged?: number; declined?: number; examples?: { decision?: 'APPROVED' | 'DECLINED' | 'CHALLENGED'; event_token?: string; timestamp?: string; transaction_token?: 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', + typescript: { + method: 'client.authRules.v2.backtests.retrieve', 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', + "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);", }, - http: { + python: { + method: 'auth_rules.v2.backtests.retrieve', example: - 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/backtests/$AUTH_RULE_BACKTEST_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'authRules().v2().backtests().retrieve', @@ -1563,20 +1564,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AuthRules.V2.Backtests.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v2/auth_rules/$AUTH_RULE_TOKEN/backtests/$AUTH_RULE_BACKTEST_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -1593,14 +1593,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.authStreamEnrollment.retrieveSecret', 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', + "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);", }, - http: { + python: { + method: 'auth_stream_enrollment.retrieve_secret', example: - 'curl https://api.lithic.com/v1/auth_stream/secret \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'authStreamEnrollment().retrieveSecret', @@ -1612,20 +1613,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AuthStreamEnrollment.GetSecret', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/auth_stream/secret \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -1641,14 +1641,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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();", }, - http: { + python: { + method: 'auth_stream_enrollment.rotate_secret', example: - 'curl https://api.lithic.com/v1/auth_stream/secret/rotate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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()', }, java: { method: 'authStreamEnrollment().rotateSecret', @@ -1660,20 +1661,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AuthStreamEnrollment.RotateSecret', 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()', + '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', }, 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', + http: { 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();", + 'curl https://api.lithic.com/v1/auth_stream/secret/rotate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -1690,14 +1690,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.tokenizationDecisioning.retrieveSecret', 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', + "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);", }, - http: { + python: { + method: 'tokenization_decisioning.retrieve_secret', example: - 'curl https://api.lithic.com/v1/tokenization_decisioning/secret \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'tokenizationDecisioning().retrieveSecret', @@ -1709,20 +1710,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.TokenizationDecisioning.GetSecret', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/tokenization_decisioning/secret \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -1739,14 +1739,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'tokenization_decisioning.rotate_secret', example: - 'curl https://api.lithic.com/v1/tokenization_decisioning/secret/rotate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'tokenizationDecisioning().rotateSecret', @@ -1758,20 +1759,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.TokenizationDecisioning.RotateSecret', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/tokenization_decisioning/secret/rotate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -1799,14 +1799,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Tokenizations.Simulate', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'tokenizations.simulate', 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 }\'', + '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)', }, java: { method: 'tokenizations().simulate', @@ -1818,20 +1819,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -1858,13 +1858,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { - example: 'curl https://api.lithic.com/v1/tokenizations \\\n -H "Authorization: $LITHIC_API_KEY"', + 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)', }, java: { method: 'tokenizations().list', @@ -1876,20 +1878,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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}", + http: { + example: 'curl https://api.lithic.com/v1/tokenizations \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -1907,14 +1907,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.tokenizations.retrieve', 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', + "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);", }, - http: { + python: { + method: 'tokenizations.retrieve', example: - 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'tokenizations().retrieve', @@ -1926,20 +1927,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Tokenizations.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -1956,14 +1956,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Tokenizations.Pause', + typescript: { + 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', + "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');", }, - http: { + python: { + method: 'tokenizations.pause', example: - 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/pause \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'tokenizations().pause', @@ -1975,20 +1976,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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');", + 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/pause \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -2005,14 +2005,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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');", }, - http: { + python: { + method: 'tokenizations.unpause', example: - 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/unpause \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'tokenizations().unpause', @@ -2024,20 +2025,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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');", + 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/unpause \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -2054,14 +2054,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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');", }, - http: { + python: { + method: 'tokenizations.deactivate', example: - 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/deactivate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'tokenizations().deactivate', @@ -2073,20 +2074,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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');", + 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/deactivate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -2103,14 +2103,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Tokenizations.Activate', + typescript: { + 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', + "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');", }, - http: { + python: { + method: 'tokenizations.activate', example: - 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/activate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'tokenizations().activate', @@ -2122,20 +2123,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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');", + 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/activate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -2155,14 +2155,15 @@ 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```", perLanguage: { - go: { - method: 'client.Tokenizations.ResendActivationCode', + typescript: { + 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', + "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});", }, - http: { + python: { + method: 'tokenizations.resend_activation_code', example: - 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/resend_activation_code \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'tokenizations().resendActivationCode', @@ -2174,20 +2175,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Tokenizations.ResendActivationCode', 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)', + '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', }, 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', + http: { 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});", + 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/resend_activation_code \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -2206,14 +2206,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'tokenizations.update_digital_card_art', example: - 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/update_digital_card_art \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'tokenizations().updateDigitalCardArt', @@ -2225,20 +2226,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Tokenizations.UpdateDigitalCardArt', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/tokenizations/$TOKENIZATION_TOKEN/update_digital_card_art \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -2265,13 +2265,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { - example: 'curl https://api.lithic.com/v1/cards \\\n -H "Authorization: $LITHIC_API_KEY"', + 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)', }, java: { method: 'cards().list', @@ -2283,20 +2285,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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}", + http: { + example: 'curl https://api.lithic.com/v1/cards \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -2337,14 +2337,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.cards.create', 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', + "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);", }, - http: { + python: { + method: 'cards.create', 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 }\'', + '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)', }, java: { method: 'cards().create', @@ -2356,20 +2357,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Cards.New', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -2387,14 +2387,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.cards.retrieve', 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', + "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);", }, - http: { + python: { + method: 'cards.retrieve', example: - 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'cards().retrieve', @@ -2406,20 +2407,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Cards.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -2450,14 +2450,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Cards.Update', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'cards.update', 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 }\'', + '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)', }, java: { method: 'cards().update', @@ -2469,20 +2470,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -2509,14 +2509,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'cards.provision', 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 '{}'", + '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)', }, java: { method: 'cards().provision', @@ -2528,20 +2529,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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);", + "curl https://api.lithic.com/v1/cards/$CARD_TOKEN/provision \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", }, }, }, @@ -2566,14 +2566,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'cards.reissue', 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 '{}'", + '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)', }, java: { method: 'cards().reissue', @@ -2585,20 +2586,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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);", + "curl https://api.lithic.com/v1/cards/$CARD_TOKEN/reissue \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", }, }, }, @@ -2616,13 +2616,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { - example: 'curl https://api.lithic.com/v1/embed/card \\\n -H "Authorization: $LITHIC_API_KEY"', + 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)', }, java: { method: 'cards().embed', @@ -2634,20 +2636,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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);", + http: { + example: 'curl https://api.lithic.com/v1/embed/card \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -2666,14 +2666,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.cards.retrieveSpendLimits', 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', + "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);", }, - http: { + python: { + method: 'cards.retrieve_spend_limits', example: - 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN/spend_limits \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'cards().retrieveSpendLimits', @@ -2685,20 +2686,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Cards.GetSpendLimits', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN/spend_limits \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -2725,14 +2725,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'cards.renew', 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 }\'', + '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)', }, java: { method: 'cards().renew', @@ -2744,20 +2745,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -2776,14 +2776,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Cards.SearchByPan', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'cards.search_by_pan', 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 }\'', + '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)', }, java: { method: 'cards().searchByPan', @@ -2795,20 +2796,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Cards.SearchByPan', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -2833,14 +2833,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Cards.ConvertPhysical', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'cards.convert_physical', 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 }\'', + '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)', }, java: { method: 'cards().convertPhysical', @@ -2852,20 +2853,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Cards.ConvertPhysical', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -2890,14 +2890,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'cards.web_provision', 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 '{}'", + '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)', }, java: { method: 'cards().webProvision', @@ -2909,20 +2910,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Cards.WebProvision', 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)', + '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', }, 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', + http: { 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);", + "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 '{}'", }, }, }, @@ -2940,14 +2940,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'cards.balances.list', example: - 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN/balances \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'cards().balances().list', @@ -2959,20 +2960,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN/balances \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -2999,14 +2999,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'cards.financial_transactions.list', example: - 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN/financial_transactions \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'cards().financialTransactions().list', @@ -3018,20 +3019,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Cards.FinancialTransactions.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN/financial_transactions \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -3049,14 +3049,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.cards.financialTransactions.retrieve', 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', + "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);", }, - http: { + python: { + method: 'cards.financial_transactions.retrieve', example: - 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN/financial_transactions/$FINANCIAL_TRANSACTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'cards().financialTransactions().retrieve', @@ -3068,20 +3069,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Cards.FinancialTransactions.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/cards/$CARD_TOKEN/financial_transactions/$FINANCIAL_TRANSACTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -3105,14 +3105,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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.List', + typescript: { + 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', + "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}", }, - http: { - example: - 'curl https://api.lithic.com/v1/card_bulk_orders \\\n -H "Authorization: $LITHIC_API_KEY"', + 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)', }, java: { method: 'cardBulkOrders().list', @@ -3124,20 +3125,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.CardBulkOrders.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/card_bulk_orders \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -3160,14 +3160,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.cardBulkOrders.create', 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', + "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);", }, - http: { + python: { + method: 'card_bulk_orders.create', 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 }\'', + '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)', }, java: { method: 'cardBulkOrders().create', @@ -3179,20 +3180,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + go: { + method: 'client.CardBulkOrders.New', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -3210,14 +3210,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.cardBulkOrders.retrieve', 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', + "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);", }, - http: { + python: { + method: 'card_bulk_orders.retrieve', example: - 'curl https://api.lithic.com/v1/card_bulk_orders/$BULK_ORDER_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'cardBulkOrders().retrieve', @@ -3229,20 +3230,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.CardBulkOrders.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/card_bulk_orders/$BULK_ORDER_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -3261,14 +3261,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.CardBulkOrders.Update', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'card_bulk_orders.update', 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 }\'', + '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)', }, java: { method: 'cardBulkOrders().update', @@ -3280,20 +3281,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.CardBulkOrders.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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -3316,13 +3316,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { - example: 'curl https://api.lithic.com/v1/balances \\\n -H "Authorization: $LITHIC_API_KEY"', + 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)', }, java: { method: 'balances().list', @@ -3334,20 +3336,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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}", + http: { + example: 'curl https://api.lithic.com/v1/balances \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -3373,13 +3373,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { - example: 'curl https://api.lithic.com/v1/disputes \\\n -H "Authorization: $LITHIC_API_KEY"', + 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)', }, java: { method: 'disputes().list', @@ -3391,20 +3393,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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}", + http: { + example: 'curl https://api.lithic.com/v1/disputes \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -3428,14 +3428,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.disputes.create', 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', + "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);", }, - http: { + python: { + method: 'disputes.create', 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 }\'', + '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)', }, java: { method: 'disputes().create', @@ -3447,20 +3448,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Disputes.New', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -3478,14 +3478,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.disputes.retrieve', 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', + "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);", }, - http: { + python: { + method: 'disputes.retrieve', example: - 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'disputes().retrieve', @@ -3497,20 +3498,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Disputes.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -3528,14 +3528,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'disputes.delete', example: - 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'disputes().delete', @@ -3547,20 +3548,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -3584,14 +3584,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'disputes.update', 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 '{}'", + '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)', }, java: { method: 'disputes().update', @@ -3603,20 +3604,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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);", + "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 '{}'", }, }, }, @@ -3641,14 +3641,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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.ListEvidences', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'disputes.list_evidences', example: - 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN/evidences \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'disputes().listEvidences', @@ -3660,20 +3661,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Disputes.ListEvidences', 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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN/evidences \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -3692,14 +3692,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Disputes.InitiateEvidenceUpload', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'disputes.initiate_evidence_upload', example: - 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN/evidences \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'disputes().initiateEvidenceUpload', @@ -3711,20 +3712,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Disputes.InitiateEvidenceUpload', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN/evidences \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -3742,14 +3742,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.disputes.retrieveEvidence', 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', + "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);", }, - http: { + python: { + method: 'disputes.retrieve_evidence', example: - 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN/evidences/$EVIDENCE_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'disputes().retrieveEvidence', @@ -3761,20 +3762,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Disputes.GetEvidence', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN/evidences/$EVIDENCE_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -3793,14 +3793,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Disputes.DeleteEvidence', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'disputes.delete_evidence', example: - 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN/evidences/$EVIDENCE_TOKEN \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'disputes().deleteEvidence', @@ -3812,20 +3813,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Disputes.DeleteEvidence', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/disputes/$DISPUTE_TOKEN/evidences/$EVIDENCE_TOKEN \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -3852,13 +3852,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { - example: 'curl https://api.lithic.com/v2/disputes \\\n -H "Authorization: $LITHIC_API_KEY"', + 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)', }, java: { method: 'disputesV2().list', @@ -3870,20 +3872,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.DisputesV2.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)', + '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', }, 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}", + http: { + example: 'curl https://api.lithic.com/v2/disputes \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -3901,14 +3901,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.DisputesV2.Get', + typescript: { + method: 'client.disputesV2.retrieve', 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', + "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);", }, - http: { + python: { + method: 'disputes_v2.retrieve', example: - 'curl https://api.lithic.com/v2/disputes/$DISPUTE_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'disputesV2().retrieve', @@ -3920,20 +3921,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.DisputesV2.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v2/disputes/$DISPUTE_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -3958,13 +3958,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { - example: 'curl https://api.lithic.com/v1/events \\\n -H "Authorization: $LITHIC_API_KEY"', + 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)', }, java: { method: 'events().list', @@ -3976,20 +3978,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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}", + http: { + example: 'curl https://api.lithic.com/v1/events \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -4006,14 +4006,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.events.retrieve', 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', + "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);", }, - http: { + python: { + method: 'events.retrieve', example: - 'curl https://api.lithic.com/v1/events/$EVENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'events().retrieve', @@ -4025,20 +4026,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Events.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/events/$EVENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -4064,14 +4064,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'events.list_attempts', example: - 'curl https://api.lithic.com/v1/events/$EVENT_TOKEN/attempts \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'events().listAttempts', @@ -4083,20 +4084,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Events.ListAttempts', 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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/events/$EVENT_TOKEN/attempts \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -4114,14 +4114,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'events.subscriptions.list', example: - 'curl https://api.lithic.com/v1/event_subscriptions \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'events().subscriptions().list', @@ -4133,20 +4134,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/event_subscriptions \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -4164,14 +4164,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.events.subscriptions.create', 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', + "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);", }, - http: { + python: { + method: 'events.subscriptions.create', 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 }\'', + '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)', }, java: { method: 'events().subscriptions().create', @@ -4183,20 +4184,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Events.Subscriptions.New', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -4214,14 +4214,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.events.subscriptions.retrieve', 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', + "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);", }, - http: { + python: { + method: 'events.subscriptions.retrieve', example: - 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'events().subscriptions().retrieve', @@ -4233,20 +4234,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Events.Subscriptions.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -4270,14 +4270,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Events.Subscriptions.Update', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'events.subscriptions.update', 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 }\'', + '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)', }, java: { method: 'events().subscriptions().update', @@ -4289,20 +4290,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -4318,14 +4318,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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');", }, - http: { + python: { + method: 'events.subscriptions.delete', example: - 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'events().subscriptions().delete', @@ -4337,20 +4338,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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');", + 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -4366,14 +4366,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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');", }, - http: { + python: { + method: 'events.subscriptions.recover', example: - 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/recover \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'events().subscriptions().recover', @@ -4385,20 +4386,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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');", + 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/recover \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -4424,14 +4424,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Events.Subscriptions.ListAttempts', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'events.subscriptions.list_attempts', example: - 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/attempts \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'events().subscriptions().listAttempts', @@ -4443,20 +4444,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Events.Subscriptions.ListAttempts', 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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/attempts \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -4473,14 +4473,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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');", }, - http: { + python: { + method: 'events.subscriptions.replay_missing', example: - 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/replay_missing \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'events().subscriptions().replayMissing', @@ -4492,20 +4493,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Events.Subscriptions.ReplayMissing', 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)', + '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', }, 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', + http: { 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');", + 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/replay_missing \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -4522,14 +4522,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.events.subscriptions.retrieveSecret', 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', + "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);", }, - http: { + python: { + method: 'events.subscriptions.retrieve_secret', example: - 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/secret \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'events().subscriptions().retrieveSecret', @@ -4541,20 +4542,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Events.Subscriptions.GetSecret', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/secret \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -4571,14 +4571,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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');", }, - http: { + python: { + method: 'events.subscriptions.rotate_secret', example: - 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/secret/rotate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'events().subscriptions().rotateSecret', @@ -4590,20 +4591,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Events.Subscriptions.RotateSecret', 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)', + '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', }, 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', + http: { 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');", + 'curl https://api.lithic.com/v1/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/secret/rotate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -4619,14 +4619,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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');", }, - http: { + python: { + method: 'events.subscriptions.send_simulated_example', example: - 'curl https://api.lithic.com/v1/simulate/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/send_example \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'events().subscriptions().sendSimulatedExample', @@ -4638,20 +4639,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Events.Subscriptions.SendSimulatedExample', 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)', + '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', }, 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', + http: { 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');", + 'curl https://api.lithic.com/v1/simulate/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/send_example \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -4667,14 +4667,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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});", }, - http: { + python: { + method: 'events.event_subscriptions.resend', 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"', + '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)', }, java: { method: 'events().eventSubscriptions().resend', @@ -4686,20 +4687,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Events.EventSubscriptions.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)', + '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', }, 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', + http: { 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});", + 'curl https://api.lithic.com/v1/events/$EVENT_TOKEN/event_subscriptions/$EVENT_SUBSCRIPTION_TOKEN/resend \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -4717,14 +4717,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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: { + typescript: { + method: 'client.transfers.create', 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 }\'', + "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);", }, java: { method: 'transfers().create', @@ -4736,15 +4732,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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}', }, + 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', + }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -4766,14 +4766,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.FinancialAccounts.List', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'financial_accounts.list', example: - 'curl https://api.lithic.com/v1/financial_accounts \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'financialAccounts().list', @@ -4785,20 +4786,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/financial_accounts \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -4816,14 +4816,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.financialAccounts.retrieve', 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', + "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);", }, - http: { + python: { + method: 'financial_accounts.retrieve', example: - 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'financialAccounts().retrieve', @@ -4835,20 +4836,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -4866,14 +4866,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'financial_accounts.update', example: - 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN \\\n -X PATCH \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'financialAccounts().update', @@ -4885,20 +4886,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN \\\n -X PATCH \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -4921,14 +4921,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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: 'CLOSED', substatus: 'END_USER_REQUEST' });\n\nconsole.log(financialAccount);\n```", perLanguage: { - go: { - method: 'client.FinancialAccounts.UpdateStatus', + typescript: { + 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.FinancialAccountUpdateStatusParamsStatusClosed),\n\t\t\tSubstatus: lithic.F(lithic.FinancialAccountUpdateStatusParamsSubstatusEndUserRequest),\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', + "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: 'CLOSED', substatus: 'END_USER_REQUEST' },\n);\n\nconsole.log(financialAccount.token);", }, - http: { + python: { + method: 'financial_accounts.update_status', 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": "CLOSED",\n "substatus": "END_USER_REQUEST"\n }\'', + '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="CLOSED",\n substatus="END_USER_REQUEST",\n)\nprint(financial_account.token)', }, java: { method: 'financialAccounts().updateStatus', @@ -4940,20 +4941,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.UpdateStatus', 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="CLOSED",\n substatus="END_USER_REQUEST",\n)\nprint(financial_account.token)', + '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.FinancialAccountUpdateStatusParamsStatusClosed),\n\t\t\tSubstatus: lithic.F(lithic.FinancialAccountUpdateStatusParamsSubstatusEndUserRequest),\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', }, 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: :CLOSED,\n substatus: :END_USER_REQUEST\n)\n\nputs(financial_account)', }, - typescript: { - method: 'client.financialAccounts.updateStatus', + http: { 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: 'CLOSED', substatus: 'END_USER_REQUEST' },\n);\n\nconsole.log(financialAccount.token);", + '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": "CLOSED",\n "substatus": "END_USER_REQUEST"\n }\'', }, }, }, @@ -4977,14 +4977,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.FinancialAccounts.New', + typescript: { + method: 'client.financialAccounts.create', 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', + "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);", }, - http: { + python: { + method: 'financial_accounts.create', 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 }\'', + '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)', }, java: { method: 'financialAccounts().create', @@ -4996,20 +4997,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.New', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -5025,14 +5025,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.FinancialAccounts.RegisterAccountNumber', + typescript: { + 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', + "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});", }, - http: { + python: { + method: 'financial_accounts.register_account_number', 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 }\'', + '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)', }, java: { method: 'financialAccounts().registerAccountNumber', @@ -5044,20 +5045,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.RegisterAccountNumber', 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)', + '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', }, 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', + http: { 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});", + '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 }\'', }, }, }, @@ -5079,14 +5079,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.FinancialAccounts.Balances.List', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'financial_accounts.balances.list', example: - 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/balances \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'financialAccounts().balances().list', @@ -5098,20 +5099,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/balances \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -5138,14 +5138,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'financial_accounts.financial_transactions.list', example: - 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/financial_transactions \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'financialAccounts().financialTransactions().list', @@ -5157,20 +5158,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.FinancialTransactions.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/financial_transactions \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -5189,14 +5189,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.financialAccounts.financialTransactions.retrieve', 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', + "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);", }, - http: { + python: { + method: 'financial_accounts.financial_transactions.retrieve', example: - 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/financial_transactions/$FINANCIAL_TRANSACTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'financialAccounts().financialTransactions().retrieve', @@ -5208,20 +5209,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.FinancialTransactions.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/financial_transactions/$FINANCIAL_TRANSACTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -5239,14 +5239,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.financialAccounts.creditConfiguration.retrieve', 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', + "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);", }, - http: { + python: { + method: 'financial_accounts.credit_configuration.retrieve', example: - 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/credit_configuration \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'financialAccounts().creditConfiguration().retrieve', @@ -5258,20 +5259,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.CreditConfiguration.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/credit_configuration \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -5296,14 +5296,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.FinancialAccounts.CreditConfiguration.Update', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'financial_accounts.credit_configuration.update', example: - 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/credit_configuration \\\n -X PATCH \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'financialAccounts().creditConfiguration().update', @@ -5315,20 +5316,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.CreditConfiguration.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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/credit_configuration \\\n -X PATCH \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -5354,14 +5354,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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; 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', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'financial_accounts.statements.list', example: - 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/statements \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'financialAccounts().statements().list', @@ -5372,21 +5373,20 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + }, + go: { + method: 'client.FinancialAccounts.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/statements \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -5404,14 +5404,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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; 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', + typescript: { + method: 'client.financialAccounts.statements.retrieve', 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', + "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);", }, - http: { + python: { + method: 'financial_accounts.statements.retrieve', example: - 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/statements/$STATEMENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'financialAccounts().statements().retrieve', @@ -5423,20 +5424,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.Statements.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/statements/$STATEMENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -5460,14 +5460,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.FinancialAccounts.Statements.LineItems.List', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'financial_accounts.statements.line_items.list', example: - 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/statements/$STATEMENT_TOKEN/line_items \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'financialAccounts().statements().lineItems().list', @@ -5479,20 +5480,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.Statements.LineItems.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/statements/$STATEMENT_TOKEN/line_items \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -5517,14 +5517,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'financial_accounts.loan_tapes.list', example: - 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/loan_tapes \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'financialAccounts().loanTapes().list', @@ -5536,20 +5537,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.LoanTapes.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/loan_tapes \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -5567,14 +5567,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.financialAccounts.loanTapes.retrieve', 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', + "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);", }, - http: { + python: { + method: 'financial_accounts.loan_tapes.retrieve', example: - 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/loan_tapes/$LOAN_TAPE_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'financialAccounts().loanTapes().retrieve', @@ -5586,20 +5587,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.LoanTapes.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/loan_tapes/$LOAN_TAPE_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -5617,14 +5617,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.financialAccounts.loanTapeConfiguration.retrieve', 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', + "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);", }, - http: { + python: { + method: 'financial_accounts.loan_tape_configuration.retrieve', example: - 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/loan_tape_configuration \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'financialAccounts().loanTapeConfiguration().retrieve', @@ -5636,20 +5637,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.LoanTapeConfiguration.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/loan_tape_configuration \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -5673,14 +5673,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'financial_accounts.interest_tier_schedule.list', example: - 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/interest_tier_schedule \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'financialAccounts().interestTierSchedule().list', @@ -5692,20 +5693,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.InterestTierSchedule.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/interest_tier_schedule \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -5730,14 +5730,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.financialAccounts.interestTierSchedule.create', 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', + "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);", }, - http: { + python: { + method: 'financial_accounts.interest_tier_schedule.create', 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 }\'', + '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)', }, java: { method: 'financialAccounts().interestTierSchedule().create', @@ -5749,20 +5750,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.InterestTierSchedule.New', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -5780,14 +5780,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.financialAccounts.interestTierSchedule.retrieve', 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', + "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);", }, - http: { + python: { + method: 'financial_accounts.interest_tier_schedule.retrieve', example: - 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/interest_tier_schedule/$EFFECTIVE_DATE \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'financialAccounts().interestTierSchedule().retrieve', @@ -5799,20 +5800,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.InterestTierSchedule.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/interest_tier_schedule/$EFFECTIVE_DATE \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -5836,14 +5836,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'financial_accounts.interest_tier_schedule.update', 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 '{}'", + '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)', }, java: { method: 'financialAccounts().interestTierSchedule().update', @@ -5855,20 +5856,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.InterestTierSchedule.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)', + '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', }, 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', + http: { 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);", + "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 '{}'", }, }, }, @@ -5885,14 +5885,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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});", }, - http: { + python: { + method: 'financial_accounts.interest_tier_schedule.delete', 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"', + '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)', }, java: { method: 'financialAccounts().interestTierSchedule().delete', @@ -5904,20 +5905,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FinancialAccounts.InterestTierSchedule.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)', + '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', }, 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', + http: { 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});", + '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"', }, }, }, @@ -5946,13 +5946,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { - example: 'curl https://api.lithic.com/v1/transactions \\\n -H "Authorization: $LITHIC_API_KEY"', + 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)', }, java: { method: 'transactions().list', @@ -5964,20 +5966,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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}", + http: { + example: 'curl https://api.lithic.com/v1/transactions \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -5996,14 +5996,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Transactions.Get', + typescript: { + method: 'client.transactions.retrieve', 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', + "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);", }, - http: { + python: { + method: 'transactions.retrieve', example: - 'curl https://api.lithic.com/v1/transactions/$TRANSACTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'transactions().retrieve', @@ -6015,20 +6016,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Transactions.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/transactions/$TRANSACTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -6060,14 +6060,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Transactions.SimulateAuthorization', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'transactions.simulate_authorization', 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 }\'', + '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)', }, java: { method: 'transactions().simulateAuthorization', @@ -6079,20 +6080,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Transactions.SimulateAuthorization', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -6110,14 +6110,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'transactions.simulate_clearing', 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 }\'', + '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)', }, java: { method: 'transactions().simulateClearing', @@ -6129,20 +6130,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Transactions.SimulateClearing', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -6160,14 +6160,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'transactions.simulate_return', 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 }\'', + '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)', }, java: { method: 'transactions().simulateReturn', @@ -6179,20 +6180,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Transactions.SimulateReturn', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -6210,14 +6210,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'transactions.simulate_return_reversal', 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 }\'', + '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)', }, java: { method: 'transactions().simulateReturnReversal', @@ -6229,20 +6230,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Transactions.SimulateReturnReversal', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -6264,14 +6264,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'transactions.simulate_void', 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 }\'', + '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)', }, java: { method: 'transactions().simulateVoid', @@ -6283,20 +6284,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Transactions.SimulateVoid', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -6323,10 +6323,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", + }, + 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)', }, java: { method: 'transactions().simulateCreditAuthorization', @@ -6338,15 +6343,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + 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);", + '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', }, }, }, @@ -6373,14 +6373,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'transactions.simulate_credit_authorization_advice', 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 }\'', + '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)', }, java: { method: 'transactions().simulateCreditAuthorizationAdvice', @@ -6392,20 +6393,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Transactions.SimulateCreditAuthorizationAdvice', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -6423,14 +6423,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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.SimulateAuthorizationAdvice', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'transactions.simulate_authorization_advice', 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 }\'', + '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)', }, java: { method: 'transactions().simulateAuthorizationAdvice', @@ -6442,20 +6443,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Transactions.SimulateAuthorizationAdvice', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -6471,14 +6471,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Transactions.ExpireAuthorization', + typescript: { + 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', + "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');", }, - http: { + python: { + method: 'transactions.expire_authorization', example: - 'curl https://api.lithic.com/v1/transactions/$TRANSACTION_TOKEN/expire_authorization \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'transactions().expireAuthorization', @@ -6490,20 +6491,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Transactions.ExpireAuthorization', 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)', + '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', }, 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', + http: { 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');", + 'curl https://api.lithic.com/v1/transactions/$TRANSACTION_TOKEN/expire_authorization \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -6522,14 +6522,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.transactions.enhancedCommercialData.retrieve', 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', + "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);", }, - http: { + python: { + method: 'transactions.enhanced_commercial_data.retrieve', example: - 'curl https://api.lithic.com/v1/transactions/$TRANSACTION_TOKEN/enhanced_commercial_data \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'transactions().enhancedCommercialData().retrieve', @@ -6541,20 +6542,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Transactions.EnhancedCommercialData.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/transactions/$TRANSACTION_TOKEN/enhanced_commercial_data \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -6573,14 +6573,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.transactions.events.enhancedCommercialData.retrieve', 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', + "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);", }, - http: { + python: { + method: 'transactions.events.enhanced_commercial_data.retrieve', example: - 'curl https://api.lithic.com/v1/transactions/events/$EVENT_TOKEN/enhanced_commercial_data \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'transactions().events().enhancedCommercialData().retrieve', @@ -6592,20 +6593,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Transactions.Events.EnhancedCommercialData.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/transactions/events/$EVENT_TOKEN/enhanced_commercial_data \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -6625,14 +6625,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.responderEndpoints.create', 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', + "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);", }, - http: { + python: { + method: 'responder_endpoints.create', example: - "curl https://api.lithic.com/v1/responder_endpoints \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", + '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)', }, java: { method: 'responderEndpoints().create', @@ -6644,20 +6645,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ResponderEndpoints.New', 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)', + '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', }, 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', + http: { 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);", + "curl https://api.lithic.com/v1/responder_endpoints \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", }, }, }, @@ -6673,14 +6673,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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' });", }, - http: { + python: { + method: 'responder_endpoints.delete', example: - 'curl https://api.lithic.com/v1/responder_endpoints \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'responderEndpoints().delete', @@ -6692,20 +6693,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ResponderEndpoints.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)', + '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', }, 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', + http: { 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' });", + 'curl https://api.lithic.com/v1/responder_endpoints \\\n -X DELETE \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -6722,14 +6722,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'responder_endpoints.check_status', example: - 'curl https://api.lithic.com/v1/responder_endpoints \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'responderEndpoints().checkStatus', @@ -6741,20 +6742,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ResponderEndpoints.CheckStatus', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/responder_endpoints \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -6782,14 +6782,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'external_bank_accounts.list', example: - 'curl https://api.lithic.com/v1/external_bank_accounts \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'externalBankAccounts().list', @@ -6801,20 +6802,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ExternalBankAccounts.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/external_bank_accounts \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -6832,14 +6832,15 @@ 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', + typescript: { + method: 'client.externalBankAccounts.create', 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', + "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);", }, - http: { + python: { + method: 'external_bank_accounts.create', 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 }\'', + '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)', }, java: { method: 'externalBankAccounts().create', @@ -6851,20 +6852,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ExternalBankAccounts.New', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -6882,14 +6882,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.externalBankAccounts.retrieve', 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', + "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);", }, - http: { + python: { + method: 'external_bank_accounts.retrieve', example: - 'curl https://api.lithic.com/v1/external_bank_accounts/$EXTERNAL_BANK_ACCOUNT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'externalBankAccounts().retrieve', @@ -6901,20 +6902,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ExternalBankAccounts.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/external_bank_accounts/$EXTERNAL_BANK_ACCOUNT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -6943,14 +6943,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.ExternalBankAccounts.Update', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'external_bank_accounts.update', 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 '{}'", + '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)', }, java: { method: 'externalBankAccounts().update', @@ -6962,20 +6963,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ExternalBankAccounts.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)', + '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', }, 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', + http: { 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);", + "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 '{}'", }, }, }, @@ -6993,14 +6993,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'external_bank_accounts.retry_micro_deposits', 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"', + '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)', }, java: { method: 'externalBankAccounts().retryMicroDeposits', @@ -7012,20 +7013,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ExternalBankAccounts.RetryMicroDeposits', 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)', + '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', }, 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', + http: { 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);", + '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"', }, }, }, @@ -7043,14 +7043,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'external_bank_accounts.retry_prenote', 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"', + '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)', }, java: { method: 'externalBankAccounts().retryPrenote', @@ -7062,20 +7063,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ExternalBankAccounts.RetryPrenote', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/external_bank_accounts/$EXTERNAL_BANK_ACCOUNT_TOKEN/retry_prenote \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -7093,14 +7093,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'external_bank_accounts.unpause', example: - 'curl https://api.lithic.com/v1/external_bank_accounts/$EXTERNAL_BANK_ACCOUNT_TOKEN/unpause \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'externalBankAccounts().unpause', @@ -7112,20 +7113,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ExternalBankAccounts.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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/external_bank_accounts/$EXTERNAL_BANK_ACCOUNT_TOKEN/unpause \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -7148,14 +7148,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ markdown: "## set_verification_method\n\n`client.externalBankAccounts.setVerificationMethod(external_bank_account_token: string, verification_method: 'MICRO_DEPOSIT' | 'PRENOTE' | 'EXTERNALLY_VERIFIED', 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}/set_verification_method`\n\nUpdate the verification method for an external bank account. Verification method can only be updated\nif the `verification_state` is `PENDING`.\n\n\n### Parameters\n\n- `external_bank_account_token: string`\n\n- `verification_method: 'MICRO_DEPOSIT' | 'PRENOTE' | 'EXTERNALLY_VERIFIED'`\n The verification method to set for the external bank account\n\n- `financial_account_token?: string`\n The financial account token of the operating account to fund the micro deposits. Required when verification_method is MICRO_DEPOSIT or PRENOTE.\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.setVerificationMethod('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { verification_method: 'MICRO_DEPOSIT' });\n\nconsole.log(externalBankAccount);\n```", perLanguage: { - go: { - method: 'client.ExternalBankAccounts.SetVerificationMethod', + typescript: { + method: 'client.externalBankAccounts.setVerificationMethod', 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.SetVerificationMethod(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.ExternalBankAccountSetVerificationMethodParams{\n\t\t\tVerificationMethod: lithic.F(lithic.ExternalBankAccountSetVerificationMethodParamsVerificationMethodMicroDeposit),\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', + "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.setVerificationMethod(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { verification_method: 'MICRO_DEPOSIT' },\n);\n\nconsole.log(externalBankAccount.company_id);", }, - http: { + python: { + method: 'external_bank_accounts.set_verification_method', example: - 'curl https://api.lithic.com/v1/external_bank_accounts/$EXTERNAL_BANK_ACCOUNT_TOKEN/set_verification_method \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "verification_method": "MICRO_DEPOSIT"\n }\'', + '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.set_verification_method(\n external_bank_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n verification_method="MICRO_DEPOSIT",\n)\nprint(external_bank_account.company_id)', }, java: { method: 'externalBankAccounts().setVerificationMethod', @@ -7167,20 +7168,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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.ExternalBankAccountSetVerificationMethodParams\n\nfun main() {\n val client: LithicClient = LithicOkHttpClient.fromEnv()\n\n val params: ExternalBankAccountSetVerificationMethodParams = ExternalBankAccountSetVerificationMethodParams.builder()\n .externalBankAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .verificationMethod(ExternalBankAccountSetVerificationMethodParams.SetVerificationMethodAllowedVerificationMethods.MICRO_DEPOSIT)\n .build()\n val externalBankAccount: ExternalBankAccount = client.externalBankAccounts().setVerificationMethod(params)\n}', }, - python: { - method: 'external_bank_accounts.set_verification_method', + go: { + method: 'client.ExternalBankAccounts.SetVerificationMethod', 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.set_verification_method(\n external_bank_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n verification_method="MICRO_DEPOSIT",\n)\nprint(external_bank_account.company_id)', + '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.SetVerificationMethod(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tlithic.ExternalBankAccountSetVerificationMethodParams{\n\t\t\tVerificationMethod: lithic.F(lithic.ExternalBankAccountSetVerificationMethodParamsVerificationMethodMicroDeposit),\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', }, ruby: { method: 'external_bank_accounts.set_verification_method', 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.set_verification_method(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n verification_method: :MICRO_DEPOSIT\n)\n\nputs(external_bank_account)', }, - typescript: { - method: 'client.externalBankAccounts.setVerificationMethod', + http: { 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.setVerificationMethod(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { verification_method: 'MICRO_DEPOSIT' },\n);\n\nconsole.log(externalBankAccount.company_id);", + 'curl https://api.lithic.com/v1/external_bank_accounts/$EXTERNAL_BANK_ACCOUNT_TOKEN/set_verification_method \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: $LITHIC_API_KEY" \\\n -d \'{\n "verification_method": "MICRO_DEPOSIT"\n }\'', }, }, }, @@ -7198,14 +7198,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.externalBankAccounts.microDeposits.create', 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', + "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);", }, - http: { + python: { + method: 'external_bank_accounts.micro_deposits.create', 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 }\'', + '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)', }, java: { method: 'externalBankAccounts().microDeposits().create', @@ -7217,20 +7218,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ExternalBankAccounts.MicroDeposits.New', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -7260,13 +7260,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { - example: 'curl https://api.lithic.com/v1/payments \\\n -H "Authorization: $LITHIC_API_KEY"', + 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)', }, java: { method: 'payments().list', @@ -7278,20 +7280,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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}", + http: { + example: 'curl https://api.lithic.com/v1/payments \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -7320,14 +7320,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.payments.create', 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', + "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);", }, - http: { + python: { + method: 'payments.create', 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 }\'', + '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)', }, java: { method: 'payments().create', @@ -7339,20 +7340,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Payments.New', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -7370,14 +7370,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.payments.retrieve', 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', + "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);", }, - http: { + python: { + method: 'payments.retrieve', example: - 'curl https://api.lithic.com/v1/payments/$PAYMENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'payments().retrieve', @@ -7389,20 +7390,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Payments.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/payments/$PAYMENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -7420,14 +7420,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Payments.SimulateRelease', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'payments.simulate_release', 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 }\'', + '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)', }, java: { method: 'payments().simulateRelease', @@ -7439,20 +7440,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Payments.SimulateRelease', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -7470,14 +7470,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'payments.simulate_return', 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 }\'', + '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)', }, java: { method: 'payments().simulateReturn', @@ -7489,20 +7490,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Payments.SimulateReturn', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -7520,14 +7520,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'payments.retry', example: - 'curl https://api.lithic.com/v1/payments/$PAYMENT_TOKEN/retry \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'payments().retry', @@ -7539,20 +7540,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/payments/$PAYMENT_TOKEN/retry \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -7578,14 +7578,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Payments.Return', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'payments.return_', 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 }\'', + '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)', }, java: { method: 'payments().return_', @@ -7597,20 +7598,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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_', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -7634,14 +7634,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'payments.simulate_receipt', 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 }\'', + '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)', }, java: { method: 'payments().simulateReceipt', @@ -7653,20 +7654,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Payments.SimulateReceipt', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -7691,14 +7691,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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.SimulateAction', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'payments.simulate_action', 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 }\'', + '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)', }, java: { method: 'payments().simulateAction', @@ -7710,20 +7711,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Payments.SimulateAction', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -7741,14 +7741,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.threeDS.authentication.retrieve', 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', + "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);", }, - http: { + python: { + method: 'three_ds.authentication.retrieve', example: - 'curl https://api.lithic.com/v1/three_ds_authentication/$THREE_DS_AUTHENTICATION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'threeDS().authentication().retrieve', @@ -7760,20 +7761,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ThreeDS.Authentication.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/three_ds_authentication/$THREE_DS_AUTHENTICATION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -7796,14 +7796,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'three_ds.authentication.simulate', 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 }\'', + '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)', }, java: { method: 'threeDS().authentication().simulate', @@ -7815,20 +7816,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ThreeDS.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)', + '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', }, 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', + }, + http: { 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);", + '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 }\'', }, }, }, @@ -7845,14 +7845,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.ThreeDS.Authentication.SimulateOtpEntry', + typescript: { + 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', + "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});", }, - http: { + python: { + method: 'three_ds.authentication.simulate_otp_entry', 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 }\'', + '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)', }, java: { method: 'threeDS().authentication().simulateOtpEntry', @@ -7864,20 +7865,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ThreeDS.Authentication.SimulateOtpEntry', 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)', + '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', }, 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', + http: { 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});", + '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 }\'', }, }, }, @@ -7894,14 +7894,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.threeDS.decisioning.retrieveSecret', 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', + "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);", }, - http: { + python: { + method: 'three_ds.decisioning.retrieve_secret', example: - 'curl https://api.lithic.com/v1/three_ds_decisioning/secret \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'threeDS().decisioning().retrieveSecret', @@ -7913,20 +7914,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ThreeDS.Decisioning.GetSecret', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/three_ds_decisioning/secret \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -7942,14 +7942,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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();", }, - http: { + python: { + method: 'three_ds.decisioning.rotate_secret', example: - 'curl https://api.lithic.com/v1/three_ds_decisioning/secret/rotate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', + '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()', }, java: { method: 'threeDS().decisioning().rotateSecret', @@ -7961,20 +7962,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ThreeDS.Decisioning.RotateSecret', 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()', + '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', }, 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', + http: { 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();", + 'curl https://api.lithic.com/v1/three_ds_decisioning/secret/rotate \\\n -X POST \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -7991,14 +7991,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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});", }, - http: { + python: { + method: 'three_ds.decisioning.challenge_response', 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 }\'', + '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)', }, java: { method: 'threeDS().decisioning().challengeResponse', @@ -8010,20 +8011,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ThreeDS.Decisioning.ChallengeResponse', 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)', + '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', }, 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', + http: { 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});", + '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 }\'', }, }, }, @@ -8046,14 +8046,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'reports.settlement.list_details', example: - 'curl https://api.lithic.com/v1/reports/settlement/details/$REPORT_DATE \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'reports().settlement().listDetails', @@ -8065,20 +8066,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Reports.Settlement.ListDetails', 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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/reports/settlement/details/$REPORT_DATE \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -8096,14 +8096,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Reports.Settlement.Summary', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'reports.settlement.summary', example: - 'curl https://api.lithic.com/v1/reports/settlement/summary/$REPORT_DATE \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'reports().settlement().summary', @@ -8115,20 +8116,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/reports/settlement/summary/$REPORT_DATE \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -8158,14 +8158,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'reports.settlement.network_totals.list', example: - 'curl https://api.lithic.com/v1/reports/settlement/network_totals \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'reports().settlement().networkTotals().list', @@ -8177,20 +8178,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Reports.Settlement.NetworkTotals.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/reports/settlement/network_totals \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -8208,14 +8208,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.reports.settlement.networkTotals.retrieve', 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', + "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);", }, - http: { + python: { + method: 'reports.settlement.network_totals.retrieve', example: - 'curl https://api.lithic.com/v1/reports/settlement/network_totals/$TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'reports().settlement().networkTotals().retrieve', @@ -8227,20 +8228,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Reports.Settlement.NetworkTotals.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/reports/settlement/network_totals/$TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -8258,13 +8258,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { - example: 'curl https://api.lithic.com/v1/card_programs \\\n -H "Authorization: $LITHIC_API_KEY"', + 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)', }, java: { method: 'cardPrograms().list', @@ -8276,20 +8278,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.CardPrograms.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)', + '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', }, 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}", + http: { + example: 'curl https://api.lithic.com/v1/card_programs \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -8307,14 +8307,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.cardPrograms.retrieve', 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', + "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);", }, - http: { + python: { + method: 'card_programs.retrieve', example: - 'curl https://api.lithic.com/v1/card_programs/$CARD_PROGRAM_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'cardPrograms().retrieve', @@ -8326,20 +8327,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.CardPrograms.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/card_programs/$CARD_PROGRAM_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -8357,14 +8357,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.DigitalCardArt.List', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'digital_card_art.list', example: - 'curl https://api.lithic.com/v1/digital_card_art \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'digitalCardArt().list', @@ -8376,20 +8377,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.DigitalCardArt.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/digital_card_art \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -8407,14 +8407,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.digitalCardArt.retrieve', 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', + "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);", }, - http: { + python: { + method: 'digital_card_art.retrieve', example: - 'curl https://api.lithic.com/v1/digital_card_art/$DIGITAL_CARD_ART_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'digitalCardArt().retrieve', @@ -8426,20 +8427,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.DigitalCardArt.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/digital_card_art/$DIGITAL_CARD_ART_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -8469,13 +8469,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.BookTransfers.List', + typescript: { + 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', + "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}", }, - http: { - example: 'curl https://api.lithic.com/v1/book_transfers \\\n -H "Authorization: $LITHIC_API_KEY"', + 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)', }, java: { method: 'bookTransfers().list', @@ -8487,20 +8489,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.BookTransfers.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)', + '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', }, 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}", + http: { + example: 'curl https://api.lithic.com/v1/book_transfers \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -8530,14 +8530,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.bookTransfers.create', 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', + "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);", }, - http: { + python: { + method: 'book_transfers.create', 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 }\'', + '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)', }, java: { method: 'bookTransfers().create', @@ -8549,20 +8550,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.BookTransfers.New', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -8580,14 +8580,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.bookTransfers.retrieve', 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', + "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);", }, - http: { + python: { + method: 'book_transfers.retrieve', example: - 'curl https://api.lithic.com/v1/book_transfers/$BOOK_TRANSFER_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'bookTransfers().retrieve', @@ -8599,20 +8600,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.BookTransfers.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/book_transfers/$BOOK_TRANSFER_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -8630,14 +8630,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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.Reverse', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'book_transfers.reverse', 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 '{}'", + '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)', }, java: { method: 'bookTransfers().reverse', @@ -8649,20 +8650,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.BookTransfers.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)', + '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', }, 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', + http: { 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);", + "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 '{}'", }, }, }, @@ -8680,14 +8680,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.BookTransfers.Retry', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'book_transfers.retry', 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 }\'', + '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)', }, java: { method: 'bookTransfers().retry', @@ -8699,20 +8700,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.BookTransfers.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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -8729,14 +8729,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.CreditProducts.ExtendedCredit.Get', + typescript: { + method: 'client.creditProducts.extendedCredit.retrieve', 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', + "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);", }, - http: { + python: { + method: 'credit_products.extended_credit.retrieve', example: - 'curl https://api.lithic.com/v1/credit_products/$CREDIT_PRODUCT_TOKEN/extended_credit \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'creditProducts().extendedCredit().retrieve', @@ -8748,20 +8749,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.CreditProducts.ExtendedCredit.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/credit_products/$CREDIT_PRODUCT_TOKEN/extended_credit \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -8778,14 +8778,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.creditProducts.primeRates.retrieve', 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', + "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);", }, - http: { + python: { + method: 'credit_products.prime_rates.retrieve', example: - 'curl https://api.lithic.com/v1/credit_products/$CREDIT_PRODUCT_TOKEN/prime_rates \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'creditProducts().primeRates().retrieve', @@ -8797,20 +8798,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.CreditProducts.PrimeRates.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/credit_products/$CREDIT_PRODUCT_TOKEN/prime_rates \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -8826,14 +8826,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.creditProducts.primeRates.create', 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', + "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});", }, - http: { + python: { + method: 'credit_products.prime_rates.create', 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 }\'', + '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)', }, java: { method: 'creditProducts().primeRates().create', @@ -8845,20 +8846,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.CreditProducts.PrimeRates.New', 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)', + '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', }, 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', + http: { 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});", + '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 }\'', }, }, }, @@ -8887,14 +8887,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.ExternalPayments.List', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'external_payments.list', example: - 'curl https://api.lithic.com/v1/external_payments \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'externalPayments().list', @@ -8906,20 +8907,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ExternalPayments.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/external_payments \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -8947,14 +8947,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.externalPayments.create', 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', + "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);", }, - http: { + python: { + method: 'external_payments.create', 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 }\'', + '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)', }, java: { method: 'externalPayments().create', @@ -8966,20 +8967,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ExternalPayments.New', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -8997,14 +8997,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.externalPayments.retrieve', 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', + "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);", }, - http: { + python: { + method: 'external_payments.retrieve', example: - 'curl https://api.lithic.com/v1/external_payments/$EXTERNAL_PAYMENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'externalPayments().retrieve', @@ -9016,20 +9017,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ExternalPayments.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/external_payments/$EXTERNAL_PAYMENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -9052,14 +9052,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.ExternalPayments.Settle', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'external_payments.settle', 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 }\'', + '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)', }, java: { method: 'externalPayments().settle', @@ -9071,20 +9072,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ExternalPayments.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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -9102,14 +9102,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'external_payments.release', 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 }\'', + '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)', }, java: { method: 'externalPayments().release', @@ -9121,20 +9122,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ExternalPayments.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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -9152,14 +9152,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'external_payments.cancel', 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 }\'', + '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)', }, java: { method: 'externalPayments().cancel', @@ -9171,20 +9172,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ExternalPayments.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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -9202,14 +9202,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'external_payments.reverse', 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 }\'', + '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)', }, java: { method: 'externalPayments().reverse', @@ -9221,20 +9222,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ExternalPayments.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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -9262,14 +9262,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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.List', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'management_operations.list', example: - 'curl https://api.lithic.com/v1/management_operations \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'managementOperations().list', @@ -9281,20 +9282,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ManagementOperations.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/management_operations \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -9324,14 +9324,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.managementOperations.create', 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', + "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);", }, - http: { + python: { + method: 'management_operations.create', 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 }\'', + '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)', }, java: { method: 'managementOperations().create', @@ -9343,20 +9344,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ManagementOperations.New', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -9374,14 +9374,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.ManagementOperations.Get', + typescript: { + method: 'client.managementOperations.retrieve', 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', + "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);", }, - http: { + python: { + method: 'management_operations.retrieve', example: - 'curl https://api.lithic.com/v1/management_operations/$MANAGEMENT_OPERATION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'managementOperations().retrieve', @@ -9393,20 +9394,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ManagementOperations.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/management_operations/$MANAGEMENT_OPERATION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -9424,14 +9424,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.ManagementOperations.Reverse', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'management_operations.reverse', 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 }\'', + '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)', }, java: { method: 'managementOperations().reverse', @@ -9443,20 +9444,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.ManagementOperations.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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -9474,13 +9474,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { - example: 'curl https://api.lithic.com/v1/funding_events \\\n -H "Authorization: $LITHIC_API_KEY"', + 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)', }, java: { method: 'fundingEvents().list', @@ -9492,20 +9494,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FundingEvents.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)', + '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', }, 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}", + http: { + example: 'curl https://api.lithic.com/v1/funding_events \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -9523,14 +9523,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.fundingEvents.retrieve', 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', + "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);", }, - http: { + python: { + method: 'funding_events.retrieve', example: - 'curl https://api.lithic.com/v1/funding_events/$FUNDING_EVENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'fundingEvents().retrieve', @@ -9542,20 +9543,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FundingEvents.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/funding_events/$FUNDING_EVENT_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -9572,14 +9572,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.fundingEvents.retrieveDetails', 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', + "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);", }, - http: { + python: { + method: 'funding_events.retrieve_details', example: - 'curl https://api.lithic.com/v1/funding_events/$FUNDING_EVENT_TOKEN/details \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'fundingEvents().retrieveDetails', @@ -9591,20 +9592,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.FundingEvents.GetDetails', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/funding_events/$FUNDING_EVENT_TOKEN/details \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -9623,14 +9623,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.fraud.transactions.retrieve', 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', + "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);", }, - http: { + python: { + method: 'fraud.transactions.retrieve', example: - 'curl https://api.lithic.com/v1/fraud/transactions/$TRANSACTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'fraud().transactions().retrieve', @@ -9642,20 +9643,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Fraud.Transactions.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/fraud/transactions/$TRANSACTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -9679,14 +9679,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'fraud.transactions.report', 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 }\'', + '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)', }, java: { method: 'fraud().transactions().report', @@ -9698,20 +9699,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -9729,14 +9729,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'network_programs.list', example: - 'curl https://api.lithic.com/v1/network_programs \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'networkPrograms().list', @@ -9748,20 +9749,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.NetworkPrograms.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/network_programs \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -9779,14 +9779,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.networkPrograms.retrieve', 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', + "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);", }, - http: { + python: { + method: 'network_programs.retrieve', example: - 'curl https://api.lithic.com/v1/network_programs/$NETWORK_PROGRAM_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'networkPrograms().retrieve', @@ -9798,20 +9799,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.NetworkPrograms.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/network_programs/$NETWORK_PROGRAM_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -9837,14 +9837,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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.List', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'holds.list', example: - 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/holds \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'holds().list', @@ -9856,20 +9857,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/financial_accounts/$FINANCIAL_ACCOUNT_TOKEN/holds \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -9895,14 +9895,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.holds.create', 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', + "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);", }, - http: { + python: { + method: 'holds.create', 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 }\'', + '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)', }, java: { method: 'holds().create', @@ -9914,20 +9915,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Holds.New', 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)', + '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', }, 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', + http: { 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);", + '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 }\'', }, }, }, @@ -9945,14 +9945,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", perLanguage: { - go: { - method: 'client.Holds.Get', + typescript: { + method: 'client.holds.retrieve', 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', + "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);", }, - http: { + python: { + method: 'holds.retrieve', example: - 'curl https://api.lithic.com/v1/holds/$HOLD_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'holds().retrieve', @@ -9964,20 +9965,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.Holds.Get', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/holds/$HOLD_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -9996,14 +9996,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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);", }, - http: { + python: { + method: 'holds.void', 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 '{}'", + '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)', }, java: { method: 'holds().void_', @@ -10015,20 +10016,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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)', + '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', }, 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', + http: { 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);", + "curl https://api.lithic.com/v1/holds/$HOLD_TOKEN/void \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: $LITHIC_API_KEY\" \\\n -d '{}'", }, }, }, @@ -10058,14 +10058,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { + python: { + method: 'account_activity.list', example: - 'curl https://api.lithic.com/v1/account_activity \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'accountActivity().list', @@ -10077,20 +10078,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AccountActivity.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)', + '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', }, 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', + http: { 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}", + 'curl https://api.lithic.com/v1/account_activity \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -10108,14 +10108,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + method: 'client.accountActivity.retrieveTransaction', 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', + "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);", }, - http: { + python: { + method: 'account_activity.retrieve_transaction', example: - 'curl https://api.lithic.com/v1/account_activity/$TRANSACTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', + '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)', }, java: { method: 'accountActivity().retrieveTransaction', @@ -10127,20 +10128,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.AccountActivity.GetTransaction', 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)', + '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', }, 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', + http: { 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);", + 'curl https://api.lithic.com/v1/account_activity/$TRANSACTION_TOKEN \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -10158,13 +10158,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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', + typescript: { + 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', + "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}", }, - http: { - example: 'curl https://api.lithic.com/v1/transfer_limits \\\n -H "Authorization: $LITHIC_API_KEY"', + 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)', }, java: { method: 'transferLimits().list', @@ -10176,20 +10178,18 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.TransferLimits.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)', + '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', }, 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}", + http: { + example: 'curl https://api.lithic.com/v1/transfer_limits \\\n -H "Authorization: $LITHIC_API_KEY"', }, }, }, @@ -10202,10 +10202,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [ stainlessPath: '(resource) webhooks > (method) parsed', qualified: 'client.webhooks.parsed', perLanguage: { - go: { - method: 'client.Webhooks.Parsed', + typescript: { + 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', + "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();", + }, + 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()', }, java: { example: @@ -10215,21 +10220,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [ example: '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', + go: { + method: 'client.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()', + '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', }, 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();", - }, }, }, ]; From d0f5362f7bc061d07058f1fd39cd5f843615ed7a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 15:47:07 +0000 Subject: [PATCH 06/22] feat(api): add AMEX to network enum in settlement reports --- .stats.yml | 4 ++-- packages/mcp-server/src/local-docs-search.ts | 12 ++++++------ src/resources/reports/reports.ts | 4 ++-- src/resources/reports/settlement/network-totals.ts | 2 +- .../reports/settlement/network-totals.test.ts | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index a0da8756..cba45ec2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-599dd2ac665b09566a84c4871ffb3b7313f6b40d0808b8ab4df63bec608b4f9f.yml -openapi_spec_hash: 429e0ad5e3aae4f63935859c2ac64fdc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ab626b78e088455e814b80debc85d420839bc11f95416491fef6a0460f2d95ed.yml +openapi_spec_hash: f6ae1bbed371a5d45927cd63797a9908 config_hash: ac8326134e692f3f3bdec82396bbec80 diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index 46f02084..b168d395 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -8042,9 +8042,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '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; }", + "{ 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: 'AMEX' | '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```", + "## 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: 'AMEX' | '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: 'AMEX' | '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: 'AMEX' | '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: { typescript: { method: 'client.reports.settlement.listDetails', @@ -8092,9 +8092,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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; }", + "{ created: string; currency: string; details: { currency?: string; disputes_gross_amount?: number; institution?: string; interchange_gross_amount?: number; network?: 'AMEX' | '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```", + "## 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?: 'AMEX' | '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?: 'AMEX' | '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```", perLanguage: { typescript: { method: 'client.reports.settlement.summary', @@ -8145,7 +8145,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 'end?: string;', 'ending_before?: string;', 'institution_id?: string;', - "network?: 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK';", + "network?: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK';", 'page_size?: number;', 'report_date?: string;', 'report_date_begin?: string;', @@ -8156,7 +8156,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", + "## list\n\n`client.reports.settlement.networkTotals.list(begin?: string, end?: string, ending_before?: string, institution_id?: string, network?: 'AMEX' | '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?: 'AMEX' | '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: { typescript: { method: 'client.reports.settlement.networkTotals.list', diff --git a/src/resources/reports/reports.ts b/src/resources/reports/reports.ts index fb2a51d5..adb176ff 100644 --- a/src/resources/reports/reports.ts +++ b/src/resources/reports/reports.ts @@ -166,7 +166,7 @@ export interface SettlementDetail { /** * Card network where the transaction took place. */ - network: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; + network: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; /** * The total gross amount of other fees by type. @@ -332,7 +332,7 @@ export interface SettlementSummaryDetails { /** * Card network where the transaction took place */ - network?: 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; + network?: 'AMEX' | 'INTERLINK' | 'MAESTRO' | 'MASTERCARD' | 'UNKNOWN' | 'VISA'; /** * Total amount of gross other fees outside of interchange. diff --git a/src/resources/reports/settlement/network-totals.ts b/src/resources/reports/settlement/network-totals.ts index 9b684c9c..6736b388 100644 --- a/src/resources/reports/settlement/network-totals.ts +++ b/src/resources/reports/settlement/network-totals.ts @@ -68,7 +68,7 @@ export interface NetworkTotalListParams extends CursorPageParams { /** * Network to filter on. */ - network?: 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; + network?: 'AMEX' | 'VISA' | 'MASTERCARD' | 'MAESTRO' | 'INTERLINK'; /** * Singular report date to filter on (YYYY-MM-DD). Cannot be populated in diff --git a/tests/api-resources/reports/settlement/network-totals.test.ts b/tests/api-resources/reports/settlement/network-totals.test.ts index 2bf1f44a..01db9656 100644 --- a/tests/api-resources/reports/settlement/network-totals.test.ts +++ b/tests/api-resources/reports/settlement/network-totals.test.ts @@ -41,7 +41,7 @@ describe('resource networkTotals', () => { end: '2019-12-27T18:11:19.117Z', ending_before: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', institution_id: 'institution_id', - network: 'VISA', + network: 'AMEX', page_size: 1, report_date: '2019-12-27', report_date_begin: '2019-12-27', From d78245b7aad796549148adcf228d0077233d0419 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 15:57:29 +0000 Subject: [PATCH 07/22] chore(formatter): run prettier and eslint separately --- eslint.config.mjs | 3 --- package.json | 1 - packages/mcp-server/manifest.json | 8 ++------ scripts/fast-format | 6 ++---- scripts/format | 3 +-- scripts/lint | 3 +++ src/internal/types.ts | 14 ++++++-------- yarn.lock | 32 ------------------------------- 8 files changed, 14 insertions(+), 56 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 0b625a58..271caeee 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,7 +1,6 @@ // @ts-check import tseslint from 'typescript-eslint'; import unusedImports from 'eslint-plugin-unused-imports'; -import prettier from 'eslint-plugin-prettier'; export default tseslint.config( { @@ -14,11 +13,9 @@ export default tseslint.config( plugins: { '@typescript-eslint': tseslint.plugin, 'unused-imports': unusedImports, - prettier, }, rules: { 'no-unused-vars': 'off', - 'prettier/prettier': 'error', 'unused-imports/no-unused-imports': 'error', 'no-restricted-imports': [ 'error', diff --git a/package.json b/package.json index c1dac825..78857902 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", "eslint": "^9.39.1", - "eslint-plugin-prettier": "^5.4.1", "eslint-plugin-unused-imports": "^4.1.4", "iconv-lite": "^0.6.3", "jest": "^29.4.0", diff --git a/packages/mcp-server/manifest.json b/packages/mcp-server/manifest.json index cc783200..eeadc951 100644 --- a/packages/mcp-server/manifest.json +++ b/packages/mcp-server/manifest.json @@ -18,9 +18,7 @@ "entry_point": "index.js", "mcp_config": { "command": "node", - "args": [ - "${__dirname}/index.js" - ], + "args": ["${__dirname}/index.js"], "env": { "LITHIC_API_KEY": "${user_config.LITHIC_API_KEY}", "LITHIC_WEBHOOK_SECRET": "${user_config.LITHIC_WEBHOOK_SECRET}" @@ -48,7 +46,5 @@ "node": ">=18.0.0" } }, - "keywords": [ - "api" - ] + "keywords": ["api"] } diff --git a/scripts/fast-format b/scripts/fast-format index 53721ac0..e1723136 100755 --- a/scripts/fast-format +++ b/scripts/fast-format @@ -31,10 +31,8 @@ if ! [ -z "$ESLINT_FILES" ]; then fi echo "==> Running prettier --write" -# format things eslint didn't -PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)" +PRETTIER_FILES="$(grep '\.\([mc]?tsx?\|[mc]?jsx?\|json\)$' "$FILE_LIST" || true)" if ! [ -z "$PRETTIER_FILES" ]; then echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \ - --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \ - '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' + --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern fi diff --git a/scripts/format b/scripts/format index 7a756401..b1b2c17a 100755 --- a/scripts/format +++ b/scripts/format @@ -8,5 +8,4 @@ echo "==> Running eslint --fix" ./node_modules/.bin/eslint --fix . echo "==> Running prettier --write" -# format things eslint didn't -./node_modules/.bin/prettier --write --cache --cache-strategy metadata . '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' +./node_modules/.bin/prettier --write --cache --cache-strategy metadata . diff --git a/scripts/lint b/scripts/lint index 3ffb78a6..1f532548 100755 --- a/scripts/lint +++ b/scripts/lint @@ -4,6 +4,9 @@ set -e cd "$(dirname "$0")/.." +echo "==> Running prettier --check" +./node_modules/.bin/prettier --check . + echo "==> Running eslint" ./node_modules/.bin/eslint . diff --git a/src/internal/types.ts b/src/internal/types.ts index b668dfc0..a050513a 100644 --- a/src/internal/types.ts +++ b/src/internal/types.ts @@ -40,7 +40,6 @@ type OverloadedParameters = : T extends (...args: infer A) => unknown ? A : never; -/* eslint-disable */ /** * These imports attempt to get types from a parent package's dependencies. * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which @@ -63,19 +62,18 @@ type OverloadedParameters = * * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition */ -/** @ts-ignore For users with \@types/node */ +/** @ts-ignore For users with \@types/node */ /* prettier-ignore */ type UndiciTypesRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with undici */ +/** @ts-ignore For users with undici */ /* prettier-ignore */ type UndiciRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with \@types/bun */ +/** @ts-ignore For users with \@types/bun */ /* prettier-ignore */ type BunRequestInit = globalThis.FetchRequestInit; -/** @ts-ignore For users with node-fetch@2 */ +/** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */ type NodeFetch2RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ +/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */ type NodeFetch3RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users who use Deno */ +/** @ts-ignore For users who use Deno */ /* prettier-ignore */ type FetchRequestInit = NonNullable[1]>; -/* eslint-enable */ type RequestInits = | NotAny diff --git a/yarn.lock b/yarn.lock index a41ae84e..9a878fe6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -709,11 +709,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@pkgr/core@^0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.4.tgz#d897170a2b0ba51f78a099edccd968f7b103387c" - integrity sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw== - "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" @@ -1520,14 +1515,6 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-plugin-prettier@^5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.4.1.tgz#99b55d7dd70047886b2222fdd853665f180b36af" - integrity sha512-9dF+KuU/Ilkq27A8idRP7N2DH8iUR6qXcjF3FR2wETY21PZdBrIjwCau8oboyGj9b7etWmTGEeM8e7oOed6ZWg== - dependencies: - prettier-linter-helpers "^1.0.0" - synckit "^0.11.7" - eslint-plugin-unused-imports@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz#62ddc7446ccbf9aa7b6f1f0b00a980423cda2738" @@ -1679,11 +1666,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-diff@^1.1.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" - integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== - fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" @@ -2851,13 +2833,6 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier-linter-helpers@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" - integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== - dependencies: - fast-diff "^1.1.2" - prettier@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" @@ -3162,13 +3137,6 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -synckit@^0.11.7: - version "0.11.8" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.8.tgz#b2aaae998a4ef47ded60773ad06e7cb821f55457" - integrity sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A== - dependencies: - "@pkgr/core" "^0.2.4" - test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" From c38ad4c69e7bdaefbc8f6288b29206ec5157650a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 20:33:47 +0000 Subject: [PATCH 08/22] chore(internal): codegen related update --- eslint.config.mjs | 3 +++ package.json | 1 + scripts/fast-format | 6 ++++-- scripts/format | 3 ++- scripts/lint | 3 --- scripts/utils/postprocess-files.cjs | 9 +++++++- src/internal/types.ts | 14 +++++++------ yarn.lock | 32 +++++++++++++++++++++++++++++ 8 files changed, 58 insertions(+), 13 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 271caeee..0b625a58 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,6 +1,7 @@ // @ts-check import tseslint from 'typescript-eslint'; import unusedImports from 'eslint-plugin-unused-imports'; +import prettier from 'eslint-plugin-prettier'; export default tseslint.config( { @@ -13,9 +14,11 @@ export default tseslint.config( plugins: { '@typescript-eslint': tseslint.plugin, 'unused-imports': unusedImports, + prettier, }, rules: { 'no-unused-vars': 'off', + 'prettier/prettier': 'error', 'unused-imports/no-unused-imports': 'error', 'no-restricted-imports': [ 'error', diff --git a/package.json b/package.json index 78857902..c1dac825 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", "eslint": "^9.39.1", + "eslint-plugin-prettier": "^5.4.1", "eslint-plugin-unused-imports": "^4.1.4", "iconv-lite": "^0.6.3", "jest": "^29.4.0", diff --git a/scripts/fast-format b/scripts/fast-format index e1723136..53721ac0 100755 --- a/scripts/fast-format +++ b/scripts/fast-format @@ -31,8 +31,10 @@ if ! [ -z "$ESLINT_FILES" ]; then fi echo "==> Running prettier --write" -PRETTIER_FILES="$(grep '\.\([mc]?tsx?\|[mc]?jsx?\|json\)$' "$FILE_LIST" || true)" +# format things eslint didn't +PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)" if ! [ -z "$PRETTIER_FILES" ]; then echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \ - --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern + --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \ + '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' fi diff --git a/scripts/format b/scripts/format index b1b2c17a..7a756401 100755 --- a/scripts/format +++ b/scripts/format @@ -8,4 +8,5 @@ echo "==> Running eslint --fix" ./node_modules/.bin/eslint --fix . echo "==> Running prettier --write" -./node_modules/.bin/prettier --write --cache --cache-strategy metadata . +# format things eslint didn't +./node_modules/.bin/prettier --write --cache --cache-strategy metadata . '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' diff --git a/scripts/lint b/scripts/lint index 1f532548..3ffb78a6 100755 --- a/scripts/lint +++ b/scripts/lint @@ -4,9 +4,6 @@ set -e cd "$(dirname "$0")/.." -echo "==> Running prettier --check" -./node_modules/.bin/prettier --check . - echo "==> Running eslint" ./node_modules/.bin/eslint . diff --git a/scripts/utils/postprocess-files.cjs b/scripts/utils/postprocess-files.cjs index deae575e..a8cdeb7c 100644 --- a/scripts/utils/postprocess-files.cjs +++ b/scripts/utils/postprocess-files.cjs @@ -23,12 +23,19 @@ async function postprocess() { // strip out lib="dom", types="node", and types="react" references; these // are needed at build time, but would pollute the user's TS environment - const transformed = code.replace( + let transformed = code.replace( /^ *\/\/\/ * ' '.repeat(match.length - 1) + '\n', ); + // TypeScript's declaration emitter collapses /** @ts-ignore */ onto the same + // line as the type declaration, which doesn't work. So we convert to // @ts-ignore + // on its own line to properly suppresses errors. + if (file.endsWith('.d.ts') || file.endsWith('.d.mts') || file.endsWith('.d.cts')) { + transformed = transformed.replace(/\/\*\* @ts-ignore\b[^*]*\*\/ /gm, '// @ts-ignore\n'); + } + if (transformed !== code) { console.error(`wrote ${path.relative(process.cwd(), file)}`); await fs.promises.writeFile(file, transformed, 'utf8'); diff --git a/src/internal/types.ts b/src/internal/types.ts index a050513a..b668dfc0 100644 --- a/src/internal/types.ts +++ b/src/internal/types.ts @@ -40,6 +40,7 @@ type OverloadedParameters = : T extends (...args: infer A) => unknown ? A : never; +/* eslint-disable */ /** * These imports attempt to get types from a parent package's dependencies. * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which @@ -62,18 +63,19 @@ type OverloadedParameters = * * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition */ -/** @ts-ignore For users with \@types/node */ /* prettier-ignore */ +/** @ts-ignore For users with \@types/node */ type UndiciTypesRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with undici */ /* prettier-ignore */ +/** @ts-ignore For users with undici */ type UndiciRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with \@types/bun */ /* prettier-ignore */ +/** @ts-ignore For users with \@types/bun */ type BunRequestInit = globalThis.FetchRequestInit; -/** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */ +/** @ts-ignore For users with node-fetch@2 */ type NodeFetch2RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */ +/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ type NodeFetch3RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users who use Deno */ /* prettier-ignore */ +/** @ts-ignore For users who use Deno */ type FetchRequestInit = NonNullable[1]>; +/* eslint-enable */ type RequestInits = | NotAny diff --git a/yarn.lock b/yarn.lock index 9a878fe6..a41ae84e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -709,6 +709,11 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@pkgr/core@^0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.4.tgz#d897170a2b0ba51f78a099edccd968f7b103387c" + integrity sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw== + "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" @@ -1515,6 +1520,14 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +eslint-plugin-prettier@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.4.1.tgz#99b55d7dd70047886b2222fdd853665f180b36af" + integrity sha512-9dF+KuU/Ilkq27A8idRP7N2DH8iUR6qXcjF3FR2wETY21PZdBrIjwCau8oboyGj9b7etWmTGEeM8e7oOed6ZWg== + dependencies: + prettier-linter-helpers "^1.0.0" + synckit "^0.11.7" + eslint-plugin-unused-imports@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz#62ddc7446ccbf9aa7b6f1f0b00a980423cda2738" @@ -1666,6 +1679,11 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +fast-diff@^1.1.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== + fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" @@ -2833,6 +2851,13 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + prettier@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" @@ -3137,6 +3162,13 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +synckit@^0.11.7: + version "0.11.8" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.8.tgz#b2aaae998a4ef47ded60773ad06e7cb821f55457" + integrity sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A== + dependencies: + "@pkgr/core" "^0.2.4" + test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" From 7031267707c21414d050657426d5a0dcdfe7318e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 20:37:23 +0000 Subject: [PATCH 09/22] feat: Update card expiration from 6 years to 5 years --- .stats.yml | 2 +- packages/mcp-server/src/local-docs-search.ts | 4 ++-- src/resources/cards/cards.ts | 12 ++++++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index cba45ec2..bf2a162b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ab626b78e088455e814b80debc85d420839bc11f95416491fef6a0460f2d95ed.yml -openapi_spec_hash: f6ae1bbed371a5d45927cd63797a9908 +openapi_spec_hash: b615a0eb16502b4de874f9ae28491894 config_hash: ac8326134e692f3f3bdec82396bbec80 diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index b168d395..9246f337 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -2335,7 +2335,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", + "## 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 five years in the future will be generated. Five years is the maximum expiration date.\n\n- `exp_year?: string`\n Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an expiration date five years in the future will be generated. Five years is the maximum expiration date.\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: { typescript: { method: 'client.cards.create', @@ -2723,7 +2723,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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```", + "## 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 five years in the future will be generated. Five years is the maximum expiration date.\n\n- `exp_year?: string`\n Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an expiration date five years in the future will be generated. Five years is the maximum expiration date.\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: { typescript: { method: 'client.cards.renew', diff --git a/src/resources/cards/cards.ts b/src/resources/cards/cards.ts index 0cf91fe7..93f4fd71 100644 --- a/src/resources/cards/cards.ts +++ b/src/resources/cards/cards.ts @@ -918,13 +918,15 @@ export interface CardCreateParams { /** * Body param: Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` - * is provided, an expiration date will be generated. + * is provided, an expiration date five years in the future will be generated. Five + * years is the maximum expiration date. */ exp_month?: string; /** * Body param: Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` - * is provided, an expiration date will be generated. + * is provided, an expiration date five years in the future will be generated. Five + * years is the maximum expiration date. */ exp_year?: string; @@ -1460,13 +1462,15 @@ export interface CardRenewParams { /** * 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. + * an expiration date five years in the future will be generated. Five years is the + * maximum expiration date. */ exp_month?: string; /** * 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. + * provided, an expiration date five years in the future will be generated. Five + * years is the maximum expiration date. */ exp_year?: string; From 2406cf738dafa08c8c0e09a833c25b079c3c4887 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 22:33:09 +0000 Subject: [PATCH 10/22] feat: support setting headers via env --- src/client.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/client.ts b/src/client.ts index 037bb5ff..43064e57 100644 --- a/src/client.ts +++ b/src/client.ts @@ -549,6 +549,18 @@ export class Lithic { this.fetch = options.fetch ?? Shims.getDefaultFetch(); this.#encoder = Opts.FallbackEncoder; + const customHeadersEnv = readEnv('LITHIC_CUSTOM_HEADERS'); + if (customHeadersEnv) { + const parsed: Record = {}; + for (const line of customHeadersEnv.split('\n')) { + const colon = line.indexOf(':'); + if (colon >= 0) { + parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim(); + } + } + options.defaultHeaders = { ...parsed, ...options.defaultHeaders }; + } + this._options = options; this.apiKey = apiKey; From 17f1170f306b327ae2766e6f55d0fa64cc9f7b62 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 17:31:34 +0000 Subject: [PATCH 11/22] chore(internal): codegen related update --- packages/mcp-server/src/local-docs-search.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index 9246f337..98c71b60 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -346,7 +346,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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}', + 'package com.lithic.api.example\n\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\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}', }, go: { method: 'client.AccountHolders.New', @@ -8004,12 +8004,12 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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}', + '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;\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}', + '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\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}', }, go: { method: 'client.ThreeDS.Decisioning.ChallengeResponse', From da614e02ddd2b6a52733417dc63c60993e19da0e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 19:04:52 +0000 Subject: [PATCH 12/22] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index bf2a162b..6e83ca3b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ab626b78e088455e814b80debc85d420839bc11f95416491fef6a0460f2d95ed.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d6101c64c957742cde9cfdc5d9213ce4e36aa43d045030fa142e27a46b60884a.yml openapi_spec_hash: b615a0eb16502b4de874f9ae28491894 config_hash: ac8326134e692f3f3bdec82396bbec80 From 10aa40fd72fd0933d2bc331dfbec23ce97b6c62f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 19:53:29 +0000 Subject: [PATCH 13/22] chore(format): run eslint and prettier separately --- eslint.config.mjs | 3 --- package.json | 1 - scripts/fast-format | 9 +++------ scripts/format | 3 +-- scripts/lint | 3 +++ src/internal/types.ts | 14 ++++++-------- yarn.lock | 32 -------------------------------- 7 files changed, 13 insertions(+), 52 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 0b625a58..271caeee 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,7 +1,6 @@ // @ts-check import tseslint from 'typescript-eslint'; import unusedImports from 'eslint-plugin-unused-imports'; -import prettier from 'eslint-plugin-prettier'; export default tseslint.config( { @@ -14,11 +13,9 @@ export default tseslint.config( plugins: { '@typescript-eslint': tseslint.plugin, 'unused-imports': unusedImports, - prettier, }, rules: { 'no-unused-vars': 'off', - 'prettier/prettier': 'error', 'unused-imports/no-unused-imports': 'error', 'no-restricted-imports': [ 'error', diff --git a/package.json b/package.json index c1dac825..78857902 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", "eslint": "^9.39.1", - "eslint-plugin-prettier": "^5.4.1", "eslint-plugin-unused-imports": "^4.1.4", "iconv-lite": "^0.6.3", "jest": "^29.4.0", diff --git a/scripts/fast-format b/scripts/fast-format index 53721ac0..f1873aef 100755 --- a/scripts/fast-format +++ b/scripts/fast-format @@ -31,10 +31,7 @@ if ! [ -z "$ESLINT_FILES" ]; then fi echo "==> Running prettier --write" -# format things eslint didn't -PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)" -if ! [ -z "$PRETTIER_FILES" ]; then - echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \ - --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \ - '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' +if ! [ -z "$FILE_LIST" ]; then + cat "$FILE_LIST" | xargs ./node_modules/.bin/prettier \ + --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern --ignore-unknown fi diff --git a/scripts/format b/scripts/format index 7a756401..b1b2c17a 100755 --- a/scripts/format +++ b/scripts/format @@ -8,5 +8,4 @@ echo "==> Running eslint --fix" ./node_modules/.bin/eslint --fix . echo "==> Running prettier --write" -# format things eslint didn't -./node_modules/.bin/prettier --write --cache --cache-strategy metadata . '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' +./node_modules/.bin/prettier --write --cache --cache-strategy metadata . diff --git a/scripts/lint b/scripts/lint index 3ffb78a6..1f532548 100755 --- a/scripts/lint +++ b/scripts/lint @@ -4,6 +4,9 @@ set -e cd "$(dirname "$0")/.." +echo "==> Running prettier --check" +./node_modules/.bin/prettier --check . + echo "==> Running eslint" ./node_modules/.bin/eslint . diff --git a/src/internal/types.ts b/src/internal/types.ts index b668dfc0..a050513a 100644 --- a/src/internal/types.ts +++ b/src/internal/types.ts @@ -40,7 +40,6 @@ type OverloadedParameters = : T extends (...args: infer A) => unknown ? A : never; -/* eslint-disable */ /** * These imports attempt to get types from a parent package's dependencies. * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which @@ -63,19 +62,18 @@ type OverloadedParameters = * * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition */ -/** @ts-ignore For users with \@types/node */ +/** @ts-ignore For users with \@types/node */ /* prettier-ignore */ type UndiciTypesRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with undici */ +/** @ts-ignore For users with undici */ /* prettier-ignore */ type UndiciRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with \@types/bun */ +/** @ts-ignore For users with \@types/bun */ /* prettier-ignore */ type BunRequestInit = globalThis.FetchRequestInit; -/** @ts-ignore For users with node-fetch@2 */ +/** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */ type NodeFetch2RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ +/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */ type NodeFetch3RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users who use Deno */ +/** @ts-ignore For users who use Deno */ /* prettier-ignore */ type FetchRequestInit = NonNullable[1]>; -/* eslint-enable */ type RequestInits = | NotAny diff --git a/yarn.lock b/yarn.lock index a41ae84e..9a878fe6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -709,11 +709,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@pkgr/core@^0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.4.tgz#d897170a2b0ba51f78a099edccd968f7b103387c" - integrity sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw== - "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" @@ -1520,14 +1515,6 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-plugin-prettier@^5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.4.1.tgz#99b55d7dd70047886b2222fdd853665f180b36af" - integrity sha512-9dF+KuU/Ilkq27A8idRP7N2DH8iUR6qXcjF3FR2wETY21PZdBrIjwCau8oboyGj9b7etWmTGEeM8e7oOed6ZWg== - dependencies: - prettier-linter-helpers "^1.0.0" - synckit "^0.11.7" - eslint-plugin-unused-imports@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz#62ddc7446ccbf9aa7b6f1f0b00a980423cda2738" @@ -1679,11 +1666,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-diff@^1.1.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" - integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== - fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" @@ -2851,13 +2833,6 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier-linter-helpers@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" - integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== - dependencies: - fast-diff "^1.1.2" - prettier@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" @@ -3162,13 +3137,6 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -synckit@^0.11.7: - version "0.11.8" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.8.tgz#b2aaae998a4ef47ded60773ad06e7cb821f55457" - integrity sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A== - dependencies: - "@pkgr/core" "^0.2.4" - test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" From 062a350217e39bf8b054c4bdfb3054cbfa7137ac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 17:53:32 +0000 Subject: [PATCH 14/22] chore: avoid formatting file that gets changed during releases --- .prettierignore | 1 + packages/mcp-server/manifest.json | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.prettierignore b/.prettierignore index 7cc13dd1..36afd3b3 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,6 +2,7 @@ CHANGELOG.md /ecosystem-tests/*/** /node_modules /deno +/packages/mcp-server/manifest.json # don't format tsc output, will break source maps dist diff --git a/packages/mcp-server/manifest.json b/packages/mcp-server/manifest.json index eeadc951..cc783200 100644 --- a/packages/mcp-server/manifest.json +++ b/packages/mcp-server/manifest.json @@ -18,7 +18,9 @@ "entry_point": "index.js", "mcp_config": { "command": "node", - "args": ["${__dirname}/index.js"], + "args": [ + "${__dirname}/index.js" + ], "env": { "LITHIC_API_KEY": "${user_config.LITHIC_API_KEY}", "LITHIC_WEBHOOK_SECRET": "${user_config.LITHIC_WEBHOOK_SECRET}" @@ -46,5 +48,7 @@ "node": ">=18.0.0" } }, - "keywords": ["api"] + "keywords": [ + "api" + ] } From 9d3d4a8bbe395a4d0af15e78be01636a06b65e51 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 18:19:44 +0000 Subject: [PATCH 15/22] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6e83ca3b..a6ff9086 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d6101c64c957742cde9cfdc5d9213ce4e36aa43d045030fa142e27a46b60884a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-d6101c64c957742cde9cfdc5d9213ce4e36aa43d045030fa142e27a46b60884a.yml openapi_spec_hash: b615a0eb16502b4de874f9ae28491894 config_hash: ac8326134e692f3f3bdec82396bbec80 From 8ab2d756166ec34ce7766052592607f4b0da4162 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 16:27:23 +0000 Subject: [PATCH 16/22] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a6ff9086..e494edd9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-d6101c64c957742cde9cfdc5d9213ce4e36aa43d045030fa142e27a46b60884a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-0572da655d188e23459f2115b03b27040b4c4d3b47e4a86510803892d0d1b0aa.yml openapi_spec_hash: b615a0eb16502b4de874f9ae28491894 config_hash: ac8326134e692f3f3bdec82396bbec80 From 4d4db79662318ed08590ff8ab40e1f6d7ab0a8be Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 18:46:03 +0000 Subject: [PATCH 17/22] docs(api): improve SettlementDetail event_tokens and transaction_token descriptions --- .stats.yml | 4 ++-- src/resources/reports/reports.ts | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index e494edd9..5a9e4234 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-0572da655d188e23459f2115b03b27040b4c4d3b47e4a86510803892d0d1b0aa.yml -openapi_spec_hash: b615a0eb16502b4de874f9ae28491894 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-a46ebb10f6bb217a591206f0574450c324f108dbd32a2d62727cd8186d85e94f.yml +openapi_spec_hash: f320c173152f74b0799166b6ef5b82cd config_hash: ac8326134e692f3f3bdec82396bbec80 diff --git a/src/resources/reports/reports.ts b/src/resources/reports/reports.ts index adb176ff..60dc7c51 100644 --- a/src/resources/reports/reports.ts +++ b/src/resources/reports/reports.ts @@ -143,7 +143,8 @@ export interface SettlementDetail { disputes_gross_amount: number; /** - * Globally unique identifiers denoting the Events associated with this settlement. + * Array of globally unique identifiers for the financial events that comprise this + * settlement. Use these tokens to access detailed event-level information. */ event_tokens: Array; @@ -191,7 +192,12 @@ export interface SettlementDetail { settlement_date: string; /** - * Globally unique identifier denoting the associated Transaction object. + * Globally unique identifier denoting the associated transaction. For settlement + * records with type `CLEARING`, `FINANCIAL`, or `NON-FINANCIAL`, this references a + * card transaction token. For settlement records with type `CHARGEBACK`, + * `REPRESENTMENT`, `PREARBITRATION`, `ARBITRATION`, or `COLLABORATION`, this + * references the dispute transaction token. May be null for certain settlement + * types. */ transaction_token: string; From 6d4c205c664de06157fe7f8db7ed04fdab8625b2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 4 May 2026 15:24:16 +0000 Subject: [PATCH 18/22] docs: clarify forwards compat behavior --- packages/mcp-server/src/local-docs-search.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index 98c71b60..0adc953f 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -10243,12 +10243,12 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [ { 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', + '# 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\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still 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', + '# 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\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still 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', }, { language: 'python', From ec4f6ca8dfaefc3fe230109d3a09fdb53c1a3812 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 18:52:06 +0000 Subject: [PATCH 19/22] docs: update with proxy auth info --- packages/mcp-server/src/local-docs-search.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index 0adc953f..a849ca40 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -10243,12 +10243,12 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [ { 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\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still 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', + '# 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\nIf the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:\n\n```java\nimport com.lithic.api.client.LithicClient;\nimport com.lithic.api.client.okhttp.LithicOkHttpClient;\nimport com.lithic.api.core.http.ProxyAuthenticator;\n\nLithicClient client = LithicOkHttpClient.builder()\n .fromEnv()\n .proxy(...)\n // Or a custom implementation of `ProxyAuthenticator`.\n .proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))\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\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still 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\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still 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', + '# 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\nIf the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:\n\n```kotlin\nimport com.lithic.api.client.LithicClient\nimport com.lithic.api.client.okhttp.LithicOkHttpClient\nimport com.lithic.api.core.http.ProxyAuthenticator\n\nval client: LithicClient = LithicOkHttpClient.builder()\n .fromEnv()\n .proxy(...)\n // Or a custom implementation of `ProxyAuthenticator`.\n .proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))\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\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still 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', }, { language: 'python', From f2b26de0a41a087240c9214c2dc433f9a0cd85e4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 20:11:42 +0000 Subject: [PATCH 20/22] feat(api): add IS_NEW_MERCHANT metric to auth rules v2 --- .stats.yml | 4 ++-- src/resources/auth-rules/v2/v2.ts | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5a9e4234..e3e60713 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-a46ebb10f6bb217a591206f0574450c324f108dbd32a2d62727cd8186d85e94f.yml -openapi_spec_hash: f320c173152f74b0799166b6ef5b82cd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-92d7ce0702a494edb7beb0ad484c4f24aca65777197d40b2108d05c13c3fa505.yml +openapi_spec_hash: 35e4b9edb38ef23f528fcfbfeaabac02 config_hash: ac8326134e692f3f3bdec82396bbec80 diff --git a/src/resources/auth-rules/v2/v2.ts b/src/resources/auth-rules/v2/v2.ts index fd5327c5..ad9274e5 100644 --- a/src/resources/auth-rules/v2/v2.ts +++ b/src/resources/auth-rules/v2/v2.ts @@ -828,6 +828,10 @@ export namespace ConditionalAuthorizationActionParameters { * transaction for the entity. Requires `parameters.scope`. * - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in * the entity's transaction history. Requires `parameters.scope`. + * - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the + * card's approved transaction history (capped at the 1000 most recently seen + * merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no + * `parameters` required. * - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as * a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required. */ @@ -867,6 +871,7 @@ export namespace ConditionalAuthorizationActionParameters { | 'CONSECUTIVE_DECLINES' | 'TIME_SINCE_LAST_TRANSACTION' | 'DISTINCT_COUNTRY_COUNT' + | 'IS_NEW_MERCHANT' | 'THREE_DS_SUCCESS_RATE'; /** From 63b51b81215e634bbfe0ec4e75155fa0f200e8f5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 10:38:52 +0000 Subject: [PATCH 21/22] feat(api): add CARD_TRANSACTION_UPDATE support to auth rules v2 --- .stats.yml | 6 +- api.md | 3 + packages/mcp-server/src/local-docs-search.ts | 28 +-- src/resources/auth-rules/auth-rules.ts | 6 + src/resources/auth-rules/index.ts | 3 + src/resources/auth-rules/v2/index.ts | 3 + src/resources/auth-rules/v2/v2.ts | 204 ++++++++++++++++++- 7 files changed, 231 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index e3e60713..883f26c0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-92d7ce0702a494edb7beb0ad484c4f24aca65777197d40b2108d05c13c3fa505.yml -openapi_spec_hash: 35e4b9edb38ef23f528fcfbfeaabac02 -config_hash: ac8326134e692f3f3bdec82396bbec80 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-0f374e78a0212145a2f55a55dfc39a612de19094d5152ae26b1bc74b01b9e343.yml +openapi_spec_hash: ec888cdaebea979a2cd6231ca04c346c +config_hash: 01dfc901bb6d54b0f582155d779bcbe0 diff --git a/api.md b/api.md index edf297ed..68106b5c 100644 --- a/api.md +++ b/api.md @@ -86,11 +86,13 @@ Types: - AuthRuleCondition - AuthRuleVersion - BacktestStats +- CardTransactionUpdateAction - Conditional3DSActionParameters - ConditionalACHActionParameters - ConditionalAttribute - ConditionalAuthorizationActionParameters - ConditionalBlockParameters +- ConditionalCardTransactionUpdateActionParameters - ConditionalOperation - ConditionalTokenizationActionParameters - ConditionalValue @@ -98,6 +100,7 @@ Types: - MerchantLockParameters - ReportStats - RuleFeature +- SpendVelocityFilters - TypescriptCodeParameters - VelocityLimitFilters - VelocityLimitParams diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index a849ca40..9f48f7c2 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -912,10 +912,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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; parameters?: object; }[]; } | { 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 | 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; parameters?: object; }[]; } | { 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 | 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; parameters?: object; }[]; } | { 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 | 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; };", + "{ 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; parameters?: object; }[]; } | { 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; }[]; } | { action: object | object; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; parameters?: object; }[]; } | { code: string; features: object | 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; parameters?: object; }[]; } | { 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; }[]; } | { action: object | object; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; parameters?: object; }[]; } | { code: string; features: object | 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; parameters?: object; }[]; } | { 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; }[]; } | { action: object | object; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; parameters?: object; }[]; } | { code: string; features: object | 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[]; }", + "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | 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: { typescript: { method: 'client.authRules.v2.create', @@ -973,9 +973,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [ '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[]; }", + "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | 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; parameters?: object; }[]; } | { 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 | 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; parameters?: object; }[]; } | { 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 | 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```", + "## 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 | object; version: number; }; draft_version: { error: string; parameters: object | 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; parameters?: object; }[]; } | { 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; }[]; } | { action: object | object; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; parameters?: object; }[]; } | { code: string; features: object | 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; parameters?: object; }[]; } | { 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; }[]; } | { action: object | object; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; parameters?: object; }[]; } | { code: string; features: object | 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: { typescript: { method: 'client.authRules.v2.list', @@ -1022,9 +1022,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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[]; }", + "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | 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; parameters?: object; }[]; } | { 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 | 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; parameters?: object; }[]; } | { 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 | 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```", + "## 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 | object; version: number; }; draft_version: { error: string; parameters: object | 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; parameters?: object; }[]; } | { 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; }[]; } | { action: object | object; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; parameters?: object; }[]; } | { code: string; features: object | 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; parameters?: object; }[]; } | { 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; }[]; } | { action: object | object; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; parameters?: object; }[]; } | { code: string; features: object | 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: { typescript: { method: 'client.authRules.v2.retrieve', @@ -1076,7 +1076,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [ "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[]; }", + "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | 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: { typescript: { method: 'client.authRules.v2.update', @@ -1173,12 +1173,12 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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; parameters?: { interval?: 'LIFETIME' | '7D' | '30D' | '90D'; scope?: 'CARD' | 'ACCOUNT' | 'BUSINESS_ACCOUNT'; }; }[]; } | { 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; } | { scope: 'CARD' | 'ACCOUNT' | 'BUSINESS_ACCOUNT'; type: 'TRANSACTION_HISTORY_SIGNALS'; name?: 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; parameters?: { interval?: 'LIFETIME' | '7D' | '30D' | '90D'; scope?: 'CARD' | 'ACCOUNT' | 'BUSINESS_ACCOUNT'; }; }[]; } | { 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; }[]; } | { action: { key: string; type: 'TAG'; value: string; } | { queue_token: string; scope: 'CARD' | 'ACCOUNT'; type: 'CREATE_CASE'; }; conditions: { attribute: string; operation: string; value: string | number | string[] | string; parameters?: { filters?: spend_velocity_filters; period?: velocity_limit_period; scope?: 'CARD' | 'ACCOUNT' | 'GLOBAL'; }; }[]; } | { 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; } | { scope: 'CARD' | 'ACCOUNT' | 'BUSINESS_ACCOUNT'; type: 'TRANSACTION_HISTORY_SIGNALS'; 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[]; }", + "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | 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; parameters?: { interval?: 'LIFETIME' | '7D' | '30D' | '90D'; scope?: 'CARD' | 'ACCOUNT' | 'BUSINESS_ACCOUNT'; }; }[]; } | { 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; } | { scope: 'CARD' | 'ACCOUNT' | 'BUSINESS_ACCOUNT'; type: 'TRANSACTION_HISTORY_SIGNALS'; 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; parameters?: object; }[]; } | { 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 | 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; parameters?: object; }[]; } | { 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 | 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```", + "## 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[]; } | { action: card_transaction_update_action; 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; parameters?: { interval?: 'LIFETIME' | '7D' | '30D' | '90D'; scope?: 'CARD' | 'ACCOUNT' | 'BUSINESS_ACCOUNT'; }; }[]; } | { 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; }[]; } | { action: { key: string; type: 'TAG'; value: string; } | { queue_token: string; scope: 'CARD' | 'ACCOUNT'; type: 'CREATE_CASE'; }; conditions: { attribute: string; operation: string; value: string | number | string[] | string; parameters?: { filters?: spend_velocity_filters; period?: velocity_limit_period; scope?: 'CARD' | 'ACCOUNT' | 'GLOBAL'; }; }[]; } | { 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; } | { scope: 'CARD' | 'ACCOUNT' | 'BUSINESS_ACCOUNT'; type: 'TRANSACTION_HISTORY_SIGNALS'; 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 | object; version: number; }; draft_version: { error: string; parameters: object | 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; parameters?: object; }[]; } | { 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; }[]; } | { action: object | object; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; parameters?: object; }[]; } | { code: string; features: object | 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; parameters?: object; }[]; } | { 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; }[]; } | { action: object | object; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; parameters?: object; }[]; } | { code: string; features: object | 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```", perLanguage: { typescript: { method: 'client.authRules.v2.draft', @@ -1226,9 +1226,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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; }[]; }", + "{ 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 | conditional_card_transaction_update_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```", + "## 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 | conditional_card_transaction_update_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[]; } | { action: card_transaction_update_action; 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: { typescript: { method: 'client.authRules.v2.listVersions', @@ -1277,9 +1277,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [ 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[]; }", + "{ token: string; account_tokens: string[]; business_account_tokens: string[]; card_tokens: string[]; current_version: { parameters: object | object | object | object | object | object | object | object | object; version: number; }; draft_version: { error: string; parameters: object | 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; parameters?: object; }[]; } | { 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 | 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; parameters?: object; }[]; } | { 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 | 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```", + "## 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 | object; version: number; }; draft_version: { error: string; parameters: object | 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; parameters?: object; }[]; } | { 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; }[]; } | { action: object | object; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; parameters?: object; }[]; } | { code: string; features: object | 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; parameters?: object; }[]; } | { 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; }[]; } | { action: object | object; conditions: { attribute: string; operation: conditional_operation; value: conditional_value; parameters?: object; }[]; } | { code: string; features: object | 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: { typescript: { method: 'client.authRules.v2.promote', diff --git a/src/resources/auth-rules/auth-rules.ts b/src/resources/auth-rules/auth-rules.ts index b544f937..acc63a26 100644 --- a/src/resources/auth-rules/auth-rules.ts +++ b/src/resources/auth-rules/auth-rules.ts @@ -8,11 +8,13 @@ import { AuthRuleVersion, AuthRulesCursorPage, BacktestStats, + CardTransactionUpdateAction, Conditional3DSActionParameters, ConditionalACHActionParameters, ConditionalAttribute, ConditionalAuthorizationActionParameters, ConditionalBlockParameters, + ConditionalCardTransactionUpdateActionParameters, ConditionalOperation, ConditionalTokenizationActionParameters, ConditionalValue, @@ -20,6 +22,7 @@ import { MerchantLockParameters, ReportStats, RuleFeature, + SpendVelocityFilters, TypescriptCodeParameters, V2, V2CreateParams, @@ -52,11 +55,13 @@ export declare namespace AuthRules { type AuthRuleCondition as AuthRuleCondition, type AuthRuleVersion as AuthRuleVersion, type BacktestStats as BacktestStats, + type CardTransactionUpdateAction as CardTransactionUpdateAction, type Conditional3DSActionParameters as Conditional3DSActionParameters, type ConditionalACHActionParameters as ConditionalACHActionParameters, type ConditionalAttribute as ConditionalAttribute, type ConditionalAuthorizationActionParameters as ConditionalAuthorizationActionParameters, type ConditionalBlockParameters as ConditionalBlockParameters, + type ConditionalCardTransactionUpdateActionParameters as ConditionalCardTransactionUpdateActionParameters, type ConditionalOperation as ConditionalOperation, type ConditionalTokenizationActionParameters as ConditionalTokenizationActionParameters, type ConditionalValue as ConditionalValue, @@ -64,6 +69,7 @@ export declare namespace AuthRules { type MerchantLockParameters as MerchantLockParameters, type ReportStats as ReportStats, type RuleFeature as RuleFeature, + type SpendVelocityFilters as SpendVelocityFilters, type TypescriptCodeParameters as TypescriptCodeParameters, type VelocityLimitFilters as VelocityLimitFilters, type VelocityLimitParams as VelocityLimitParams, diff --git a/src/resources/auth-rules/index.ts b/src/resources/auth-rules/index.ts index dddb701c..edb2dd74 100644 --- a/src/resources/auth-rules/index.ts +++ b/src/resources/auth-rules/index.ts @@ -7,11 +7,13 @@ export { type AuthRuleCondition, type AuthRuleVersion, type BacktestStats, + type CardTransactionUpdateAction, type Conditional3DSActionParameters, type ConditionalACHActionParameters, type ConditionalAttribute, type ConditionalAuthorizationActionParameters, type ConditionalBlockParameters, + type ConditionalCardTransactionUpdateActionParameters, type ConditionalOperation, type ConditionalTokenizationActionParameters, type ConditionalValue, @@ -19,6 +21,7 @@ export { type MerchantLockParameters, type ReportStats, type RuleFeature, + type SpendVelocityFilters, type TypescriptCodeParameters, type VelocityLimitFilters, type VelocityLimitParams, diff --git a/src/resources/auth-rules/v2/index.ts b/src/resources/auth-rules/v2/index.ts index b9e37360..ce9dc0a5 100644 --- a/src/resources/auth-rules/v2/index.ts +++ b/src/resources/auth-rules/v2/index.ts @@ -13,11 +13,13 @@ export { type AuthRuleCondition, type AuthRuleVersion, type BacktestStats, + type CardTransactionUpdateAction, type Conditional3DSActionParameters, type ConditionalACHActionParameters, type ConditionalAttribute, type ConditionalAuthorizationActionParameters, type ConditionalBlockParameters, + type ConditionalCardTransactionUpdateActionParameters, type ConditionalOperation, type ConditionalTokenizationActionParameters, type ConditionalValue, @@ -25,6 +27,7 @@ export { type MerchantLockParameters, type ReportStats, type RuleFeature, + type SpendVelocityFilters, type TypescriptCodeParameters, type VelocityLimitFilters, type VelocityLimitParams, diff --git a/src/resources/auth-rules/v2/v2.ts b/src/resources/auth-rules/v2/v2.ts index ad9274e5..83f9f3ae 100644 --- a/src/resources/auth-rules/v2/v2.ts +++ b/src/resources/auth-rules/v2/v2.ts @@ -214,7 +214,8 @@ export interface AuthRule { * - `VELOCITY_LIMIT`: AUTHORIZATION event stream. * - `MERCHANT_LOCK`: AUTHORIZATION event stream. * - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - * ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + * ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + * stream. * - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, * ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. */ @@ -249,6 +250,7 @@ export namespace AuthRule { | V2API.ConditionalAuthorizationActionParameters | V2API.ConditionalACHActionParameters | V2API.ConditionalTokenizationActionParameters + | V2API.ConditionalCardTransactionUpdateActionParameters | V2API.TypescriptCodeParameters; /** @@ -276,6 +278,7 @@ export namespace AuthRule { | V2API.ConditionalAuthorizationActionParameters | V2API.ConditionalACHActionParameters | V2API.ConditionalTokenizationActionParameters + | V2API.ConditionalCardTransactionUpdateActionParameters | V2API.TypescriptCodeParameters; /** @@ -383,6 +386,7 @@ export interface AuthRuleVersion { | ConditionalAuthorizationActionParameters | ConditionalACHActionParameters | ConditionalTokenizationActionParameters + | ConditionalCardTransactionUpdateActionParameters | TypescriptCodeParameters; /** @@ -456,6 +460,46 @@ export namespace BacktestStats { } } +export type CardTransactionUpdateAction = + | CardTransactionUpdateAction.TagAction + | CardTransactionUpdateAction.CreateCaseAction; + +export namespace CardTransactionUpdateAction { + export interface TagAction { + /** + * The key of the tag to apply to the transaction + */ + key: string; + + /** + * Tag the transaction with key-value metadata + */ + type: 'TAG'; + + /** + * The value of the tag to apply to the transaction + */ + value: string; + } + + export interface CreateCaseAction { + /** + * The token of the queue to create the case in + */ + queue_token: string; + + /** + * The scope of the case to create + */ + scope: 'CARD' | 'ACCOUNT'; + + /** + * Create a case for the transaction + */ + type: 'CREATE_CASE'; + } +} + export interface Conditional3DSActionParameters { /** * The action to take if the conditions are met. @@ -925,6 +969,129 @@ export interface ConditionalBlockParameters { conditions: Array; } +export interface ConditionalCardTransactionUpdateActionParameters { + /** + * The action to take if the conditions are met. + */ + action: CardTransactionUpdateAction; + + conditions: Array; +} + +export namespace ConditionalCardTransactionUpdateActionParameters { + export interface Condition { + /** + * The attribute to target. + * + * The following attributes may be targeted: + * + * - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a + * business by the types of goods or services it provides. + * - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all + * ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for + * Netherlands Antilles. + * - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of + * the transaction. + * - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor + * (merchant). + * - `DESCRIPTOR`: Short description of card acceptor. + * - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer + * fee field in the settlement/cardholder billing currency. This is the amount + * the issuer should authorize against unless the issuer is paying the acquirer + * fee on behalf of the cardholder. + * - `RISK_SCORE`: Network-provided score assessing risk level associated with a + * given authorization. Scores are on a range of 0-999, with 0 representing the + * lowest risk and 999 representing the highest risk. For Visa transactions, + * where the raw score has a range of 0-99, Lithic will normalize the score by + * multiplying the raw score by 10x. + * - `TRANSACTION_STATUS`: The status of the transaction. Valid values are + * `PENDING`, `VOIDED`, `SETTLING`, `SETTLED`, `BOUNCED`, `RETURNED`, `DECLINED`, + * `EXPIRED`. + * - `LAST_EVENT_TYPE`: The type of the most recent event on the transaction. Valid + * values are `AUTHORIZATION`, `AUTHORIZATION_ADVICE`, `AUTHORIZATION_EXPIRY`, + * `AUTHORIZATION_REVERSAL`, `BALANCE_INQUIRY`, `CLEARING`, `CORRECTION_CREDIT`, + * `CORRECTION_DEBIT`, `CREDIT_AUTHORIZATION`, `CREDIT_AUTHORIZATION_ADVICE`, + * `FINANCIAL_AUTHORIZATION`, `FINANCIAL_CREDIT_AUTHORIZATION`, `RETURN`, + * `RETURN_REVERSAL`. + * - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer + * applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or + * `TOKEN_AUTHENTICATED`. + * - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number + * (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`, + * `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`, + * `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`, + * `UNKNOWN`, or `CREDENTIAL_ON_FILE`. + * - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the + * source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, + * `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. + * - `CARD_AGE`: The age of the card in seconds at the time of the transaction. + * - `ACCOUNT_AGE`: The age of the account in seconds at the time of the + * transaction. + * - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified + * filters within the given period. Requires `parameters` with `scope`, `period`, + * and optional `filters`. + * - `SPEND_VELOCITY_AMOUNT`: The total spend amount (in cents) of transactions + * matching the specified filters within the given period. Requires `parameters` + * with `scope`, `period`, and optional `filters`. + */ + attribute: + | 'MCC' + | 'COUNTRY' + | 'CURRENCY' + | 'MERCHANT_ID' + | 'DESCRIPTOR' + | 'TRANSACTION_AMOUNT' + | 'RISK_SCORE' + | 'TRANSACTION_STATUS' + | 'LAST_EVENT_TYPE' + | 'LIABILITY_SHIFT' + | 'PAN_ENTRY_MODE' + | 'WALLET_TYPE' + | 'CARD_AGE' + | 'ACCOUNT_AGE' + | 'SPEND_VELOCITY_COUNT' + | 'SPEND_VELOCITY_AMOUNT'; + + /** + * The operation to apply to the attribute + */ + operation: V2API.ConditionalOperation; + + /** + * A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + */ + value: V2API.ConditionalValue; + + /** + * Additional parameters for spend velocity attributes. Required when `attribute` + * is `SPEND_VELOCITY_COUNT` or `SPEND_VELOCITY_AMOUNT`. Not used for other + * attributes. + */ + parameters?: Condition.Parameters; + } + + export namespace Condition { + /** + * Additional parameters for spend velocity attributes. Required when `attribute` + * is `SPEND_VELOCITY_COUNT` or `SPEND_VELOCITY_AMOUNT`. Not used for other + * attributes. + */ + export interface Parameters { + filters?: V2API.SpendVelocityFilters; + + /** + * The time period over which to calculate the spend velocity. + */ + period?: V2API.VelocityLimitPeriod; + + /** + * The entity scope to evaluate the attribute against. + */ + scope?: 'CARD' | 'ACCOUNT' | 'GLOBAL'; + } + } +} + /** * The operation to apply to the attribute */ @@ -1097,7 +1264,8 @@ export type EventStream = | 'THREE_DS_AUTHENTICATION' | 'TOKENIZATION' | 'ACH_CREDIT_RECEIPT' - | 'ACH_DEBIT_RECEIPT'; + | 'ACH_DEBIT_RECEIPT' + | 'CARD_TRANSACTION_UPDATE'; export interface MerchantLockParameters { /** @@ -1550,6 +1718,22 @@ export namespace RuleFeature { } } +export interface SpendVelocityFilters extends VelocityLimitFilters { + /** + * Tag key-value pairs to exclude from the velocity calculation. Transactions + * matching all specified tag key-value pairs will be excluded from the calculated + * velocity. + */ + exclude_tags?: { [key: string]: string } | null; + + /** + * Tag key-value pairs to include in the velocity calculation. Only transactions + * matching all specified tag key-value pairs will be included in the calculated + * velocity. + */ + include_tags?: { [key: string]: string } | null; +} + /** * Parameters for defining a TypeScript code rule */ @@ -2294,6 +2478,7 @@ export declare namespace V2CreateParams { | ConditionalAuthorizationActionParameters | ConditionalACHActionParameters | ConditionalTokenizationActionParameters + | ConditionalCardTransactionUpdateActionParameters | TypescriptCodeParameters; /** @@ -2307,7 +2492,8 @@ export declare namespace V2CreateParams { * - `VELOCITY_LIMIT`: AUTHORIZATION event stream. * - `MERCHANT_LOCK`: AUTHORIZATION event stream. * - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - * ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + * ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + * stream. * - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, * ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. */ @@ -2351,6 +2537,7 @@ export declare namespace V2CreateParams { | ConditionalAuthorizationActionParameters | ConditionalACHActionParameters | ConditionalTokenizationActionParameters + | ConditionalCardTransactionUpdateActionParameters | TypescriptCodeParameters; /** @@ -2364,7 +2551,8 @@ export declare namespace V2CreateParams { * - `VELOCITY_LIMIT`: AUTHORIZATION event stream. * - `MERCHANT_LOCK`: AUTHORIZATION event stream. * - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - * ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + * ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + * stream. * - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, * ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. */ @@ -2393,6 +2581,7 @@ export declare namespace V2CreateParams { | ConditionalAuthorizationActionParameters | ConditionalACHActionParameters | ConditionalTokenizationActionParameters + | ConditionalCardTransactionUpdateActionParameters | TypescriptCodeParameters; /** @@ -2411,7 +2600,8 @@ export declare namespace V2CreateParams { * - `VELOCITY_LIMIT`: AUTHORIZATION event stream. * - `MERCHANT_LOCK`: AUTHORIZATION event stream. * - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - * ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + * ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + * stream. * - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, * ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. */ @@ -2581,6 +2771,7 @@ export interface V2DraftParams { | ConditionalAuthorizationActionParameters | ConditionalACHActionParameters | ConditionalTokenizationActionParameters + | ConditionalCardTransactionUpdateActionParameters | TypescriptCodeParameters | null; } @@ -2641,11 +2832,13 @@ export declare namespace V2 { type AuthRuleCondition as AuthRuleCondition, type AuthRuleVersion as AuthRuleVersion, type BacktestStats as BacktestStats, + type CardTransactionUpdateAction as CardTransactionUpdateAction, type Conditional3DSActionParameters as Conditional3DSActionParameters, type ConditionalACHActionParameters as ConditionalACHActionParameters, type ConditionalAttribute as ConditionalAttribute, type ConditionalAuthorizationActionParameters as ConditionalAuthorizationActionParameters, type ConditionalBlockParameters as ConditionalBlockParameters, + type ConditionalCardTransactionUpdateActionParameters as ConditionalCardTransactionUpdateActionParameters, type ConditionalOperation as ConditionalOperation, type ConditionalTokenizationActionParameters as ConditionalTokenizationActionParameters, type ConditionalValue as ConditionalValue, @@ -2653,6 +2846,7 @@ export declare namespace V2 { type MerchantLockParameters as MerchantLockParameters, type ReportStats as ReportStats, type RuleFeature as RuleFeature, + type SpendVelocityFilters as SpendVelocityFilters, type TypescriptCodeParameters as TypescriptCodeParameters, type VelocityLimitFilters as VelocityLimitFilters, type VelocityLimitParams as VelocityLimitParams, From d33861b93907d872a8740e7e509cb8225cb17477 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 10:39:33 +0000 Subject: [PATCH 22/22] release: 0.138.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 36 +++++++++++++++++++++++++++++++ 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, 42 insertions(+), 6 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7d69fc3f..a51a25af 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.137.0" + ".": "0.138.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 05ab0382..ed5d0710 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,41 @@ # Changelog +## 0.138.0 (2026-05-06) + +Full Changelog: [v0.137.0...v0.138.0](https://github.com/lithic-com/lithic-node/compare/v0.137.0...v0.138.0) + +### Features + +* **api:** add AMEX to network enum in settlement reports ([d0f5362](https://github.com/lithic-com/lithic-node/commit/d0f5362f7bc061d07058f1fd39cd5f843615ed7a)) +* **api:** add CARD_TRANSACTION_UPDATE support to auth rules v2 ([63b51b8](https://github.com/lithic-com/lithic-node/commit/63b51b81215e634bbfe0ec4e75155fa0f200e8f5)) +* **api:** add IS_NEW_MERCHANT metric to auth rules v2 ([f2b26de](https://github.com/lithic-com/lithic-node/commit/f2b26de0a41a087240c9214c2dc433f9a0cd85e4)) +* support setting headers via env ([2406cf7](https://github.com/lithic-com/lithic-node/commit/2406cf738dafa08c8c0e09a833c25b079c3c4887)) +* Update card expiration from 6 years to 5 years ([7031267](https://github.com/lithic-com/lithic-node/commit/7031267707c21414d050657426d5a0dcdfe7318e)) + + +### Bug Fixes + +* **types:** make fields nullable in account-holders, accounts, and cards ([c5475ef](https://github.com/lithic-com/lithic-node/commit/c5475ef1525294e6a50e47637e3479ae5b4c6866)) + + +### Chores + +* avoid formatting file that gets changed during releases ([062a350](https://github.com/lithic-com/lithic-node/commit/062a350217e39bf8b054c4bdfb3054cbfa7137ac)) +* **format:** run eslint and prettier separately ([10aa40f](https://github.com/lithic-com/lithic-node/commit/10aa40fd72fd0933d2bc331dfbec23ce97b6c62f)) +* **formatter:** run prettier and eslint separately ([d78245b](https://github.com/lithic-com/lithic-node/commit/d78245b7aad796549148adcf228d0077233d0419)) +* **internal:** codegen related update ([17f1170](https://github.com/lithic-com/lithic-node/commit/17f1170f306b327ae2766e6f55d0fa64cc9f7b62)) +* **internal:** codegen related update ([c38ad4c](https://github.com/lithic-com/lithic-node/commit/c38ad4c69e7bdaefbc8f6288b29206ec5157650a)) +* **internal:** more robust bootstrap script ([eb0bf7c](https://github.com/lithic-com/lithic-node/commit/eb0bf7c3e099e87bca8f2997d582fdb10a2b796c)) +* **internal:** update docs ordering ([bb95c1f](https://github.com/lithic-com/lithic-node/commit/bb95c1f529a85c3e04eab6783b1f7301e6085670)) +* restructure docs search code ([f64d754](https://github.com/lithic-com/lithic-node/commit/f64d75431f41bef55ed246bf3da3d8a1183fd327)) + + +### Documentation + +* **api:** improve SettlementDetail event_tokens and transaction_token descriptions ([4d4db79](https://github.com/lithic-com/lithic-node/commit/4d4db79662318ed08590ff8ab40e1f6d7ab0a8be)) +* clarify forwards compat behavior ([6d4c205](https://github.com/lithic-com/lithic-node/commit/6d4c205c664de06157fe7f8db7ed04fdab8625b2)) +* update with proxy auth info ([ec4f6ca](https://github.com/lithic-com/lithic-node/commit/ec4f6ca8dfaefc3fe230109d3a09fdb53c1a3812)) + ## 0.137.0 (2026-04-20) Full Changelog: [v0.136.0...v0.137.0](https://github.com/lithic-com/lithic-node/compare/v0.136.0...v0.137.0) diff --git a/package.json b/package.json index 78857902..256c5a4f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lithic", - "version": "0.137.0", + "version": "0.138.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 cc783200..8eb6ef11 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.137.0", + "version": "0.138.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 69e72ddb..87f7f80d 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -1,6 +1,6 @@ { "name": "lithic-mcp", - "version": "0.137.0", + "version": "0.138.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 468c1847..8e1d7fcd 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.137.0', + version: '0.138.0', }, { instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }), diff --git a/src/version.ts b/src/version.ts index bbd0a12b..26aad63c 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.137.0'; // x-release-please-version +export const VERSION = '0.138.0'; // x-release-please-version