1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 17:42:49 -05:00

return invoices and transactions on billing api

This commit is contained in:
Kyle Spearrin
2019-02-08 23:24:48 -05:00
parent f837c1708e
commit a97a6216d7
5 changed files with 119 additions and 28 deletions

View File

@ -958,6 +958,14 @@ namespace Bit.Core.Services
});
billingInfo.Charges = charges?.Data?.OrderByDescending(c => c.Created)
.Select(c => new BillingInfo.BillingCharge(c));
var invoices = await invoiceService.ListAsync(new InvoiceListOptions
{
CustomerId = customer.Id,
Limit = 20
});
billingInfo.Invoices = invoices?.Data?.OrderByDescending(i => i.Date)
.Select(i => new BillingInfo.BillingInvoice2(i));
}
}