1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

[AC-1759] Update subscription status section (#8578)

* Resolve subscription status confusion

* Add feature flag
This commit is contained in:
Alex Morask
2024-04-02 13:53:13 -04:00
committed by GitHub
parent f79d159277
commit 7df3304a25
8 changed files with 341 additions and 44 deletions

View File

@@ -36,6 +36,10 @@ export class BillingSubscriptionResponse extends BaseResponse {
status: string;
cancelled: boolean;
items: BillingSubscriptionItemResponse[] = [];
collectionMethod: string;
suspensionDate?: string;
unpaidPeriodEndDate?: string;
gracePeriod?: number;
constructor(response: any) {
super(response);
@@ -51,6 +55,10 @@ export class BillingSubscriptionResponse extends BaseResponse {
if (items != null) {
this.items = items.map((i: any) => new BillingSubscriptionItemResponse(i));
}
this.collectionMethod = this.getResponseProperty("CollectionMethod");
this.suspensionDate = this.getResponseProperty("SuspensionDate");
this.unpaidPeriodEndDate = this.getResponseProperty("unpaidPeriodEndDate");
this.gracePeriod = this.getResponseProperty("GracePeriod");
}
}

View File

@@ -8,6 +8,7 @@ export enum FeatureFlag {
FlexibleCollectionsMigration = "flexible-collections-migration",
ShowPaymentMethodWarningBanners = "show-payment-method-warning-banners",
EnableConsolidatedBilling = "enable-consolidated-billing",
AC1795_UpdatedSubscriptionStatusSection = "AC-1795_updated-subscription-status-section",
}
// Replace this with a type safe lookup of the feature flag values in PM-2282