From d8499b4ce21113be1843bff0ca6f7b8405052cb7 Mon Sep 17 00:00:00 2001 From: dankito Date: Sun, 8 Sep 2024 22:58:28 +0200 Subject: [PATCH] Updated to new fints4k model --- .../banking/client/fints4k/FinTs4kMapper.kt | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/FinTs4jBankingClient/src/commonMain/kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt b/FinTs4jBankingClient/src/commonMain/kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt index 4f8d799a..51588201 100644 --- a/FinTs4jBankingClient/src/commonMain/kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt +++ b/FinTs4jBankingClient/src/commonMain/kotlin/net/codinux/banking/client/fints4k/FinTs4kMapper.kt @@ -141,7 +141,7 @@ open class FinTs4kMapper { mapAccountType(account.type), account.currency, account.accountLimit, account.isAccountTypeSupportedByApplication, mapFeatures(account), mapAmount(account.balance), - account.countDaysForWhichTransactionsAreKept, + account.serverTransactionsRetentionDays, account.lastTransactionsRetrievalTime, account.retrievedTransactionsFrom, bookedTransactions = mapBookedTransactions(account).toMutableList() ) @@ -169,26 +169,28 @@ open class FinTs4kMapper { account.bookedTransactions.map { mapTransaction(it) } 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.otherPartyName, transaction.otherPartyBankCode, transaction.otherPartyAccountId, + transaction.otherPartyName, transaction.otherPartyBankId, transaction.otherPartyAccountId, - transaction.bookingText, + transaction.postingText, mapNullableAmount(transaction.openingBalance), mapNullableAmount(transaction.closingBalance), - transaction.statementNumber, transaction.sequenceNumber, + transaction.statementNumber, transaction.sheetNumber, - transaction.referenceForTheAccountOwner, transaction.referenceOfTheAccountServicingInstitution, - transaction.supplementaryDetails, + transaction.customerReference, transaction.bankReference, + transaction.furtherInformation, transaction.endToEndReference, transaction.mandateReference, transaction.creditorIdentifier, transaction.originatorsIdentificationCode, transaction.compensationAmount, transaction.originalAmount, transaction.deviantOriginator, transaction.deviantRecipient, - transaction.referenceWithNoSpecialType, transaction.primaNotaNumber, transaction.textKeySupplement, + transaction.referenceWithNoSpecialType, - transaction.transactionReferenceNumber, transaction.relatedReferenceNumber, - false + transaction.journalNumber, transaction.textKeyAddition, + + transaction.orderReferenceNumber, transaction.referenceNumber, + transaction.isReversal ) 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 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) { challenge.addUserApprovedDecoupledTanCallback(callback) }