Added constructor for Bank and BankAccount
This commit is contained in:
parent
933c761a0d
commit
ee21f684eb
|
@ -1,8 +1,6 @@
|
||||||
package net.codinux.banking.client.model.request
|
package net.codinux.banking.client.model.request
|
||||||
|
|
||||||
import net.codinux.banking.client.model.Amount
|
import net.codinux.banking.client.model.*
|
||||||
import net.codinux.banking.client.model.BankAccountIdentifier
|
|
||||||
import net.codinux.banking.client.model.DefaultValues
|
|
||||||
import net.codinux.banking.client.model.config.NoArgConstructor
|
import net.codinux.banking.client.model.config.NoArgConstructor
|
||||||
import net.codinux.banking.client.model.tan.TanMethodType
|
import net.codinux.banking.client.model.tan.TanMethodType
|
||||||
|
|
||||||
|
@ -45,5 +43,22 @@ open class TransferMoneyRequestForUser(
|
||||||
: this(bankCode, loginName, password, request.senderAccount, request.recipientName, request.recipientAccountIdentifier, request.recipientBankIdentifier,
|
: this(bankCode, loginName, password, request.senderAccount, request.recipientName, request.recipientAccountIdentifier, request.recipientBankIdentifier,
|
||||||
request.amount, request.currency, request.paymentReference, request.instantTransfer, request.preferredTanMethods, request.tanMethodsNotSupportedByApplication)
|
request.amount, request.currency, request.paymentReference, request.instantTransfer, request.preferredTanMethods, request.tanMethodsNotSupportedByApplication)
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
bank: BankAccess, account: BankAccount?,
|
||||||
|
recipientName: String, recipientAccountIdentifier: String, recipientBankIdentifier: String? = null,
|
||||||
|
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) },
|
||||||
|
recipientName, recipientAccountIdentifier, recipientBankIdentifier, amount, currency, paymentReference, instantTransfer,
|
||||||
|
listOf(bank.selectedTanMethod.type) + TanMethodType.NonVisualOrImageBased) {
|
||||||
|
this.bank = bank
|
||||||
|
this.account = account
|
||||||
|
}
|
||||||
|
|
||||||
|
open var bank: BankAccess? = null
|
||||||
|
protected set
|
||||||
|
|
||||||
|
open var account: BankAccount? = null
|
||||||
|
protected set
|
||||||
|
|
||||||
override fun toString() = "$bankCode $loginName ${super.toString()}"
|
override fun toString() = "$bankCode $loginName ${super.toString()}"
|
||||||
}
|
}
|
Loading…
Reference in New Issue