diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClientDeprecated.kt similarity index 99% rename from fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt rename to fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClientDeprecated.kt index 7525259f..d590688a 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClientDeprecated.kt @@ -18,7 +18,7 @@ import kotlin.jvm.JvmOverloads * This is the high level FinTS client that groups single low level jobs of [FinTsJobExecutor] to senseful units e.g. * [addAccountAsync] gets user's TAN methods, user's TAN media, user's bank accounts and may even current balance and account transactions of last 90 days. */ -open class FinTsClient @JvmOverloads constructor( +open class FinTsClientDeprecated @JvmOverloads constructor( open var callback: FinTsClientCallback, protected open val jobExecutor: FinTsJobExecutor = FinTsJobExecutor(), protected open val product: ProductData = ProductData("15E53C26816138699C7B6A3E8", "1.0.0") // TODO: get version dynamically diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClientForCustomer.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClientForCustomer.kt index 0d7d1608..f6febcd8 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClientForCustomer.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClientForCustomer.kt @@ -29,7 +29,7 @@ open class FinTsClientForCustomer( : this(bank, callback, RequestExecutor(MessageBuilder(), webClient, base64Service), product = product) - protected val client = FinTsClient(callback, FinTsJobExecutor(requestExecutor, messageBuilder, modelMapper, tanMethodSelector), product) + protected val client = FinTsClientDeprecated(callback, FinTsJobExecutor(requestExecutor, messageBuilder, modelMapper, tanMethodSelector), product) open val messageLogWithoutSensitiveData: List = mutableListOf() diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsJobExecutor.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsJobExecutor.kt index 5ed2efab..c8b44424 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsJobExecutor.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsJobExecutor.kt @@ -27,7 +27,7 @@ import net.dankito.utils.multiplatform.extensions.todayAtSystemDefaultTimeZone /** * Low level class that executes concrete business transactions (= FinTS Geschäftsvorfälle). * - * In almost all cases you want to use [FinTsClient] which wraps these business transactions to a higher level API. + * In almost all cases you want to use [FinTsClientDeprecated] which wraps these business transactions to a higher level API. */ open class FinTsJobExecutor( protected open val requestExecutor: RequestExecutor = RequestExecutor(), diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/AccountData.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/AccountData.kt index 3836b43e..d73135ad 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/AccountData.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/model/AccountData.kt @@ -1,6 +1,6 @@ package net.dankito.banking.fints.model -import net.dankito.banking.fints.FinTsClient +import net.dankito.banking.fints.FinTsClientDeprecated import net.dankito.banking.fints.messages.datenelemente.abgeleiteteformate.Laenderkennzeichen import net.dankito.banking.fints.messages.segmente.id.CustomerSegmentId import net.dankito.banking.fints.response.segments.AccountType @@ -27,7 +27,7 @@ open class AccountData( open val isAccountTypeSupportedByApplication: Boolean - get() = FinTsClient.SupportedAccountTypes.contains(accountType) + get() = FinTsClientDeprecated.SupportedAccountTypes.contains(accountType) || allowedJobNames.contains(CustomerSegmentId.Balance.id) || allowedJobNames.contains(CustomerSegmentId.AccountTransactionsMt940.id) diff --git a/fints4k/src/nativeMain/kotlin/Application.kt b/fints4k/src/nativeMain/kotlin/Application.kt index 1b147f53..7b52e633 100644 --- a/fints4k/src/nativeMain/kotlin/Application.kt +++ b/fints4k/src/nativeMain/kotlin/Application.kt @@ -1,6 +1,6 @@ import kotlinx.coroutines.runBlocking import kotlinx.datetime.LocalDate -import net.dankito.banking.fints.FinTsClient +import net.dankito.banking.fints.FinTsClientDeprecated import net.dankito.banking.fints.FinTsJobExecutor import net.dankito.banking.fints.RequestExecutor import net.dankito.banking.fints.callback.SimpleFinTsClientCallback @@ -25,7 +25,7 @@ class Application { fun retrieveAccountData(bankCode: String, customerId: String, pin: String, finTs3ServerAddress: String) { runBlocking { - val client = FinTsClient(SimpleFinTsClientCallback(), FinTsJobExecutor(RequestExecutor(webClient = BlockingKtorWebClient()))) + val client = FinTsClientDeprecated(SimpleFinTsClientCallback(), FinTsJobExecutor(RequestExecutor(webClient = BlockingKtorWebClient()))) client.addAccountAsync(AddAccountParameter(bankCode, customerId, pin, finTs3ServerAddress)) { response -> println("Retrieved response from ${response.bank.bankName} for ${response.bank.customerName}")