mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
[AC-2721][Defect] Apply Subscription Status Updates in Provider Subscription details (#9484)
* Add status banner to the provider subscription page * Add the isexpired method * Add the unpaid status banner
This commit is contained in:
@@ -4,6 +4,10 @@ export class ProviderSubscriptionResponse extends BaseResponse {
|
||||
status: string;
|
||||
currentPeriodEndDate: Date;
|
||||
discountPercentage?: number | null;
|
||||
collectionMethod: string;
|
||||
unpaidPeriodEndDate?: string;
|
||||
gracePeriod?: number | null;
|
||||
suspensionDate?: string;
|
||||
plans: Plans[] = [];
|
||||
|
||||
constructor(response: any) {
|
||||
@@ -11,6 +15,10 @@ export class ProviderSubscriptionResponse extends BaseResponse {
|
||||
this.status = this.getResponseProperty("status");
|
||||
this.currentPeriodEndDate = new Date(this.getResponseProperty("currentPeriodEndDate"));
|
||||
this.discountPercentage = this.getResponseProperty("discountPercentage");
|
||||
this.collectionMethod = this.getResponseProperty("collectionMethod");
|
||||
this.unpaidPeriodEndDate = this.getResponseProperty("unpaidPeriodEndDate");
|
||||
this.gracePeriod = this.getResponseProperty("gracePeriod");
|
||||
this.suspensionDate = this.getResponseProperty("suspensionDate");
|
||||
const plans = this.getResponseProperty("plans");
|
||||
if (plans != null) {
|
||||
this.plans = plans.map((i: any) => new Plans(i));
|
||||
|
||||
Reference in New Issue
Block a user