Renamed FinTsClient to FinTsClientDeprecated
This commit is contained in:
parent
e5f9371e56
commit
0888166466
|
@ -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.
|
* 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.
|
* [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,
|
open var callback: FinTsClientCallback,
|
||||||
protected open val jobExecutor: FinTsJobExecutor = FinTsJobExecutor(),
|
protected open val jobExecutor: FinTsJobExecutor = FinTsJobExecutor(),
|
||||||
protected open val product: ProductData = ProductData("15E53C26816138699C7B6A3E8", "1.0.0") // TODO: get version dynamically
|
protected open val product: ProductData = ProductData("15E53C26816138699C7B6A3E8", "1.0.0") // TODO: get version dynamically
|
|
@ -29,7 +29,7 @@ open class FinTsClientForCustomer(
|
||||||
: this(bank, callback, RequestExecutor(MessageBuilder(), webClient, base64Service), product = product)
|
: 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<MessageLogEntry> = mutableListOf()
|
open val messageLogWithoutSensitiveData: List<MessageLogEntry> = mutableListOf()
|
||||||
|
|
|
@ -27,7 +27,7 @@ import net.dankito.utils.multiplatform.extensions.todayAtSystemDefaultTimeZone
|
||||||
/**
|
/**
|
||||||
* Low level class that executes concrete business transactions (= FinTS Geschäftsvorfälle).
|
* 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(
|
open class FinTsJobExecutor(
|
||||||
protected open val requestExecutor: RequestExecutor = RequestExecutor(),
|
protected open val requestExecutor: RequestExecutor = RequestExecutor(),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package net.dankito.banking.fints.model
|
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.datenelemente.abgeleiteteformate.Laenderkennzeichen
|
||||||
import net.dankito.banking.fints.messages.segmente.id.CustomerSegmentId
|
import net.dankito.banking.fints.messages.segmente.id.CustomerSegmentId
|
||||||
import net.dankito.banking.fints.response.segments.AccountType
|
import net.dankito.banking.fints.response.segments.AccountType
|
||||||
|
@ -27,7 +27,7 @@ open class AccountData(
|
||||||
|
|
||||||
|
|
||||||
open val isAccountTypeSupportedByApplication: Boolean
|
open val isAccountTypeSupportedByApplication: Boolean
|
||||||
get() = FinTsClient.SupportedAccountTypes.contains(accountType)
|
get() = FinTsClientDeprecated.SupportedAccountTypes.contains(accountType)
|
||||||
|| allowedJobNames.contains(CustomerSegmentId.Balance.id)
|
|| allowedJobNames.contains(CustomerSegmentId.Balance.id)
|
||||||
|| allowedJobNames.contains(CustomerSegmentId.AccountTransactionsMt940.id)
|
|| allowedJobNames.contains(CustomerSegmentId.AccountTransactionsMt940.id)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import kotlinx.coroutines.runBlocking
|
import kotlinx.coroutines.runBlocking
|
||||||
import kotlinx.datetime.LocalDate
|
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.FinTsJobExecutor
|
||||||
import net.dankito.banking.fints.RequestExecutor
|
import net.dankito.banking.fints.RequestExecutor
|
||||||
import net.dankito.banking.fints.callback.SimpleFinTsClientCallback
|
import net.dankito.banking.fints.callback.SimpleFinTsClientCallback
|
||||||
|
@ -25,7 +25,7 @@ class Application {
|
||||||
|
|
||||||
fun retrieveAccountData(bankCode: String, customerId: String, pin: String, finTs3ServerAddress: String) {
|
fun retrieveAccountData(bankCode: String, customerId: String, pin: String, finTs3ServerAddress: String) {
|
||||||
runBlocking {
|
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 ->
|
client.addAccountAsync(AddAccountParameter(bankCode, customerId, pin, finTs3ServerAddress)) { response ->
|
||||||
println("Retrieved response from ${response.bank.bankName} for ${response.bank.customerName}")
|
println("Retrieved response from ${response.bank.bankName} for ${response.bank.customerName}")
|
||||||
|
|
Loading…
Reference in New Issue