diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d3dc9f51..988e843f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.115.0" + ".": "0.116.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index fd0cb7e8..2f34650e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 176 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-c24eebe942f400bff8922a6fbef1ce551ad14f61eb4da21b50d823a62ca42586.yml -openapi_spec_hash: b79ed927e625dedff69cea29131a34d9 -config_hash: 693dddc4721eef512d75ab6c60897794 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-f85b60190db68921a3a877d0dd931670c27933ba1f5031fcdd27365e99adb5c9.yml +openapi_spec_hash: 4828c2dc7543ce2a39774a9921c73c80 +config_hash: fbc424e01cca916048d63adcadaa8750 diff --git a/CHANGELOG.md b/CHANGELOG.md index 981334cd..9963adf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 0.116.0 (2026-02-23) + +Full Changelog: [v0.115.0...v0.116.0](https://github.com/lithic-com/lithic-python/compare/v0.115.0...v0.116.0) + +### Features + +* **api:** Add INTEREST_AND_FEES_PAUSED substatus to financial account ([c4a37de](https://github.com/lithic-com/lithic-python/commit/c4a37de9f0f7821e54d05702c4d1d809124fc7bc)) + + +### Chores + +* **dependencies:** require standardwebhooks 1.0.1 ([7dae789](https://github.com/lithic-com/lithic-python/commit/7dae7892de61a765ab4bca8c7af3046d90fe2ff4)) +* **internal:** add request options to SSE classes ([1b49e55](https://github.com/lithic-com/lithic-python/commit/1b49e550b0e6fe3c5203740a9634ee6264046489)) +* update mock server docs ([ec268b7](https://github.com/lithic-com/lithic-python/commit/ec268b7426be15578b2eaf92ca81107cbf9084e6)) + ## 0.115.0 (2026-02-13) Full Changelog: [v0.114.0...v0.115.0](https://github.com/lithic-com/lithic-python/compare/v0.114.0...v0.115.0) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d68a8975..e758caa0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -88,8 +88,7 @@ $ pip install ./path-to-wheel-file.whl Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. ```sh -# you will need npm installed -$ npx prism mock path/to/your/openapi.yml +$ ./scripts/mock ``` ```sh diff --git a/pyproject.toml b/pyproject.toml index 5f325713..18c9a87e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "lithic" -version = "0.115.0" +version = "0.116.0" description = "The official Python library for the lithic API" dynamic = ["readme"] license = "Apache-2.0" @@ -42,7 +42,7 @@ Repository = "https://github.com/lithic-com/lithic-python" [project.optional-dependencies] aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"] -webhooks = ["standardwebhooks"] +webhooks = ["standardwebhooks >= 1.0.1, < 2"] [tool.rye] managed = true diff --git a/requirements-dev.lock b/requirements-dev.lock index 197f41b6..61575831 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -125,7 +125,7 @@ six==1.17.0 # via python-dateutil sniffio==1.3.1 # via lithic -standardwebhooks==1.0.0 +standardwebhooks==1.0.1 # via lithic time-machine==2.19.0 tomli==2.4.0 diff --git a/requirements.lock b/requirements.lock index 01e8660f..3ae4c2cf 100644 --- a/requirements.lock +++ b/requirements.lock @@ -69,7 +69,7 @@ six==1.17.0 # via python-dateutil sniffio==1.3.1 # via lithic -standardwebhooks==1.0.0 +standardwebhooks==1.0.1 # via lithic types-deprecated==1.3.1.20251101 # via standardwebhooks diff --git a/src/lithic/_legacy_response.py b/src/lithic/_legacy_response.py index d3758f2b..415c593c 100644 --- a/src/lithic/_legacy_response.py +++ b/src/lithic/_legacy_response.py @@ -214,6 +214,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: ), response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) @@ -224,6 +225,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: cast_to=extract_stream_chunk_type(self._stream_cls), response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) @@ -237,6 +239,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: cast_to=cast_to, response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) diff --git a/src/lithic/_response.py b/src/lithic/_response.py index 083b08df..f19ac6bc 100644 --- a/src/lithic/_response.py +++ b/src/lithic/_response.py @@ -152,6 +152,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: ), response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) @@ -162,6 +163,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: cast_to=extract_stream_chunk_type(self._stream_cls), response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) @@ -175,6 +177,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: cast_to=cast_to, response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) diff --git a/src/lithic/_streaming.py b/src/lithic/_streaming.py index 73afbbec..38d8cb5f 100644 --- a/src/lithic/_streaming.py +++ b/src/lithic/_streaming.py @@ -4,7 +4,7 @@ import json import inspect from types import TracebackType -from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, AsyncIterator, cast +from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, Optional, AsyncIterator, cast from typing_extensions import Self, Protocol, TypeGuard, override, get_origin, runtime_checkable import httpx @@ -13,6 +13,7 @@ if TYPE_CHECKING: from ._client import Lithic, AsyncLithic + from ._models import FinalRequestOptions _T = TypeVar("_T") @@ -22,7 +23,7 @@ class Stream(Generic[_T]): """Provides the core interface to iterate over a synchronous stream response.""" response: httpx.Response - + _options: Optional[FinalRequestOptions] = None _decoder: SSEBytesDecoder def __init__( @@ -31,10 +32,12 @@ def __init__( cast_to: type[_T], response: httpx.Response, client: Lithic, + options: Optional[FinalRequestOptions] = None, ) -> None: self.response = response self._cast_to = cast_to self._client = client + self._options = options self._decoder = client._make_sse_decoder() self._iterator = self.__stream__() @@ -85,7 +88,7 @@ class AsyncStream(Generic[_T]): """Provides the core interface to iterate over an asynchronous stream response.""" response: httpx.Response - + _options: Optional[FinalRequestOptions] = None _decoder: SSEDecoder | SSEBytesDecoder def __init__( @@ -94,10 +97,12 @@ def __init__( cast_to: type[_T], response: httpx.Response, client: AsyncLithic, + options: Optional[FinalRequestOptions] = None, ) -> None: self.response = response self._cast_to = cast_to self._client = client + self._options = options self._decoder = client._make_sse_decoder() self._iterator = self.__stream__() diff --git a/src/lithic/_version.py b/src/lithic/_version.py index 9b480c33..d7f6788a 100644 --- a/src/lithic/_version.py +++ b/src/lithic/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "lithic" -__version__ = "0.115.0" # x-release-please-version +__version__ = "0.116.0" # x-release-please-version diff --git a/src/lithic/resources/financial_accounts/financial_accounts.py b/src/lithic/resources/financial_accounts/financial_accounts.py index af68c9d5..e42cc408 100644 --- a/src/lithic/resources/financial_accounts/financial_accounts.py +++ b/src/lithic/resources/financial_accounts/financial_accounts.py @@ -319,7 +319,15 @@ def update_status( financial_account_token: str, *, status: Literal["OPEN", "CLOSED", "SUSPENDED", "PENDING"], - substatus: Optional[Literal["CHARGED_OFF_FRAUD", "END_USER_REQUEST", "BANK_REQUEST", "CHARGED_OFF_DELINQUENT"]], + substatus: Optional[ + Literal[ + "CHARGED_OFF_FRAUD", + "END_USER_REQUEST", + "BANK_REQUEST", + "CHARGED_OFF_DELINQUENT", + "INTEREST_AND_FEES_PAUSED", + ] + ], user_defined_status: str | Omit = omit, # 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. @@ -621,7 +629,15 @@ async def update_status( financial_account_token: str, *, status: Literal["OPEN", "CLOSED", "SUSPENDED", "PENDING"], - substatus: Optional[Literal["CHARGED_OFF_FRAUD", "END_USER_REQUEST", "BANK_REQUEST", "CHARGED_OFF_DELINQUENT"]], + substatus: Optional[ + Literal[ + "CHARGED_OFF_FRAUD", + "END_USER_REQUEST", + "BANK_REQUEST", + "CHARGED_OFF_DELINQUENT", + "INTEREST_AND_FEES_PAUSED", + ] + ], user_defined_status: str | Omit = omit, # 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. diff --git a/src/lithic/types/financial_account.py b/src/lithic/types/financial_account.py index 9c232fa6..92e7ddd4 100644 --- a/src/lithic/types/financial_account.py +++ b/src/lithic/types/financial_account.py @@ -47,7 +47,14 @@ class FinancialAccount(BaseModel): """Status of the financial account""" substatus: Optional[ - Literal["CHARGED_OFF_DELINQUENT", "CHARGED_OFF_FRAUD", "END_USER_REQUEST", "BANK_REQUEST", "DELINQUENT"] + Literal[ + "CHARGED_OFF_DELINQUENT", + "CHARGED_OFF_FRAUD", + "END_USER_REQUEST", + "BANK_REQUEST", + "DELINQUENT", + "INTEREST_AND_FEES_PAUSED", + ] ] = None """Substatus for the financial account""" diff --git a/src/lithic/types/financial_account_update_status_params.py b/src/lithic/types/financial_account_update_status_params.py index cc2d79a8..5680efee 100644 --- a/src/lithic/types/financial_account_update_status_params.py +++ b/src/lithic/types/financial_account_update_status_params.py @@ -13,7 +13,15 @@ class FinancialAccountUpdateStatusParams(TypedDict, total=False): """Status of the financial account""" substatus: Required[ - Optional[Literal["CHARGED_OFF_FRAUD", "END_USER_REQUEST", "BANK_REQUEST", "CHARGED_OFF_DELINQUENT"]] + Optional[ + Literal[ + "CHARGED_OFF_FRAUD", + "END_USER_REQUEST", + "BANK_REQUEST", + "CHARGED_OFF_DELINQUENT", + "INTEREST_AND_FEES_PAUSED", + ] + ] ] """Substatus for the financial account""" diff --git a/src/lithic/types/financial_accounts/loan_tape.py b/src/lithic/types/financial_accounts/loan_tape.py index 6c16a8ca..583f98cd 100644 --- a/src/lithic/types/financial_accounts/loan_tape.py +++ b/src/lithic/types/financial_accounts/loan_tape.py @@ -28,7 +28,14 @@ class AccountStandingFinancialAccountState(BaseModel): """Status of the financial account""" substatus: Optional[ - Literal["CHARGED_OFF_DELINQUENT", "CHARGED_OFF_FRAUD", "END_USER_REQUEST", "BANK_REQUEST", "DELINQUENT"] + Literal[ + "CHARGED_OFF_DELINQUENT", + "CHARGED_OFF_FRAUD", + "END_USER_REQUEST", + "BANK_REQUEST", + "DELINQUENT", + "INTEREST_AND_FEES_PAUSED", + ] ] = None """Substatus for the financial account""" diff --git a/src/lithic/types/financial_accounts/statement.py b/src/lithic/types/financial_accounts/statement.py index 37b8884d..513630fb 100644 --- a/src/lithic/types/financial_accounts/statement.py +++ b/src/lithic/types/financial_accounts/statement.py @@ -25,7 +25,14 @@ class AccountStandingFinancialAccountState(BaseModel): """Status of the financial account""" substatus: Optional[ - Literal["CHARGED_OFF_DELINQUENT", "CHARGED_OFF_FRAUD", "END_USER_REQUEST", "BANK_REQUEST", "DELINQUENT"] + Literal[ + "CHARGED_OFF_DELINQUENT", + "CHARGED_OFF_FRAUD", + "END_USER_REQUEST", + "BANK_REQUEST", + "DELINQUENT", + "INTEREST_AND_FEES_PAUSED", + ] ] = None """Substatus for the financial account"""