Added mediumName to TanMedium

This commit is contained in:
dankito 2020-08-12 00:12:38 +02:00
parent 384523e854
commit 2e71b2e53a
3 changed files with 8 additions and 7 deletions

View File

@ -6,11 +6,11 @@ import net.dankito.banking.fints.messages.datenelementgruppen.implementierte.acc
open class MobilePhoneTanMedium( open class MobilePhoneTanMedium(
mediumClass: TanMediumKlasse, mediumClass: TanMediumKlasse,
status: TanMediumStatus, status: TanMediumStatus,
val mediumName: String, override val mediumName: String,
val concealedPhoneNumber: String?, val concealedPhoneNumber: String?,
val phoneNumber: String?, val phoneNumber: String?,
val smsDebitAccount: KontoverbindungInternational? = null val smsDebitAccount: KontoverbindungInternational? = null
) : TanMedium(mediumClass, status) { ) : TanMedium(mediumClass, status, mediumName) {
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {

View File

@ -11,8 +11,8 @@ open class TanGeneratorTanMedium(
val cardType: Int?, val cardType: Int?,
val validFrom: Date?, val validFrom: Date?,
val validTo: Date?, val validTo: Date?,
val mediumName: String? mediumName: String?
) : TanMedium(mediumClass, status) { ) : TanMedium(mediumClass, status, mediumName) {
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {

View File

@ -10,11 +10,12 @@ package net.dankito.banking.fints.messages.datenelemente.implementierte.tan
*/ */
open class TanMedium( open class TanMedium(
val mediumClass: TanMediumKlasse, val mediumClass: TanMediumKlasse,
val status: TanMediumStatus val status: TanMediumStatus,
open val mediumName: String?
) { ) {
internal constructor() : this(TanMediumKlasse.AlleMedien, TanMediumStatus.Verfuegbar) internal constructor() : this(TanMediumKlasse.AlleMedien, TanMediumStatus.Verfuegbar, null)
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
@ -37,7 +38,7 @@ open class TanMedium(
override fun toString(): String { override fun toString(): String {
return "$mediumClass $status" return "$mediumClass $mediumName $status"
} }
} }