[][src]Struct stripe::CreateSubscriptionItem

pub struct CreateSubscriptionItem<'a> {
    pub billing_thresholds: Option<CreateSubscriptionItemBillingThresholds>,
    pub expand: &'a [&'a str],
    pub metadata: Option<Metadata>,
    pub plan: PlanId,
    pub prorate: Option<bool>,
    pub proration_date: Option<Timestamp>,
    pub quantity: Option<u64>,
    pub subscription: SubscriptionId,
    pub tax_rates: Option<Vec<String>>,
}

The parameters for SubscriptionItem::create.

Fields

billing_thresholds: Option<CreateSubscriptionItemBillingThresholds>

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

expand: &'a [&'a str]

Specifies which fields in the response should be expanded.

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.

plan: PlanId

The identifier of the plan to add to the subscription.

prorate: Option<bool>

Flag indicating whether to prorate switching plans during a billing cycle.

proration_date: Option<Timestamp>

If set, the proration will be calculated as though the subscription was updated at the given time.

This can be used to apply the same proration that was previewed with the upcoming invoice endpoint.

quantity: Option<u64>

The quantity you'd like to apply to the subscription item you're creating.

subscription: SubscriptionId

The identifier of the subscription to modify.

tax_rates: Option<Vec<String>>

The tax rates which apply to this subscription_item.

When set, the default_tax_rates on the subscription do not apply to this subscription_item.

Implementations

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

pub fn new(plan: PlanId, subscription: SubscriptionId) -> Self[src]

Trait Implementations

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

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

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