|
13 | 13 | financial_account_create_params, |
14 | 14 | financial_account_update_params, |
15 | 15 | financial_account_update_status_params, |
| 16 | + financial_account_register_account_number_params, |
16 | 17 | ) |
17 | | -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven |
| 18 | +from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven |
18 | 19 | from ..._utils import maybe_transform, async_maybe_transform |
19 | 20 | from .balances import ( |
20 | 21 | Balances, |
@@ -273,6 +274,46 @@ def list( |
273 | 274 | model=FinancialAccount, |
274 | 275 | ) |
275 | 276 |
|
| 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 | + |
276 | 317 | def update_status( |
277 | 318 | self, |
278 | 319 | financial_account_token: str, |
@@ -531,6 +572,46 @@ def list( |
531 | 572 | model=FinancialAccount, |
532 | 573 | ) |
533 | 574 |
|
| 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 | + |
534 | 615 | async def update_status( |
535 | 616 | self, |
536 | 617 | financial_account_token: str, |
@@ -596,6 +677,9 @@ def __init__(self, financial_accounts: FinancialAccounts) -> None: |
596 | 677 | self.list = _legacy_response.to_raw_response_wrapper( |
597 | 678 | financial_accounts.list, |
598 | 679 | ) |
| 680 | + self.register_account_number = _legacy_response.to_raw_response_wrapper( |
| 681 | + financial_accounts.register_account_number, |
| 682 | + ) |
599 | 683 | self.update_status = _legacy_response.to_raw_response_wrapper( |
600 | 684 | financial_accounts.update_status, |
601 | 685 | ) |
@@ -637,6 +721,9 @@ def __init__(self, financial_accounts: AsyncFinancialAccounts) -> None: |
637 | 721 | self.list = _legacy_response.async_to_raw_response_wrapper( |
638 | 722 | financial_accounts.list, |
639 | 723 | ) |
| 724 | + self.register_account_number = _legacy_response.async_to_raw_response_wrapper( |
| 725 | + financial_accounts.register_account_number, |
| 726 | + ) |
640 | 727 | self.update_status = _legacy_response.async_to_raw_response_wrapper( |
641 | 728 | financial_accounts.update_status, |
642 | 729 | ) |
@@ -678,6 +765,9 @@ def __init__(self, financial_accounts: FinancialAccounts) -> None: |
678 | 765 | self.list = to_streamed_response_wrapper( |
679 | 766 | financial_accounts.list, |
680 | 767 | ) |
| 768 | + self.register_account_number = to_streamed_response_wrapper( |
| 769 | + financial_accounts.register_account_number, |
| 770 | + ) |
681 | 771 | self.update_status = to_streamed_response_wrapper( |
682 | 772 | financial_accounts.update_status, |
683 | 773 | ) |
@@ -719,6 +809,9 @@ def __init__(self, financial_accounts: AsyncFinancialAccounts) -> None: |
719 | 809 | self.list = async_to_streamed_response_wrapper( |
720 | 810 | financial_accounts.list, |
721 | 811 | ) |
| 812 | + self.register_account_number = async_to_streamed_response_wrapper( |
| 813 | + financial_accounts.register_account_number, |
| 814 | + ) |
722 | 815 | self.update_status = async_to_streamed_response_wrapper( |
723 | 816 | financial_accounts.update_status, |
724 | 817 | ) |
|
0 commit comments