Money.Subscription.cancel_pending_plan
You're seeing just the function
cancel_pending_plan
, go back to Money.Subscription module for more information.
Specs
Cancel a subscription's pending plan.
A pending plan arise when a a Subscription.change_plan/3
has
been executed but the effective date is in the future. Only
one plan may be pending at any one time so that if
Subscription.change_plan/3
is attemtped a second time an
error tuple will be returned.
Subscription.cancel_pending_plan/2
can be used to roll back the pending plan change.
Arguments
:subscription
is anyMoney.Subscription.t
:options
is aKeyword.t
Options
:today
is aDate.t
that represents today. The default isDate.utc_today
Returns
- An updated
Money.Subscription.t
which may or may not have had a pending plan. If it did have a pending plan that plan is deleted. If there was no pending plan then the subscription is returned unchanged.