/** * Returns a list of the invoices contained within FreeAgent for the authorised account. * * @param nestInvoiceItems Should the invoice items also be included with the invoice * @return A list of FreeAgentInvoice instances. */ public List<FreeAgentInvoice> getInvoices(boolean nestInvoiceItems) { FreeAgentInvoiceWrapper invoicesWrapper = freeAgentServiceInstance.getInvoices(nestInvoiceItems); if (invoicesWrapper != null && invoicesWrapper.hasInvoices()) { return invoicesWrapper.getInvoices(); } else { return null; } }