mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 18:53:29 +00:00
[PM-8830] Billing Enums Rename (#9612)
* Renamed ProductType to ProductTierType * Renamed Product properties to ProductTier * Moved product-tier-type.enum.ts to billing folder * Added ProductType enum
This commit is contained in:
@@ -3,3 +3,4 @@ export * from "./plan-sponsorship-type.enum";
|
||||
export * from "./plan-type.enum";
|
||||
export * from "./transaction-type.enum";
|
||||
export * from "./bitwarden-product-type.enum";
|
||||
export * from "./product-tier-type.enum";
|
||||
|
||||
7
libs/common/src/billing/enums/product-tier-type.enum.ts
Normal file
7
libs/common/src/billing/enums/product-tier-type.enum.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export enum ProductTierType {
|
||||
Free = 0,
|
||||
Families = 1,
|
||||
Teams = 2,
|
||||
Enterprise = 3,
|
||||
TeamsStarter = 4,
|
||||
}
|
||||
4
libs/common/src/billing/enums/product-type.enum.ts
Normal file
4
libs/common/src/billing/enums/product-type.enum.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export enum ProductType {
|
||||
PasswordManager = 0,
|
||||
SecretsManager = 1,
|
||||
}
|
||||
@@ -1,10 +1,9 @@
|
||||
import { ProductType } from "../../../enums";
|
||||
import { ProductTierType, PlanType } from "../../../billing/enums";
|
||||
import { BaseResponse } from "../../../models/response/base.response";
|
||||
import { PlanType } from "../../enums";
|
||||
|
||||
export class PlanResponse extends BaseResponse {
|
||||
type: PlanType;
|
||||
product: ProductType;
|
||||
productTier: ProductTierType;
|
||||
name: string;
|
||||
isAnnual: boolean;
|
||||
nameLocalizationKey: string;
|
||||
@@ -32,7 +31,7 @@ export class PlanResponse extends BaseResponse {
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
this.type = this.getResponseProperty("Type");
|
||||
this.product = this.getResponseProperty("Product");
|
||||
this.productTier = this.getResponseProperty("ProductTier");
|
||||
this.name = this.getResponseProperty("Name");
|
||||
this.isAnnual = this.getResponseProperty("IsAnnual");
|
||||
this.nameLocalizationKey = this.getResponseProperty("NameLocalizationKey");
|
||||
|
||||
Reference in New Issue
Block a user