Passing clientData to fints4k client
This commit is contained in:
parent
ee21f684eb
commit
c443656c03
|
@ -73,7 +73,9 @@ open class TransferMoneyRequest(
|
||||||
*/
|
*/
|
||||||
val preferredTanMethods: List<TanMethodType>? = TanMethodType.NonVisualOrImageBased,
|
val preferredTanMethods: List<TanMethodType>? = TanMethodType.NonVisualOrImageBased,
|
||||||
|
|
||||||
val tanMethodsNotSupportedByApplication: List<TanMethodType> = TanMethodType.TanMethodsNotSupportedByMostApplications
|
val tanMethodsNotSupportedByApplication: List<TanMethodType> = TanMethodType.TanMethodsNotSupportedByMostApplications,
|
||||||
|
|
||||||
|
val clientData: String? = null
|
||||||
) {
|
) {
|
||||||
override fun toString() = "$amount to $recipientName - $paymentReference"
|
override fun toString() = "$amount to $recipientName - $paymentReference"
|
||||||
}
|
}
|
|
@ -37,7 +37,9 @@ open class TransferMoneyRequestForUser(
|
||||||
|
|
||||||
preferredTanMethods: List<TanMethodType>? = TanMethodType.NonVisualOrImageBased,
|
preferredTanMethods: List<TanMethodType>? = TanMethodType.NonVisualOrImageBased,
|
||||||
tanMethodsNotSupportedByApplication: List<TanMethodType> = TanMethodType.TanMethodsNotSupportedByMostApplications,
|
tanMethodsNotSupportedByApplication: List<TanMethodType> = TanMethodType.TanMethodsNotSupportedByMostApplications,
|
||||||
) : TransferMoneyRequest(senderAccount, recipientName, recipientAccountIdentifier, recipientBankIdentifier, amount, currency, paymentReference, instantTransfer, preferredTanMethods, tanMethodsNotSupportedByApplication) {
|
|
||||||
|
clientData: String? = null
|
||||||
|
) : TransferMoneyRequest(senderAccount, recipientName, recipientAccountIdentifier, recipientBankIdentifier, amount, currency, paymentReference, instantTransfer, preferredTanMethods, tanMethodsNotSupportedByApplication, clientData) {
|
||||||
|
|
||||||
constructor(bankCode: String, loginName: String, password: String, request: TransferMoneyRequest)
|
constructor(bankCode: String, loginName: String, password: String, request: TransferMoneyRequest)
|
||||||
: this(bankCode, loginName, password, request.senderAccount, request.recipientName, request.recipientAccountIdentifier, request.recipientBankIdentifier,
|
: this(bankCode, loginName, password, request.senderAccount, request.recipientName, request.recipientAccountIdentifier, request.recipientBankIdentifier,
|
||||||
|
@ -49,7 +51,7 @@ open class TransferMoneyRequestForUser(
|
||||||
amount: Amount, currency: String = DefaultValues.DefaultCurrency, paymentReference: String? = null, instantTransfer: Boolean = false
|
amount: Amount, currency: String = DefaultValues.DefaultCurrency, paymentReference: String? = null, instantTransfer: Boolean = false
|
||||||
) : this(bank.domesticBankCode, bank.loginName, bank.password!!, account?.let { BankAccountIdentifier(it.identifier, it.subAccountNumber, it.iban) },
|
) : this(bank.domesticBankCode, bank.loginName, bank.password!!, account?.let { BankAccountIdentifier(it.identifier, it.subAccountNumber, it.iban) },
|
||||||
recipientName, recipientAccountIdentifier, recipientBankIdentifier, amount, currency, paymentReference, instantTransfer,
|
recipientName, recipientAccountIdentifier, recipientBankIdentifier, amount, currency, paymentReference, instantTransfer,
|
||||||
listOf(bank.selectedTanMethod.type) + TanMethodType.NonVisualOrImageBased) {
|
listOf(bank.selectedTanMethod.type) + TanMethodType.NonVisualOrImageBased, TanMethodType.TanMethodsNotSupportedByMostApplications, bank.clientData) {
|
||||||
this.bank = bank
|
this.bank = bank
|
||||||
this.account = account
|
this.account = account
|
||||||
}
|
}
|
||||||
|
|
|
@ -395,7 +395,8 @@ open class FinTs4kMapper {
|
||||||
request.recipientName, request.recipientAccountIdentifier, request.recipientBankIdentifier,
|
request.recipientName, request.recipientAccountIdentifier, request.recipientBankIdentifier,
|
||||||
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) }
|
||||||
)
|
)
|
||||||
|
|
||||||
open fun mapTransferMoneyResponse(response: net.dankito.banking.client.model.response.TransferMoneyResponse): Response<TransferMoneyResponse> =
|
open fun mapTransferMoneyResponse(response: net.dankito.banking.client.model.response.TransferMoneyResponse): Response<TransferMoneyResponse> =
|
||||||
|
|
Loading…
Reference in New Issue