The following example shows how to post an invoice. Before starting, you must get the unique key of the target invoice record.
String invoiceUniqueKey = "inv_1001";
protected InvoiceRepository invoiceRepository;
invoiceRepository.postInvoice(invoiceUniqueKey);