public class Bill
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Bill.Language
QR bill language
Intentially in lowercase.
|
static class |
Bill.Version
QR bill version
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FIELD_ACCOUNT
Field name of the account number
|
static java.lang.String |
FIELD_ADDITIONAL_INFO
Field name of the additional bill information
|
static java.lang.String |
FIELD_AMOUNT
Field name of the amount
|
static java.lang.String |
FIELD_CODING_TYPE
Field name of the QR bill's coding type
|
static java.lang.String |
FIELD_CREDITOR_COUNTRY_CODE
Field name of the creditor's country code
|
static java.lang.String |
FIELD_CREDITOR_HOUSE_NO
Field name of the creditor's house number
|
static java.lang.String |
FIELD_CREDITOR_NAME
Field name of the creditor's name
|
static java.lang.String |
FIELD_CREDITOR_POSTAL_CODE
Field name of the creditor's postal codde
|
static java.lang.String |
FIELD_CREDITOR_STREET
Field name of the creditor's street
|
static java.lang.String |
FIELD_CREDITOR_TOWN
Field name of the creditor's town
|
static java.lang.String |
FIELD_CURRENCY
Field name of the currency
|
static java.lang.String |
FIELD_DEBTOR_COUNTRY_CODE
Field name of the debtor's country code
|
static java.lang.String |
FIELD_DEBTOR_HOUSE_NO
Field name of the debtor's house number
|
static java.lang.String |
FIELD_DEBTOR_NAME
Field name of the debtor's name
|
static java.lang.String |
FIELD_DEBTOR_POSTAL_CODE
Field name of the debtor's postal code
|
static java.lang.String |
FIELD_DEBTOR_STREET
Field name of the debtor's street
|
static java.lang.String |
FIELD_DEBTOR_TOWN
Field name of the debtor's town
|
static java.lang.String |
FIELD_DUE_DATE
Field name of the due date
|
static java.lang.String |
FIELD_FINAL_CREDITOR_COUNTRY_CODE
Field name of the final creditor's country code
|
static java.lang.String |
FIELD_FINAL_CREDITOR_HOUSE_NO
Field name of the final creditor's house number
|
static java.lang.String |
FIELD_FINAL_CREDITOR_NAME
Field name of the final creditor's name
|
static java.lang.String |
FIELD_FINAL_CREDITOR_POSTAL_CODE
Field name of the final creditor's postal code
|
static java.lang.String |
FIELD_FINAL_CREDITOR_STREET
Field name of the final creditor's street
|
static java.lang.String |
FIELD_FINAL_CREDITOR_TOWN
Field name of the final creditor's town
|
static java.lang.String |
FIELD_LANGUAGE
Field name of the QR bill's coding type
|
static java.lang.String |
FIELD_QR_TYPE
Field name of the QR code type
|
static java.lang.String |
FIELD_REFERENCE_NO
Field name of the reference number
|
static java.lang.String |
FIELD_VERSION
Field name of the QR bill version
|
static java.lang.String |
FIELDROOT_CREDITOR
Start of field name of the creditor address
|
static java.lang.String |
FIELDROOT_DEBTOR
Start of field name of the debtor's address
|
static java.lang.String |
FIELDROOT_FINAL_CREDITOR
Start of field name of the final creditor address
|
static java.lang.String |
SUBFIELD_COUNTRY_CODE
Relative field of an address' country code
|
static java.lang.String |
SUBFIELD_HOUSE_NO
Relative field of an address' house number
|
static java.lang.String |
SUBFIELD_NAME
Relative field name of an address' name
|
static java.lang.String |
SUBFIELD_POSTAL_CODE
Relative field of an address' postal code
|
static java.lang.String |
SUBFIELD_STREET
Relative field of an address' street
|
static java.lang.String |
SUBFIELD_TOWN
Relative field of an address' town
|
| Constructor and Description |
|---|
Bill() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getAccount()
Gets the creditor's account number.
|
java.lang.String |
getAdditionalInfo()
Gets the additional unstructured message.
|
java.lang.Double |
getAmount()
Gets the payment amount
|
Address |
getCreditor()
Gets the creditor address.
|
java.lang.String |
getCurrency()
Gets the payment currency.
|
Address |
getDebtor()
Gets the debtor's address.
|
java.time.LocalDate |
getDueDate()
Gets the payment's due date.
|
Address |
getFinalCreditor()
Gets the final creditor address.
|
Bill.Language |
getLanguage()
Gets the bill language.
|
java.lang.String |
getReferenceNo()
Gets the payment reference number
|
Bill.Version |
getVersion()
Gets the version of the QR bill standard.
|
int |
hashCode() |
void |
setAccount(java.lang.String account)
Sets the creditor's account number.
|
void |
setAdditionalInfo(java.lang.String additionalInfo)
Sets the additional unstructured message.
|
void |
setAmount(java.lang.Double amount)
Sets the payment amount.
|
void |
setCreditor(Address creditor)
Sets the creditor address.
|
void |
setCurrency(java.lang.String currency)
Sets the payment currency.
|
void |
setDebtor(Address debtor)
Sets the debtor's address.
|
void |
setDueDate(java.time.LocalDate dueDate)
Sets the payment's due date.
|
void |
setFinalCreditor(Address finalCreditor)
Sets the final creditor address.
|
void |
setLanguage(Bill.Language language)
Sets the bill language
|
void |
setReferenceNo(java.lang.String referenceNo)
Sets the payment reference number.
|
void |
setVersion(Bill.Version version)
Sets the version of the QR bill standard.
|
public static final java.lang.String SUBFIELD_NAME
public static final java.lang.String SUBFIELD_STREET
public static final java.lang.String SUBFIELD_HOUSE_NO
public static final java.lang.String SUBFIELD_POSTAL_CODE
public static final java.lang.String SUBFIELD_TOWN
public static final java.lang.String SUBFIELD_COUNTRY_CODE
public static final java.lang.String FIELD_QR_TYPE
public static final java.lang.String FIELD_VERSION
public static final java.lang.String FIELD_CODING_TYPE
public static final java.lang.String FIELD_LANGUAGE
public static final java.lang.String FIELD_CURRENCY
public static final java.lang.String FIELD_AMOUNT
public static final java.lang.String FIELD_ACCOUNT
public static final java.lang.String FIELDROOT_CREDITOR
public static final java.lang.String FIELD_CREDITOR_NAME
public static final java.lang.String FIELD_CREDITOR_STREET
public static final java.lang.String FIELD_CREDITOR_HOUSE_NO
public static final java.lang.String FIELD_CREDITOR_POSTAL_CODE
public static final java.lang.String FIELD_CREDITOR_TOWN
public static final java.lang.String FIELD_CREDITOR_COUNTRY_CODE
public static final java.lang.String FIELDROOT_FINAL_CREDITOR
public static final java.lang.String FIELD_FINAL_CREDITOR_NAME
public static final java.lang.String FIELD_FINAL_CREDITOR_STREET
public static final java.lang.String FIELD_FINAL_CREDITOR_HOUSE_NO
public static final java.lang.String FIELD_FINAL_CREDITOR_POSTAL_CODE
public static final java.lang.String FIELD_FINAL_CREDITOR_TOWN
public static final java.lang.String FIELD_FINAL_CREDITOR_COUNTRY_CODE
public static final java.lang.String FIELD_REFERENCE_NO
public static final java.lang.String FIELD_ADDITIONAL_INFO
public static final java.lang.String FIELDROOT_DEBTOR
public static final java.lang.String FIELD_DEBTOR_NAME
public static final java.lang.String FIELD_DEBTOR_STREET
public static final java.lang.String FIELD_DEBTOR_HOUSE_NO
public static final java.lang.String FIELD_DEBTOR_POSTAL_CODE
public static final java.lang.String FIELD_DEBTOR_TOWN
public static final java.lang.String FIELD_DEBTOR_COUNTRY_CODE
public static final java.lang.String FIELD_DUE_DATE
public Bill.Language getLanguage()
public void setLanguage(Bill.Language language)
language - the languagepublic Bill.Version getVersion()
public void setVersion(Bill.Version version)
version - the versionpublic java.lang.Double getAmount()
public void setAmount(java.lang.Double amount)
Valid values are between 0.01 and 999,999,999.99
amount - the amountpublic java.lang.String getCurrency()
public void setCurrency(java.lang.String currency)
Valid values are "CHF" and "EUR".
currency - the currencypublic java.time.LocalDate getDueDate()
public void setDueDate(java.time.LocalDate dueDate)
The due date is optional.
dueDate - the due datepublic java.lang.String getAccount()
public void setAccount(java.lang.String account)
Account numbers must be valid IBANs of a bank of Switzerland or Liechtenstein. Spaces are allowed in the account number.
account - the account numberpublic Address getCreditor()
public void setCreditor(Address creditor)
creditor - the creditor address.public Address getFinalCreditor()
public void setFinalCreditor(Address finalCreditor)
The final creditor is optional. If it is not used, both setting this field to null
or setting an address with all null or empty values is ok.
finalCreditor - the final creditor addresspublic java.lang.String getReferenceNo()
public void setReferenceNo(java.lang.String referenceNo)
The reference number is mandatory for QR IBANs, i.e. IBANs in the range CHxx30000xxxxxx through CHxx31999xxxxx.
If specified, the reference number must be either a valid QR reference (which corresponds to the form ISR reference number) or a valid creditor reference according to ISO 11649 ("RFxxxx"). Both may contain spaces for formatting.
referenceNo - the payment reference numberpublic java.lang.String getAdditionalInfo()
public void setAdditionalInfo(java.lang.String additionalInfo)
additionalInfo - the additional messagepublic Address getDebtor()
public void setDebtor(Address debtor)
The debtor is optional. If it is omitted, both setting this field to null
or setting an address with all null or empty values is ok.
debtor - the debtor addresspublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object