pub struct Subscription {Show 27 fields
pub created_at: DateTime<Utc>,
pub modified_at: Option<DateTime<Utc>>,
pub id: Uuid,
pub amount: u32,
pub currency: String,
pub recurring_interval: RecurringInterval,
pub status: SubscriptionStatus,
pub current_period_start: DateTime<Utc>,
pub current_period_end: Option<DateTime<Utc>>,
pub cancel_at_period_end: bool,
pub canceled_at: Option<DateTime<Utc>>,
pub started_at: Option<DateTime<Utc>>,
pub ends_at: Option<DateTime<Utc>>,
pub ended_at: Option<DateTime<Utc>>,
pub customer_id: Uuid,
pub product_id: Uuid,
pub discount_id: Option<Uuid>,
pub checkout_id: Option<Uuid>,
pub customer_cancellation_reason: Option<CustomerCancellationReason>,
pub customer_cancellation_comment: Option<String>,
pub metadata: HashMap<String, String>,
pub customer: Customer,
pub product: Product,
pub discount: Option<Discount>,
pub prices: Vec<Price>,
pub meters: Vec<SubscriptionMeter>,
pub custom_field_data: HashMap<String, String>,
}Fields§
§created_at: DateTime<Utc>Creation timestamp of the object.
modified_at: Option<DateTime<Utc>>Last modification timestamp of the object.
id: UuidThe ID of the object.
amount: u32The amount of the subscription.
currency: StringThe currency of the subscription.
recurring_interval: RecurringIntervalThe interval at which the subscription recurs.
status: SubscriptionStatusThe status of the subscription.
current_period_start: DateTime<Utc>The start timestamp of the current billing period.
current_period_end: Option<DateTime<Utc>>The end timestamp of the current billing period.
cancel_at_period_end: boolWhether the subscription will be canceled at the end of the current period.
canceled_at: Option<DateTime<Utc>>The timestamp when the subscription was canceled. The subscription might still be active if cancel_at_period_end is true.
started_at: Option<DateTime<Utc>>The timestamp when the subscription started.
ends_at: Option<DateTime<Utc>>The timestamp when the subscription will end.
ended_at: Option<DateTime<Utc>>The timestamp when the subscription ended.
customer_id: UuidThe ID of the subscribed customer.
product_id: UuidThe ID of the subscribed product.
discount_id: Option<Uuid>The ID of the applied discount, if any.
checkout_id: Option<Uuid>§customer_cancellation_reason: Option<CustomerCancellationReason>§customer_cancellation_comment: Option<String>§metadata: HashMap<String, String>§customer: Customer§product: ProductA product.
discount: Option<Discount>§prices: Vec<Price>List of enabled prices for the subscription.
meters: Vec<SubscriptionMeter>List of meters associated with the subscription.
custom_field_data: HashMap<String, String>