mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 13:23:34 +00:00
Fix TaxService.previewTaxAmountForOrganizationTrial return type (#15848)
This commit is contained in:
@@ -3,7 +3,6 @@ import { PreviewIndividualInvoiceRequest } from "../models/request/preview-indiv
|
||||
import { PreviewOrganizationInvoiceRequest } from "../models/request/preview-organization-invoice.request";
|
||||
import { PreviewTaxAmountForOrganizationTrialRequest } from "../models/request/tax";
|
||||
import { PreviewInvoiceResponse } from "../models/response/preview-invoice.response";
|
||||
import { PreviewTaxAmountResponse } from "../models/response/tax";
|
||||
|
||||
export abstract class TaxServiceAbstraction {
|
||||
abstract getCountries(): CountryListItem[];
|
||||
@@ -20,5 +19,5 @@ export abstract class TaxServiceAbstraction {
|
||||
|
||||
abstract previewTaxAmountForOrganizationTrial: (
|
||||
request: PreviewTaxAmountForOrganizationTrialRequest,
|
||||
) => Promise<PreviewTaxAmountResponse>;
|
||||
) => Promise<number>;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { PreviewTaxAmountForOrganizationTrialRequest } from "@bitwarden/common/billing/models/request/tax";
|
||||
import { PreviewTaxAmountResponse } from "@bitwarden/common/billing/models/response/tax";
|
||||
|
||||
import { ApiService } from "../../abstractions/api.service";
|
||||
import { TaxServiceAbstraction } from "../abstractions/tax.service.abstraction";
|
||||
@@ -306,13 +305,14 @@ export class TaxService implements TaxServiceAbstraction {
|
||||
|
||||
async previewTaxAmountForOrganizationTrial(
|
||||
request: PreviewTaxAmountForOrganizationTrialRequest,
|
||||
): Promise<PreviewTaxAmountResponse> {
|
||||
return await this.apiService.send(
|
||||
): Promise<number> {
|
||||
const response = await this.apiService.send(
|
||||
"POST",
|
||||
"/tax/preview-amount/organization-trial",
|
||||
request,
|
||||
true,
|
||||
true,
|
||||
);
|
||||
return response as number;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user