pub struct UpdatePlanInput {Show 15 fields
pub name: Option<String>,
pub code: Option<String>,
pub interval: Option<PlanInterval>,
pub amount_cents: Option<i64>,
pub amount_currency: Option<String>,
pub invoice_display_name: Option<String>,
pub description: Option<String>,
pub trial_period: Option<f64>,
pub pay_in_advance: Option<bool>,
pub bill_charges_monthly: Option<bool>,
pub tax_codes: Option<Vec<String>>,
pub charges: Option<Vec<CreatePlanChargeInput>>,
pub minimum_commitment: Option<CreateMinimumCommitmentInput>,
pub usage_thresholds: Option<Vec<CreateUsageThresholdInput>>,
pub cascade_updates: Option<bool>,
}Expand description
Input data for updating a plan.
Fields§
§name: Option<String>Name of the plan.
code: Option<String>Unique code for the plan.
interval: Option<PlanInterval>Billing interval.
amount_cents: Option<i64>Base amount in cents.
amount_currency: Option<String>Currency for the amount.
invoice_display_name: Option<String>Display name for invoices.
description: Option<String>Description of the plan.
trial_period: Option<f64>Trial period in days.
pay_in_advance: Option<bool>Whether the plan is billed in advance.
bill_charges_monthly: Option<bool>Whether charges are billed monthly for yearly plans.
tax_codes: Option<Vec<String>>Tax codes for this plan.
charges: Option<Vec<CreatePlanChargeInput>>Charges for this plan.
minimum_commitment: Option<CreateMinimumCommitmentInput>Minimum commitment for this plan.
usage_thresholds: Option<Vec<CreateUsageThresholdInput>>Usage thresholds for progressive billing.
cascade_updates: Option<bool>Whether to cascade updates to existing subscriptions.
Implementations§
Source§impl UpdatePlanInput
impl UpdatePlanInput
Sourcepub fn with_interval(self, interval: PlanInterval) -> Self
pub fn with_interval(self, interval: PlanInterval) -> Self
Sets the interval.
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.
Sourcepub fn with_amount_currency(self, currency: String) -> Self
pub fn with_amount_currency(self, currency: String) -> Self
Sets the currency.
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.
Sourcepub fn with_description(self, description: String) -> Self
pub fn with_description(self, description: String) -> Self
Sets the description.
Sourcepub fn with_trial_period(self, days: f64) -> Self
pub fn with_trial_period(self, days: f64) -> Self
Sets the trial period in days.
Sourcepub fn with_pay_in_advance(self, pay_in_advance: bool) -> Self
pub fn with_pay_in_advance(self, pay_in_advance: bool) -> Self
Sets whether the plan is billed in advance.
Sourcepub fn with_bill_charges_monthly(self, bill_charges_monthly: bool) -> Self
pub fn with_bill_charges_monthly(self, bill_charges_monthly: bool) -> Self
Sets whether charges are billed monthly.
Sourcepub fn with_tax_codes(self, tax_codes: Vec<String>) -> Self
pub fn with_tax_codes(self, tax_codes: Vec<String>) -> Self
Sets the tax codes.
Sourcepub fn with_charges(self, charges: Vec<CreatePlanChargeInput>) -> Self
pub fn with_charges(self, charges: Vec<CreatePlanChargeInput>) -> Self
Sets the charges.
Sourcepub fn with_minimum_commitment(
self,
minimum_commitment: CreateMinimumCommitmentInput,
) -> Self
pub fn with_minimum_commitment( self, minimum_commitment: CreateMinimumCommitmentInput, ) -> Self
Sets the minimum commitment.
Sourcepub fn with_usage_thresholds(
self,
usage_thresholds: Vec<CreateUsageThresholdInput>,
) -> Self
pub fn with_usage_thresholds( self, usage_thresholds: Vec<CreateUsageThresholdInput>, ) -> Self
Sets the usage thresholds.
Sourcepub fn with_cascade_updates(self, cascade_updates: bool) -> Self
pub fn with_cascade_updates(self, cascade_updates: bool) -> Self
Sets whether to cascade updates to existing subscriptions.
Trait Implementations§
Source§impl Clone for UpdatePlanInput
impl Clone for UpdatePlanInput
Source§fn clone(&self) -> UpdatePlanInput
fn clone(&self) -> UpdatePlanInput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more