pub struct SubscriptionPlanOverrides {
pub amount_cents: Option<i64>,
pub amount_currency: Option<String>,
pub description: Option<String>,
pub invoice_display_name: Option<String>,
pub name: Option<String>,
pub tax_codes: Option<Vec<String>>,
pub trial_period: Option<f64>,
pub minimum_commitment: Option<SubscriptionMinimumCommitmentOverride>,
pub charges: Option<Vec<SubscriptionChargeOverride>>,
}Expand description
Plan overrides to customize a plan for a specific subscription.
Fields§
§amount_cents: Option<i64>Override the base amount in cents.
amount_currency: Option<String>Override the currency.
description: Option<String>Override the plan description.
invoice_display_name: Option<String>Override the invoice display name.
name: Option<String>Override the plan name.
tax_codes: Option<Vec<String>>Override the tax codes.
trial_period: Option<f64>Override the trial period in days.
minimum_commitment: Option<SubscriptionMinimumCommitmentOverride>Override the minimum commitment.
charges: Option<Vec<SubscriptionChargeOverride>>Override specific charges.
Implementations§
Source§impl SubscriptionPlanOverrides
impl SubscriptionPlanOverrides
Sourcepub fn with_amount_cents(self, amount_cents: i64) -> Self
pub fn with_amount_cents(self, amount_cents: i64) -> Self
Sets the amount in cents override.
Sourcepub fn with_amount_currency(self, currency: String) -> Self
pub fn with_amount_currency(self, currency: String) -> Self
Sets the currency override.
Sourcepub fn with_description(self, description: String) -> Self
pub fn with_description(self, description: String) -> Self
Sets the description override.
Sourcepub fn with_invoice_display_name(self, name: String) -> Self
pub fn with_invoice_display_name(self, name: String) -> Self
Sets the invoice display name override.
Sourcepub fn with_trial_period(self, days: f64) -> Self
pub fn with_trial_period(self, days: f64) -> Self
Sets the trial period override.
Trait Implementations§
Source§impl Clone for SubscriptionPlanOverrides
impl Clone for SubscriptionPlanOverrides
Source§fn clone(&self) -> SubscriptionPlanOverrides
fn clone(&self) -> SubscriptionPlanOverrides
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SubscriptionPlanOverrides
impl Debug for SubscriptionPlanOverrides
Source§impl Default for SubscriptionPlanOverrides
impl Default for SubscriptionPlanOverrides
Source§fn default() -> SubscriptionPlanOverrides
fn default() -> SubscriptionPlanOverrides
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SubscriptionPlanOverrides
impl<'de> Deserialize<'de> for SubscriptionPlanOverrides
Source§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 Freeze for SubscriptionPlanOverrides
impl RefUnwindSafe for SubscriptionPlanOverrides
impl Send for SubscriptionPlanOverrides
impl Sync for SubscriptionPlanOverrides
impl Unpin for SubscriptionPlanOverrides
impl UnwindSafe for SubscriptionPlanOverrides
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more