Skip to content

Commit 9fec4b1

Browse files
feat(client): adds endpoint to register an account number on a Financial Account
- Add YEAR to Spend Velocity windows - Add CUSTOMER_RULES to decision_made_by enum for 3DS authentication - Add COLLECTION to financial account types
1 parent 843f8ef commit 9fec4b1

File tree

12 files changed

+218
-10
lines changed

12 files changed

+218
-10
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 160
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-89dfdedd460a673d9addf6d763389f59895e986036296d99baf89366ba622034.yml
3-
openapi_spec_hash: b6183fb775fc8bfa3d40ed7130b17976
4-
config_hash: fa3481d1d8505e4157f6cebe93211bd0
1+
configured_endpoints: 161
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-0c08d769e7a549e40ed9ab9b0298c687cc14e6c2fbe4fdd4544467906a05a613.yml
3+
openapi_spec_hash: 2ea548eacd1af68ec19e847250a65b7d
4+
config_hash: 227ad54062905d4ae964b24cef0505b0

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ Methods:
338338
- <code title="get /v1/financial_accounts/{financial_account_token}">client.financial_accounts.<a href="./src/lithic/resources/financial_accounts/financial_accounts.py">retrieve</a>(financial_account_token) -> <a href="./src/lithic/types/financial_account.py">FinancialAccount</a></code>
339339
- <code title="patch /v1/financial_accounts/{financial_account_token}">client.financial_accounts.<a href="./src/lithic/resources/financial_accounts/financial_accounts.py">update</a>(financial_account_token, \*\*<a href="src/lithic/types/financial_account_update_params.py">params</a>) -> <a href="./src/lithic/types/financial_account.py">FinancialAccount</a></code>
340340
- <code title="get /v1/financial_accounts">client.financial_accounts.<a href="./src/lithic/resources/financial_accounts/financial_accounts.py">list</a>(\*\*<a href="src/lithic/types/financial_account_list_params.py">params</a>) -> <a href="./src/lithic/types/financial_account.py">SyncSinglePage[FinancialAccount]</a></code>
341+
- <code title="post /v1/financial_accounts/{financial_account_token}/register_account_number">client.financial_accounts.<a href="./src/lithic/resources/financial_accounts/financial_accounts.py">register_account_number</a>(financial_account_token, \*\*<a href="src/lithic/types/financial_account_register_account_number_params.py">params</a>) -> None</code>
341342
- <code title="post /v1/financial_accounts/{financial_account_token}/update_status">client.financial_accounts.<a href="./src/lithic/resources/financial_accounts/financial_accounts.py">update_status</a>(financial_account_token, \*\*<a href="src/lithic/types/financial_account_update_status_params.py">params</a>) -> <a href="./src/lithic/types/financial_account.py">FinancialAccount</a></code>
342343

343344
## Balances

src/lithic/resources/financial_accounts/financial_accounts.py

