1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 19:23:52 +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:
Alex Morask
2024-06-14 12:27:49 -04:00
committed by GitHub
parent 215bbc2f8e
commit af53df09ac
15 changed files with 270 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import { BaseResponse } from "@bitwarden/common/models/response/base.response";
export class InvoicesResponse extends BaseResponse {
invoices: InvoiceResponse[] = [];
constructor(response: any) {
super(response);
const invoices = this.getResponseProperty("Invoices");
if (invoices && invoices.length) {
this.invoices = invoices.map((t: any) => new InvoiceResponse(t));
}
}
}
export class InvoiceResponse extends BaseResponse {
id: string;
date: string;
number: string;
total: number;
status: string;
url: string;
pdfUrl: string;
constructor(response: any) {
super(response);
this.id = this.getResponseProperty("Id");
this.date = this.getResponseProperty("Date");
this.number = this.getResponseProperty("Number");
this.total = this.getResponseProperty("Total");
this.status = this.getResponseProperty("Status");
this.url = this.getResponseProperty("Url");
this.pdfUrl = this.getResponseProperty("PdfUrl");
}
}