pub struct SubscriptionPause<'a> { /* private fields */ }
Expand description
Request builder for pausing a subscription.
Implementations§
Source§impl<'a> SubscriptionPause<'a>
impl<'a> SubscriptionPause<'a>
pub fn new( client: &'a Paddle, subscription_id: impl Into<SubscriptionID>, ) -> Self
Sourcepub fn effective_from(&mut self, effective_from: EffectiveFrom) -> &mut Self
pub fn effective_from(&mut self, effective_from: EffectiveFrom) -> &mut Self
When this subscription change should take effect from.
Defaults to next_billing_period
for active subscriptions, which creates a scheduled_change
to apply the subscription change at the end of the billing period.
Sourcepub fn resume_at(&mut self, datetime: DateTime<Utc>) -> &mut Self
pub fn resume_at(&mut self, datetime: DateTime<Utc>) -> &mut Self
Datetime of when the paused subscription should resume. Omit to pause indefinitely until resumed.
Sourcepub fn on_resume(&mut self, value: SubscriptionOnResume) -> &mut Self
pub fn on_resume(&mut self, value: SubscriptionOnResume) -> &mut Self
How Paddle should set the billing period for the subscription when resuming. If omitted, defaults to start_new_billing_period
.
Sourcepub async fn send(&self) -> Result<SuccessResponse<Subscription>, Error>
pub async fn send(&self) -> Result<SuccessResponse<Subscription>, Error>
Send the request to Paddle and return the response.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SubscriptionPause<'a>
impl<'a> RefUnwindSafe for SubscriptionPause<'a>
impl<'a> Send for SubscriptionPause<'a>
impl<'a> Sync for SubscriptionPause<'a>
impl<'a> Unpin for SubscriptionPause<'a>
impl<'a> UnwindSafe for SubscriptionPause<'a>
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