1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

Updated certain billing callsites to get billing history instead (#9443)

This commit is contained in:
Conner Turnbull
2024-06-12 07:52:59 -04:00
committed by GitHub
parent 99dc88688a
commit f85c4877e2
4 changed files with 17 additions and 15 deletions

View File

@@ -1,3 +1,5 @@
import { BillingHistoryResponse } from "@bitwarden/common/billing/models/response/billing-history.response";
import { ApiService } from "../../../abstractions/api.service";
import { OrganizationApiKeyRequest } from "../../../admin-console/models/request/organization-api-key.request";
import { OrganizationSsoRequest } from "../../../auth/models/request/organization-sso.request";
@@ -55,6 +57,17 @@ export class OrganizationApiService implements OrganizationApiServiceAbstraction
return new BillingResponse(r);
}
async getBillingHistory(id: string): Promise<BillingHistoryResponse> {
const r = await this.apiService.send(
"GET",
"/organizations/" + id + "/billing/history",
null,
true,
true,
);
return new BillingHistoryResponse(r);
}
async getSubscription(id: string): Promise<OrganizationSubscriptionResponse> {
const r = await this.apiService.send(
"GET",