pub struct Subscription {Show 23 fields
pub id: SubscriptionID,
pub status: SubscriptionStatus,
pub customer_id: CustomerID,
pub address_id: AddressID,
pub business_id: Option<BusinessID>,
pub currency_code: CurrencyCode,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub started_at: Option<DateTime<Utc>>,
pub first_billed_at: Option<DateTime<Utc>>,
pub next_billed_at: DateTime<Utc>,
pub paused_at: Option<DateTime<Utc>>,
pub canceled_at: Option<DateTime<Utc>>,
pub discount: Option<Discount>,
pub collection_mode: CollectionMode,
pub billing_details: Option<BillingDetails>,
pub current_billing_period: Option<TimePeriod>,
pub billing_cycle: Duration,
pub scheduled_change: Option<SubscriptionScheduledChange>,
pub management_urls: SubscriptionManagementUrls,
pub items: Vec<SubscriptionItem>,
pub custom_data: Option<Value>,
pub import_meta: Option<ImportMeta>,
}Expand description
Represents a subscription entity.
Fields§
§id: SubscriptionIDUnique Paddle ID for this subscription entity, prefixed with sub_.
status: SubscriptionStatusStatus of this subscription. Set automatically by Paddle. Use the pause subscription or cancel subscription operations to change.
customer_id: CustomerIDUnique Paddle ID for this customer entity, prefixed with ctm_.
address_id: AddressIDUnique Paddle ID for this address entity, prefixed with add_.
business_id: Option<BusinessID>Paddle ID of the business that this subscription is for, prefixed with biz_.
currency_code: CurrencyCodeSupported three-letter ISO 4217 currency code.
created_at: DateTime<Utc>RFC 3339 datetime string of when this entity was created. Set automatically by Paddle.
updated_at: DateTime<Utc>RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle.
started_at: Option<DateTime<Utc>>RFC 3339 datetime string of when this subscription started. This may be different from first_billed_at if the subscription started in trial.
first_billed_at: Option<DateTime<Utc>>RFC 3339 datetime string of when this subscription was first billed. This may be different from started_at if the subscription started in trial.
next_billed_at: DateTime<Utc>RFC 3339 datetime string of when this subscription is next scheduled to be billed.
paused_at: Option<DateTime<Utc>>RFC 3339 datetime string of when this subscription was paused. Set automatically by Paddle when the pause subscription operation is used. null if not paused.
canceled_at: Option<DateTime<Utc>>RFC 3339 datetime string of when this subscription was canceled. Set automatically by Paddle when the cancel subscription operation is used. null if not canceled.
discount: Option<Discount>Details of the discount applied to this subscription.
collection_mode: CollectionModeHow payment is collected. automatic for checkout, manual for invoices.
billing_details: Option<BillingDetails>Details for invoicing. Required if collection_mode is manual.
current_billing_period: Option<TimePeriod>Current billing period for this subscription. Set automatically by Paddle based on the billing cycle. null for paused and canceled subscriptions.
billing_cycle: Duration§scheduled_change: Option<SubscriptionScheduledChange>Change that’s scheduled to be applied to a subscription. Use the pause subscription, cancel subscription, and resume subscription operations to create scheduled changes. null if no scheduled changes.
management_urls: SubscriptionManagementUrlsAuthenticated customer portal deep links for this subscription. For security, the token appended to each link is temporary. You shouldn’t store these links.
items: Vec<SubscriptionItem>List of items on this subscription. Only recurring items are returned.
custom_data: Option<Value>Your own structured key-value data.
import_meta: Option<ImportMeta>Import information for this entity. null if this entity is not imported.
Trait Implementations§
Source§impl Clone for Subscription
impl Clone for Subscription
Source§fn clone(&self) -> Subscription
fn clone(&self) -> Subscription
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more