Struct stripe::SubscriptionItem
source · [−]pub struct SubscriptionItem {
pub id: SubscriptionItemId,
pub billing_thresholds: Option<SubscriptionItemBillingThresholds>,
pub created: Option<Timestamp>,
pub deleted: bool,
pub metadata: Metadata,
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: 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<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
sourceimpl 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
sourceimpl Clone for SubscriptionItem
impl Clone for SubscriptionItem
sourcefn clone(&self) -> SubscriptionItem
fn clone(&self) -> SubscriptionItem
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SubscriptionItem
impl Debug for SubscriptionItem
sourceimpl Default for SubscriptionItem
impl Default for SubscriptionItem
sourcefn default() -> SubscriptionItem
fn default() -> SubscriptionItem
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for SubscriptionItem
impl<'de> Deserialize<'de> for SubscriptionItem
sourcefn 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
sourceimpl Object for SubscriptionItem
impl Object for SubscriptionItem
sourceimpl Serialize for SubscriptionItem
impl Serialize for SubscriptionItem
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more