Lines changed: 94 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
financial_account_create_params,
1414
financial_account_update_params,
1515
financial_account_update_status_params,
16+
financial_account_register_account_number_params,
1617
)
17-
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
18+
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
1819
from ..._utils import maybe_transform, async_maybe_transform
1920
from .balances import (
2021
Balances,
@@ -273,6 +274,46 @@ def list(
273274
model=FinancialAccount,
274275
)
275276

277+
def register_account_number(
278+
self,
279+
financial_account_token: str,
280+
*,
281+
account_number: str,
282+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
283+
# The extra values given here take precedence over values defined on the client or passed to this method.
284+
extra_headers: Headers | None = None,
285+
extra_query: Query | None = None,
286+
extra_body: Body | None = None,
287+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
288+
) -> None:
289+
"""
290+
Register account number
291+
292+
Args:
293+
extra_headers: Send extra headers
294+
295+
extra_query: Add additional query parameters to the request
296+
297+
extra_body: Add additional JSON properties to the request
298+
299+
timeout: Override the client-level default timeout for this request, in seconds
300+
"""
301+
if not financial_account_token:
302+
raise ValueError(
303+
f"Expected a non-empty value for `financial_account_token` but received {financial_account_token!r}"
304+
)
305+
return self._post(
306+
f"/v1/financial_accounts/{financial_account_token}/register_account_number",
307+
body=maybe_transform(
308+
{"account_number": account_number},
309+
financial_account_register_account_number_params.FinancialAccountRegisterAccountNumberParams,
310+
),
311+
options=make_request_options(
312+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
313+
),
314+
cast_to=NoneType,
315+
)
316+
276317
def update_status(
277318
self,
278319
financial_account_token: str,
@@ -531,6 +572,46 @@ def list(
531572
model=FinancialAccount,
532573
)
533574

575+
async def register_account_number(
576+
self,
577+
financial_account_token: str,
578+
*,
579+
account_number: str,
580+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
581+
# The extra values given here take precedence over values defined on the client or passed to this method.
582+
extra_headers: Headers | None = None,
583+
extra_query: Query | None = None,
584+
extra_body: Body | None = None,
585+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
586+
) -> None:
587+
"""
588+
Register account number
589+
590+
Args:
591+
extra_headers: Send extra headers
592+
593+
extra_query: Add additional query parameters to the request
594+
595+
extra_body: Add additional JSON properties to the request
596+
597+
timeout: Override the client-level default timeout for this request, in seconds
598+
"""
599+
if not financial_account_token:
600+
raise ValueError(
601+
f"Expected a non-empty value for `financial_account_token` but received {financial_account_token!r}"
602+
)
603+
return await self._post(
604+
f"/v1/financial_accounts/{financial_account_token}/register_account_number",
605+
body=await async_maybe_transform(
606+
{"account_number": account_number},
607+
financial_account_register_account_number_params.FinancialAccountRegisterAccountNumberParams,
608+
),
609+
options=make_request_options(
610+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
611+
),
612+
cast_to=NoneType,
613+
)
614+
534615
async def update_status(
535616
self,
536617
financial_account_token: str,
@@ -596,6 +677,9 @@ def __init__(self, financial_accounts: FinancialAccounts) -> None:
596677
self.list = _legacy_response.to_raw_response_wrapper(
597678
financial_accounts.list,
598679
)
680+
self.register_account_number = _legacy_response.to_raw_response_wrapper(
681+
financial_accounts.register_account_number,
682+
)
599683
self.update_status = _legacy_response.to_raw_response_wrapper(
600684
financial_accounts.update_status,
601685
)
@@ -637,6 +721,9 @@ def __init__(self, financial_accounts: AsyncFinancialAccounts) -> None:
637721
self.list = _legacy_response.async_to_raw_response_wrapper(
638722
financial_accounts.list,
639723
)
724+
self.register_account_number = _legacy_response.async_to_raw_response_wrapper(
725+
financial_accounts.register_account_number,
726+
)
640727
self.update_status = _legacy_response.async_to_raw_response_wrapper(
641728
financial_accounts.update_status,
642729
)
@@ -678,6 +765,9 @@ def __init__(self, financial_accounts: FinancialAccounts) -> None:
678765
self.list = to_streamed_response_wrapper(
679766
financial_accounts.list,
680767
)
768+
self.register_account_number = to_streamed_response_wrapper(
769+
financial_accounts.register_account_number,
770+
)
681771
self.update_status = to_streamed_response_wrapper(
682772
financial_accounts.update_status,
683773
)
@@ -719,6 +809,9 @@ def __init__(self, financial_accounts: AsyncFinancialAccounts) -> None:
719809
self.list = async_to_streamed_response_wrapper(
720810
financial_accounts.list,
721811
)
812+
self.register_account_number = async_to_streamed_response_wrapper(
813+
financial_accounts.register_account_number,
814+
)
722815
self.update_status = async_to_streamed_response_wrapper(
723816
financial_accounts.update_status,
724817
)

src/lithic/resources/three_ds/authentication.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ def simulate(
9393
Simulates a 3DS authentication request from the payment network as if it came
9494
from an ACS. If you're configured for 3DS Customer Decisioning, simulating
9595
authentications requires your customer decisioning endpoint to be set up
96-
properly (respond with a valid JSON).
96+
properly (respond with a valid JSON). If the authentication decision is to
97+
challenge, ensure that the account holder associated with the card transaction
98+
has a valid phone number configured to receive the OTP code via SMS.
9799
98100
Args:
99101
pan: Sixteen digit card number.
@@ -248,7 +250,9 @@ async def simulate(
248250
Simulates a 3DS authentication request from the payment network as if it came
249251
from an ACS. If you're configured for 3DS Customer Decisioning, simulating
250252
authentications requires your customer decisioning endpoint to be set up
251-
properly (respond with a valid JSON).
253+
properly (respond with a valid JSON). If the authentication decision is to
254+
challenge, ensure that the account holder associated with the card transaction
255+
has a valid phone number configured to receive the OTP code via SMS.
252256
253257
Args:
254258
pan: Sixteen digit card number.

src/lithic/types/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@
195195
from .account_holder_simulate_enrollment_review_params import (
196196
AccountHolderSimulateEnrollmentReviewParams as AccountHolderSimulateEnrollmentReviewParams,
197197
)
198+
from .financial_account_register_account_number_params import (
199+
FinancialAccountRegisterAccountNumberParams as FinancialAccountRegisterAccountNumberParams,
200+
)
198201
from .transaction_simulate_authorization_advice_params import (
199202
TransactionSimulateAuthorizationAdviceParams as TransactionSimulateAuthorizationAdviceParams,
200203
)

src/lithic/types/auth_rules/velocity_limit_params_period_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
__all__ = ["VelocityLimitParamsPeriodWindow"]
66

7-
VelocityLimitParamsPeriodWindow: TypeAlias = Literal["DAY", "WEEK", "MONTH"]
7+
VelocityLimitParamsPeriodWindow: TypeAlias = Literal["DAY", "WEEK", "MONTH", "YEAR"]

src/lithic/types/financial_account.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class FinancialAccount(BaseModel):
5656
"CHARGED_OFF_PRINCIPAL",
5757
"SECURITY",
5858
"PROGRAM_RECEIVABLES",
59+
"COLLECTION",
5960
]
6061

6162
updated: datetime
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import Required, TypedDict
6+
7+
__all__ = ["FinancialAccountRegisterAccountNumberParams"]
8+
9+
10+
class FinancialAccountRegisterAccountNumberParams(TypedDict, total=False):
11+
account_number: Required[str]

src/lithic/types/settlement_detail.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ class SettlementDetail(BaseModel):
7676
"""Date of when the report was first generated."""
7777

7878
settlement_date: str
79-
"""Date of when money movement is triggered for the transaction."""
79+
"""Date of when money movement is triggered for the transaction.
80+
81+
One exception applies - for Mastercard dual message settlement, this is the
82+
settlement advisement date, which is distinct from the date of money movement.
83+
"""
8084

8185
transaction_token: str
8286
"""Globally unique identifier denoting the associated Transaction object."""

src/lithic/types/shared/instance_financial_account_type.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@
1313
"CHARGED_OFF_PRINCIPAL",
1414
"SECURITY",
1515
"PROGRAM_RECEIVABLES",
16+
"COLLECTION",
1617
]

0 commit comments

Comments
 (0)