pub struct Event {
pub lago_id: Uuid,
pub transaction_id: String,
pub lago_customer_id: Option<Uuid>,
pub code: String,
pub timestamp: DateTime<Utc>,
pub lago_subscription_id: Option<Uuid>,
pub external_subscription_id: Option<String>,
pub created_at: DateTime<Utc>,
pub precise_total_amount_cents: Option<String>,
pub properties: Option<Value>,
}Expand description
Represents a usage measurement event in the Lago billing system.
Events are used to track customer usage and are aggregated into invoice line items based on billable metrics.
Fields§
§lago_id: UuidUnique identifier for the event in Lago
transaction_id: StringExternal transaction reference provided when creating the event
lago_customer_id: Option<Uuid>Lago ID of the associated customer (may be null)
code: StringBillable metric code
timestamp: DateTime<Utc>Event occurrence timestamp
lago_subscription_id: Option<Uuid>Lago ID of the linked subscription (may be null)
external_subscription_id: Option<String>External subscription reference
created_at: DateTime<Utc>Record creation timestamp
precise_total_amount_cents: Option<String>Precise amount calculation in cents
properties: Option<Value>Custom event metadata/properties
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more