diff --git a/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/BankAccount.kt b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/BankAccount.kt index 77482c4f..4af3af0c 100644 --- a/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/BankAccount.kt +++ b/BankingClientModel/src/commonMain/kotlin/net/codinux/banking/client/model/BankAccount.kt @@ -22,7 +22,7 @@ open class BankAccount( // var balance: BigDecimal = BigDecimal.ZERO, var balance: Amount = Amount.Zero, // TODO: add a BigDecimal library - val transactionsRetentionDays: Int? = null, + val serverTransactionsRetentionDays: Int? = null, open var lastTransactionsRetrievalTime: Instant? = null, var retrievedTransactionsFrom: LocalDate? = null, @@ -61,7 +61,7 @@ open class BankAccount( /** * Determines if all transactions that are retained on bank server have been fetched. * - * Does this by comparing [transactionsRetentionDays] to [retrievedTransactionsFrom]. + * Does this by comparing [serverTransactionsRetentionDays] to [retrievedTransactionsFrom]. */ open val haveAllRetainedTransactionsBeenRetrieved: Boolean by lazy { val fromDay = retrievedTransactionsFrom @@ -69,7 +69,7 @@ open class BankAccount( false } else { // if countDaysForWhichTransactionsAreKeptOnBankServer is not set, we cannot know for how long bank server keeps transactions. We then assume for 90 days - val storageDays = transactionsRetentionDays ?: 90 + val storageDays = serverTransactionsRetentionDays ?: 90 fromDay < Clock.System.now().toLocalDateTime(TimeZone.of("Europe/Berlin")).date.minus(storageDays, DateTimeUnit.DAY) } }