From b198706e26e59b82e05452cb4a3fec5e5553ba12 Mon Sep 17 00:00:00 2001 From: dankito Date: Fri, 23 Aug 2024 16:05:30 +0200 Subject: [PATCH] Added option to specify for which accounts account data should be retrieved --- .../banking/client/model/BankAccountIdentifier.kt | 12 ++++++++++++ .../client/model/options/GetAccountDataOptions.kt | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/BankAccountIdentifier.kt diff --git a/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/BankAccountIdentifier.kt b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/BankAccountIdentifier.kt new file mode 100644 index 00000000..08cd0145 --- /dev/null +++ b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/BankAccountIdentifier.kt @@ -0,0 +1,12 @@ +package net.codinux.banking.client.model + +import net.codinux.banking.client.model.config.NoArgConstructor + +@NoArgConstructor +open class BankAccountIdentifier( + val identifier: String, + val subAccountNumber: String?, + val iban: String? +) { + override fun toString() = "$identifier, $iban" +} \ No newline at end of file diff --git a/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/options/GetAccountDataOptions.kt b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/options/GetAccountDataOptions.kt index d68b4d80..4d0fed23 100644 --- a/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/options/GetAccountDataOptions.kt +++ b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/options/GetAccountDataOptions.kt @@ -1,6 +1,7 @@ package net.codinux.banking.client.model.options import kotlinx.datetime.LocalDate +import net.codinux.banking.client.model.BankAccountIdentifier import net.codinux.banking.client.model.config.NoArgConstructor @NoArgConstructor @@ -9,7 +10,9 @@ open class GetAccountDataOptions( val retrieveTransactions: RetrieveTransactions = RetrieveTransactions.OfLast90Days, val retrieveTransactionsFrom: LocalDate? = null, val retrieveTransactionsTo: LocalDate? = null, - val abortIfTanIsRequired: Boolean = false + val abortIfTanIsRequired: Boolean = false, + // account(s) may should get excluded from data retrieval, so add option to set for which accounts data should be retrieved + val accounts: List = emptyList() ) { override fun toString(): String { return "retrieveBalance=$retrieveBalance, retrieveTransactions=$retrieveTransactions, abortIfTanIsRequired=$abortIfTanIsRequired"