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.accountType, accountInfo.currency, accountHolderName, accountInfo.productName,
|
||||||
accountInfo.accountLimit, accountInfo.allowedJobNames)
|
accountInfo.accountLimit, accountInfo.allowedJobNames)
|
||||||
|
|
||||||
val accounts = customer.accounts.toMutableList()
|
customer.addAccount(newAccount)
|
||||||
accounts.add(newAccount)
|
|
||||||
customer.accounts = accounts
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: may also make use of other info
|
// TODO: may also make use of other info
|
||||||
|
|
|
@ -11,7 +11,7 @@ open class CustomerData(
|
||||||
val userId: String = customerId,
|
val userId: String = customerId,
|
||||||
var name: String = "",
|
var name: String = "",
|
||||||
var iban: String? = null,
|
var iban: String? = null,
|
||||||
var accounts: List<AccountData> = listOf(),
|
val accounts: List<AccountData> = mutableListOf(),
|
||||||
var updVersion: Int = UPDVersion.VersionNotReceivedYet,
|
var updVersion: Int = UPDVersion.VersionNotReceivedYet,
|
||||||
var supportedTanProcedures: List<TanProcedure> = listOf(),
|
var supportedTanProcedures: List<TanProcedure> = listOf(),
|
||||||
var selectedTanProcedure: TanProcedure = TanProcedureNotSelected,
|
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 {
|
override fun toString(): String {
|
||||||
return customerId
|
return customerId
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue