SubscriptionSchedule
A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.
Related guide: Subscription schedules
Summary
Functions
Cancel a schedule
Create a schedule
List all schedules
Release a schedule
Retrieve a schedule
Update a schedule
Functions
@spec cancel(StripeElixir.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
Cancel a schedule
Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
@spec create(StripeElixir.Client.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
Create a schedule
Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.
@spec list(StripeElixir.Client.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
List all schedules
Retrieves the list of your subscription schedules.
@spec release(StripeElixir.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
Release a schedule
Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_subscription property.
@spec retrieve(StripeElixir.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
Retrieve a schedule
Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.
@spec update(StripeElixir.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
Update a schedule
Updates an existing subscription schedule.