1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#[derive(Deserialize, Debug)] #[serde(rename_all = "lowercase")] pub enum Frequency { Weekly, Monthly, Quarterly, Yearly, } #[derive(Deserialize, Debug)] pub struct Plan { /// Plan identifier tag id: String, /// The plan name name: String, /// The price of the subscription that will be billed, in US dollars price: f64, /// The monetary unit in which pricing information is displayed currency: String, /// The frequency at which you will be billed for this plan frequency: Frequency, /// A 'friendly' identifier to indicate to the UI what plan the object is legacy_id: String, /// If the zone is subscribed to this plan is_subscribed: bool, /// If the zone is allowed to subscribe to this plan can_subscribe: bool, }