Struct stripe::SubscriptionItem [−][src]
pub struct SubscriptionItem {
pub id: SubscriptionItemId,
pub billing_thresholds: Option<Box<SubscriptionItemBillingThresholds>>,
pub created: Option<Timestamp>,
pub deleted: bool,
pub metadata: Metadata,
pub price: Option<Box<Price>>,
pub quantity: Option<Box<u64>>,
pub subscription: Option<Box<String>>,
pub tax_rates: Option<Box<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<Box<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: 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.
price: Option<Box<Price>>
quantity: Option<Box<u64>>
The quantity of the plan to which the customer should be subscribed.
subscription: Option<Box<String>>
The subscription
this subscription_item
belongs to.
tax_rates: Option<Box<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
pub 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.
pub 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.
pub 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.
pub 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.
pub 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
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for SubscriptionItem
impl Send for SubscriptionItem
impl Sync for SubscriptionItem
impl Unpin for SubscriptionItem
impl UnwindSafe for SubscriptionItem
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more