Added and finTsModelOrDeserialized to
This commit is contained in:
parent
4802493886
commit
636963b3d4
|
@ -193,8 +193,8 @@ open class FinTsClient(
|
||||||
* 04 FinTS_3.0_Messages_Geschaeftsvorfaelle.pdf
|
* 04 FinTS_3.0_Messages_Geschaeftsvorfaelle.pdf
|
||||||
*/
|
*/
|
||||||
open suspend fun getRequiredDataToSendUserJobs(param: FinTsClientParameter): net.dankito.banking.client.model.response.FinTsClientResponse {
|
open suspend fun getRequiredDataToSendUserJobs(param: FinTsClientParameter): net.dankito.banking.client.model.response.FinTsClientResponse {
|
||||||
if (param.finTsModel != null) {
|
param.finTsModelOrDeserialized?.let { finTsModel ->
|
||||||
return net.dankito.banking.client.model.response.FinTsClientResponse(null, null, emptyList(), param.finTsModel)
|
return net.dankito.banking.client.model.response.FinTsClientResponse(null, null, emptyList(), finTsModel)
|
||||||
}
|
}
|
||||||
|
|
||||||
val defaultValues = (param as? GetAccountDataParameter)?.defaultBankValues
|
val defaultValues = (param as? GetAccountDataParameter)?.defaultBankValues
|
||||||
|
@ -213,7 +213,7 @@ open class FinTsClient(
|
||||||
}
|
}
|
||||||
|
|
||||||
protected open suspend fun getAccountInfo(param: FinTsClientParameter, bank: BankData): GetAccountInfoResponse {
|
protected open suspend fun getAccountInfo(param: FinTsClientParameter, bank: BankData): GetAccountInfoResponse {
|
||||||
param.finTsModel?.let {
|
param.finTsModelOrDeserialized?.let {
|
||||||
// TODO: implement
|
// TODO: implement
|
||||||
// return GetAccountInfoResponse(it)
|
// return GetAccountInfoResponse(it)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package net.dankito.banking.client.model.parameter
|
||||||
|
|
||||||
import net.codinux.banking.fints.model.BankData
|
import net.codinux.banking.fints.model.BankData
|
||||||
import net.codinux.banking.fints.model.TanMethodType
|
import net.codinux.banking.fints.model.TanMethodType
|
||||||
|
import net.codinux.banking.fints.serialization.FinTsModelSerializer
|
||||||
import net.dankito.banking.client.model.CustomerCredentials
|
import net.dankito.banking.client.model.CustomerCredentials
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,5 +16,12 @@ open class FinTsClientParameter(
|
||||||
open val tanMethodsNotSupportedByApplication: List<TanMethodType>? = null,
|
open val tanMethodsNotSupportedByApplication: List<TanMethodType>? = null,
|
||||||
open val preferredTanMedium: String? = null, // the ID of the medium
|
open val preferredTanMedium: String? = null, // the ID of the medium
|
||||||
open val abortIfTanIsRequired: Boolean = false,
|
open val abortIfTanIsRequired: Boolean = false,
|
||||||
open val finTsModel: BankData? = null
|
open val finTsModel: BankData? = null,
|
||||||
) : CustomerCredentials(bankCode, loginName, password)
|
open val serializedFinTsModel: String? = null
|
||||||
|
) : CustomerCredentials(bankCode, loginName, password) {
|
||||||
|
|
||||||
|
open val finTsModelOrDeserialized: BankData? by lazy {
|
||||||
|
finTsModel ?: serializedFinTsModel?.let { FinTsModelSerializer.deserializeFromJson(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -25,8 +25,9 @@ open class GetAccountDataParameter(
|
||||||
preferredTanMedium: String? = null,
|
preferredTanMedium: String? = null,
|
||||||
abortIfTanIsRequired: Boolean = false,
|
abortIfTanIsRequired: Boolean = false,
|
||||||
finTsModel: BankData? = null,
|
finTsModel: BankData? = null,
|
||||||
|
serializedFinTsModel: String? = null,
|
||||||
open val defaultBankValues: BankData? = null
|
open val defaultBankValues: BankData? = null
|
||||||
) : FinTsClientParameter(bankCode, loginName, password, preferredTanMethods, tanMethodsNotSupportedByApplication, preferredTanMedium, abortIfTanIsRequired, finTsModel) {
|
) : FinTsClientParameter(bankCode, loginName, password, preferredTanMethods, tanMethodsNotSupportedByApplication, preferredTanMedium, abortIfTanIsRequired, finTsModel, serializedFinTsModel) {
|
||||||
|
|
||||||
open val retrieveOnlyAccountInfo: Boolean
|
open val retrieveOnlyAccountInfo: Boolean
|
||||||
get() = retrieveBalance == false && retrieveTransactions == RetrieveTransactions.No
|
get() = retrieveBalance == false && retrieveTransactions == RetrieveTransactions.No
|
||||||
|
|
|
@ -38,7 +38,8 @@ open class TransferMoneyParameter(
|
||||||
preferredTanMedium: String? = null,
|
preferredTanMedium: String? = null,
|
||||||
abortIfTanIsRequired: Boolean = false,
|
abortIfTanIsRequired: Boolean = false,
|
||||||
finTsModel: BankData? = null,
|
finTsModel: BankData? = null,
|
||||||
|
serializedFinTsModel: String? = null,
|
||||||
|
|
||||||
open val selectAccountToUseForTransfer: ((List<AccountData>) -> AccountData?)? = null // TODO: use BankAccount instead of AccountData
|
open val selectAccountToUseForTransfer: ((List<AccountData>) -> AccountData?)? = null // TODO: use BankAccount instead of AccountData
|
||||||
|
|
||||||
) : FinTsClientParameter(bankCode, loginName, password, preferredTanMethods, tanMethodsNotSupportedByApplication, preferredTanMedium, abortIfTanIsRequired, finTsModel)
|
) : FinTsClientParameter(bankCode, loginName, password, preferredTanMethods, tanMethodsNotSupportedByApplication, preferredTanMedium, abortIfTanIsRequired, finTsModel, serializedFinTsModel)
|
Loading…
Reference in New Issue