mirror of
https://github.com/bitwarden/browser
synced 2026-01-06 18:43:25 +00:00
[PM-13999] Show estimated tax for taxable countries (#12145)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { BaseResponse } from "@bitwarden/common/models/response/base.response";
|
||||
|
||||
export class PreviewInvoiceResponse extends BaseResponse {
|
||||
effectiveTaxRate: number;
|
||||
taxableBaseAmount: number;
|
||||
taxAmount: number;
|
||||
totalAmount: number;
|
||||
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
this.effectiveTaxRate = this.getResponseProperty("EffectiveTaxRate");
|
||||
this.taxableBaseAmount = this.getResponseProperty("TaxableBaseAmount");
|
||||
this.taxAmount = this.getResponseProperty("TaxAmount");
|
||||
this.totalAmount = this.getResponseProperty("TotalAmount");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { BaseResponse } from "@bitwarden/common/models/response/base.response";
|
||||
|
||||
export class TaxIdTypesResponse extends BaseResponse {
|
||||
taxIdTypes: TaxIdTypeResponse[] = [];
|
||||
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
const taxIdTypes = this.getResponseProperty("TaxIdTypes");
|
||||
if (taxIdTypes && taxIdTypes.length) {
|
||||
this.taxIdTypes = taxIdTypes.map((t: any) => new TaxIdTypeResponse(t));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class TaxIdTypeResponse extends BaseResponse {
|
||||
code: string;
|
||||
country: string;
|
||||
description: string;
|
||||
example: string;
|
||||
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
this.code = this.getResponseProperty("Code");
|
||||
this.country = this.getResponseProperty("Country");
|
||||
this.description = this.getResponseProperty("Description");
|
||||
this.example = this.getResponseProperty("Example");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user