Made changeable properties var and using List instead of MutableList for transactions

This commit is contained in:
dankito 2024-09-16 17:16:41 +02:00
parent 72608a444d
commit 68317f3b1c
2 changed files with 9 additions and 10 deletions

View File

@ -29,7 +29,7 @@ open class BankAccess(
* So in most cases the userId is identical with the customerId = loginName in our speech, but there are rare cases * So in most cases the userId is identical with the customerId = loginName in our speech, but there are rare cases
* where the userId differs from customerId. * where the userId differs from customerId.
*/ */
val userId: String? = null, var userId: String? = null,
open val accounts: List<BankAccount> = emptyList(), open val accounts: List<BankAccount> = emptyList(),
@ -39,8 +39,8 @@ open class BankAccess(
* As [tanMethods] also contains selected TanMethod, we didn't want to duplicate this object. Use * As [tanMethods] also contains selected TanMethod, we didn't want to duplicate this object. Use
* [selectedTanMethod] to get selected TanMethod or iterate over [tanMethods] and filter selected one by this id. * [selectedTanMethod] to get selected TanMethod or iterate over [tanMethods] and filter selected one by this id.
*/ */
val selectedTanMethodIdentifier: String? = null, var selectedTanMethodIdentifier: String? = null,
open val tanMethods: List<TanMethod> = listOf(), open var tanMethods: List<TanMethod> = listOf(),
/** /**
* Identifier of selected TanMedium. * Identifier of selected TanMedium.
@ -48,8 +48,8 @@ open class BankAccess(
* As [tanMedia] also contains selected TanMedium, we didn't want to duplicate this object. Use [selectedTanMedium] * As [tanMedia] also contains selected TanMedium, we didn't want to duplicate this object. Use [selectedTanMedium]
* to get selected TanMedium or iterate over [tanMedia] and filter selected one by this medium name. * to get selected TanMedium or iterate over [tanMedia] and filter selected one by this medium name.
*/ */
val selectedTanMediumIdentifier: String? = null, var selectedTanMediumIdentifier: String? = null,
open val tanMedia: List<TanMedium> = listOf(), open var tanMedia: List<TanMedium> = listOf(),
var bankingGroup: BankingGroup? = null, var bankingGroup: BankingGroup? = null,
open var serverAddress: String? = null open var serverAddress: String? = null

View File

@ -20,16 +20,15 @@ open class BankAccount(
val isAccountTypeSupportedByApplication: Boolean = false, val isAccountTypeSupportedByApplication: Boolean = false,
val features: Set<BankAccountFeatures> = emptySet(), val features: Set<BankAccountFeatures> = emptySet(),
// var balance: BigDecimal = BigDecimal.ZERO, var balance: Amount = Amount.Zero,
var balance: Amount = Amount.Zero, // TODO: add a BigDecimal library
val serverTransactionsRetentionDays: Int? = null, val serverTransactionsRetentionDays: Int? = null,
open var lastAccountUpdateTime: Instant? = null, open var lastAccountUpdateTime: Instant? = null,
var retrievedTransactionsFrom: LocalDate? = null, var retrievedTransactionsFrom: LocalDate? = null,
open val bookedTransactions: MutableList<AccountTransaction> = mutableListOf(), open var bookedTransactions: List<AccountTransaction> = emptyList(),
open val prebookedTransactions: MutableList<PrebookedAccountTransaction> = mutableListOf(), open var prebookedTransactions: List<PrebookedAccountTransaction> = emptyList(),
open val holdings: List<Holding> = emptyList(), open var holdings: List<Holding> = emptyList(),
var userSetDisplayName: String? = null, var userSetDisplayName: String? = null,
var displayIndex: Int = 0, var displayIndex: Int = 0,