Renamed EpcQrCode to EpcQrCodeValues

This commit is contained in:
dankito 2022-03-13 22:30:02 +01:00
parent 5d818dfeec
commit 01b5d33dfb
2 changed files with 8 additions and 8 deletions

View File

@ -4,18 +4,18 @@ package net.codinux.banking.epcqrcode
open class EpcQrCodeGenerator { open class EpcQrCodeGenerator {
open fun generate(param: EpcQrCodeConfig): EpcQrCode { open fun generate(param: EpcQrCodeConfig): EpcQrCodeValues {
return EpcQrCode( return EpcQrCodeValues(
EpcQrCode.ServiceTagDefaultValue, EpcQrCodeValues.ServiceTagDefaultValue,
EpcQrCodeVersion.Version2, EpcQrCodeVersion.Version2,
param.encoding, param.encoding,
EpcQrCode.FunctionDefaultValue, EpcQrCodeValues.FunctionDefaultValue,
param.bic, param.bic,
param.receiverName, param.receiverName,
param.iban, param.iban,
EpcQrCode.CurrencyCodeDefaultValue, EpcQrCodeValues.CurrencyCodeDefaultValue,
param.amount, param.amount,
EpcQrCode.PurposeCodeDefaultValue, EpcQrCodeValues.PurposeCodeDefaultValue,
null, null,
param.reference, param.reference,
param.noteToUser param.noteToUser
@ -34,7 +34,7 @@ open class EpcQrCodeGenerator {
epcQrCodeBuilder.appendLine(mapNullable(epcQrCode.bic)) epcQrCodeBuilder.appendLine(mapNullable(epcQrCode.bic))
epcQrCodeBuilder.appendLine(epcQrCode.receiverName) epcQrCodeBuilder.appendLine(epcQrCode.receiverName)
epcQrCodeBuilder.appendLine(epcQrCode.iban) 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(epcQrCode.purposeCode)
epcQrCodeBuilder.appendLine(mapNullable(epcQrCode.remittanceReference)) epcQrCodeBuilder.appendLine(mapNullable(epcQrCode.remittanceReference))

View File

@ -1,7 +1,7 @@
package net.codinux.banking.epcqrcode package net.codinux.banking.epcqrcode
open class EpcQrCode( open class EpcQrCodeValues(
/** /**
* 3 bytes. * 3 bytes.