Renamed countDaysForWhichTransactionsAreKeptOnBankServer to transactionsRetentionDays
This commit is contained in:
parent
1e5c83c369
commit
7353b0347e
|
@ -21,7 +21,7 @@ open class BankAccount(
|
||||||
val isAccountTypeSupportedByApplication: Boolean = false,
|
val isAccountTypeSupportedByApplication: Boolean = false,
|
||||||
val features: Set<BankAccountFeatures> = emptySet(),
|
val features: Set<BankAccountFeatures> = emptySet(),
|
||||||
|
|
||||||
val countDaysForWhichTransactionsAreKeptOnBankServer: Int? = null,
|
val transactionsRetentionDays: Int? = null,
|
||||||
open var lastTransactionsRetrievalTime: Instant? = null,
|
open var lastTransactionsRetrievalTime: Instant? = null,
|
||||||
var retrievedTransactionsFrom: LocalDate? = null,
|
var retrievedTransactionsFrom: LocalDate? = null,
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ open class BankAccount(
|
||||||
/**
|
/**
|
||||||
* Determines if all transactions that are retained on bank server have been fetched.
|
* Determines if all transactions that are retained on bank server have been fetched.
|
||||||
*
|
*
|
||||||
* Does this by comparing [countDaysForWhichTransactionsAreKeptOnBankServer] to [retrievedTransactionsFrom].
|
* Does this by comparing [transactionsRetentionDays] to [retrievedTransactionsFrom].
|
||||||
*/
|
*/
|
||||||
open val haveAllRetainedTransactionsBeenRetrieved: Boolean by lazy {
|
open val haveAllRetainedTransactionsBeenRetrieved: Boolean by lazy {
|
||||||
val fromDay = retrievedTransactionsFrom
|
val fromDay = retrievedTransactionsFrom
|
||||||
|
@ -52,7 +52,7 @@ open class BankAccount(
|
||||||
false
|
false
|
||||||
} else {
|
} else {
|
||||||
// if countDaysForWhichTransactionsAreKeptOnBankServer is not set, we cannot know for how long bank server keeps transactions. We then assume for 90 days
|
// if countDaysForWhichTransactionsAreKeptOnBankServer is not set, we cannot know for how long bank server keeps transactions. We then assume for 90 days
|
||||||
val storageDays = countDaysForWhichTransactionsAreKeptOnBankServer ?: 90
|
val storageDays = transactionsRetentionDays ?: 90
|
||||||
fromDay < Clock.System.now().toLocalDateTime(TimeZone.of("Europe/Berlin")).date.minus(storageDays, DateTimeUnit.DAY)
|
fromDay < Clock.System.now().toLocalDateTime(TimeZone.of("Europe/Berlin")).date.minus(storageDays, DateTimeUnit.DAY)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue