import ch.codeblock.qrinvoice.model.QrInvoice;
import ch.codeblock.qrinvoice.model.ParseException;
import ch.codeblock.qrinvoice.model.parser.BillInformationParser;
import ch.codeblock.qrinvoice.model.billinformation.swicos1v12.SwicoS1v12;
import ch.codeblock.qrinvoice.model.billinformation.BillInformation;
// ...
final QrInvoice qrInvoice = ... ;
// e.g. "//S1/10/10201409/11/190512/20/1400.000-53/30/106017086/31/180508/32/7.7/40/2:10;0:30"
final String billInformation = qrInvoice.getPaymentReference().getAdditionalInformation().getBillInformation();
try {
final BillInformation billInformation = BillInformationParser.create().parseBillInformation(billInformation);
if(billInformation instanceof SwicoS1v12) {
final SwicoS1v12 s1 = (SwicoS1v12) billInformation;
s1.getCustomerReference();
// ...
}
} catch (ParseException e) {
// parsing exception handling
}