Added convenience constructors

This commit is contained in:
dankito 2022-03-13 22:20:37 +01:00
parent 385acdfaf9
commit db548eb9cd
1 changed files with 7 additions and 0 deletions

View File

@ -30,4 +30,11 @@ open class EpcQrCodeConfig(
open val amount: String? = ensureAmountFormat(amount) open val amount: String? = ensureAmountFormat(amount)
// convenience constructors for languages not supporting default values (like Swift and JavaScript)
constructor(receiverName: String, iban: String, amount: String?, reference: String?) : this(receiverName, iban, null, amount, reference)
constructor(receiverName: String, iban: String, bic: String?, amount: String?, reference: String?) : this(receiverName, iban, bic, amount, reference, null)
} }