mirror of
https://github.com/bitwarden/server.git
synced 2025-07-04 09:32:48 -05:00
[AC-1942] Add endpoint to get provider invoices (#4158)
* Added endpoint to get provider invoices * Added missing properties of invoice * Run dotnet format'
This commit is contained in:
@ -25,6 +25,23 @@ public class ProviderBillingController(
|
||||
IStripeAdapter stripeAdapter,
|
||||
ISubscriberService subscriberService) : Controller
|
||||
{
|
||||
[HttpGet("invoices")]
|
||||
public async Task<IResult> GetInvoicesAsync([FromRoute] Guid providerId)
|
||||
{
|
||||
var (provider, result) = await GetAuthorizedBillableProviderOrResultAsync(providerId);
|
||||
|
||||
if (provider == null)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
var invoices = await subscriberService.GetInvoices(provider);
|
||||
|
||||
var response = InvoicesResponse.From(invoices);
|
||||
|
||||
return TypedResults.Ok(response);
|
||||
}
|
||||
|
||||
[HttpGet("payment-information")]
|
||||
public async Task<IResult> GetPaymentInformationAsync([FromRoute] Guid providerId)
|
||||
{
|
||||
|
Reference in New Issue
Block a user