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
22 changes: 21 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
lint:
name: lint
runs-on: ubuntu-latest
if: github.repository == 'lithic-com/lithic-python'

steps:
- uses: actions/checkout@v4
Expand All @@ -31,6 +30,27 @@ jobs:
- name: Run lints
run: ./scripts/lint

test:
name: test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rye
run: |
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'

- name: Bootstrap
run: ./scripts/bootstrap

- name: Run tests
run: ./scripts/test

examples:
name: examples
runs-on: ubuntu-latest
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.87.0"
".": "0.87.1"
}
3 changes: 3 additions & 0 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
configured_endpoints: 155
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-fe97f820471b725722897539252e7444af7490c5a444a2e9304f5e6eec5513f3.yml
openapi_spec_hash: 7e6a5737901cef39499bf749a17d9939
config_hash: 3d06d32938417ca039b0caa91d2dc8b6
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 0.87.1 (2025-03-27)

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

### Bug Fixes

* **types:** add missing total=False ([#723](https://github.com/lithic-com/lithic-python/issues/723)) ([8fa5021](https://github.com/lithic-com/lithic-python/commit/8fa502151127f8b9a5f5d9ad915c6f99f48cbeb9))


### Chores

* **api:** new attribute targets for Auth Rules and new Financial Account State schema ([#721](https://github.com/lithic-com/lithic-python/issues/721)) ([8ec0990](https://github.com/lithic-com/lithic-python/commit/8ec09902524a403201f81eae3e5b549afbe34a29))
* fix typos ([#722](https://github.com/lithic-com/lithic-python/issues/722)) ([5542c78](https://github.com/lithic-com/lithic-python/commit/5542c7833c2594651ae07a734d26ee3b80d865c7))
* **internal:** codegen related update ([#724](https://github.com/lithic-com/lithic-python/issues/724)) ([b7f9419](https://github.com/lithic-com/lithic-python/commit/b7f9419ca0c5bc3f2d066078156440b5dc81ce3d))
* **internal:** update .stats.yml ([#719](https://github.com/lithic-com/lithic-python/issues/719)) ([71a42c0](https://github.com/lithic-com/lithic-python/commit/71a42c0f2604c81f87fb0ee82a13017d6d758008))

## 0.87.0 (2025-03-18)

Full Changelog: [v0.86.2...v0.87.0](https://github.com/lithic-com/lithic-python/compare/v0.86.2...v0.87.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.87.0"
version = "0.87.1"
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/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ def set_pydantic_config(typ: Any, config: pydantic.ConfigDict) -> None:
setattr(typ, "__pydantic_config__", config) # noqa: B010


# our use of subclasssing here causes weirdness for type checkers,
# our use of subclassing here causes weirdness for type checkers,
# so we just pretend that we don't subclass
if TYPE_CHECKING:
GenericModel = BaseModel
Expand Down
2 changes: 1 addition & 1 deletion src/lithic/_utils/_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def _get_annotated_type(type_: type) -> type | None:
def _maybe_transform_key(key: str, type_: type) -> str:
"""Transform the given `data` based on the annotations provided in `type_`.
Note: this function only looks at `Annotated` types that contain `PropertInfo` metadata.
Note: this function only looks at `Annotated` types that contain `PropertyInfo` metadata.
"""
annotated_type = _get_annotated_type(type_)
if annotated_type is None:
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.87.0" # x-release-please-version
__version__ = "0.87.1" # x-release-please-version
9 changes: 9 additions & 0 deletions src/lithic/types/auth_rules/auth_rule_condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,22 @@ class AuthRuleCondition(BaseModel):
lowest risk and 999 representing the highest risk. For Visa transactions,
where the raw score has a range of 0-99, Lithic will normalize the score by
multiplying the raw score by 10x.
- `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
trailing 15 minutes before the authorization.
- `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
trailing hour up and until the authorization.
- `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
trailing 24 hours up and until the authorization.
- `CARD_STATE`: The current state of the card associated with the transaction.
Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
`PENDING_FULFILLMENT`.
- `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
Valid values are `TRUE`, `FALSE`.
- `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
`OK`, `BLOCKED`.
- `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
`SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
"""

operation: Optional[
Expand Down
9 changes: 9 additions & 0 deletions src/lithic/types/auth_rules/auth_rule_condition_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,22 @@ class AuthRuleConditionParam(TypedDict, total=False):
lowest risk and 999 representing the highest risk. For Visa transactions,
where the raw score has a range of 0-99, Lithic will normalize the score by
multiplying the raw score by 10x.
- `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
trailing 15 minutes before the authorization.
- `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
trailing hour up and until the authorization.
- `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
trailing 24 hours up and until the authorization.
- `CARD_STATE`: The current state of the card associated with the transaction.
Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
`PENDING_FULFILLMENT`.
- `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
Valid values are `TRUE`, `FALSE`.
- `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
`OK`, `BLOCKED`.
- `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
`SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
"""

operation: Literal["IS_ONE_OF", "IS_NOT_ONE_OF", "MATCHES", "DOES_NOT_MATCH", "IS_GREATER_THAN", "IS_LESS_THAN"]
Expand Down
4 changes: 4 additions & 0 deletions src/lithic/types/auth_rules/conditional_attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
"PAN_ENTRY_MODE",
"TRANSACTION_AMOUNT",
"RISK_SCORE",
"CARD_TRANSACTION_COUNT_15M",
"CARD_TRANSACTION_COUNT_1H",
"CARD_TRANSACTION_COUNT_24H",
"CARD_STATE",
"PIN_ENTERED",
"PIN_STATUS",
"WALLET_TYPE",
]
14 changes: 14 additions & 0 deletions src/lithic/types/financial_accounts/loan_tape.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
__all__ = [
"LoanTape",
"AccountStanding",
"AccountStandingFinancialAccountState",
"Balances",
"BalancesDue",
"BalancesNextStatementDue",
Expand All @@ -27,6 +28,16 @@
]


class AccountStandingFinancialAccountState(BaseModel):
status: Literal["OPEN", "CLOSED", "SUSPENDED", "PENDING"]
"""Status of the financial account"""

status_change_reason: Optional[
Literal["CHARGED_OFF_DELINQUENT", "CHARGED_OFF_FRAUD", "END_USER_REQUEST", "BANK_REQUEST", "DELINQUENT"]
] = None
"""Reason for the financial account status change"""


class AccountStanding(BaseModel):
consecutive_full_payments_made: int
"""Number of consecutive full payments made"""
Expand All @@ -40,6 +51,9 @@ class AccountStanding(BaseModel):
days_past_due: int
"""Number of days past due"""

financial_account_state: AccountStandingFinancialAccountState
"""Information about the financial account state"""

has_grace: bool
"""Whether the account currently has grace or not"""

Expand Down
14 changes: 14 additions & 0 deletions src/lithic/types/financial_accounts/statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
__all__ = [
"Statement",
"AccountStanding",
"AccountStandingFinancialAccountState",
"AmountDue",
"PeriodTotals",
"YtdTotals",
Expand All @@ -19,6 +20,16 @@
]


class AccountStandingFinancialAccountState(BaseModel):
status: Literal["OPEN", "CLOSED", "SUSPENDED", "PENDING"]
"""Status of the financial account"""

status_change_reason: Optional[
Literal["CHARGED_OFF_DELINQUENT", "CHARGED_OFF_FRAUD", "END_USER_REQUEST", "BANK_REQUEST", "DELINQUENT"]
] = None
"""Reason for the financial account status change"""


class AccountStanding(BaseModel):
consecutive_full_payments_made: int
"""Number of consecutive full payments made"""
Expand All @@ -32,6 +43,9 @@ class AccountStanding(BaseModel):
days_past_due: int
"""Number of days past due"""

financial_account_state: AccountStandingFinancialAccountState
"""Information about the financial account state"""

has_grace: bool
"""Whether the account currently has grace or not"""

Expand Down
Loading