Struct stripe::SubscriptionItem
source · pub struct SubscriptionItem {
pub id: SubscriptionItemId,
pub billing_thresholds: Option<SubscriptionItemBillingThresholds>,
pub created: Option<Timestamp>,
pub deleted: bool,
pub metadata: Option<Metadata>,
pub plan: Option<Plan>,
pub price: Option<Price>,
pub quantity: Option<u64>,
pub subscription: Option<String>,
pub tax_rates: Option<Vec<TaxRate>>,
}
Expand description
The resource representing a Stripe “SubscriptionItem”.
For more details see https://stripe.com/docs/api/subscription_items/object
Fields§
§id: SubscriptionItemId
Unique identifier for the object.
billing_thresholds: Option<SubscriptionItemBillingThresholds>
Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period.
created: Option<Timestamp>
Time at which the object was created.
Measured in seconds since the Unix epoch.
deleted: bool
§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: Option<Plan>
§price: Option<Price>
§quantity: Option<u64>
The quantity of the plan to which the customer should be subscribed.
subscription: Option<String>
The subscription
this subscription_item
belongs to.
tax_rates: Option<Vec<TaxRate>>
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§
source§impl SubscriptionItem
impl SubscriptionItem
sourcepub fn list(
client: &Client,
params: &ListSubscriptionItems<'_>
) -> Response<List<SubscriptionItem>>
pub fn list( client: &Client, params: &ListSubscriptionItems<'_> ) -> Response<List<SubscriptionItem>>
Returns a list of your subscription items for a given subscription.
sourcepub fn create(
client: &Client,
params: CreateSubscriptionItem<'_>
) -> Response<SubscriptionItem>
pub fn create( client: &Client, params: CreateSubscriptionItem<'_> ) -> Response<SubscriptionItem>
Adds a new item to an existing subscription.
No existing items will be changed or replaced.
sourcepub fn retrieve(
client: &Client,
id: &SubscriptionItemId,
expand: &[&str]
) -> Response<SubscriptionItem>
pub fn retrieve( client: &Client, id: &SubscriptionItemId, expand: &[&str] ) -> Response<SubscriptionItem>
Retrieves the subscription item with the given ID.
sourcepub fn update(
client: &Client,
id: &SubscriptionItemId,
params: UpdateSubscriptionItem<'_>
) -> Response<SubscriptionItem>
pub fn update( client: &Client, id: &SubscriptionItemId, params: UpdateSubscriptionItem<'_> ) -> Response<SubscriptionItem>
Updates the plan or quantity of an item on a current subscription.
sourcepub fn delete(
client: &Client,
id: &SubscriptionItemId
) -> Response<Deleted<SubscriptionItemId>>
pub fn delete( client: &Client, id: &SubscriptionItemId ) -> Response<Deleted<SubscriptionItemId>>
Deletes an item from the subscription.
Removing a subscription item from a subscription will not cancel the subscription.
Trait Implementations§
source§impl Clone for SubscriptionItem
impl Clone for SubscriptionItem
source§fn clone(&self) -> SubscriptionItem
fn clone(&self) -> SubscriptionItem
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more