Use PlanType enum when formatting usage-limit CTA (#3495)

- Started using Play type struct
- Added CTA for team/business 
- Refactored a bit to unify the logic
This commit is contained in:
Ahmed Ibrahim authored and GitHub committed 2025-09-11 22:01:25 +00:00
1 parent 8f7b22b652
commit 44587c2443
4 files changed
+125 -41

No files matched your search

-9
View File
@@ -47,15 +47,6 @@ pub(crate) enum PlanType {
Unknown(String),
}
impl PlanType {
pub fn as_string(&self) -> String {
match self {
Self::Known(known) => format!("{known:?}").to_lowercase(),
Self::Unknown(s) => s.clone(),
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub(crate) enum KnownPlan {