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
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.123.0"
".": "0.124.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: 190
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-0f374e78a0212145a2f55a55dfc39a612de19094d5152ae26b1bc74b01b9e343.yml
openapi_spec_hash: ec888cdaebea979a2cd6231ca04c346c
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-af9701d01abffc53ba2bf56c06415d893460e6b420f122e602cf4afe67bbf57b.yml
openapi_spec_hash: 963688b09480159a06865075c94a2577
config_hash: 01dfc901bb6d54b0f582155d779bcbe0
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.124.0 (2026-05-07)

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

### Features

* **api:** add unit parameter and travel/distance attributes to auth_rules ([02bd0f0](https://github.com/lithic-com/lithic-python/commit/02bd0f021353f6ddb9e930f3e5515c0636adfb29))

## 0.123.0 (2026-05-06)

Full Changelog: [v0.122.0...v0.123.0](https://github.com/lithic-com/lithic-python/compare/v0.122.0...v0.123.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.123.0"
version = "0.124.0"
description = "The official Python library for the lithic API"
dynamic = ["readme"]
license = "Apache-2.0"
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.123.0" # x-release-please-version
__version__ = "0.124.0" # x-release-please-version
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@


class ConditionParameters(BaseModel):
"""Additional parameters required for transaction history signal attributes.
"""Additional parameters for certain attributes.

Required when
`attribute` is one of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`,
`STDEV_TRANSACTION_AMOUNT`, `IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`,
`CONSECUTIVE_DECLINES`, `TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT`.
Required when `attribute` is one of
`AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`,
`IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`,
`TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT` (require `scope`);
or `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION` (require `unit`).
Not used for other attributes.
"""

Expand All @@ -30,6 +31,16 @@ class ConditionParameters(BaseModel):
scope: Optional[Literal["CARD", "ACCOUNT", "BUSINESS_ACCOUNT"]] = None
"""The entity scope to evaluate the attribute against."""

unit: Optional[Literal["MPH", "KPH", "MILES", "KILOMETERS"]] = None
"""The unit for impossible travel attributes.

Required when `attribute` is `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION`.

For `TRAVEL_SPEED`: `MPH` (miles per hour) or `KPH` (kilometers per hour).

For `DISTANCE_FROM_LAST_TRANSACTION`: `MILES` or `KILOMETERS`.
"""


class Condition(BaseModel):
attribute: Literal[
Expand Down Expand Up @@ -70,6 +81,8 @@ class Condition(BaseModel):
"DISTINCT_COUNTRY_COUNT",
"IS_NEW_MERCHANT",
"THREE_DS_SUCCESS_RATE",
"TRAVEL_SPEED",
"DISTANCE_FROM_LAST_TRANSACTION",
]
"""The attribute to target.

Expand Down Expand Up @@ -173,6 +186,15 @@ class Condition(BaseModel):
`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.
- `TRAVEL_SPEED`: The estimated speed of travel derived from the distance
between the postal code centers of the last card-present transaction and the
current transaction, divided by the elapsed time. Null if there is no prior
card-present transaction, if either postal code cannot be geocoded, or if
elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`.
- `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal
code centers of the last card-present transaction and the current transaction.
Null if there is no prior card-present transaction or if either postal code
cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`.
"""

operation: ConditionalOperation
Expand All @@ -182,12 +204,14 @@ class Condition(BaseModel):
"""A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`"""

parameters: Optional[ConditionParameters] = None
"""Additional parameters required for transaction history signal attributes.
"""Additional parameters for certain attributes.

Required when `attribute` is one of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`,
`STDEV_TRANSACTION_AMOUNT`, `IS_NEW_COUNTRY`, `IS_NEW_MCC`,
`IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`, `TIME_SINCE_LAST_TRANSACTION`,
or `DISTINCT_COUNTRY_COUNT`. Not used for other attributes.
or `DISTINCT_COUNTRY_COUNT` (require `scope`); or `TRAVEL_SPEED` or
`DISTANCE_FROM_LAST_TRANSACTION` (require `unit`). Not used for other
attributes.
"""


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@


class ConditionParameters(TypedDict, total=False):
"""Additional parameters required for transaction history signal attributes.
"""Additional parameters for certain attributes.

Required when
`attribute` is one of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`,
`STDEV_TRANSACTION_AMOUNT`, `IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`,
`CONSECUTIVE_DECLINES`, `TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT`.
Required when `attribute` is one of
`AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`, `STDEV_TRANSACTION_AMOUNT`,
`IS_NEW_COUNTRY`, `IS_NEW_MCC`, `IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`,
`TIME_SINCE_LAST_TRANSACTION`, or `DISTINCT_COUNTRY_COUNT` (require `scope`);
or `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION` (require `unit`).
Not used for other attributes.
"""

Expand All @@ -32,6 +33,16 @@ class ConditionParameters(TypedDict, total=False):
scope: Literal["CARD", "ACCOUNT", "BUSINESS_ACCOUNT"]
"""The entity scope to evaluate the attribute against."""

unit: Literal["MPH", "KPH", "MILES", "KILOMETERS"]
"""The unit for impossible travel attributes.

Required when `attribute` is `TRAVEL_SPEED` or `DISTANCE_FROM_LAST_TRANSACTION`.

For `TRAVEL_SPEED`: `MPH` (miles per hour) or `KPH` (kilometers per hour).

For `DISTANCE_FROM_LAST_TRANSACTION`: `MILES` or `KILOMETERS`.
"""


class Condition(TypedDict, total=False):
attribute: Required[
Expand Down Expand Up @@ -73,6 +84,8 @@ class Condition(TypedDict, total=False):
"DISTINCT_COUNTRY_COUNT",
"IS_NEW_MERCHANT",
"THREE_DS_SUCCESS_RATE",
"TRAVEL_SPEED",
"DISTANCE_FROM_LAST_TRANSACTION",
]
]
"""The attribute to target.
Expand Down Expand Up @@ -177,6 +190,15 @@ class Condition(TypedDict, total=False):
`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.
- `TRAVEL_SPEED`: The estimated speed of travel derived from the distance
between the postal code centers of the last card-present transaction and the
current transaction, divided by the elapsed time. Null if there is no prior
card-present transaction, if either postal code cannot be geocoded, or if
elapsed time is zero. Requires `parameters.unit` set to `MPH` or `KPH`.
- `DISTANCE_FROM_LAST_TRANSACTION`: The estimated distance between the postal
code centers of the last card-present transaction and the current transaction.
Null if there is no prior card-present transaction or if either postal code
cannot be geocoded. Requires `parameters.unit` set to `MILES` or `KILOMETERS`.
"""

operation: Required[ConditionalOperation]
Expand All @@ -186,12 +208,14 @@ class Condition(TypedDict, total=False):
"""A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`"""

parameters: ConditionParameters
"""Additional parameters required for transaction history signal attributes.
"""Additional parameters for certain attributes.

Required when `attribute` is one of `AMOUNT_Z_SCORE`, `AVG_TRANSACTION_AMOUNT`,
`STDEV_TRANSACTION_AMOUNT`, `IS_NEW_COUNTRY`, `IS_NEW_MCC`,
`IS_FIRST_TRANSACTION`, `CONSECUTIVE_DECLINES`, `TIME_SINCE_LAST_TRANSACTION`,
or `DISTINCT_COUNTRY_COUNT`. Not used for other attributes.
or `DISTINCT_COUNTRY_COUNT` (require `scope`); or `TRAVEL_SPEED` or
`DISTANCE_FROM_LAST_TRANSACTION` (require `unit`). Not used for other
attributes.
"""


Expand Down