pub struct SubscriptionPreview {Show 26 fields
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: Option<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 immediate_transaction: Option<NextTransaction>,
pub next_transaction: NextTransaction,
pub recurring_transaction_details: SubscriptionTransactionDetailsPreview,
pub update_summary: Option<SubscriptionPreviewUpdateSummary>,
pub import_meta: Option<ImportMeta>,
}
Expand description
Represents a subscription preview when previewing a subscription.
Fields§
§status: SubscriptionStatus
Status of this subscription. Set automatically by Paddle. Use the pause subscription or cancel subscription operations to change.
customer_id: CustomerID
Unique Paddle ID for this customer entity, prefixed with ctm_
.
address_id: AddressID
Unique 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: CurrencyCode
Supported 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: Option<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: CollectionMode
How 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: SubscriptionManagementUrls
Authenticated 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.
immediate_transaction: Option<NextTransaction>
Preview of the immediate transaction created as a result of changes to the subscription. Returns a complete object where proration_billing_mode
is prorated_immediately
or full_immediately
; null
otherwise.
next_transaction: NextTransaction
Preview of the next transaction for this subscription. Includes charges created where proration_billing_mode
is prorated_next_billing_period
or full_next_billing_period
, as well as one-time charges. null
if the subscription is scheduled to cancel or pause.
recurring_transaction_details: SubscriptionTransactionDetailsPreview
Calculated totals for a transaction preview, including discounts, tax, and currency conversion. Considered the source of truth for totals on a transaction preview.
update_summary: Option<SubscriptionPreviewUpdateSummary>
§import_meta: Option<ImportMeta>
Import information for this entity. null
if this entity is not imported.
Trait Implementations§
Source§impl Clone for SubscriptionPreview
impl Clone for SubscriptionPreview
Source§fn clone(&self) -> SubscriptionPreview
fn clone(&self) -> SubscriptionPreview
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more