Skip to content
Open
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
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-eb2cf51467f505a1d29c3ca40b9595ecbf6d6a3743f53bc42a52c8135a252ff0.yml
openapi_spec_hash: 2fbd71b69d71138b3e54432a38d759ed
config_hash: edbdfefeb0d3d927c2f9fe3402793215
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 0.121.0 (2026-03-26)

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 override_company_name parameter to payment create method ([babec29](https://github.com/lithic-com/lithic-python/commit/babec2956fc1cea2f2a7568f7229be0973f763f6))
* **internal:** implement indices array format for query and form serialization ([bef46fb](https://github.com/lithic-com/lithic-python/commit/bef46fbe5eacffefedb37a7677753e877da3c922))


### 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
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
40 changes: 24 additions & 16 deletions src/lithic/resources/cards/cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def create(
| Omit = omit,
shipping_address: ShippingAddress | Omit = omit,
shipping_method: Literal[
"2_DAY", "BULK_EXPEDITED", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"
"2_DAY", "BULK", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"
]
| Omit = omit,
spend_limit: int | Omit = omit,
Expand Down Expand Up @@ -254,7 +254,8 @@ def create(
tracking
- `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight
or similar international option, with tracking
- `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
- `BULK` - Card will be shipped as part of a bulk fulfillment order. The
shipping method and timeline are inherited from the parent bulk order.

spend_limit: 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
Expand Down Expand Up @@ -595,7 +596,7 @@ def convert_physical(
carrier: Carrier | Omit = omit,
product_id: str | Omit = omit,
shipping_method: Literal[
"2_DAY", "BULK_EXPEDITED", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"
"2_DAY", "BULK", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"
]
| Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -641,7 +642,8 @@ def convert_physical(
tracking
- `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight
or similar international option, with tracking
- `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
- `BULK` - Card will be shipped as part of a bulk fulfillment order. The
shipping method and timeline are inherited from the parent bulk order.

extra_headers: Send extra headers

Expand Down Expand Up @@ -940,7 +942,7 @@ def reissue(
product_id: str | Omit = omit,
shipping_address: ShippingAddress | Omit = omit,
shipping_method: Literal[
"2_DAY", "BULK_EXPEDITED", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"
"2_DAY", "BULK", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"
]
| Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -981,7 +983,8 @@ def reissue(
tracking
- `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight
or similar international option, with tracking
- `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
- `BULK` - Card will be shipped as part of a bulk fulfillment order. The
shipping method and timeline are inherited from the parent bulk order.

extra_headers: Send extra headers

Expand Down Expand Up @@ -1020,7 +1023,7 @@ def renew(
exp_year: str | Omit = omit,
product_id: str | Omit = omit,
shipping_method: Literal[
"2_DAY", "BULK_EXPEDITED", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"
"2_DAY", "BULK", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"
]
| Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -1071,7 +1074,8 @@ def renew(
tracking
- `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight
or similar international option, with tracking
- `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
- `BULK` - Card will be shipped as part of a bulk fulfillment order. The
shipping method and timeline are inherited from the parent bulk order.

extra_headers: Send extra headers

Expand Down Expand Up @@ -1306,7 +1310,7 @@ async def create(
| Omit = omit,
shipping_address: ShippingAddress | Omit = omit,
shipping_method: Literal[
"2_DAY", "BULK_EXPEDITED", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"
"2_DAY", "BULK", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"
]
| Omit = omit,
spend_limit: int | Omit = omit,
Expand Down Expand Up @@ -1436,7 +1440,8 @@ async def create(
tracking
- `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight
or similar international option, with tracking
- `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
- `BULK` - Card will be shipped as part of a bulk fulfillment order. The
shipping method and timeline are inherited from the parent bulk order.

spend_limit: 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
Expand Down Expand Up @@ -1777,7 +1782,7 @@ async def convert_physical(
carrier: Carrier | Omit = omit,
product_id: str | Omit = omit,
shipping_method: Literal[
"2_DAY", "BULK_EXPEDITED", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"
"2_DAY", "BULK", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"
]
| Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -1823,7 +1828,8 @@ async def convert_physical(
tracking
- `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight
or similar international option, with tracking
- `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
- `BULK` - Card will be shipped as part of a bulk fulfillment order. The
shipping method and timeline are inherited from the parent bulk order.

extra_headers: Send extra headers

Expand Down Expand Up @@ -2122,7 +2128,7 @@ async def reissue(
product_id: str | Omit = omit,
shipping_address: ShippingAddress | Omit = omit,
shipping_method: Literal[
"2_DAY", "BULK_EXPEDITED", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"
"2_DAY", "BULK", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"
]
| Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -2163,7 +2169,8 @@ async def reissue(
tracking
- `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight
or similar international option, with tracking
- `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
- `BULK` - Card will be shipped as part of a bulk fulfillment order. The
shipping method and timeline are inherited from the parent bulk order.

extra_headers: Send extra headers

Expand Down Expand Up @@ -2202,7 +2209,7 @@ async def renew(
exp_year: str | Omit = omit,
product_id: str | Omit = omit,
shipping_method: Literal[
"2_DAY", "BULK_EXPEDITED", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"
"2_DAY", "BULK", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"
]
| Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -2253,7 +2260,8 @@ async def renew(
tracking
- `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight
or similar international option, with tracking
- `BULK_EXPEDITED` - Bulk shipment with Expedited shipping
- `BULK` - Card will be shipped as part of a bulk fulfillment order. The
shipping method and timeline are inherited from the parent bulk order.

extra_headers: Send extra headers

Expand Down
Loading