Function toInvoices

Convert backend API result to library result object to return in Client.getInvoices and Client.getInvoicesPaginate methods