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
2025-09-11 18:01:25 -04:00
committed by GitHub
parent 8f7b22b652
commit 44587c2443
4 changed files with 125 additions and 41 deletions

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 {