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 Feb 8, 2024
1 parent 5bc627b commit 55c8fa0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
6 changes: 3 additions & 3 deletions moneykit/api/accounts_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ def get_accounts(
) -> GetAccountsResponse:
"""/links/{id}/accounts
Returns a list of open, permissioned accounts associated with a <a href=#tag/Links>link</a>
Returns a list of open, permissioned accounts associated with a <a href=#tag/Links>link</a>.
:param id: The unique ID for this link. (required)
:type id: str
Expand Down Expand Up @@ -675,7 +675,7 @@ def get_accounts_with_http_info(
) -> ApiResponse[GetAccountsResponse]:
"""/links/{id}/accounts
Returns a list of open, permissioned accounts associated with a <a href=#tag/Links>link</a>
Returns a list of open, permissioned accounts associated with a <a href=#tag/Links>link</a>.
:param id: The unique ID for this link. (required)
:type id: str
Expand Down Expand Up @@ -752,7 +752,7 @@ def get_accounts_without_preload_content(
) -> RESTResponseType:
"""/links/{id}/accounts
Returns a list of open, permissioned accounts associated with a <a href=#tag/Links>link</a>
Returns a list of open, permissioned accounts associated with a <a href=#tag/Links>link</a>.
:param id: The unique ID for this link. (required)
:type id: str
Expand Down
15 changes: 13 additions & 2 deletions moneykit/models/account_balances.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import re # noqa: F401
import json


from datetime import datetime
from typing import Any, ClassVar, Dict, List, Optional, Union
from pydantic import BaseModel, StrictFloat, StrictInt
from pydantic import Field
Expand Down Expand Up @@ -47,8 +47,18 @@ class AccountBalances(BaseModel):
default=None,
description="The credit limit on the account. Typically this exists only for credit-type accounts. <p>In some cases, this may represent the overdraft limit for depository accounts.",
)
balance_date: Optional[datetime] = Field(
default=None,
description="The date that the balance was captured at. This may not include a time. When this field is null, the balance was captured at an unknown time.",
)
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["currency", "available", "current", "limit"]
__properties: ClassVar[List[str]] = [
"currency",
"available",
"current",
"limit",
"balance_date",
]

model_config = {"populate_by_name": True, "validate_assignment": True}

Expand Down Expand Up @@ -106,6 +116,7 @@ def from_dict(cls, obj: Dict) -> Self:
"available": obj.get("available"),
"current": obj.get("current"),
"limit": obj.get("limit"),
"balance_date": obj.get("balance_date"),
}
)
# store additional fields in additional_properties
Expand Down
4 changes: 4 additions & 0 deletions moneykit/models/link_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from moneykit.models.link_error import LinkError
from moneykit.models.link_products import LinkProducts
from moneykit.models.link_state import LinkState
from moneykit.models.product import Product

try:
from typing import Self
Expand Down Expand Up @@ -54,6 +55,7 @@ class LinkCommon(BaseModel):
)
tags: Optional[List[StrictStr]] = None
products: LinkProducts
available_products: List[Product]
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = [
"link_id",
Expand All @@ -65,6 +67,7 @@ class LinkCommon(BaseModel):
"last_synced_at",
"tags",
"products",
"available_products",
]

model_config = {"populate_by_name": True, "validate_assignment": True}
Expand Down Expand Up @@ -133,6 +136,7 @@ def from_dict(cls, obj: Dict) -> Self:
"products": LinkProducts.from_dict(obj.get("products"))
if obj.get("products") is not None
else None,
"available_products": obj.get("available_products"),
}
)
# store additional fields in additional_properties
Expand Down
4 changes: 4 additions & 0 deletions moneykit/models/link_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from moneykit.models.link_error import LinkError
from moneykit.models.link_products import LinkProducts
from moneykit.models.link_state import LinkState
from moneykit.models.product import Product
from moneykit.models.provider import Provider

try:
Expand Down Expand Up @@ -55,6 +56,7 @@ class LinkResponse(BaseModel):
)
tags: Optional[List[StrictStr]] = None
products: LinkProducts
available_products: List[Product]
provider: Provider
webhook: Optional[StrictStr] = Field(
default=None, description="The webhook url assigned to this link."
Expand All @@ -70,6 +72,7 @@ class LinkResponse(BaseModel):
"last_synced_at",
"tags",
"products",
"available_products",
"provider",
"webhook",
]
Expand Down Expand Up @@ -140,6 +143,7 @@ def from_dict(cls, obj: Dict) -> Self:
"products": LinkProducts.from_dict(obj.get("products"))
if obj.get("products") is not None
else None,
"available_products": obj.get("available_products"),
"provider": obj.get("provider"),
"webhook": obj.get("webhook"),
}
Expand Down

0 comments on commit 55c8fa0

Please sign in to comment.