From db548eb9cd3cb15dc47368513fd0a5e76ecb4e32 Mon Sep 17 00:00:00 2001 From: dankito Date: Sun, 13 Mar 2022 22:20:37 +0100 Subject: [PATCH] Added convenience constructors --- .../net/codinux/banking/epcqrcode/EpcQrCodeConfig.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeConfig.kt b/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeConfig.kt index b08a035..20e40ca 100644 --- a/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeConfig.kt +++ b/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeConfig.kt @@ -30,4 +30,11 @@ open class EpcQrCodeConfig( 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) + } \ No newline at end of file