From 284590073117b5e15538436fbc2dce183fdee2d7 Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 16 Oct 2024 00:43:53 +0200 Subject: [PATCH] Added documentation --- .../banking/epcqrcode/EpcQrCodeConfig.kt | 8 +++++ .../banking/epcqrcode/EpcQrCodeValues.kt | 29 +++++++++++++++++-- 2 files changed, 34 insertions(+), 3 deletions(-) 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 c0347c7..984a153 100644 --- a/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeConfig.kt +++ b/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeConfig.kt @@ -3,8 +3,16 @@ package net.codinux.banking.epcqrcode open class EpcQrCodeConfig( + /** + * Name of the Receiver. Mandatory. + * Max. 70 characters + */ open val receiverName: String = "", + /** + * Receiver's IBAN. Mandatory. + * Max. 34 bytes. + */ open val iban: String = "", open val bic: String? = null, diff --git a/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeValues.kt b/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeValues.kt index 1c8b4e5..3827782 100644 --- a/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeValues.kt +++ b/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeValues.kt @@ -1,6 +1,11 @@ package net.codinux.banking.epcqrcode +/** + * The values of a EPC QR code use two different charsets: + * - byte = printable ASCII characters from range 32 (white space) to 126 (tilde) (most fields) + * - characters = all allowed characters according to encoding in line 3 'coding' (only for receiver name, remittance and information for user) + */ open class EpcQrCodeValues( /** @@ -36,13 +41,13 @@ open class EpcQrCodeValues( open val bic: String?, /** - * Receiver name. - * Max. 70 characters + * Name of the Receiver. Mandatory. + * Max. 70 characters in encoding of line 3 'coding'. */ open val receiverName: String, /** - * Receiver's IBAN. + * Receiver's IBAN. Mandatory. * Max. 34 bytes. */ open val iban: String, @@ -66,8 +71,24 @@ open class EpcQrCodeValues( */ open val purposeCode: String?, + /** + * Structured Remittance Information. + * + * Creditor Reference (ISO 11649 RF Creditor Reference may be used). + * + * May only be set if line 11 (unstructured remittanceText) is empty. + * + * Max. 35 bytes + */ open val remittanceReference: String?, + /** + * Unstructured remittance information (Verwendungstext). + * + * May only be set if line 10 (structured remittanceReference) is empty. + * + * Max. 140 characters in encoding of line 3 'coding' + */ open val remittanceText: String?, /** @@ -76,6 +97,8 @@ open class EpcQrCodeValues( * The text contained in Display must be shown to the user after decoding and serves a * short textual description of what the user is going to initiate. * This text must not be forwarded with the data handed over to the payment system. + * + * Max. 70 characters in encoding of line 3 'coding' */ open val informationForUser: String?