[][src]Struct stripe::UpdateSubscriptionSchedule

pub struct UpdateSubscriptionSchedule<'a> {
    pub billing: Option<CollectionMethod>,
    pub billing_thresholds: Option<SubscriptionBillingThresholds>,
    pub collection_method: Option<CollectionMethod>,
    pub default_payment_method: Option<&'a str>,
    pub default_source: Option<&'a str>,
    pub end_behavior: Option<SubscriptionScheduleRenewalBehavior>,
    pub expand: &'a [&'a str],
    pub invoice_settings: Option<SubscriptionScheduleInvoiceSettings>,
    pub metadata: Option<Metadata>,
    pub phases: Option<Vec<UpdateSubscriptionSchedulePhases>>,
    pub prorate: Option<bool>,
    pub renewal_behavior: Option<SubscriptionScheduleRenewalBehavior>,
    pub renewal_interval: Option<SubscriptionScheduleRenewalIntervalParams>,
}

The parameters for SubscriptionSchedule::update.

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.

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.

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<UpdateSubscriptionSchedulePhases>>

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. Note that past phases can be omitted.

prorate: Option<bool>

If the update changes the current phase, indicates if the changes should be prorated.

Defaults to true.

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.

Implementations

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

pub fn new() -> Self[src]

Trait Implementations

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

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

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

impl<'a> Serialize for UpdateSubscriptionSchedule<'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.