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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* 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,
}
}
}