mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 10:13:31 +00:00
* implementing the clients changes * resolve pr comments on message.json * moved the method to billing-api.service * move the request and response files to billing folder * remove the adding existing orgs * resolve the routing issue * resolving the pr comments * code owner changes * fix the assignedseat * resolve the warning message * resolve the error on update * passing the right id * resolve the unassign value * removed unused logservice * Adding the loader on submit button
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import { BaseResponse } from "../../../models/response/base.response";
|
|
|
|
export class ProviderSubscriptionResponse extends BaseResponse {
|
|
status: string;
|
|
currentPeriodEndDate: Date;
|
|
discountPercentage?: number | null;
|
|
plans: Plans[] = [];
|
|
|
|
constructor(response: any) {
|
|
super(response);
|
|
this.status = this.getResponseProperty("status");
|
|
this.currentPeriodEndDate = new Date(this.getResponseProperty("currentPeriodEndDate"));
|
|
this.discountPercentage = this.getResponseProperty("discountPercentage");
|
|
const plans = this.getResponseProperty("plans");
|
|
if (plans != null) {
|
|
this.plans = plans.map((i: any) => new Plans(i));
|
|
}
|
|
}
|
|
}
|
|
|
|
export class Plans extends BaseResponse {
|
|
planName: string;
|
|
seatMinimum: number;
|
|
assignedSeats: number;
|
|
purchasedSeats: number;
|
|
cost: number;
|
|
cadence: string;
|
|
|
|
constructor(response: any) {
|
|
super(response);
|
|
this.planName = this.getResponseProperty("PlanName");
|
|
this.seatMinimum = this.getResponseProperty("SeatMinimum");
|
|
this.assignedSeats = this.getResponseProperty("AssignedSeats");
|
|
this.purchasedSeats = this.getResponseProperty("PurchasedSeats");
|
|
this.cost = this.getResponseProperty("Cost");
|
|
this.cadence = this.getResponseProperty("Cadence");
|
|
}
|
|
}
|