pub struct UpdateSubscriptionItems {
pub billing_thresholds: Option<ItemBillingThresholdsParam>,
pub clear_usage: Option<bool>,
pub deleted: Option<bool>,
pub discounts: Option<Vec<DiscountsDataParam>>,
pub id: Option<String>,
pub metadata: Option<HashMap<String, String>>,
pub plan: Option<String>,
pub price: Option<String>,
pub price_data: Option<UpdateSubscriptionItemsPriceData>,
pub quantity: Option<u64>,
pub tax_rates: Option<Vec<String>>,
}
Expand description
A list of up to 20 subscription items, each with an attached price.
Fields§
§billing_thresholds: Option<ItemBillingThresholdsParam>
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.
clear_usage: Option<bool>
Delete all usage for a given subscription item.
You must pass this when deleting a usage records subscription item.
clear_usage
has no effect if the plan has a billing meter attached.
deleted: Option<bool>
A flag that, if set to true
, will delete the specified item.
discounts: Option<Vec<DiscountsDataParam>>
The coupons to redeem into discounts for the subscription item.
id: Option<String>
Subscription item to update.
metadata: Option<HashMap<String, String>>
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.
Individual keys can be unset by posting an empty value to them.
All keys can be unset by posting an empty value to metadata
.
plan: Option<String>
Plan ID for this item, as a string.
price: Option<String>
The ID of the price object.
One of price
or price_data
is required.
When changing a subscription item’s price, quantity
is set to 1 unless a quantity
parameter is provided.
price_data: Option<UpdateSubscriptionItemsPriceData>
Data used to generate a new Price object inline.
One of price
or price_data
is required.
quantity: Option<u64>
Quantity for this item.
tax_rates: Option<Vec<String>>
A list of Tax Rate ids.
These Tax Rates will override the default_tax_rates
on the Subscription.
When updating, pass an empty string to remove previously-defined tax rates.
Implementations§
Trait Implementations§
Source§impl Clone for UpdateSubscriptionItems
impl Clone for UpdateSubscriptionItems
Source§fn clone(&self) -> UpdateSubscriptionItems
fn clone(&self) -> UpdateSubscriptionItems
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more