From 01b5d33dfbb608699c59540126c594407e2cc763 Mon Sep 17 00:00:00 2001 From: dankito Date: Sun, 13 Mar 2022 22:30:02 +0100 Subject: [PATCH] Renamed EpcQrCode to EpcQrCodeValues --- .../banking/epcqrcode/EpcQrCodeGenerator.kt | 14 +++++++------- .../epcqrcode/{EpcQrCode.kt => EpcQrCodeValues.kt} | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) rename EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/{EpcQrCode.kt => EpcQrCodeValues.kt} (98%) diff --git a/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeGenerator.kt b/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeGenerator.kt index 582f7e7..99c75b0 100644 --- a/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeGenerator.kt +++ b/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeGenerator.kt @@ -4,18 +4,18 @@ package net.codinux.banking.epcqrcode open class EpcQrCodeGenerator { - open fun generate(param: EpcQrCodeConfig): EpcQrCode { - return EpcQrCode( - EpcQrCode.ServiceTagDefaultValue, + open fun generate(param: EpcQrCodeConfig): EpcQrCodeValues { + return EpcQrCodeValues( + EpcQrCodeValues.ServiceTagDefaultValue, EpcQrCodeVersion.Version2, param.encoding, - EpcQrCode.FunctionDefaultValue, + EpcQrCodeValues.FunctionDefaultValue, param.bic, param.receiverName, param.iban, - EpcQrCode.CurrencyCodeDefaultValue, + EpcQrCodeValues.CurrencyCodeDefaultValue, param.amount, - EpcQrCode.PurposeCodeDefaultValue, + EpcQrCodeValues.PurposeCodeDefaultValue, null, param.reference, param.noteToUser @@ -34,7 +34,7 @@ open class EpcQrCodeGenerator { epcQrCodeBuilder.appendLine(mapNullable(epcQrCode.bic)) epcQrCodeBuilder.appendLine(epcQrCode.receiverName) epcQrCodeBuilder.appendLine(epcQrCode.iban) - epcQrCodeBuilder.appendLine(mapNullable(epcQrCode.amount?.let { (epcQrCode.currencyCode ?: EpcQrCode.CurrencyCodeDefaultValue) + it })) // TODO: ensure that amount is converted to the correct format + epcQrCodeBuilder.appendLine(mapNullable(epcQrCode.amount?.let { (epcQrCode.currencyCode ?: EpcQrCodeValues.CurrencyCodeDefaultValue) + it })) // TODO: ensure that amount is converted to the correct format epcQrCodeBuilder.appendLine(epcQrCode.purposeCode) epcQrCodeBuilder.appendLine(mapNullable(epcQrCode.remittanceReference)) diff --git a/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCode.kt b/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeValues.kt similarity index 98% rename from EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCode.kt rename to EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeValues.kt index 902316c..a6c3f02 100644 --- a/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCode.kt +++ b/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeValues.kt @@ -1,7 +1,7 @@ package net.codinux.banking.epcqrcode -open class EpcQrCode( +open class EpcQrCodeValues( /** * 3 bytes.