pub struct CustomerUsage {
pub from_datetime: DateTime<Utc>,
pub to_datetime: DateTime<Utc>,
pub issuing_date: String,
pub lago_invoice_id: Option<Uuid>,
pub currency: String,
pub amount_cents: i64,
pub taxes_amount_cents: i64,
pub total_amount_cents: i64,
pub charges_usage: Vec<ChargeUsage>,
}Expand description
Represents the current usage data for a customer’s subscription.
This struct contains information about usage-based billing data within the current billing period.
Fields§
§from_datetime: DateTime<Utc>Start of the billing period
to_datetime: DateTime<Utc>End of the billing period
issuing_date: StringInvoice issuance date
lago_invoice_id: Option<Uuid>Associated invoice identifier (if exists)
currency: StringCurrency code (e.g., USD, EUR)
amount_cents: i64Total charges amount in cents (excluding taxes)
taxes_amount_cents: i64Tax amount in cents
total_amount_cents: i64Grand total in cents (amount + taxes)
charges_usage: Vec<ChargeUsage>Array of charge usage line items
Trait Implementations§
Source§impl Clone for CustomerUsage
impl Clone for CustomerUsage
Source§fn clone(&self) -> CustomerUsage
fn clone(&self) -> CustomerUsage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CustomerUsage
impl Debug for CustomerUsage
Source§impl<'de> Deserialize<'de> for CustomerUsage
impl<'de> Deserialize<'de> for CustomerUsage
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 CustomerUsage
impl RefUnwindSafe for CustomerUsage
impl Send for CustomerUsage
impl Sync for CustomerUsage
impl Unpin for CustomerUsage
impl UnwindSafe for CustomerUsage
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