cloudflare/endpoints/
plan.rs

1#[derive(Deserialize, Debug)]
2#[serde(rename_all = "lowercase")]
3/// Free plans won't have a Frequency, so most responses should accept Option instead.
4pub enum Frequency {
5    #[serde(rename = "")]
6    Nil,
7    Weekly,
8    Monthly,
9    Quarterly,
10    Yearly,
11    /// We get an empty variant for free plans
12    #[serde(other)]
13    Missing,
14}
15
16#[derive(Deserialize, Debug)]
17pub struct Plan {
18    /// Plan identifier tag
19    id: String,
20    /// The plan name
21    name: String,
22    /// The price of the subscription that will be billed, in US dollars
23    price: f64,
24    /// The monetary unit in which pricing information is displayed
25    currency: String,
26    /// The frequency at which you will be billed for this plan
27    frequency: Option<Frequency>,
28    /// A 'friendly' identifier to indicate to the UI what plan the object is
29    legacy_id: String,
30    /// If the zone is subscribed to this plan
31    is_subscribed: bool,
32    /// If the zone is allowed to subscribe to this plan
33    can_subscribe: bool,
34}