Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/lithic-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@v6

Expand All @@ -38,7 +38,7 @@ jobs:
run: ./scripts/lint

build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
timeout-minutes: 10
name: build
permissions:
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
timeout-minutes: 10
name: examples
runs-on: ${{ github.repository == 'stainless-sdks/lithic-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.repository == 'lithic-com/lithic-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
if: github.repository == 'lithic-com/lithic-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')

steps:
- uses: actions/checkout@v6
Expand Down
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.120.0"
".": "0.121.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 189
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-17c04dd1b0508b380c21e3acc3d4cd1e86b590f81d14fa26d1973b236f660e38.yml
openapi_spec_hash: f8ddee07358d2c938450a6889fbf7940
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-bc1866f92f50e1de35c16e782a13052913aeedc56723b13de396dea7c754889b.yml
openapi_spec_hash: d7110a33edc390903093258735ee0cfb
config_hash: edbdfefeb0d3d927c2f9fe3402793215
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## 0.121.0 (2026-04-09)

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

### Features

* **api:** add decline count attributes to auth_rules conditions ([c511d14](https://github.com/lithic-com/lithic-python/commit/c511d14d11ca9c7d37fb549cb36ca3cba4661224))
* **api:** add INTERCHANGE/CHARGEBACK/PROVISIONAL_CREDIT_ACCOUNT account types ([aa96cd4](https://github.com/lithic-com/lithic-python/commit/aa96cd46ed483528438520ffa337b9dbdfa85e45))
* **api:** add override_company_name parameter to payment create method ([babec29](https://github.com/lithic-com/lithic-python/commit/babec2956fc1cea2f2a7568f7229be0973f763f6))
* **api:** add statement_totals field to Statement model ([3b035bc](https://github.com/lithic-com/lithic-python/commit/3b035bce611c86716f0f837e11a590384c94442e))
* **api:** add transaction_token field to auth_rules example models ([ce41be2](https://github.com/lithic-com/lithic-python/commit/ce41be23c7b6a638e387598ced8ebb31d9696cb9))
* **api:** add transaction_token field to auth_rules result types ([25fcd02](https://github.com/lithic-com/lithic-python/commit/25fcd02a8982d74d39761c25eaeee897d19e7601))
* **internal:** implement indices array format for query and form serialization ([bef46fb](https://github.com/lithic-com/lithic-python/commit/bef46fbe5eacffefedb37a7677753e877da3c922))


### Bug Fixes

* **client:** preserve hardcoded query params when merging with user params ([89aced4](https://github.com/lithic-com/lithic-python/commit/89aced4c87b0777be00f82621e50077905bff9d8))
* **types:** make credit_product_token optional in Statement ([6caf4c4](https://github.com/lithic-com/lithic-python/commit/6caf4c4065ffb59f6e285f72c1d0f4b5c8713249))
* **types:** make fields required, remove hostname in card authorization approval webhook ([80c1bcc](https://github.com/lithic-com/lithic-python/commit/80c1bccf3efd889135833d481db58ca7743464c3))
* **types:** remove INTERCHANGE and CHARGEBACK from financial account types ([5567809](https://github.com/lithic-com/lithic-python/commit/55678093ad91356470a2e7dc30bcb9ec1069263d))


### Chores

* **ci:** skip lint on metadata-only changes ([7d73b7b](https://github.com/lithic-com/lithic-python/commit/7d73b7b0775f2e4f9fe6cd78f5bbf528b93804ab))


### Documentation

* **api:** update nature_of_business and qr_code_url parameter descriptions ([7514c59](https://github.com/lithic-com/lithic-python/commit/7514c5966cd9b4a84d221aadffe3ef02c7fa8814))

## 0.120.0 (2026-03-23)

Full Changelog: [v0.119.0...v0.120.0](https://github.com/lithic-com/lithic-python/compare/v0.119.0...v0.120.0)
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.120.0"
version = "0.121.0"
description = "The official Python library for the lithic API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
4 changes: 4 additions & 0 deletions src/lithic/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,10 @@ def _build_request(
files = cast(HttpxRequestFiles, ForceMultipartDict())

prepared_url = self._prepare_url(options.url)
# preserve hard-coded query params from the url
if params and prepared_url.query:
params = {**dict(prepared_url.params.items()), **params}
prepared_url = prepared_url.copy_with(raw_path=prepared_url.raw_path.split(b"?", 1)[0])
if "_" in prepared_url.host:
# work around https://github.com/encode/httpx/discussions/2880
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
Expand Down
5 changes: 4 additions & 1 deletion src/lithic/_qs.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ def _stringify_item(
items.extend(self._stringify_item(key, item, opts))
return items
elif array_format == "indices":
raise NotImplementedError("The array indices format is not supported yet")
items = []
for i, item in enumerate(value):
items.extend(self._stringify_item(f"{key}[{i}]", item, opts))
return items
elif array_format == "brackets":
items = []
key = key + "[]"
Expand Down
2 changes: 1 addition & 1 deletion src/lithic/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "lithic"
__version__ = "0.120.0" # x-release-please-version
__version__ = "0.121.0" # x-release-please-version
56 changes: 28 additions & 28 deletions src/lithic/resources/card_bulk_orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,30 +47,30 @@ def create(
*,
customer_product_id: str,
shipping_address: object,
shipping_method: Literal["BULK_EXPEDITED"],
shipping_method: Literal["BULK_EXPEDITED", "BULK_PRIORITY", "BULK_2_DAY", "BULK_EXPRESS"],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CardBulkOrder:
"""Create a new bulk order for physical card shipments **[BETA]**.
"""Create a new bulk order for physical card shipments.

Cards can be
added to the order via the POST /v1/cards endpoint by specifying the
bulk_order_token. Lock the order via PATCH
/v1/card_bulk_orders/{bulk_order_token} to prepare for shipment. Please work
with your Customer Success Manager and card personalization bureau to ensure
bulk shipping is supported for your program.
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.

Args:
customer_product_id: Customer-specified product configuration for physical card manufacturing. This
must be configured with Lithic before use

shipping_address: Shipping address for all cards in this bulk order

shipping_method: Shipping method for all cards in this bulk order
shipping_method: Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and
BULK_EXPRESS are only available with Perfect Plastic Printing

extra_headers: Send extra headers

Expand Down Expand Up @@ -108,7 +108,7 @@ def retrieve(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CardBulkOrder:
"""
Retrieve a specific bulk order by token **[BETA]**
Retrieve a specific bulk order by token

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -141,10 +141,10 @@ def update(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CardBulkOrder:
"""Update a bulk order **[BETA]**.
"""Update a bulk order.

Primarily used to lock the order, preventing
additional cards from being added
Primarily used to lock the order, preventing additional
cards from being added

Args:
status: Status to update the bulk order to. Use LOCKED to finalize the order
Expand Down Expand Up @@ -184,7 +184,7 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncCursorPage[CardBulkOrder]:
"""
List bulk orders for physical card shipments **[BETA]**
List bulk orders for physical card shipments

Args:
begin: Date string in RFC 3339 format. Only entries created after the specified time
Expand Down Expand Up @@ -257,30 +257,30 @@ async def create(
*,
customer_product_id: str,
shipping_address: object,
shipping_method: Literal["BULK_EXPEDITED"],
shipping_method: Literal["BULK_EXPEDITED", "BULK_PRIORITY", "BULK_2_DAY", "BULK_EXPRESS"],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CardBulkOrder:
"""Create a new bulk order for physical card shipments **[BETA]**.
"""Create a new bulk order for physical card shipments.

Cards can be
added to the order via the POST /v1/cards endpoint by specifying the
bulk_order_token. Lock the order via PATCH
/v1/card_bulk_orders/{bulk_order_token} to prepare for shipment. Please work
with your Customer Success Manager and card personalization bureau to ensure
bulk shipping is supported for your program.
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.

Args:
customer_product_id: Customer-specified product configuration for physical card manufacturing. This
must be configured with Lithic before use

shipping_address: Shipping address for all cards in this bulk order

shipping_method: Shipping method for all cards in this bulk order
shipping_method: Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and
BULK_EXPRESS are only available with Perfect Plastic Printing

extra_headers: Send extra headers

Expand Down Expand Up @@ -318,7 +318,7 @@ async def retrieve(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CardBulkOrder:
"""
Retrieve a specific bulk order by token **[BETA]**
Retrieve a specific bulk order by token

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -351,10 +351,10 @@ async def update(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CardBulkOrder:
"""Update a bulk order **[BETA]**.
"""Update a bulk order.

Primarily used to lock the order, preventing
additional cards from being added
Primarily used to lock the order, preventing additional
cards from being added

Args:
status: Status to update the bulk order to. Use LOCKED to finalize the order
Expand Down Expand Up @@ -396,7 +396,7 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[CardBulkOrder, AsyncCursorPage[CardBulkOrder]]:
"""
List bulk orders for physical card shipments **[BETA]**
List bulk orders for physical card shipments

Args:
begin: Date string in RFC 3339 format. Only entries created after the specified time
Expand Down
Loading