Nombaone.Subscriptions.Schedule (Nomba One v0.1.0)

View Source

Scheduled (next-cycle) changes queued against a subscription — the safe way to switch billing intervals (mid-cycle interval proration is unsupported).

Summary

Functions

Queue a change for the next cycle boundary. :price_id is the price to switch to; optional :quantity.

Cancel the pending schedule before it applies.

Retrieve the subscription's schedule. Common errors: 404 SUBSCRIPTION_SCHEDULE_NOT_FOUND.

Functions

create(client, subscription_id, params, opts \\ [])

@spec create(Nombaone.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Nombaone.SubscriptionSchedule.t()} | {:error, Nombaone.Error.t()}

Queue a change for the next cycle boundary. :price_id is the price to switch to; optional :quantity.

Common errors: 409 SUBSCRIPTION_SCHEDULE_CONFLICT.

create!(client, subscription_id, params, opts \\ [])

Raising variant of create/4.

release(client, subscription_id, opts \\ [])

@spec release(Nombaone.Client.t(), String.t(), keyword()) ::
  {:ok, Nombaone.SubscriptionSchedule.t()} | {:error, Nombaone.Error.t()}

Cancel the pending schedule before it applies.

release!(client, subscription_id, opts \\ [])

Raising variant of release/3.

retrieve(client, subscription_id, opts \\ [])

@spec retrieve(Nombaone.Client.t(), String.t(), keyword()) ::
  {:ok, Nombaone.SubscriptionSchedule.t()} | {:error, Nombaone.Error.t()}

Retrieve the subscription's schedule. Common errors: 404 SUBSCRIPTION_SCHEDULE_NOT_FOUND.

retrieve!(client, subscription_id, opts \\ [])

Raising variant of retrieve/3.