lago_types/models/usage_threshold.rs
1use chrono::{DateTime, Utc};
2use serde::{Deserialize, Serialize};
3use uuid::Uuid;
4
5/// Represents a usage threshold in the Lago billing system.
6///
7/// Usage thresholds define spending limits that can trigger notifications
8/// or actions when usage amounts exceed specified thresholds.
9#[derive(Debug, Clone, Serialize, Deserialize)]
10pub struct UsageThreshold {
11 pub lago_id: Uuid,
12 pub amount_cents: i64,
13 pub recurring: bool,
14 pub created_at: DateTime<Utc>,
15 pub updated_at: DateTime<Utc>,
16 pub threshold_display_name: Option<String>,
17}