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};

/// Trial : Trial status information.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Trial {
    /// Days remaining in the trial.
    #[serde(rename = "days_total")]
    pub days_total: i32,
    /// Trial end date (ISO 8601).
    #[serde(rename = "end", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub end: Option<Option<String>>,
    /// Whether the trial is currently active.
    #[serde(rename = "is_active")]
    pub is_active: bool,
    /// Trial start date (ISO 8601).
    #[serde(rename = "start", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub start: Option<Option<String>>,
}

impl Trial {
    /// Trial status information.
    pub fn new(days_total: i32, is_active: bool) -> Trial {
        Trial {
            days_total,
            end: None,
            is_active,
            start: None,
        }
    }
}