From 66e67d2172f1bf851765168efca73f6172f60381 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 21 Aug 2020 17:44:45 -0400 Subject: [PATCH] map plantype to old strings for license hash (#882) --- src/Core/Utilities/CoreHelpers.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Core/Utilities/CoreHelpers.cs b/src/Core/Utilities/CoreHelpers.cs index 594d8d0ae2..d0b1d35687 100644 --- a/src/Core/Utilities/CoreHelpers.cs +++ b/src/Core/Utilities/CoreHelpers.cs @@ -442,6 +442,21 @@ namespace Bit.Core.Utilities return val.ToString().ToLowerInvariant(); } + if (val is PlanType planType) + { + return planType switch + { + PlanType.Free => "Free", + PlanType.FamiliesAnnually2019 => "FamiliesAnnually", + PlanType.TeamsMonthly2019 => "TeamsMonthly", + PlanType.TeamsAnnually2019 => "TeamsAnnually", + PlanType.EnterpriseMonthly2019 => "EnterpriseMonthly", + PlanType.EnterpriseAnnually2019 => "EnterpriseAnnually", + PlanType.Custom => "Custom", + _ => ((byte)planType).ToString(), + }; + } + return val.ToString(); }