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.127.0"
".": "0.128.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: 213
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-185b3d93b4e6ed5ae02c32f0bc9133b0ac99dcd1263a12b7aa9ba64e71a5461e.yml
openapi_spec_hash: 2418116f58a464afdd5611865e860d30
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-47e9f78d22682623e313f1689f5fa7e3420575ff285a14a2f4704c49ffb6b72e.yml
openapi_spec_hash: 4797fe46d942cb32e648a79015783d01
config_hash: 5bb913c05ebeb301ec925b16e75bb251
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.128.0 (2026-06-23)

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

### Features

* **api:** add claim and claim_document webhook events ([512d4fa](https://github.com/lithic-com/lithic-python/commit/512d4fad7f07a4e9756cd5c5b16693bcd2105262))
* **api:** add external bank/payment velocity/declines/history features to auth_rules ([11d71e3](https://github.com/lithic-com/lithic-python/commit/11d71e30f57728e98b9d8c90077d355b08cbc89c))

## 0.127.0 (2026-06-22)

Full Changelog: [v0.126.0...v0.127.0](https://github.com/lithic-com/lithic-python/compare/v0.126.0...v0.127.0)
Expand Down
5 changes: 5 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,11 @@ from lithic.types import (
CardTransactionUpdatedWebhookEvent,
CardTransactionEnhancedDataCreatedWebhookEvent,
CardTransactionEnhancedDataUpdatedWebhookEvent,
ClaimCreatedWebhookEvent,
ClaimUpdatedWebhookEvent,
ClaimDocumentUploadedWebhookEvent,
ClaimDocumentAcceptedWebhookEvent,
ClaimDocumentRejectedWebhookEvent,
DigitalWalletTokenizationApprovalRequestWebhookEvent,
DigitalWalletTokenizationResultWebhookEvent,
DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent,
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.127.0"
version = "0.128.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.127.0" # x-release-please-version
__version__ = "0.128.0" # x-release-please-version
10 changes: 10 additions & 0 deletions src/lithic/resources/events/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ def list(
"card.renewed",
"card.shipped",
"card.updated",
"claim_document.accepted",
"claim_document.rejected",
"claim_document.uploaded",
"claim.created",
"claim.updated",
"digital_wallet.tokenization_result",
"digital_wallet.tokenization_two_factor_authentication_code",
"digital_wallet.tokenization_two_factor_authentication_code_sent",
Expand Down Expand Up @@ -403,6 +408,11 @@ def list(
"card.renewed",
"card.shipped",
"card.updated",
"claim_document.accepted",
"claim_document.rejected",
"claim_document.uploaded",
"claim.created",
"claim.updated",
"digital_wallet.tokenization_result",
"digital_wallet.tokenization_two_factor_authentication_code",
"digital_wallet.tokenization_two_factor_authentication_code_sent",
Expand Down
30 changes: 30 additions & 0 deletions src/lithic/resources/events/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ def create(
"card.renewed",
"card.shipped",
"card.updated",
"claim_document.accepted",
"claim_document.rejected",
"claim_document.uploaded",
"claim.created",
"claim.updated",
"digital_wallet.tokenization_result",
"digital_wallet.tokenization_two_factor_authentication_code",
"digital_wallet.tokenization_two_factor_authentication_code_sent",
Expand Down Expand Up @@ -227,6 +232,11 @@ def update(
"card.renewed",
"card.shipped",
"card.updated",
"claim_document.accepted",
"claim_document.rejected",
"claim_document.uploaded",
"claim.created",
"claim.updated",
"digital_wallet.tokenization_result",
"digital_wallet.tokenization_two_factor_authentication_code",
"digital_wallet.tokenization_two_factor_authentication_code_sent",
Expand Down Expand Up @@ -698,6 +708,11 @@ def send_simulated_example(
"card.renewed",
"card.shipped",
"card.updated",
"claim_document.accepted",
"claim_document.rejected",
"claim_document.uploaded",
"claim.created",
"claim.updated",
"digital_wallet.tokenization_result",
"digital_wallet.tokenization_two_factor_authentication_code",
"digital_wallet.tokenization_two_factor_authentication_code_sent",
Expand Down Expand Up @@ -823,6 +838,11 @@ async def create(
"card.renewed",
"card.shipped",
"card.updated",
"claim_document.accepted",
"claim_document.rejected",
"claim_document.uploaded",
"claim.created",
"claim.updated",
"digital_wallet.tokenization_result",
"digital_wallet.tokenization_two_factor_authentication_code",
"digital_wallet.tokenization_two_factor_authentication_code_sent",
Expand Down Expand Up @@ -971,6 +991,11 @@ async def update(
"card.renewed",
"card.shipped",
"card.updated",
"claim_document.accepted",
"claim_document.rejected",
"claim_document.uploaded",
"claim.created",
"claim.updated",
"digital_wallet.tokenization_result",
"digital_wallet.tokenization_two_factor_authentication_code",
"digital_wallet.tokenization_two_factor_authentication_code_sent",
Expand Down Expand Up @@ -1442,6 +1467,11 @@ async def send_simulated_example(
"card.renewed",
"card.shipped",
"card.updated",
"claim_document.accepted",
"claim_document.rejected",
"claim_document.uploaded",
"claim.created",
"claim.updated",
"digital_wallet.tokenization_result",
"digital_wallet.tokenization_two_factor_authentication_code",
"digital_wallet.tokenization_two_factor_authentication_code_sent",
Expand Down
11 changes: 11 additions & 0 deletions src/lithic/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@
from .card_bulk_order_list_params import CardBulkOrderListParams as CardBulkOrderListParams
from .card_reissued_webhook_event import CardReissuedWebhookEvent as CardReissuedWebhookEvent
from .card_web_provision_response import CardWebProvisionResponse as CardWebProvisionResponse
from .claim_created_webhook_event import ClaimCreatedWebhookEvent as ClaimCreatedWebhookEvent
from .claim_updated_webhook_event import ClaimUpdatedWebhookEvent as ClaimUpdatedWebhookEvent
from .network_program_list_params import NetworkProgramListParams as NetworkProgramListParams
from .tokenization_decline_reason import TokenizationDeclineReason as TokenizationDeclineReason
from .account_activity_list_params import AccountActivityListParams as AccountActivityListParams
Expand Down Expand Up @@ -192,6 +194,15 @@
from .account_holder_upload_document_params import (
AccountHolderUploadDocumentParams as AccountHolderUploadDocumentParams,
)
from .claim_document_accepted_webhook_event import (
ClaimDocumentAcceptedWebhookEvent as ClaimDocumentAcceptedWebhookEvent,
)
from .claim_document_rejected_webhook_event import (
ClaimDocumentRejectedWebhookEvent as ClaimDocumentRejectedWebhookEvent,
)
from .claim_document_uploaded_webhook_event import (
ClaimDocumentUploadedWebhookEvent as ClaimDocumentUploadedWebhookEvent,
)
from .external_bank_account_create_response import (
ExternalBankAccountCreateResponse as ExternalBankAccountCreateResponse,
)
Expand Down
85 changes: 84 additions & 1 deletion src/lithic/types/auth_rules/rule_feature.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Union, Optional
from typing import Dict, List, Union, Optional
from typing_extensions import Literal, TypeAlias

from ..._models import BaseModel
Expand All @@ -15,11 +15,16 @@
"ACHReceiptFeature",
"CardTransactionFeature",
"ACHPaymentFeature",
"ExternalBankAccountFeature",
"CardFeature",
"AccountHolderFeature",
"IPMetadataFeature",
"SpendVelocityFeature",
"PaymentVelocityFeature",
"PaymentVelocityFeatureFilters",
"TransactionHistorySignalsFeature",
"ConsecutiveDeclinesFeature",
"ACHPaymentHistoryFeature",
]


Expand Down Expand Up @@ -65,6 +70,13 @@ class ACHPaymentFeature(BaseModel):
"""The variable name for this feature in the rule function signature"""


class ExternalBankAccountFeature(BaseModel):
type: Literal["EXTERNAL_BANK_ACCOUNT"]

name: Optional[str] = None
"""The variable name for this feature in the rule function signature"""


class CardFeature(BaseModel):
type: Literal["CARD"]

Expand Down Expand Up @@ -101,6 +113,53 @@ class SpendVelocityFeature(BaseModel):
"""The variable name for this feature in the rule function signature"""


class PaymentVelocityFeatureFilters(BaseModel):
"""Optional filters applied when aggregating ACH payment velocity.

Payments not matching the provided filters are excluded from the calculated velocity.
"""

exclude_tags: Optional[Dict[str, str]] = None
"""Exclude payments matching any of the provided tag key-value pairs."""

include_payment_types: Optional[List[Literal["ORIGINATION", "RECEIPT"]]] = None
"""Payment types to include in the velocity calculation."""

include_polarities: Optional[List[Literal["CREDIT", "DEBIT"]]] = None
"""Payment polarities to include in the velocity calculation."""

include_statuses: Optional[List[Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED", "RETURNED"]]] = (
None
)
"""Payment statuses to include in the velocity calculation."""

include_tags: Optional[Dict[str, str]] = None
"""Only include payments matching all of the provided tag key-value pairs."""

result: Optional[Literal["APPROVED", "DECLINED"]] = None
"""Only include payments with the given result."""


class PaymentVelocityFeature(BaseModel):
period: VelocityLimitPeriod
"""Velocity over the current day since 00:00 / 12 AM in Eastern Time"""

scope: Literal["FINANCIAL_ACCOUNT", "GLOBAL"]
"""The scope over which the ACH payment velocity is aggregated."""

type: Literal["PAYMENT_VELOCITY"]

filters: Optional[PaymentVelocityFeatureFilters] = None
"""Optional filters applied when aggregating ACH payment velocity.

Payments not matching the provided filters are excluded from the calculated
velocity.
"""

name: Optional[str] = None
"""The variable name for this feature in the rule function signature"""


class TransactionHistorySignalsFeature(BaseModel):
scope: Literal["CARD", "ACCOUNT", "BUSINESS_ACCOUNT"]
"""The entity scope to load transaction history signals for."""
Expand All @@ -111,16 +170,40 @@ class TransactionHistorySignalsFeature(BaseModel):
"""The variable name for this feature in the rule function signature"""


class ConsecutiveDeclinesFeature(BaseModel):
scope: Literal["CARD", "ACCOUNT"]
"""The entity scope to count consecutive declines for."""

type: Literal["CONSECUTIVE_DECLINES"]

name: Optional[str] = None
"""The variable name for this feature in the rule function signature"""


class ACHPaymentHistoryFeature(BaseModel):
scope: Literal["FINANCIAL_ACCOUNT"]
"""The entity scope to load ACH payment history for."""

type: Literal["ACH_PAYMENT_HISTORY"]

name: Optional[str] = None
"""The variable name for this feature in the rule function signature"""


RuleFeature: TypeAlias = Union[
AuthorizationFeature,
AuthenticationFeature,
TokenizationFeature,
ACHReceiptFeature,
CardTransactionFeature,
ACHPaymentFeature,
ExternalBankAccountFeature,
CardFeature,
AccountHolderFeature,
IPMetadataFeature,
SpendVelocityFeature,
PaymentVelocityFeature,
TransactionHistorySignalsFeature,
ConsecutiveDeclinesFeature,
ACHPaymentHistoryFeature,
]
Loading