pub struct ResumeSubscription { /* private fields */ }
Expand description
Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations.
If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused.
If payment succeeds the subscription will become active
, and if payment fails the subscription will be past_due
.
The resumption invoice will void automatically if not paid by the expiration date.
Implementations§
Source§impl ResumeSubscription
impl ResumeSubscription
Sourcepub fn new(subscription: impl Into<SubscriptionId>) -> Self
pub fn new(subscription: impl Into<SubscriptionId>) -> Self
Construct a new ResumeSubscription
.
Sourcepub fn billing_cycle_anchor(
self,
billing_cycle_anchor: impl Into<ResumeSubscriptionBillingCycleAnchor>,
) -> Self
pub fn billing_cycle_anchor( self, billing_cycle_anchor: impl Into<ResumeSubscriptionBillingCycleAnchor>, ) -> Self
The billing cycle anchor that applies when the subscription is resumed.
Either now
or unchanged
.
The default is now
.
For more information, see the billing cycle documentation.
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 proration_behavior(
self,
proration_behavior: impl Into<ResumeSubscriptionProrationBehavior>,
) -> Self
pub fn proration_behavior( self, proration_behavior: impl Into<ResumeSubscriptionProrationBehavior>, ) -> Self
Determines how to handle prorations resulting from the billing_cycle_anchor
being unchanged
.
When the billing_cycle_anchor
is set to now
(default value), no prorations are generated.
If no value is passed, the default is create_prorations
.
Sourcepub fn proration_date(self, proration_date: impl Into<Timestamp>) -> Self
pub fn proration_date(self, proration_date: impl Into<Timestamp>) -> Self
If set, prorations will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same prorations that were previewed with the create preview endpoint.
Source§impl ResumeSubscription
impl ResumeSubscription
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 ResumeSubscription
impl Clone for ResumeSubscription
Source§fn clone(&self) -> ResumeSubscription
fn clone(&self) -> ResumeSubscription
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more