Implemented CustomerData.addAccount()
This commit is contained in:
parent
8b7456bb29
commit
f55b84032e
|
@ -808,9 +808,7 @@ open class FinTsClient @JvmOverloads constructor(
|
|||
accountInfo.accountType, accountInfo.currency, accountHolderName, accountInfo.productName,
|
||||
accountInfo.accountLimit, accountInfo.allowedJobNames)
|
||||
|
||||
val accounts = customer.accounts.toMutableList()
|
||||
accounts.add(newAccount)
|
||||
customer.accounts = accounts
|
||||
customer.addAccount(newAccount)
|
||||
}
|
||||
|
||||
// TODO: may also make use of other info
|
||||
|
|
|
@ -11,7 +11,7 @@ open class CustomerData(
|
|||
val userId: String = customerId,
|
||||
var name: String = "",
|
||||
var iban: String? = null,
|
||||
var accounts: List<AccountData> = listOf(),
|
||||
val accounts: List<AccountData> = mutableListOf(),
|
||||
var updVersion: Int = UPDVersion.VersionNotReceivedYet,
|
||||
var supportedTanProcedures: List<TanProcedure> = listOf(),
|
||||
var selectedTanProcedure: TanProcedure = TanProcedureNotSelected,
|
||||
|
@ -49,6 +49,11 @@ open class CustomerData(
|
|||
}
|
||||
|
||||
|
||||
open fun addAccount(account: AccountData) {
|
||||
(accounts as? MutableList)?.add(account)
|
||||
}
|
||||
|
||||
|
||||
override fun toString(): String {
|
||||
return customerId
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue