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

/// ActivityStats : Summary statistics of notification delivery activity.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ActivityStats {
    /// Notifications sent in the last 30 days.
    #[serde(rename = "monthly_sent")]
    pub monthly_sent: i64,
    /// Total successfully delivered notifications.
    #[serde(rename = "total_delivered")]
    pub total_delivered: i64,
    /// Total failed delivery attempts.
    #[serde(rename = "total_failed")]
    pub total_failed: i64,
    /// Total pending deliveries.
    #[serde(rename = "total_pending")]
    pub total_pending: i64,
    /// Total notifications sent (all time).
    #[serde(rename = "total_sent")]
    pub total_sent: i64,
    /// Notifications sent in the last 7 days.
    #[serde(rename = "weekly_sent")]
    pub weekly_sent: i64,
}

impl ActivityStats {
    /// Summary statistics of notification delivery activity.
    pub fn new(monthly_sent: i64, total_delivered: i64, total_failed: i64, total_pending: i64, total_sent: i64, weekly_sent: i64) -> ActivityStats {
        ActivityStats {
            monthly_sent,
            total_delivered,
            total_failed,
            total_pending,
            total_sent,
            weekly_sent,
        }
    }
}