pub struct UpdatePlan { /* private fields */ }
Expand description
Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.
Implementations§
Source§impl UpdatePlan
impl UpdatePlan
Sourcepub fn active(self, active: impl Into<bool>) -> Self
pub fn active(self, active: impl Into<bool>) -> Self
Whether the plan is currently available for new subscriptions.
Sourcepub fn expand(self, expand: impl Into<Vec<String>>) -> Self
pub fn expand(self, expand: impl Into<Vec<String>>) -> Self
Specifies which fields in the response should be expanded.
Sourcepub fn metadata(self, metadata: impl Into<HashMap<String, String>>) -> Self
pub fn metadata(self, metadata: impl Into<HashMap<String, String>>) -> Self
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
.
Sourcepub fn nickname(self, nickname: impl Into<String>) -> Self
pub fn nickname(self, nickname: impl Into<String>) -> Self
A brief description of the plan, hidden from customers.
Sourcepub fn product(self, product: impl Into<String>) -> Self
pub fn product(self, product: impl Into<String>) -> Self
The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule.
Sourcepub fn trial_period_days(self, trial_period_days: impl Into<u32>) -> Self
pub fn trial_period_days(self, trial_period_days: impl Into<u32>) -> Self
Default number of trial days when subscribing a customer to this plan using trial_from_plan=true
.
Source§impl UpdatePlan
impl UpdatePlan
Sourcepub async fn send<C: StripeClient>(
&self,
client: &C,
) -> Result<<Self as StripeRequest>::Output, C::Err>
pub async fn send<C: StripeClient>( &self, client: &C, ) -> Result<<Self as StripeRequest>::Output, C::Err>
Send the request and return the deserialized response.
Sourcepub fn send_blocking<C: StripeBlockingClient>(
&self,
client: &C,
) -> Result<<Self as StripeRequest>::Output, C::Err>
pub fn send_blocking<C: StripeBlockingClient>( &self, client: &C, ) -> Result<<Self as StripeRequest>::Output, C::Err>
Send the request and return the deserialized response, blocking until completion.
Trait Implementations§
Source§impl Clone for UpdatePlan
impl Clone for UpdatePlan
Source§fn clone(&self) -> UpdatePlan
fn clone(&self) -> UpdatePlan
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more