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

/// EventsUsage : Events usage within a billing period (embedded in Subscription).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EventsUsage {
    /// Events consumed so far.
    #[serde(rename = "current")]
    pub current: i64,
    /// Events included in the plan.
    #[serde(rename = "included", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub included: Option<Option<i64>>,
}

impl EventsUsage {
    /// Events usage within a billing period (embedded in Subscription).
    pub fn new(current: i64) -> EventsUsage {
        EventsUsage {
            current,
            included: None,
        }
    }
}