Skip to content

Commit

Permalink
Update with latest OpenAPI changes
Browse files Browse the repository at this point in the history
  • Loading branch information
moneykitt committed Apr 30, 2024
1 parent fd1c2f5 commit 7ba5708
Show file tree
Hide file tree
Showing 16 changed files with 1,020 additions and 55 deletions.
12 changes: 8 additions & 4 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ moneykit/models/account.py
moneykit/models/account_balances.py
moneykit/models/account_group.py
moneykit/models/account_identity.py
moneykit/models/account_numbers.py
moneykit/models/account_with_account_numbers.py
moneykit/models/account_numbers_legacy20230218.py
moneykit/models/account_with_account_numbers_legacy20230218.py
moneykit/models/ach_number.py
moneykit/models/address.py
moneykit/models/api_error_auth_expired_access_token_response.py
Expand All @@ -45,7 +45,7 @@ moneykit/models/email.py
moneykit/models/exchange_token_request.py
moneykit/models/exchange_token_response.py
moneykit/models/generate_access_token_response.py
moneykit/models/get_account_numbers_response.py
moneykit/models/get_account_numbers_response_legacy20230218.py
moneykit/models/get_account_response.py
moneykit/models/get_accounts_response.py
moneykit/models/get_holdings_response.py
Expand Down Expand Up @@ -99,7 +99,7 @@ moneykit/models/requested_link_permission.py
moneykit/models/response401_disconnect_links_id_delete.py
moneykit/models/response401_exchange_token_link_session_exchange_token_post.py
moneykit/models/response401_get_account_links_id_accounts_account_id_get.py
moneykit/models/response401_get_account_numbers_links_id_accounts_numbers_get.py
moneykit/models/response401_get_account_numbers_legacy20230218_links_id_accounts_numbers_get.py
moneykit/models/response401_get_accounts_links_id_accounts_get.py
moneykit/models/response401_get_holdings_links_id_investments_holdings_get.py
moneykit/models/response401_get_identities_links_id_identity_get.py
Expand Down Expand Up @@ -138,3 +138,7 @@ moneykit/py.typed
moneykit/rest.py
pyproject.toml
test/__init__.py
test/test_account_numbers_legacy20230218.py
test/test_account_with_account_numbers_legacy20230218.py
test/test_get_account_numbers_response_legacy20230218.py
test/test_response401_get_account_numbers_legacy20230218_links_id_accounts_numbers_get.py
14 changes: 9 additions & 5 deletions moneykit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@
from moneykit.models.account_balances import AccountBalances
from moneykit.models.account_group import AccountGroup
from moneykit.models.account_identity import AccountIdentity
from moneykit.models.account_numbers import AccountNumbers
from moneykit.models.account_with_account_numbers import AccountWithAccountNumbers
from moneykit.models.account_numbers_legacy20230218 import AccountNumbersLegacy20230218
from moneykit.models.account_with_account_numbers_legacy20230218 import (
AccountWithAccountNumbersLegacy20230218,
)
from moneykit.models.ach_number import AchNumber
from moneykit.models.address import Address
from moneykit.models.app_client_response import AppClientResponse
Expand All @@ -74,7 +76,9 @@
from moneykit.models.exchange_token_request import ExchangeTokenRequest
from moneykit.models.exchange_token_response import ExchangeTokenResponse
from moneykit.models.generate_access_token_response import GenerateAccessTokenResponse
from moneykit.models.get_account_numbers_response import GetAccountNumbersResponse
from moneykit.models.get_account_numbers_response_legacy20230218 import (
GetAccountNumbersResponseLegacy20230218,
)
from moneykit.models.get_account_response import GetAccountResponse
from moneykit.models.get_accounts_response import GetAccountsResponse
from moneykit.models.get_holdings_response import GetHoldingsResponse
Expand Down Expand Up @@ -152,8 +156,8 @@
from moneykit.models.response401_get_account_links_id_accounts_account_id_get import (
Response401GetAccountLinksIdAccountsAccountIdGet,
)
from moneykit.models.response401_get_account_numbers_links_id_accounts_numbers_get import (
Response401GetAccountNumbersLinksIdAccountsNumbersGet,
from moneykit.models.response401_get_account_numbers_legacy20230218_links_id_accounts_numbers_get import (
Response401GetAccountNumbersLegacy20230218LinksIdAccountsNumbersGet,
)
from moneykit.models.response401_get_accounts_links_id_accounts_get import (
Response401GetAccountsLinksIdAccountsGet,
Expand Down
34 changes: 18 additions & 16 deletions moneykit/api/account_numbers_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
from typing_extensions import Annotated
from pydantic import StrictStr

from moneykit.models.get_account_numbers_response import GetAccountNumbersResponse
from moneykit.models.get_account_numbers_response_legacy20230218 import (
GetAccountNumbersResponseLegacy20230218,
)

from moneykit.api_client import ApiClient
from moneykit.api_response import ApiResponse
Expand All @@ -45,7 +47,7 @@ def __init__(self, api_client=None) -> None:
self.api_client = api_client

@validate_call
def get_account_numbers(
def get_account_numbers_legacy20230218(
self,
id: Annotated[StrictStr, Field(description="The unique ID for this link.")],
_request_timeout: Union[
Expand All @@ -59,7 +61,7 @@ def get_account_numbers(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> GetAccountNumbersResponse:
) -> GetAccountNumbersResponseLegacy20230218:
"""/links/{id}/accounts/numbers
Returns a list of open, permissioned accounts associated with a <a href=#tag/Links>link</a>, including full account and routing numbers for appropriate accounts (such as checking and savings accounts). <p>**Note** that this endpoint does **not** trigger a fetch of account numbers from the institution; it merely returns account numbers that have already been fetched, either because `prefetch` was requested when the link was created, or because of an on-demand update. **To force a check for new/updated account numbers, you must use the <a href=#operation/refresh_products>/products</a> endpoint.** <p>If you have requested prefetch or an on-demand update, you should check the `refreshed_at` date for this product in the returned response, and compare that against the previous `refreshed_at` date, which you can get from any previous response for this or any other account or link request. If the refreshed_at date has not increased, then updated data is not yet available.
Expand Down Expand Up @@ -88,7 +90,7 @@ def get_account_numbers(
:return: Returns the result object.
""" # noqa: E501

_param = self._get_account_numbers_serialize(
_param = self._get_account_numbers_legacy20230218_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
Expand All @@ -97,8 +99,8 @@ def get_account_numbers(
)

_response_types_map: Dict[str, Optional[str]] = {
"200": "GetAccountNumbersResponse",
"401": "Response401GetAccountNumbersLinksIdAccountsNumbersGet",
"200": "GetAccountNumbersResponseLegacy20230218",
"401": "Response401GetAccountNumbersLegacy20230218LinksIdAccountsNumbersGet",
"429": "APIErrorRateLimitExceededResponse",
"404": "LinkErrorNotFoundResponse",
"403": "LinkErrorForbiddenActionResponse",
Expand All @@ -115,7 +117,7 @@ def get_account_numbers(
).data

@validate_call
def get_account_numbers_with_http_info(
def get_account_numbers_legacy20230218_with_http_info(
self,
id: Annotated[StrictStr, Field(description="The unique ID for this link.")],
_request_timeout: Union[
Expand All @@ -129,7 +131,7 @@ def get_account_numbers_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[GetAccountNumbersResponse]:
) -> ApiResponse[GetAccountNumbersResponseLegacy20230218]:
"""/links/{id}/accounts/numbers
Returns a list of open, permissioned accounts associated with a <a href=#tag/Links>link</a>, including full account and routing numbers for appropriate accounts (such as checking and savings accounts). <p>**Note** that this endpoint does **not** trigger a fetch of account numbers from the institution; it merely returns account numbers that have already been fetched, either because `prefetch` was requested when the link was created, or because of an on-demand update. **To force a check for new/updated account numbers, you must use the <a href=#operation/refresh_products>/products</a> endpoint.** <p>If you have requested prefetch or an on-demand update, you should check the `refreshed_at` date for this product in the returned response, and compare that against the previous `refreshed_at` date, which you can get from any previous response for this or any other account or link request. If the refreshed_at date has not increased, then updated data is not yet available.
Expand Down Expand Up @@ -158,7 +160,7 @@ def get_account_numbers_with_http_info(
:return: Returns the result object.
""" # noqa: E501

_param = self._get_account_numbers_serialize(
_param = self._get_account_numbers_legacy20230218_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
Expand All @@ -167,8 +169,8 @@ def get_account_numbers_with_http_info(
)

_response_types_map: Dict[str, Optional[str]] = {
"200": "GetAccountNumbersResponse",
"401": "Response401GetAccountNumbersLinksIdAccountsNumbersGet",
"200": "GetAccountNumbersResponseLegacy20230218",
"401": "Response401GetAccountNumbersLegacy20230218LinksIdAccountsNumbersGet",
"429": "APIErrorRateLimitExceededResponse",
"404": "LinkErrorNotFoundResponse",
"403": "LinkErrorForbiddenActionResponse",
Expand All @@ -185,7 +187,7 @@ def get_account_numbers_with_http_info(
)

@validate_call
def get_account_numbers_without_preload_content(
def get_account_numbers_legacy20230218_without_preload_content(
self,
id: Annotated[StrictStr, Field(description="The unique ID for this link.")],
_request_timeout: Union[
Expand Down Expand Up @@ -228,7 +230,7 @@ def get_account_numbers_without_preload_content(
:return: Returns the result object.
""" # noqa: E501

_param = self._get_account_numbers_serialize(
_param = self._get_account_numbers_legacy20230218_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
Expand All @@ -237,8 +239,8 @@ def get_account_numbers_without_preload_content(
)

_response_types_map: Dict[str, Optional[str]] = {
"200": "GetAccountNumbersResponse",
"401": "Response401GetAccountNumbersLinksIdAccountsNumbersGet",
"200": "GetAccountNumbersResponseLegacy20230218",
"401": "Response401GetAccountNumbersLegacy20230218LinksIdAccountsNumbersGet",
"429": "APIErrorRateLimitExceededResponse",
"404": "LinkErrorNotFoundResponse",
"403": "LinkErrorForbiddenActionResponse",
Expand All @@ -250,7 +252,7 @@ def get_account_numbers_without_preload_content(
)
return response_data.response

def _get_account_numbers_serialize(
def _get_account_numbers_legacy20230218_serialize(
self,
id,
_request_auth,
Expand Down
34 changes: 18 additions & 16 deletions moneykit/api/accounts_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@

from typing import List, Optional

from moneykit.models.get_account_numbers_response import GetAccountNumbersResponse
from moneykit.models.get_account_numbers_response_legacy20230218 import (
GetAccountNumbersResponseLegacy20230218,
)
from moneykit.models.get_account_response import GetAccountResponse
from moneykit.models.get_accounts_response import GetAccountsResponse
from moneykit.models.get_user_accounts_response import GetUserAccountsResponse
Expand Down Expand Up @@ -321,7 +323,7 @@ def _get_account_serialize(
)

@validate_call
def get_account_numbers(
def get_account_numbers_legacy20230218(
self,
id: Annotated[StrictStr, Field(description="The unique ID for this link.")],
_request_timeout: Union[
Expand All @@ -335,7 +337,7 @@ def get_account_numbers(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> GetAccountNumbersResponse:
) -> GetAccountNumbersResponseLegacy20230218:
"""/links/{id}/accounts/numbers
Returns a list of open, permissioned accounts associated with a <a href=#tag/Links>link</a>, including full account and routing numbers for appropriate accounts (such as checking and savings accounts). <p>**Note** that this endpoint does **not** trigger a fetch of account numbers from the institution; it merely returns account numbers that have already been fetched, either because `prefetch` was requested when the link was created, or because of an on-demand update. **To force a check for new/updated account numbers, you must use the <a href=#operation/refresh_products>/products</a> endpoint.** <p>If you have requested prefetch or an on-demand update, you should check the `refreshed_at` date for this product in the returned response, and compare that against the previous `refreshed_at` date, which you can get from any previous response for this or any other account or link request. If the refreshed_at date has not increased, then updated data is not yet available.
Expand Down Expand Up @@ -364,7 +366,7 @@ def get_account_numbers(
:return: Returns the result object.
""" # noqa: E501

_param = self._get_account_numbers_serialize(
_param = self._get_account_numbers_legacy20230218_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
Expand All @@ -373,8 +375,8 @@ def get_account_numbers(
)

_response_types_map: Dict[str, Optional[str]] = {
"200": "GetAccountNumbersResponse",
"401": "Response401GetAccountNumbersLinksIdAccountsNumbersGet",
"200": "GetAccountNumbersResponseLegacy20230218",
"401": "Response401GetAccountNumbersLegacy20230218LinksIdAccountsNumbersGet",
"429": "APIErrorRateLimitExceededResponse",
"404": "LinkErrorNotFoundResponse",
"403": "LinkErrorForbiddenActionResponse",
Expand All @@ -391,7 +393,7 @@ def get_account_numbers(
).data

@validate_call
def get_account_numbers_with_http_info(
def get_account_numbers_legacy20230218_with_http_info(
self,
id: Annotated[StrictStr, Field(description="The unique ID for this link.")],
_request_timeout: Union[
Expand All @@ -405,7 +407,7 @@ def get_account_numbers_with_http_info(
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[GetAccountNumbersResponse]:
) -> ApiResponse[GetAccountNumbersResponseLegacy20230218]:
"""/links/{id}/accounts/numbers
Returns a list of open, permissioned accounts associated with a <a href=#tag/Links>link</a>, including full account and routing numbers for appropriate accounts (such as checking and savings accounts). <p>**Note** that this endpoint does **not** trigger a fetch of account numbers from the institution; it merely returns account numbers that have already been fetched, either because `prefetch` was requested when the link was created, or because of an on-demand update. **To force a check for new/updated account numbers, you must use the <a href=#operation/refresh_products>/products</a> endpoint.** <p>If you have requested prefetch or an on-demand update, you should check the `refreshed_at` date for this product in the returned response, and compare that against the previous `refreshed_at` date, which you can get from any previous response for this or any other account or link request. If the refreshed_at date has not increased, then updated data is not yet available.
Expand Down Expand Up @@ -434,7 +436,7 @@ def get_account_numbers_with_http_info(
:return: Returns the result object.
""" # noqa: E501

_param = self._get_account_numbers_serialize(
_param = self._get_account_numbers_legacy20230218_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
Expand All @@ -443,8 +445,8 @@ def get_account_numbers_with_http_info(
)

_response_types_map: Dict[str, Optional[str]] = {
"200": "GetAccountNumbersResponse",
"401": "Response401GetAccountNumbersLinksIdAccountsNumbersGet",
"200": "GetAccountNumbersResponseLegacy20230218",
"401": "Response401GetAccountNumbersLegacy20230218LinksIdAccountsNumbersGet",
"429": "APIErrorRateLimitExceededResponse",
"404": "LinkErrorNotFoundResponse",
"403": "LinkErrorForbiddenActionResponse",
Expand All @@ -461,7 +463,7 @@ def get_account_numbers_with_http_info(
)

@validate_call
def get_account_numbers_without_preload_content(
def get_account_numbers_legacy20230218_without_preload_content(
self,
id: Annotated[StrictStr, Field(description="The unique ID for this link.")],
_request_timeout: Union[
Expand Down Expand Up @@ -504,7 +506,7 @@ def get_account_numbers_without_preload_content(
:return: Returns the result object.
""" # noqa: E501

_param = self._get_account_numbers_serialize(
_param = self._get_account_numbers_legacy20230218_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
Expand All @@ -513,8 +515,8 @@ def get_account_numbers_without_preload_content(
)

_response_types_map: Dict[str, Optional[str]] = {
"200": "GetAccountNumbersResponse",
"401": "Response401GetAccountNumbersLinksIdAccountsNumbersGet",
"200": "GetAccountNumbersResponseLegacy20230218",
"401": "Response401GetAccountNumbersLegacy20230218LinksIdAccountsNumbersGet",
"429": "APIErrorRateLimitExceededResponse",
"404": "LinkErrorNotFoundResponse",
"403": "LinkErrorForbiddenActionResponse",
Expand All @@ -526,7 +528,7 @@ def get_account_numbers_without_preload_content(
)
return response_data.response

def _get_account_numbers_serialize(
def _get_account_numbers_legacy20230218_serialize(
self,
id,
_request_auth,
Expand Down
Loading

0 comments on commit 7ba5708

Please sign in to comment.