Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.112.0"
".": "0.113.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 175
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-abe6a4f82f696099fa8ecb1cc44f08979e17d56578ae7ea68b0e9182e21df508.yml
openapi_spec_hash: d2ce51592a9a234c6f34a1168a31f91f
config_hash: f4b1d2f464e80527f970de61cba0c52f
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-4ecc06edca2cfad4eaf11573611e89823fda5f56370bac5cd02a498a6b277d09.yml
openapi_spec_hash: 8f4a30bec4348cbde85b1e65bef9189a
config_hash: 9dddee5f7af579864599849cb28a0770
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# Changelog

## 0.113.0 (2026-01-08)

Full Changelog: [v0.112.0...v0.113.0](https://github.com/lithic-com/lithic-python/compare/v0.112.0...v0.113.0)

### Features

* **api:** Add card state attribute to tokenization rules ([baad6b3](https://github.com/lithic-com/lithic-python/commit/baad6b392013bd69f1b96e1e56c5a7557fb2262f))
* **api:** Add event_type to ASA request and 3DS decisioning request ([baad6b3](https://github.com/lithic-com/lithic-python/commit/baad6b392013bd69f1b96e1e56c5a7557fb2262f))
* **api:** add external_id to payment_event ([b87046c](https://github.com/lithic-com/lithic-python/commit/b87046c51cb5d332ea53959ac3892ce2ba29cec3))
* **api:** add get /v1/transfer_limits endpoint ([b87046c](https://github.com/lithic-com/lithic-python/commit/b87046c51cb5d332ea53959ac3892ce2ba29cec3))
* **api:** add post /v1/book_transfers/{book_transfer_token}/retry endpoint ([b87046c](https://github.com/lithic-com/lithic-python/commit/b87046c51cb5d332ea53959ac3892ce2ba29cec3))
* **api:** Add user defined status to ledger accounts ([baad6b3](https://github.com/lithic-com/lithic-python/commit/baad6b392013bd69f1b96e1e56c5a7557fb2262f))
* **api:** add WIRE_DRAWDOWN_REQUEST transfer type ([97f0128](https://github.com/lithic-com/lithic-python/commit/97f012830440e7bd5071bf58d88b47b87b8b2025))
* **api:** Expose Payment Allocation Details ([baad6b3](https://github.com/lithic-com/lithic-python/commit/baad6b392013bd69f1b96e1e56c5a7557fb2262f))
* **api:** remove unnecessary X-Lithic-Pagination header ([97f0128](https://github.com/lithic-com/lithic-python/commit/97f012830440e7bd5071bf58d88b47b87b8b2025))
* **api:** remove v1/aggregate_balances and related models ([f3e089e](https://github.com/lithic-com/lithic-python/commit/f3e089e78535d88553bd60681bce6e75f0c29ece))


### Bug Fixes

* use async_to_httpx_files in patch method ([783d8ff](https://github.com/lithic-com/lithic-python/commit/783d8ff3f2119f1ff7c89e65864107fa13afe9b4))


### Chores

* **internal:** add `--fix` argument to lint script ([8e0a11c](https://github.com/lithic-com/lithic-python/commit/8e0a11ca6969fe5956ad244a7222525ff16c11b9))
* **internal:** add missing files argument to base client ([52f441e](https://github.com/lithic-com/lithic-python/commit/52f441ece2827bf2b57bc2840d226121becbbff4))
* **internal:** codegen related update ([14b9d48](https://github.com/lithic-com/lithic-python/commit/14b9d48c8280147c26e92118bf070fd3a35e5013))
* update code formatting ([baad6b3](https://github.com/lithic-com/lithic-python/commit/baad6b392013bd69f1b96e1e56c5a7557fb2262f))


### Documentation

* **api:** clarify description of token / retry_token when it serves as idempotency key ([97f0128](https://github.com/lithic-com/lithic-python/commit/97f012830440e7bd5071bf58d88b47b87b8b2025))
* Update language for Google Web Push Provisioning docs ([baad6b3](https://github.com/lithic-com/lithic-python/commit/baad6b392013bd69f1b96e1e56c5a7557fb2262f))

## 0.112.0 (2025-12-10)

Full Changelog: [v0.111.0...v0.112.0](https://github.com/lithic-com/lithic-python/compare/v0.111.0...v0.112.0)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2025 Lithic
Copyright 2026 Lithic

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,20 +338,6 @@ On timeout, an `APITimeoutError` is thrown.

Note that requests that time out are [retried twice by default](#retries).

## Default Headers

We automatically send the `X-Lithic-Pagination` header set to `cursor`.

If you need to, you can override it by setting default headers per-request or on the client object.

```python
from lithic import Lithic

client = Lithic(
default_headers={"X-Lithic-Pagination": "My-Custom-Value"},
)
```

## Advanced

### Logging
Expand Down
40 changes: 15 additions & 25 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,18 +214,6 @@ Methods:
- <code>client.cards.<a href="./src/lithic/resources/cards/cards.py">get_embed_html</a>(\*args) -> str</code>
- <code>client.cards.<a href="./src/lithic/resources/cards/cards.py">get_embed_url</a>(\*args) -> URL</code>

## AggregateBalances

Types:

```python
from lithic.types.cards import AggregateBalanceListResponse
```

Methods:

- <code title="get /v1/cards/aggregate_balances">client.cards.aggregate_balances.<a href="./src/lithic/resources/cards/aggregate_balances.py">list</a>(\*\*<a href="src/lithic/types/cards/aggregate_balance_list_params.py">params</a>) -> <a href="./src/lithic/types/cards/aggregate_balance_list_response.py">SyncSinglePage[AggregateBalanceListResponse]</a></code>

## Balances

Methods:
Expand Down Expand Up @@ -266,18 +254,6 @@ Methods:

- <code title="get /v1/balances">client.balances.<a href="./src/lithic/resources/balances.py">list</a>(\*\*<a href="src/lithic/types/balance_list_params.py">params</a>) -> <a href="./src/lithic/types/balance.py">SyncSinglePage[Balance]</a></code>

# AggregateBalances

Types:

```python
from lithic.types import AggregateBalance
```

Methods:

- <code title="get /v1/aggregate_balances">client.aggregate_balances.<a href="./src/lithic/resources/aggregate_balances.py">list</a>(\*\*<a href="src/lithic/types/aggregate_balance_list_params.py">params</a>) -> <a href="./src/lithic/types/aggregate_balance.py">SyncSinglePage[AggregateBalance]</a></code>

# Disputes

Types:
Expand Down Expand Up @@ -694,6 +670,7 @@ Methods:
- <code title="post /v1/book_transfers">client.book_transfers.<a href="./src/lithic/resources/book_transfers.py">create</a>(\*\*<a href="src/lithic/types/book_transfer_create_params.py">params</a>) -> <a href="./src/lithic/types/book_transfer_response.py">BookTransferResponse</a></code>
- <code title="get /v1/book_transfers/{book_transfer_token}">client.book_transfers.<a href="./src/lithic/resources/book_transfers.py">retrieve</a>(book_transfer_token) -> <a href="./src/lithic/types/book_transfer_response.py">BookTransferResponse</a></code>
- <code title="get /v1/book_transfers">client.book_transfers.<a href="./src/lithic/resources/book_transfers.py">list</a>(\*\*<a href="src/lithic/types/book_transfer_list_params.py">params</a>) -> <a href="./src/lithic/types/book_transfer_response.py">SyncCursorPage[BookTransferResponse]</a></code>
- <code title="post /v1/book_transfers/{book_transfer_token}/retry">client.book_transfers.<a href="./src/lithic/resources/book_transfers.py">retry</a>(book_transfer_token, \*\*<a href="src/lithic/types/book_transfer_retry_params.py">params</a>) -> <a href="./src/lithic/types/book_transfer_response.py">BookTransferResponse</a></code>
- <code title="post /v1/book_transfers/{book_transfer_token}/reverse">client.book_transfers.<a href="./src/lithic/resources/book_transfers.py">reverse</a>(book_transfer_token, \*\*<a href="src/lithic/types/book_transfer_reverse_params.py">params</a>) -> <a href="./src/lithic/types/book_transfer_response.py">BookTransferResponse</a></code>

# CreditProducts
Expand Down Expand Up @@ -823,6 +800,18 @@ Methods:
- <code title="get /v1/account_activity">client.account_activity.<a href="./src/lithic/resources/account_activity.py">list</a>(\*\*<a href="src/lithic/types/account_activity_list_params.py">params</a>) -> <a href="./src/lithic/types/account_activity_list_response.py">SyncCursorPage[AccountActivityListResponse]</a></code>
- <code title="get /v1/account_activity/{transaction_token}">client.account_activity.<a href="./src/lithic/resources/account_activity.py">retrieve_transaction</a>(transaction_token) -> <a href="./src/lithic/types/account_activity_retrieve_transaction_response.py">AccountActivityRetrieveTransactionResponse</a></code>

# TransferLimits

Types:

```python
from lithic.types import TransferLimitsResponse
```

Methods:

- <code title="get /v1/transfer_limits">client.transfer_limits.<a href="./src/lithic/resources/transfer_limits.py">list</a>(\*\*<a href="src/lithic/types/transfer_limit_list_params.py">params</a>) -> SyncSinglePage[Data]</code>

# Webhooks

Types:
Expand All @@ -833,7 +822,7 @@ from lithic.types import (
AccountHolderUpdatedWebhookEvent,
AccountHolderVerificationWebhookEvent,
AccountHolderDocumentUpdatedWebhookEvent,
AsaRequestWebhookEvent,
CardAuthorizationApprovalRequestWebhookEvent,
TokenizationDecisioningRequestWebhookEvent,
AuthRulesBacktestReportCreatedWebhookEvent,
BalanceUpdatedWebhookEvent,
Expand Down Expand Up @@ -881,6 +870,7 @@ from lithic.types import (
TokenizationTwoFactorAuthenticationCodeWebhookEvent,
TokenizationTwoFactorAuthenticationCodeSentWebhookEvent,
TokenizationUpdatedWebhookEvent,
ThreeDSAuthenticationApprovalRequestWebhookEvent,
DisputeTransactionCreatedWebhookEvent,
DisputeTransactionUpdatedWebhookEvent,
ParsedWebhookEvent,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "lithic"
version = "0.112.0"
version = "0.113.0"
description = "The official Python library for the lithic API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
9 changes: 7 additions & 2 deletions scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ set -e

cd "$(dirname "$0")/.."

echo "==> Running lints"
rye run lint
if [ "$1" = "--fix" ]; then
echo "==> Running lints with --fix"
rye run fix:ruff
else
echo "==> Running lints"
rye run lint
fi

echo "==> Making sure it imports"
rye run python -c 'import lithic'
10 changes: 8 additions & 2 deletions src/lithic/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1262,9 +1262,12 @@ def patch(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
) -> ResponseT:
opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options)
opts = FinalRequestOptions.construct(
method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
)
return self.request(cast_to, opts)

def put(
Expand Down Expand Up @@ -1796,9 +1799,12 @@ async def patch(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
) -> ResponseT:
opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options)
opts = FinalRequestOptions.construct(
method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options
)
return await self.request(cast_to, opts)

async def put(
Expand Down
Loading