Class BillTextFormatter
Formats text on a QR bill.
The resulting text often contains multiple lines, e.g. for addresses.These line breaks a represented by a line feed character(U+000A). Long lines might require additional line breaks to fit into the given text boxes.These additional line breaks are not included in the resulting text.
Inherited Members
Namespace: Codecrete.SwissQRBill.Generator
Assembly: Codecrete.SwissQRBill.Core.dll
Syntax
public class BillTextFormatter
Constructors
| Edit this page View SourceBillTextFormatter(Bill)
Creates a new instance for the specified bill.
Declaration
public BillTextFormatter(Bill bill)
Parameters
| Type | Name | Description |
|---|---|---|
| Bill | bill | QR bill data |
Exceptions
| Type | Condition |
|---|---|
| QRBillValidationException | thrown if the bill cannot be validated without errors |
Properties
| Edit this page View SourceAccount
Gets the formatted account number.
Declaration
public string Account { get; }
Property Value
| Type | Description |
|---|---|
| string | account number |
AdditionalInformation
Returns the additional information.
It consists of the unstructured message, the bill information, both or none,
depending on what has been specified. If neither has been specified, null is returned.
Declaration
public string AdditionalInformation { get; }
Property Value
| Type | Description |
|---|---|
| string | additional information |
Amount
Gets the formatted amount.
Returns null if no amount has been set.
Declaration
public string Amount { get; }
Property Value
| Type | Description |
|---|---|
| string | formatted amount |
CreditorAddress
Gets the formatted creditor address.
Declaration
public string CreditorAddress { get; }
Property Value
| Type | Description |
|---|---|
| string | creditor address |
CreditorAddressReduced
Gets the reduced formatted creditor address.
If space is very tight, a reduced address without street and house number can be used.
Declaration
public string CreditorAddressReduced { get; }
Property Value
| Type | Description |
|---|---|
| string | formatted address |
PayableBy
Gets the "payable by" text (debtor address).
Returns null if no debtor has been set.
Declaration
public string PayableBy { get; }
Property Value
| Type | Description |
|---|---|
| string | formatted address |
PayableByReduced
Gets the "payable by" text with a reduced address.
If space is very tight, a reduced address without street and house number can be used.
Returns null if no debtor has been set.
Declaration
public string PayableByReduced { get; }
Property Value
| Type | Description |
|---|---|
| string | formatted address |
PayableTo
Gets the "payable to" text (account number and creditor address).
Declaration
public string PayableTo { get; }
Property Value
| Type | Description |
|---|---|
| string | "payable to" text |
PayableToReduced
Gets the "payable to" text (account number and creditor address) with a reduced address.
If space is very tight, an address without street and house number can be used.
Declaration
public string PayableToReduced { get; }
Property Value
| Type | Description |
|---|---|
| string |
Reference
Gets the formatted reference number.
Declaration
public string Reference { get; }
Property Value
| Type | Description |
|---|---|
| string | reference number |