crypto_pay_api/models/stats/
mod.rs

1mod params;
2
3pub use params::*;
4
5use crate::utils::deserialize_decimal;
6use chrono::{DateTime, Utc};
7use rust_decimal::Decimal;
8use serde::{Deserialize, Serialize};
9
10#[derive(Debug, Deserialize, Serialize)]
11pub struct AppStats {
12    /// Total volume of paid invoices in USD.
13    #[serde(deserialize_with = "deserialize_decimal")]
14    pub volume: Decimal,
15
16    /// Conversion of all created invoices.
17    #[serde(deserialize_with = "deserialize_decimal")]
18    pub conversion: Decimal,
19
20    /// The unique number of users who have paid the invoice.
21    pub unique_users_count: u64,
22
23    /// Total created invoice count.
24    pub created_invoice_count: u64,
25
26    /// Total paid invoice count.
27    pub paid_invoice_count: u64,
28
29    /// The date on which the statistics calculation was started in ISO 8601 format.
30    pub start_at: DateTime<Utc>,
31
32    /// The date on which the statistics calculation was ended in ISO 8601 format.
33    pub end_at: DateTime<Utc>,
34}