crypto_pay_api/models/stats/
mod.rs

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