Updated to new fints4k model that now contains serializedFinTsModel
This commit is contained in:
parent
ef1177c76f
commit
a5e809ff68
|
@ -33,7 +33,6 @@ import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanGe
|
||||||
import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanMedium
|
import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanMedium
|
||||||
import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanMediumStatus
|
import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanMediumStatus
|
||||||
import net.codinux.banking.fints.model.*
|
import net.codinux.banking.fints.model.*
|
||||||
import net.codinux.banking.fints.serialization.FinTsModelSerializer
|
|
||||||
import net.codinux.banking.fints.transactions.swift.model.Holding
|
import net.codinux.banking.fints.transactions.swift.model.Holding
|
||||||
import net.dankito.banking.banklistcreator.prettifier.BankingGroupMapper
|
import net.dankito.banking.banklistcreator.prettifier.BankingGroupMapper
|
||||||
import net.dankito.banking.client.model.parameter.TransferMoneyParameter
|
import net.dankito.banking.client.model.parameter.TransferMoneyParameter
|
||||||
|
@ -44,8 +43,6 @@ open class FinTs4kMapper {
|
||||||
|
|
||||||
protected val fintsModelMapper = FinTsModelMapper()
|
protected val fintsModelMapper = FinTsModelMapper()
|
||||||
|
|
||||||
protected val serializer = FinTsModelSerializer()
|
|
||||||
|
|
||||||
protected val bankingGroupMapper = BankingGroupMapper()
|
protected val bankingGroupMapper = BankingGroupMapper()
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,13 +71,12 @@ open class FinTs4kMapper {
|
||||||
// val preferredTanMethods = listOf(mapTanMethodType(bank.selectedTanMethod.type)) // TODO: currently we aren't saving TanMethods in database, re-enable as soon as TanMethods get saved
|
// val preferredTanMethods = listOf(mapTanMethodType(bank.selectedTanMethod.type)) // TODO: currently we aren't saving TanMethods in database, re-enable as soon as TanMethods get saved
|
||||||
val preferredTanMethods = defaults.preferredTanMethods?.map { mapTanMethodType(it) }
|
val preferredTanMethods = defaults.preferredTanMethods?.map { mapTanMethodType(it) }
|
||||||
|
|
||||||
val actualFinTsModel = finTsModel ?: bank.clientData?.let { serializer.deserializeFromJson(it) }
|
|
||||||
|
|
||||||
return GetAccountDataParameter(bank.domesticBankCode, bank.loginName, bank.password!!, listOf(accountIdentifier), true,
|
return GetAccountDataParameter(bank.domesticBankCode, bank.loginName, bank.password!!, listOf(accountIdentifier), true,
|
||||||
retrieveTransactions, from,
|
retrieveTransactions, from,
|
||||||
preferredTanMethods = preferredTanMethods,
|
preferredTanMethods = preferredTanMethods,
|
||||||
preferredTanMedium = bank.selectedTanMediumIdentifier,
|
preferredTanMedium = bank.selectedTanMediumIdentifier,
|
||||||
finTsModel = actualFinTsModel
|
finTsModel = finTsModel,
|
||||||
|
serializedFinTsModel = bank.clientData
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -400,7 +396,7 @@ open class FinTs4kMapper {
|
||||||
mapToMoney(request.amount, request.currency), request.paymentReference, request.instantTransfer,
|
mapToMoney(request.amount, request.currency), request.paymentReference, request.instantTransfer,
|
||||||
request.preferredTanMethods?.map { mapTanMethodType(it) },
|
request.preferredTanMethods?.map { mapTanMethodType(it) },
|
||||||
request.tanMethodsNotSupportedByApplication.map { mapTanMethodType(it) },
|
request.tanMethodsNotSupportedByApplication.map { mapTanMethodType(it) },
|
||||||
finTsModel = request.clientData?.let { serializer.deserializeFromJson(it) }
|
serializedFinTsModel = request.clientData
|
||||||
)
|
)
|
||||||
|
|
||||||
open fun mapTransferMoneyResponse(response: net.dankito.banking.client.model.response.TransferMoneyResponse, bank: BankAccess? = null, account: BankAccount? = null): Response<TransferMoneyResponse> =
|
open fun mapTransferMoneyResponse(response: net.dankito.banking.client.model.response.TransferMoneyResponse, bank: BankAccess? = null, account: BankAccount? = null): Response<TransferMoneyResponse> =
|
||||||
|
|
Loading…
Reference in New Issue