Add extra Serde mappings for transaction data

This commit is contained in:
Mark Veidemanis 2022-04-11 20:55:50 +01:00
parent b14a07b3b2
commit fec536616d
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 21 additions and 0 deletions

View File

@ -6,8 +6,29 @@ class Amount(Model):
currency: fields.Str()
class TransactionBBAN(Model):
bban: fields.Str()
class ExchangeInstructedAmount(Model):
amount: fields.Str()
currency: fields.Str()
class TransactionCurrencyExchange(Model):
exchangeRate: fields.Str()
instructedAmount: fields.Nested(ExchangeInstructedAmount)
sourceCurrency: fields.Str()
targetCurrency: fields.Str()
unitCurrency: fields.Str()
class Transaction(Model):
bookingDate: fields.Date()
creditorAccount: fields.Optional(fields.Nested(TransactionBBAN))
creditorName: fields.Optional(fields.Str())
debtorName: fields.Optional(fields.Str())
currencyExchange: fields.Optional(fields.Nested(TransactionCurrencyExchange))
proprietaryBankTransactionCode: fields.Optional(fields.Str())
remittanceInformationUnstructured: fields.Optional(fields.Str())
transactionAmount: fields.Nested(Amount)