Add schemas for account balances
This commit is contained in:
parent
21c5150f6f
commit
5ae838b55f
|
@ -180,7 +180,7 @@ class NordigenClient(BaseClient, AggregatorClient):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
path = f"accounts/{account_id}/balances"
|
path = f"accounts/{account_id}/balances"
|
||||||
response = await self.call(path, schema="AccountBalance")
|
response = await self.call(path, schema="AccountBalances")
|
||||||
|
|
||||||
total = 0
|
total = 0
|
||||||
currency = None
|
currency = None
|
||||||
|
|
|
@ -128,3 +128,20 @@ class AccountDetails(BaseModel):
|
||||||
AccountDetailsSchema = {
|
AccountDetailsSchema = {
|
||||||
"account": "account",
|
"account": "account",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class AccountBalance(BaseModel):
|
||||||
|
balanceAmount: dict[str, str]
|
||||||
|
balanceType: str
|
||||||
|
referenceDate: str
|
||||||
|
|
||||||
|
|
||||||
|
class AccountBalances(BaseModel):
|
||||||
|
balances: list[AccountBalance]
|
||||||
|
summary: str | None
|
||||||
|
|
||||||
|
|
||||||
|
AccountBalancesSchema = {
|
||||||
|
"balances": "balances",
|
||||||
|
"summary": "summary",
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue