Implement adding bank links
This commit is contained in:
1
core/lib/schemas/__init__.py
Normal file
1
core/lib/schemas/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from core.lib.schemas import nordigen_s # noqa
|
||||
77
core/lib/schemas/nordigen_s.py
Normal file
77
core/lib/schemas/nordigen_s.py
Normal file
@@ -0,0 +1,77 @@
|
||||
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",
|
||||
}
|
||||
Reference in New Issue
Block a user