148 lines
2.8 KiB
Python
148 lines
2.8 KiB
Python
from pydantic import BaseModel
|
|
|
|
|
|
class TokenNew(BaseModel):
|
|
access: str
|
|
access_expires: int
|
|
refresh: str
|
|
refresh_expires: int
|
|
|
|
|
|
TokenNewSchema = {
|
|
"access": "access",
|
|
"access_expires": "access_expires",
|
|
"refresh": "refresh",
|
|
"refresh_expires": "refresh_expires",
|
|
}
|
|
|
|
|
|
class RequisitionResult(BaseModel):
|
|
id: str
|
|
created: str
|
|
redirect: str
|
|
status: str
|
|
institution_id: str
|
|
agreement: str
|
|
reference: str
|
|
accounts: list[str]
|
|
link: str
|
|
ssn: str | None
|
|
account_selection: bool
|
|
redirect_immediate: bool
|
|
|
|
|
|
class Requisitions(BaseModel):
|
|
count: int
|
|
next: str | None
|
|
previous: str | None
|
|
results: list[RequisitionResult]
|
|
|
|
|
|
RequisitionsSchema = {
|
|
"count": "count",
|
|
"next": "next",
|
|
"previous": "previous",
|
|
"results": "results",
|
|
}
|
|
|
|
|
|
class RequisitionsPost(BaseModel):
|
|
id: str
|
|
created: str
|
|
redirect: str
|
|
status: str
|
|
institution_id: str
|
|
agreement: str
|
|
reference: str
|
|
accounts: list[str]
|
|
link: str
|
|
ssn: str | None
|
|
account_selection: bool
|
|
redirect_immediate: bool
|
|
|
|
|
|
RequisitionsPostSchema = {
|
|
"id": "id",
|
|
"created": "created",
|
|
"redirect": "redirect",
|
|
"status": "status",
|
|
"institution_id": "institution_id",
|
|
"agreement": "agreement",
|
|
"reference": "reference",
|
|
"accounts": "accounts",
|
|
"link": "link",
|
|
"ssn": "ssn",
|
|
"account_selection": "account_selection",
|
|
"redirect_immediate": "redirect_immediate",
|
|
}
|
|
|
|
|
|
class Requisition(BaseModel):
|
|
id: str
|
|
created: str
|
|
redirect: str
|
|
status: str
|
|
institution_id: str
|
|
agreement: str
|
|
reference: str
|
|
accounts: list[str]
|
|
link: str
|
|
ssn: str | None
|
|
account_selection: bool
|
|
redirect_immediate: bool
|
|
|
|
|
|
RequisitionSchema = {
|
|
"id": "id",
|
|
"created": "created",
|
|
"redirect": "redirect",
|
|
"status": "status",
|
|
"institution_id": "institution_id",
|
|
"agreement": "agreement",
|
|
"reference": "reference",
|
|
"accounts": "accounts",
|
|
"link": "link",
|
|
"ssn": "ssn",
|
|
"account_selection": "account_selection",
|
|
"redirect_immediate": "redirect_immediate",
|
|
}
|
|
|
|
|
|
class AccountDetailsNested(BaseModel):
|
|
resourceId: str
|
|
currency: str
|
|
ownerName: str
|
|
cashAccountType: str | None
|
|
status: str | None
|
|
maskedPan: str | None
|
|
details: str | None
|
|
iban: str | None
|
|
name: str | None
|
|
product: str | None
|
|
|
|
|
|
class AccountDetails(BaseModel):
|
|
account: AccountDetailsNested
|
|
|
|
|
|
AccountDetailsSchema = {
|
|
"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",
|
|
}
|