Made all properties overridable
This commit is contained in:
parent
7cb19d6f7d
commit
50a5938046
|
@ -9,8 +9,8 @@ package net.dankito.banking.fints.messages.datenelemente.implementierte.tan
|
||||||
* Wird das Datenelement „TAN-Medium-Klasse“ mit „B“ (bilateral vereinbart) belegt, so muss im Element „Sicherheitsfunktion, kodiert“ die entsprechende Sicherheitsfunktion in der DEG „Verfahrensparameter Zwei-Schritt-Verfahren“ referenziert werden.
|
* Wird das Datenelement „TAN-Medium-Klasse“ mit „B“ (bilateral vereinbart) belegt, so muss im Element „Sicherheitsfunktion, kodiert“ die entsprechende Sicherheitsfunktion in der DEG „Verfahrensparameter Zwei-Schritt-Verfahren“ referenziert werden.
|
||||||
*/
|
*/
|
||||||
open class TanMedium(
|
open class TanMedium(
|
||||||
val mediumClass: TanMediumKlasse,
|
open val mediumClass: TanMediumKlasse,
|
||||||
val status: TanMediumStatus,
|
open val status: TanMediumStatus,
|
||||||
open val mediumName: String?
|
open val mediumName: String?
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
|
@ -6,25 +6,25 @@ import net.dankito.banking.fints.response.segments.JobParameters
|
||||||
|
|
||||||
|
|
||||||
open class AccountData(
|
open class AccountData(
|
||||||
val accountIdentifier: String,
|
open val accountIdentifier: String,
|
||||||
val subAccountAttribute: String?,
|
open val subAccountAttribute: String?,
|
||||||
val bankCountryCode: Int,
|
open val bankCountryCode: Int,
|
||||||
val bankCode: String,
|
open val bankCode: String,
|
||||||
val iban: String?,
|
open val iban: String?,
|
||||||
val customerId: String,
|
open val customerId: String,
|
||||||
val accountType: AccountType?,
|
open val accountType: AccountType?,
|
||||||
val currency: String?, // TODO: may parse to a value object
|
open val currency: String?, // TODO: may parse to a value object
|
||||||
val accountHolderName: String,
|
open val accountHolderName: String,
|
||||||
val productName: String?,
|
open val productName: String?,
|
||||||
val accountLimit: String?,
|
open val accountLimit: String?,
|
||||||
val allowedJobNames: List<String>,
|
open val allowedJobNames: List<String>,
|
||||||
var allowedJobs: List<JobParameters> = listOf()
|
open var allowedJobs: List<JobParameters> = listOf()
|
||||||
) {
|
) {
|
||||||
|
|
||||||
internal constructor() : this("", null, Laenderkennzeichen.Germany, "", null, "", null, null, "", null, null, listOf()) // for object deserializers
|
internal constructor() : this("", null, Laenderkennzeichen.Germany, "", null, "", null, null, "", null, null, listOf()) // for object deserializers
|
||||||
|
|
||||||
|
|
||||||
protected val supportedFeatures = mutableSetOf<AccountFeature>()
|
protected open val supportedFeatures = mutableSetOf<AccountFeature>()
|
||||||
|
|
||||||
|
|
||||||
open fun supportsFeature(feature: AccountFeature): Boolean {
|
open fun supportsFeature(feature: AccountFeature): Boolean {
|
||||||
|
|
|
@ -10,40 +10,40 @@ import net.dankito.banking.fints.response.segments.PinInfo
|
||||||
|
|
||||||
|
|
||||||
open class BankData(
|
open class BankData(
|
||||||
var bankCode: String,
|
open var bankCode: String,
|
||||||
var customerId: String,
|
open var customerId: String,
|
||||||
var pin: String,
|
open var pin: String,
|
||||||
var finTs3ServerAddress: String,
|
open var finTs3ServerAddress: String,
|
||||||
var bic: String,
|
open var bic: String,
|
||||||
|
|
||||||
var bankName: String = "",
|
open var bankName: String = "",
|
||||||
var countryCode: Int = Laenderkennzeichen.Germany, // TODO: currently there are only German banks. But change this if ever other countries get supported
|
open var countryCode: Int = Laenderkennzeichen.Germany, // TODO: currently there are only German banks. But change this if ever other countries get supported
|
||||||
var bpdVersion: Int = BPDVersion.VersionNotReceivedYet,
|
open var bpdVersion: Int = BPDVersion.VersionNotReceivedYet,
|
||||||
|
|
||||||
var userId: String = customerId,
|
open var userId: String = customerId,
|
||||||
var customerName: String = "",
|
open var customerName: String = "",
|
||||||
var updVersion: Int = UPDVersion.VersionNotReceivedYet,
|
open var updVersion: Int = UPDVersion.VersionNotReceivedYet,
|
||||||
|
|
||||||
var tanProceduresSupportedByBank: List<TanProcedure> = listOf(),
|
open var tanProceduresSupportedByBank: List<TanProcedure> = listOf(),
|
||||||
var tanProceduresAvailableForUser: List<TanProcedure> = listOf(),
|
open var tanProceduresAvailableForUser: List<TanProcedure> = listOf(),
|
||||||
var selectedTanProcedure: TanProcedure = TanProcedureNotSelected,
|
open var selectedTanProcedure: TanProcedure = TanProcedureNotSelected,
|
||||||
var tanMedia: List<TanMedium> = listOf(),
|
open var tanMedia: List<TanMedium> = listOf(),
|
||||||
var changeTanMediumParameters: ChangeTanMediaParameters? = null,
|
open var changeTanMediumParameters: ChangeTanMediaParameters? = null,
|
||||||
var pinInfo: PinInfo? = null,
|
open var pinInfo: PinInfo? = null,
|
||||||
|
|
||||||
var supportedLanguages: List<Dialogsprache> = listOf(),
|
open var supportedLanguages: List<Dialogsprache> = listOf(),
|
||||||
var selectedLanguage: Dialogsprache = Dialogsprache.Default,
|
open var selectedLanguage: Dialogsprache = Dialogsprache.Default,
|
||||||
var customerSystemId: String = KundensystemID.Anonymous,
|
open var customerSystemId: String = KundensystemID.Anonymous,
|
||||||
var customerSystemStatus: KundensystemStatusWerte = KundensystemStatus.SynchronizingCustomerSystemId,
|
open var customerSystemStatus: KundensystemStatusWerte = KundensystemStatus.SynchronizingCustomerSystemId,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maximale Anzahl an Geschäftsvorfallsarten, die pro Nachricht zulässig ist.
|
* Maximale Anzahl an Geschäftsvorfallsarten, die pro Nachricht zulässig ist.
|
||||||
* Der Wert ‚0’ gibt an, dass keine Restriktionen bzgl. der Anzahl an Geschäftsvorfallsarten bestehen.
|
* Der Wert ‚0’ gibt an, dass keine Restriktionen bzgl. der Anzahl an Geschäftsvorfallsarten bestehen.
|
||||||
*/
|
*/
|
||||||
var countMaxJobsPerMessage: Int = 0,
|
open var countMaxJobsPerMessage: Int = 0,
|
||||||
|
|
||||||
var supportedHbciVersions: List<HbciVersion> = listOf(),
|
open var supportedHbciVersions: List<HbciVersion> = listOf(),
|
||||||
var supportedJobs: List<JobParameters> = listOf()
|
open var supportedJobs: List<JobParameters> = listOf()
|
||||||
) {
|
) {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -62,7 +62,7 @@ open class BankData(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected val _accounts = mutableListOf<AccountData>()
|
protected open val _accounts = mutableListOf<AccountData>()
|
||||||
|
|
||||||
open val accounts: List<AccountData>
|
open val accounts: List<AccountData>
|
||||||
get() = ArrayList(_accounts)
|
get() = ArrayList(_accounts)
|
||||||
|
|
|
@ -4,9 +4,9 @@ import net.dankito.utils.multiplatform.Date
|
||||||
|
|
||||||
|
|
||||||
open class GetTransactionsParameter(
|
open class GetTransactionsParameter(
|
||||||
val alsoRetrieveBalance: Boolean = true,
|
open val alsoRetrieveBalance: Boolean = true,
|
||||||
val fromDate: Date? = null,
|
open val fromDate: Date? = null,
|
||||||
val toDate: Date? = null,
|
open val toDate: Date? = null,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Be aware this is by far not supported by all banks.
|
* Be aware this is by far not supported by all banks.
|
||||||
|
@ -15,14 +15,14 @@ open class GetTransactionsParameter(
|
||||||
*
|
*
|
||||||
* // TODO: set a parameter in response if maxCountEntries is set but bank doesn't support it.
|
* // TODO: set a parameter in response if maxCountEntries is set but bank doesn't support it.
|
||||||
*/
|
*/
|
||||||
val maxCountEntries: Int? = null,
|
open val maxCountEntries: Int? = null,
|
||||||
val abortIfTanIsRequired: Boolean = false,
|
open val abortIfTanIsRequired: Boolean = false,
|
||||||
val retrievedChunkListener: ((Collection<AccountTransaction>) -> Unit)? = null
|
open val retrievedChunkListener: ((Collection<AccountTransaction>) -> Unit)? = null
|
||||||
) {
|
) {
|
||||||
|
|
||||||
internal var isSettingMaxCountEntriesAllowedByBank = false
|
internal open var isSettingMaxCountEntriesAllowedByBank = false
|
||||||
|
|
||||||
internal val maxCountEntriesIfSettingItIsAllowed: Int?
|
internal open val maxCountEntriesIfSettingItIsAllowed: Int?
|
||||||
get() = if (isSettingMaxCountEntriesAllowedByBank) maxCountEntries else null
|
get() = if (isSettingMaxCountEntriesAllowedByBank) maxCountEntries else null
|
||||||
|
|
||||||
}
|
}
|
|
@ -2,10 +2,10 @@ package net.dankito.banking.fints.model
|
||||||
|
|
||||||
|
|
||||||
open class RetrievedAccountData(
|
open class RetrievedAccountData(
|
||||||
val accountData: AccountData,
|
open val accountData: AccountData,
|
||||||
val balance: Money?,
|
open val balance: Money?,
|
||||||
var bookedTransactions: Collection<AccountTransaction>,
|
open var bookedTransactions: Collection<AccountTransaction>,
|
||||||
var unbookedTransactions: List<Any>
|
open var unbookedTransactions: List<Any>
|
||||||
) {
|
) {
|
||||||
|
|
||||||
open fun addBookedTransactions(transactions: List<AccountTransaction>) {
|
open fun addBookedTransactions(transactions: List<AccountTransaction>) {
|
||||||
|
|
|
@ -5,13 +5,13 @@ import net.dankito.banking.fints.messages.datenelemente.implementierte.tan.Allow
|
||||||
|
|
||||||
|
|
||||||
open class TanProcedure(
|
open class TanProcedure(
|
||||||
val displayName: String,
|
open val displayName: String,
|
||||||
val securityFunction: Sicherheitsfunktion,
|
open val securityFunction: Sicherheitsfunktion,
|
||||||
val type: TanProcedureType,
|
open val type: TanProcedureType,
|
||||||
val hhdVersion: HHDVersion? = null,
|
open val hhdVersion: HHDVersion? = null,
|
||||||
val maxTanInputLength: Int? = null,
|
open val maxTanInputLength: Int? = null,
|
||||||
val allowedTanFormat: AllowedTanFormat = AllowedTanFormat.Alphanumeric,
|
open val allowedTanFormat: AllowedTanFormat = AllowedTanFormat.Alphanumeric,
|
||||||
val nameOfTanMediaRequired: Boolean = false
|
open val nameOfTanMediaRequired: Boolean = false
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import net.dankito.banking.fints.response.Response
|
||||||
|
|
||||||
open class AddAccountResponse(
|
open class AddAccountResponse(
|
||||||
response: Response,
|
response: Response,
|
||||||
val bank: BankData,
|
open val bank: BankData,
|
||||||
val supportsRetrievingTransactionsOfLast90DaysWithoutTan: Boolean = false,
|
open val supportsRetrievingTransactionsOfLast90DaysWithoutTan: Boolean = false,
|
||||||
retrievedData: List<RetrievedAccountData> = listOf()
|
retrievedData: List<RetrievedAccountData> = listOf()
|
||||||
) : GetTransactionsResponse(response, retrievedData)
|
) : GetTransactionsResponse(response, retrievedData)
|
|
@ -6,28 +6,28 @@ import net.dankito.banking.fints.response.segments.TanResponse
|
||||||
|
|
||||||
open class FinTsClientResponse(
|
open class FinTsClientResponse(
|
||||||
|
|
||||||
val isSuccessful: Boolean,
|
open val isSuccessful: Boolean, // TODO: rename to successful
|
||||||
|
|
||||||
val noTanProcedureSelected: Boolean,
|
open val noTanProcedureSelected: Boolean,
|
||||||
|
|
||||||
val isStrongAuthenticationRequired: Boolean,
|
open val isStrongAuthenticationRequired: Boolean,
|
||||||
val tanRequired: TanResponse? = null,
|
open val tanRequired: TanResponse? = null,
|
||||||
|
|
||||||
val errorsToShowToUser: List<String> = listOf(),
|
open val errorsToShowToUser: List<String> = listOf(),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When a serious error occurred during web request or response parsing.
|
* When a serious error occurred during web request or response parsing.
|
||||||
*/
|
*/
|
||||||
val errorMessage: String? = null,
|
open val errorMessage: String? = null,
|
||||||
|
|
||||||
val userCancelledAction: Boolean = false,
|
open val userCancelledAction: Boolean = false,
|
||||||
|
|
||||||
val tanRequiredButWeWereToldToAbortIfSo: Boolean = false,
|
open val tanRequiredButWeWereToldToAbortIfSo: Boolean = false,
|
||||||
|
|
||||||
val isJobAllowed: Boolean = true,
|
open val isJobAllowed: Boolean = true,
|
||||||
val isJobVersionSupported: Boolean = true,
|
open val isJobVersionSupported: Boolean = true,
|
||||||
val allowedVersions: List<Int> = listOf(),
|
open val allowedVersions: List<Int> = listOf(),
|
||||||
val supportedVersions: List<Int> = listOf()
|
open val supportedVersions: List<Int> = listOf()
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,9 @@ import net.dankito.banking.fints.response.Response
|
||||||
|
|
||||||
open class GetTransactionsResponse(
|
open class GetTransactionsResponse(
|
||||||
response: Response,
|
response: Response,
|
||||||
val retrievedData: List<RetrievedAccountData> = listOf(),
|
open val retrievedData: List<RetrievedAccountData> = listOf(),
|
||||||
/**
|
/**
|
||||||
* This value is only set if [GetTransactionsParameter.maxCountEntries] was set to tell caller if maxCountEntries parameter has been evaluated or not
|
* This value is only set if [GetTransactionsParameter.maxCountEntries] was set to tell caller if maxCountEntries parameter has been evaluated or not
|
||||||
*/
|
*/
|
||||||
var isSettingMaxCountEntriesAllowedByBank: Boolean? = null
|
open var isSettingMaxCountEntriesAllowedByBank: Boolean? = null
|
||||||
) : FinTsClientResponse(response)
|
) : FinTsClientResponse(response)
|
|
@ -2,11 +2,11 @@ package net.dankito.banking.fints.response.segments
|
||||||
|
|
||||||
|
|
||||||
open class JobParameters(
|
open class JobParameters(
|
||||||
val jobName: String,
|
open val jobName: String,
|
||||||
val maxCountJobs: Int,
|
open val maxCountJobs: Int,
|
||||||
val minimumCountSignatures: Int,
|
open val minimumCountSignatures: Int,
|
||||||
val securityClass: Int?,
|
open val securityClass: Int?,
|
||||||
segmentString: String // TODO: when serializing / deserializing we don't care for segment string -> remove it
|
segmentString: String
|
||||||
)
|
)
|
||||||
: ReceivedSegment(segmentString) {
|
: ReceivedSegment(segmentString) {
|
||||||
|
|
||||||
|
|
|
@ -5,14 +5,14 @@ import kotlin.jvm.Transient
|
||||||
|
|
||||||
|
|
||||||
open class ReceivedSegment(
|
open class ReceivedSegment(
|
||||||
val segmentId: String,
|
open val segmentId: String,
|
||||||
@Transient
|
@Transient
|
||||||
val segmentNumber: Int,
|
open val segmentNumber: Int,
|
||||||
val segmentVersion: Int,
|
open val segmentVersion: Int,
|
||||||
@Transient
|
@Transient
|
||||||
val referenceSegmentNumber: Int? = null,
|
open val referenceSegmentNumber: Int? = null,
|
||||||
@Transient
|
@Transient
|
||||||
val segmentString: String
|
open val segmentString: String
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@ import net.dankito.utils.multiplatform.BigDecimal
|
||||||
|
|
||||||
|
|
||||||
open class RetrievedAccountData(
|
open class RetrievedAccountData(
|
||||||
val account: TypedBankAccount,
|
open val account: TypedBankAccount,
|
||||||
val balance: BigDecimal?,
|
open val balance: BigDecimal?,
|
||||||
var bookedTransactions: Collection<IAccountTransaction>,
|
open val bookedTransactions: Collection<IAccountTransaction>,
|
||||||
var unbookedTransactions: List<Any>
|
open val unbookedTransactions: List<Any>
|
||||||
)
|
)
|
|
@ -7,9 +7,9 @@ import net.dankito.utils.multiplatform.BigDecimal
|
||||||
open class AddAccountResponse(
|
open class AddAccountResponse(
|
||||||
isSuccessful: Boolean,
|
isSuccessful: Boolean,
|
||||||
errorToShowToUser: String?,
|
errorToShowToUser: String?,
|
||||||
val customer: TypedCustomer,
|
open val customer: TypedCustomer,
|
||||||
val supportsRetrievingTransactionsOfLast90DaysWithoutTan: Boolean = false,
|
open val supportsRetrievingTransactionsOfLast90DaysWithoutTan: Boolean = false,
|
||||||
val retrievedData: List<RetrievedAccountData> = listOf(),
|
open val retrievedData: List<RetrievedAccountData> = listOf(),
|
||||||
userCancelledAction: Boolean = false
|
userCancelledAction: Boolean = false
|
||||||
) : BankingClientResponse(isSuccessful, errorToShowToUser, userCancelledAction) {
|
) : BankingClientResponse(isSuccessful, errorToShowToUser, userCancelledAction) {
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@ package net.dankito.banking.ui.model.responses
|
||||||
|
|
||||||
|
|
||||||
open class BankingClientResponse(
|
open class BankingClientResponse(
|
||||||
val isSuccessful: Boolean,
|
open val isSuccessful: Boolean,
|
||||||
val errorToShowToUser: String?,
|
open val errorToShowToUser: String?,
|
||||||
val userCancelledAction: Boolean = false // TODO: not implemented in hbci4jBankingClient yet
|
open val userCancelledAction: Boolean = false // TODO: not implemented in hbci4jBankingClient yet
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@ import net.dankito.banking.ui.model.TypedBankAccount
|
||||||
|
|
||||||
|
|
||||||
open class GetTransactionsResponse(
|
open class GetTransactionsResponse(
|
||||||
val bankAccount: TypedBankAccount,
|
open val bankAccount: TypedBankAccount,
|
||||||
isSuccessful: Boolean,
|
isSuccessful: Boolean,
|
||||||
errorToShowToUser: String?,
|
errorToShowToUser: String?,
|
||||||
val retrievedData: List<RetrievedAccountData> = listOf(),
|
open val retrievedData: List<RetrievedAccountData> = listOf(),
|
||||||
userCancelledAction: Boolean = false,
|
userCancelledAction: Boolean = false,
|
||||||
val tanRequiredButWeWereToldToAbortIfSo: Boolean = false
|
open val tanRequiredButWeWereToldToAbortIfSo: Boolean = false
|
||||||
) : BankingClientResponse(isSuccessful, errorToShowToUser, userCancelledAction)
|
) : BankingClientResponse(isSuccessful, errorToShowToUser, userCancelledAction)
|
||||||
|
|
Loading…
Reference in New Issue