#include <vector>

#include <qrinvoice/model/qr_invoice.hpp>
#include <qrinvoice/model/validation.hpp>

// ...
try {
    qrinvoice::model::qr_invoice::builder qr_invoice_builder;

    qr_invoice_builder.creditor_iban("CH4431999123000889012");

    qr_invoice_builder.payment_amount_info()
    // Important part is here. amount can be left out, however currency must be set
        .chf();

    qr_invoice_builder.creditor()
        .structured_address()
        .name("Robert Schneider AG")
        .street_name("Rue du Lac")
        .house_number("1268")
        .postal_code("2501")
        .city("Biel")
        .country("CH");

    qr_invoice_builder.ultimate_debtor()
        .structured_address()
        .name("Pia-Maria Rutschmann-Schnyder")
        .street_name("Grosse Marktgasse")
        .house_number("28")
        .postal_code("9400")
        .city("Rorschach")
        .country("CH");

    qr_invoice_builder.payment_reference()
        .qr_reference("210000000003139471430009017");

    qr_invoice_builder.additional_information()
        .unstructured_message("Instruction of 15.09.2019")
        .bill_information("//S1/01/20170309/11/10201409/20/14000000/22/36958/30/CH106017086/40/1020/41/3010");

    qr_invoice_builder.alternative_scheme_params({
        "Name AV1: UV;UltraPay005;12345",
        "Name AV2: XY;XYService;54321"
    });

    const qrinvoice::model::qr_invoice qr_invoice = qr_invoice_builder.build();
} catch (const qrinvoice::model::validation::validation_exception& exception) {
    std::vector<qrinvoice::model::validation::validation_result::validation_error> errors = exception.get_result().get()->get_errors();
    // handle exception...
}