mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 02:33:46 +00:00
[AC-1944] Add provider billing history component (#9520)
* Add provider-billing-history.component * Implement provider client invoice export
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { InvoicesResponse } from "@bitwarden/common/billing/models/response/invoices.response";
|
||||
|
||||
import { ApiService } from "../../abstractions/api.service";
|
||||
import { BillingApiServiceAbstraction } from "../../billing/abstractions";
|
||||
import { PaymentMethodType } from "../../billing/enums";
|
||||
@@ -106,6 +108,28 @@ export class BillingApiService implements BillingApiServiceAbstraction {
|
||||
return new ListResponse(r, PlanResponse);
|
||||
}
|
||||
|
||||
async getProviderClientInvoiceReport(providerId: string, invoiceId: string): Promise<string> {
|
||||
const response = await this.apiService.send(
|
||||
"GET",
|
||||
"/providers/" + providerId + "/billing/invoices/" + invoiceId,
|
||||
null,
|
||||
true,
|
||||
true,
|
||||
);
|
||||
return response as string;
|
||||
}
|
||||
|
||||
async getProviderInvoices(providerId: string): Promise<InvoicesResponse> {
|
||||
const response = await this.apiService.send(
|
||||
"GET",
|
||||
"/providers/" + providerId + "/billing/invoices",
|
||||
null,
|
||||
true,
|
||||
true,
|
||||
);
|
||||
return new InvoicesResponse(response);
|
||||
}
|
||||
|
||||
async getProviderPaymentInformation(providerId: string): Promise<PaymentInformationResponse> {
|
||||
const response = await this.apiService.send(
|
||||
"GET",
|
||||
|
||||
Reference in New Issue
Block a user