Updated to new fints4k model
This commit is contained in:
parent
8f5024b169
commit
d8499b4ce2
|
@ -141,7 +141,7 @@ open class FinTs4kMapper {
|
||||||
mapAccountType(account.type), account.currency, account.accountLimit,
|
mapAccountType(account.type), account.currency, account.accountLimit,
|
||||||
account.isAccountTypeSupportedByApplication, mapFeatures(account),
|
account.isAccountTypeSupportedByApplication, mapFeatures(account),
|
||||||
mapAmount(account.balance),
|
mapAmount(account.balance),
|
||||||
account.countDaysForWhichTransactionsAreKept,
|
account.serverTransactionsRetentionDays,
|
||||||
account.lastTransactionsRetrievalTime, account.retrievedTransactionsFrom,
|
account.lastTransactionsRetrievalTime, account.retrievedTransactionsFrom,
|
||||||
bookedTransactions = mapBookedTransactions(account).toMutableList()
|
bookedTransactions = mapBookedTransactions(account).toMutableList()
|
||||||
)
|
)
|
||||||
|
@ -169,26 +169,28 @@ open class FinTs4kMapper {
|
||||||
account.bookedTransactions.map { mapTransaction(it) }
|
account.bookedTransactions.map { mapTransaction(it) }
|
||||||
|
|
||||||
protected open fun mapTransaction(transaction: net.dankito.banking.client.model.AccountTransaction): AccountTransaction = AccountTransaction(
|
protected open fun mapTransaction(transaction: net.dankito.banking.client.model.AccountTransaction): AccountTransaction = AccountTransaction(
|
||||||
mapAmount(transaction.amount), transaction.amount.currency.code, transaction.unparsedReference,
|
mapAmount(transaction.amount), transaction.amount.currency.code, transaction.reference,
|
||||||
transaction.bookingDate, transaction.valueDate,
|
transaction.bookingDate, transaction.valueDate,
|
||||||
transaction.otherPartyName, transaction.otherPartyBankCode, transaction.otherPartyAccountId,
|
transaction.otherPartyName, transaction.otherPartyBankId, transaction.otherPartyAccountId,
|
||||||
|
|
||||||
transaction.bookingText,
|
transaction.postingText,
|
||||||
mapNullableAmount(transaction.openingBalance), mapNullableAmount(transaction.closingBalance),
|
mapNullableAmount(transaction.openingBalance), mapNullableAmount(transaction.closingBalance),
|
||||||
|
|
||||||
transaction.statementNumber, transaction.sequenceNumber,
|
transaction.statementNumber, transaction.sheetNumber,
|
||||||
|
|
||||||
transaction.referenceForTheAccountOwner, transaction.referenceOfTheAccountServicingInstitution,
|
transaction.customerReference, transaction.bankReference,
|
||||||
transaction.supplementaryDetails,
|
transaction.furtherInformation,
|
||||||
|
|
||||||
transaction.endToEndReference, transaction.mandateReference,
|
transaction.endToEndReference, transaction.mandateReference,
|
||||||
transaction.creditorIdentifier, transaction.originatorsIdentificationCode,
|
transaction.creditorIdentifier, transaction.originatorsIdentificationCode,
|
||||||
transaction.compensationAmount, transaction.originalAmount,
|
transaction.compensationAmount, transaction.originalAmount,
|
||||||
transaction.deviantOriginator, transaction.deviantRecipient,
|
transaction.deviantOriginator, transaction.deviantRecipient,
|
||||||
transaction.referenceWithNoSpecialType, transaction.primaNotaNumber, transaction.textKeySupplement,
|
transaction.referenceWithNoSpecialType,
|
||||||
|
|
||||||
transaction.transactionReferenceNumber, transaction.relatedReferenceNumber,
|
transaction.journalNumber, transaction.textKeyAddition,
|
||||||
false
|
|
||||||
|
transaction.orderReferenceNumber, transaction.referenceNumber,
|
||||||
|
transaction.isReversal
|
||||||
)
|
)
|
||||||
|
|
||||||
protected open fun mapNullableAmount(amount: Money?) = amount?.let { mapAmount(it) }
|
protected open fun mapNullableAmount(amount: Money?) = amount?.let { mapAmount(it) }
|
||||||
|
@ -213,7 +215,7 @@ open class FinTs4kMapper {
|
||||||
val tanImage = if (challenge is ImageTanChallenge) mapTanImage(challenge.image) else null
|
val tanImage = if (challenge is ImageTanChallenge) mapTanImage(challenge.image) else null
|
||||||
val flickerCode = if (challenge is FlickerCodeTanChallenge) mapFlickerCode(challenge.flickerCode) else null
|
val flickerCode = if (challenge is FlickerCodeTanChallenge) mapFlickerCode(challenge.flickerCode) else null
|
||||||
|
|
||||||
return object : TanChallenge(type, action, challenge.messageToShowToUser, selectedTanMethodId, tanMethods, selectedTanMediumName, tanMedia, tanImage, flickerCode, user, account) {
|
return object : TanChallenge(type, action, challenge.messageToShowToUser, selectedTanMethodId, tanMethods, selectedTanMediumName, tanMedia, tanImage, flickerCode, user, account, challenge.tanExpirationTime, challenge.challengeCreationTimestamp) {
|
||||||
override fun addUserApprovedDecoupledTanCallback(callback: () -> Unit) {
|
override fun addUserApprovedDecoupledTanCallback(callback: () -> Unit) {
|
||||||
challenge.addUserApprovedDecoupledTanCallback(callback)
|
challenge.addUserApprovedDecoupledTanCallback(callback)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue