pub struct UpdateSubscriptionSchedule { /* private fields */ }
Expand description
Updates an existing subscription schedule.
Implementations§
Source§impl UpdateSubscriptionSchedule
impl UpdateSubscriptionSchedule
Sourcepub fn new(schedule: impl Into<SubscriptionScheduleId>) -> Self
pub fn new(schedule: impl Into<SubscriptionScheduleId>) -> Self
Construct a new UpdateSubscriptionSchedule
.
Sourcepub fn default_settings(
self,
default_settings: impl Into<UpdateSubscriptionScheduleDefaultSettings>,
) -> Self
pub fn default_settings( self, default_settings: impl Into<UpdateSubscriptionScheduleDefaultSettings>, ) -> Self
Object representing the subscription schedule’s default settings.
Sourcepub fn end_behavior(
self,
end_behavior: impl Into<SubscriptionScheduleEndBehavior>,
) -> Self
pub fn end_behavior( self, end_behavior: impl Into<SubscriptionScheduleEndBehavior>, ) -> Self
Behavior of the subscription schedule and underlying subscription when it ends.
Possible values are release
or cancel
with the default being release
.
release
will end the subscription schedule and keep the underlying subscription running.
cancel
will end the subscription schedule and cancel the underlying subscription.
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 phases(
self,
phases: impl Into<Vec<UpdateSubscriptionSchedulePhases>>,
) -> Self
pub fn phases( self, phases: impl Into<Vec<UpdateSubscriptionSchedulePhases>>, ) -> Self
List representing phases of the subscription schedule.
Each phase can be customized to have different durations, plans, and coupons.
If there are multiple phases, the end_date
of one phase will always equal the start_date
of the next phase.
Note that past phases can be omitted.
Sourcepub fn proration_behavior(
self,
proration_behavior: impl Into<UpdateSubscriptionScheduleProrationBehavior>,
) -> Self
pub fn proration_behavior( self, proration_behavior: impl Into<UpdateSubscriptionScheduleProrationBehavior>, ) -> Self
If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled.
The default value is create_prorations
.
Source§impl UpdateSubscriptionSchedule
impl UpdateSubscriptionSchedule
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 UpdateSubscriptionSchedule
impl Clone for UpdateSubscriptionSchedule
Source§fn clone(&self) -> UpdateSubscriptionSchedule
fn clone(&self) -> UpdateSubscriptionSchedule
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more