Skip to main content

artifacts/models/
stripe_subscription_plan.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4/// StripeSubscriptionPlan : Stripe subscription plan type.
5/// Stripe subscription plan type.
6#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
7#[cfg_attr(feature = "specta", derive(specta::Type))]
8#[derive(Default)]
9pub enum StripeSubscriptionPlan {
10    #[serde(rename = "monthly")]
11    #[default]
12    Monthly,
13    #[serde(rename = "annual")]
14    Annual,
15}
16
17impl std::fmt::Display for StripeSubscriptionPlan {
18    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
19        match self {
20            Self::Monthly => write!(f, "monthly"),
21            Self::Annual => write!(f, "annual"),
22        }
23    }
24}