pub struct Plan {Show 19 fields
pub lago_id: Uuid,
pub name: String,
pub invoice_display_name: Option<String>,
pub created_at: DateTime<Utc>,
pub code: String,
pub interval: PlanInterval,
pub description: Option<String>,
pub amount_cents: i64,
pub amount_currency: String,
pub trial_period: Option<f64>,
pub pay_in_advance: bool,
pub bill_charges_monthly: Option<bool>,
pub active_subscriptions_count: Option<i32>,
pub draft_invoices_count: Option<i32>,
pub parent_id: Option<Uuid>,
pub charges: Option<Vec<PlanCharge>>,
pub taxes: Option<Vec<PlanTax>>,
pub minimum_commitment: Option<PlanMinimumCommitment>,
pub usage_thresholds: Option<Vec<UsageThreshold>>,
}Expand description
Represents a plan in the Lago billing system.
A plan defines pricing configuration that can be assigned to customers through subscriptions.
Fields§
§lago_id: UuidUnique identifier for the plan in Lago.
name: StringName of the plan.
invoice_display_name: Option<String>Display name for invoices.
created_at: DateTime<Utc>When the plan was created.
code: StringUnique code for the plan.
interval: PlanIntervalBilling interval (weekly, monthly, quarterly, yearly).
description: Option<String>Description of the plan.
amount_cents: i64Base amount in cents.
amount_currency: StringCurrency for the amount.
trial_period: Option<f64>Trial period in days.
pay_in_advance: boolWhether the plan is billed in advance.
bill_charges_monthly: Option<bool>Whether charges are billed monthly for yearly plans.
active_subscriptions_count: Option<i32>Number of active subscriptions using this plan.
draft_invoices_count: Option<i32>Number of draft invoices for this plan.
parent_id: Option<Uuid>Parent plan ID (for plan overrides).
charges: Option<Vec<PlanCharge>>Charges associated with this plan.
taxes: Option<Vec<PlanTax>>Taxes associated with this plan.
minimum_commitment: Option<PlanMinimumCommitment>Minimum commitment for this plan.
usage_thresholds: Option<Vec<UsageThreshold>>Usage thresholds for progressive billing.