Added getInvoices functionality