1
0
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:
Jonas Hendrickx
2024-12-04 11:45:44 +01:00
committed by GitHub
parent 853db233d9
commit 1dce7f5ba0
34 changed files with 1093 additions and 1243 deletions

View File

@@ -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");
}
}

View File

@@ -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");
}
}