From 5ce12fe38298dfee74bf62855b3da7c6565944ee Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 21 Aug 2024 01:15:34 +0200 Subject: [PATCH] Added HKSAL 8 --- .../banking/fints/messages/MessageBuilder.kt | 7 ++++--- .../umsaetze/SaldenabfrageVersion8.kt | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/umsaetze/SaldenabfrageVersion8.kt diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/MessageBuilder.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/MessageBuilder.kt index 7df202cb..5930e6fa 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/MessageBuilder.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/MessageBuilder.kt @@ -231,8 +231,9 @@ open class MessageBuilder(protected val utils: FinTsUtils = FinTsUtils()) { val segmentNumber = SignedMessagePayloadFirstSegmentNumber val balanceJob = if (result.isAllowed(6)) SaldenabfrageVersion6(segmentNumber, account) - else if (result.isAllowed(5)) SaldenabfrageVersion5(segmentNumber, account) - else SaldenabfrageVersion7(segmentNumber, account, context.bank) + else if (result.isAllowed(7)) SaldenabfrageVersion7(segmentNumber, account, context.bank) + else if (result.isAllowed(8)) SaldenabfrageVersion8(segmentNumber, account, context.bank) + else SaldenabfrageVersion5(segmentNumber, account) val segments = mutableListOf(balanceJob) @@ -249,7 +250,7 @@ open class MessageBuilder(protected val utils: FinTsUtils = FinTsUtils()) { } protected open fun supportsGetBalanceMessage(account: AccountData): MessageBuilderResult { - return getSupportedVersionsOfJobForAccount(CustomerSegmentId.Balance, account, listOf(5, 6, 7)) + return getSupportedVersionsOfJobForAccount(CustomerSegmentId.Balance, account, listOf(5, 6, 7, 8)) } diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/umsaetze/SaldenabfrageVersion8.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/umsaetze/SaldenabfrageVersion8.kt new file mode 100644 index 00000000..0c341aab --- /dev/null +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/umsaetze/SaldenabfrageVersion8.kt @@ -0,0 +1,16 @@ +package net.dankito.banking.fints.messages.segmente.implementierte.umsaetze + +import net.dankito.banking.fints.messages.datenelementgruppen.implementierte.account.KontoverbindungInternational +import net.dankito.banking.fints.model.AccountData +import net.dankito.banking.fints.model.BankData + + +open class SaldenabfrageVersion8( + segmentNumber: Int, + account: AccountData, + bank: BankData, + allAccounts: Boolean = false, + maxAmountEntries: Int? = null, + continuationId: String? = null +) + : SaldenabfrageBase(segmentNumber, 8, KontoverbindungInternational(account, bank), allAccounts, maxAmountEntries, continuationId) \ No newline at end of file