[][src]Struct stripe::CreateSubscriptionSchedule

pub struct CreateSubscriptionSchedule<'a> {
    pub billing: Option<CollectionMethod>,
    pub billing_thresholds: Option<SubscriptionBillingThresholds>,
    pub collection_method: Option<CollectionMethod>,
    pub customer: Option<CustomerId>,
    pub default_payment_method: Option<&'a str>,
    pub default_source: Option<&'a str>,
    pub end_behavior: Option<SubscriptionScheduleRenewalBehavior>,
    pub expand: &'a [&'a str],
    pub from_subscription: Option<&'a str>,
    pub invoice_settings: Option<SubscriptionScheduleInvoiceSettings>,
    pub metadata: Option<Metadata>,
    pub phases: Option<Vec<CreateSubscriptionSchedulePhases>>,
    pub renewal_behavior: Option<SubscriptionScheduleRenewalBehavior>,
    pub renewal_interval: Option<SubscriptionScheduleRenewalIntervalParams>,
    pub start_date: Option<Scheduled>,
}

The parameters for SubscriptionSchedule::create.

Fields

billing: Option<CollectionMethod>

This field has been renamed to collection_method and will be removed in a future API version.

billing_thresholds: Option<SubscriptionBillingThresholds>

Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.

Pass an empty string to remove previously-defined thresholds.

collection_method: Option<CollectionMethod>

Either charge_automatically, or send_invoice.

When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to charge_automatically on creation.

customer: Option<CustomerId>

The identifier of the customer to create the subscription schedule for.

default_payment_method: Option<&'a str>

ID of the default payment method for the subscription schedule.

It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.

default_source: Option<&'a str>

ID of the default payment source for the subscription schedule.

It must belong to the customer associated with the subscription schedule and be in a chargeable state. If not set, defaults to the customer's default source.

end_behavior: Option<SubscriptionScheduleRenewalBehavior>expand: &'a [&'a str]

Specifies which fields in the response should be expanded.

from_subscription: Option<&'a str>

Migrate an existing subscription to be managed by a subscription schedule.

If this parameter is set, a subscription schedule will be created using the subscription's plan(s), set to auto-renew using the subscription's interval. Other parameters cannot be set since their values will be inferred from the subscription.

invoice_settings: Option<SubscriptionScheduleInvoiceSettings>

All invoices will be billed using the specified settings.

metadata: Option<Metadata>

Set of key-value pairs that you can attach to an object.

This can be useful for storing additional information about the object in a structured format.

phases: Option<Vec<CreateSubscriptionSchedulePhases>>

List representing phases of the subscription schedule.

Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the end_date of one phase will always equal the start_date of the next phase.

renewal_behavior: Option<SubscriptionScheduleRenewalBehavior>

Configures how the subscription schedule behaves when it ends.

Possible values are none, cancel, renew, or release. renew will create a new subscription schedule revision by adding a new phase using the most recent phase's plans applied to a duration set by renewal_interval. none will stop the subscription schedule and cancel the underlying subscription. cancel is semantically the same as none. release will stop the subscription schedule, but keep the underlying subscription running.

renewal_interval: Option<SubscriptionScheduleRenewalIntervalParams>

Configuration for renewing the subscription schedule when it ends.

Must be set if renewal_behavior is renew. Otherwise, must not be set.

start_date: Option<Scheduled>

The date at which the subscription schedule starts.

Methods

impl<'a> CreateSubscriptionSchedule<'a>[src]

pub fn new() -> Self[src]

Trait Implementations

impl<'a> Clone for CreateSubscriptionSchedule<'a>[src]

impl<'a> Debug for CreateSubscriptionSchedule<'a>[src]

impl<'a> Default for CreateSubscriptionSchedule<'a>[src]

impl<'a> Serialize for CreateSubscriptionSchedule<'a>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.