List<Invoice> AllInvoices = new List<Invoice>();
List<Invoice> CurrentInvoices = new List<Invoice>();
int i = 1;
CurrentInvoices = _api.Invoices.Page(i).Find().OrderBy(e => e.DueDate).ToList();
while(CurrentInvoices != null)
{
AllInvoices.AddRange(CurrentInvoices);
i++;
CurrentInvoices = _api.Invoices.Page(i).Find().OrderBy(e => e.DueDate).ToList();
}