stripity_stripe v2.0.0-alpha.6 Stripe.Subscription

Work with Stripe subscription objects.

You can:

  • Create a subscription
  • Retrieve a subscription
  • Update a subscription
  • Delete a subscription

Does not yet render lists or take options.

Stripe API reference: https://stripe.com/docs/api#subscription

Summary

Functions

Create a subscription

Retrieve a subscription

Update a subscription

Types

t()
t :: %Stripe.Subscription{application_fee_percent: term, cancel_at_period_end: term, canceled_at: term, created: term, current_period_end: term, current_period_start: term, customer: term, ended_at: term, id: term, livemode: term, metadata: term, object: term, plan: term, quantity: term, source: term, start: term, status: term, tax_percent: term, trial_end: term, trial_start: term}

Functions

create(changes, opts \\ [])
create(map, Keyword.t) ::
  {:ok, t} |
  {:error, Stripe.api_error_struct}

Create a subscription.

delete(id, params \\ %{}, opts \\ [])
delete(binary, map, list) ::
  :ok |
  {:error, Stripe.api_error_struct}

Delete a subscription.

Takes the id and an optional map of params.

retrieve(id, opts \\ [])
retrieve(binary, Keyword.t) ::
  {:ok, t} |
  {:error, Stripe.api_error_struct}

Retrieve a subscription.

update(id, changes, opts \\ [])
update(binary, map, list) ::
  {:ok, t} |
  {:error, Stripe.api_error_struct}

Update a subscription.

Takes the id and a map of changes.