enbbox 1.0.1

Notification infrastructure API — open-source alternative to Novu/Courier
Documentation
/*
 * enbbox API
 *
 * Notification infrastructure API — open-source alternative to Novu/Courier
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// PriceTier : Price info for a plan tier.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PriceTier {
    /// Annual price in cents (null for free/enterprise).
    #[serde(rename = "annual_price", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub annual_price: Option<Option<i64>>,
    /// Currency code (e.g., \"usd\").
    #[serde(rename = "currency")]
    pub currency: String,
    /// Monthly price in cents (null for free/enterprise).
    #[serde(rename = "monthly_price", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub monthly_price: Option<Option<i64>>,
    /// Plan tier label.
    #[serde(rename = "tier")]
    pub tier: String,
}

impl PriceTier {
    /// Price info for a plan tier.
    pub fn new(currency: String, tier: String) -> PriceTier {
        PriceTier {
            annual_price: None,
            currency,
            monthly_price: None,
            tier,
        }
    }
}