Search documentation of tiger_stripe

# Stripe.Services.SubscriptionItemService (tiger_stripe v0.1.1)

Copy Markdown View Source

SubscriptionItem

Subscription items allow you to create customer subscriptions with more than one plan, making it easy to represent complex billing relationships.

## Summary

### Functions

create(client, params \\ %{}, opts \\ [])

Create a subscription item

delete(client, item, params \\ %{}, opts \\ [])

Delete a subscription item

list(client, params \\ %{}, opts \\ [])

List all subscription items

retrieve(client, item, params \\ %{}, opts \\ [])

Retrieve a subscription item

update(client, item, params \\ %{}, opts \\ [])

Update a subscription item

## Functions

# create(client, params \\ %{}, opts \\ [])

    @spec create(Stripe.Client.t(), map(), keyword()) ::
      {:ok, term()} | {:error, Stripe.Error.t()}

Create a subscription item

Adds a new item to an existing subscription. No existing items will be changed or replaced.

# delete(client, item, params \\ %{}, opts \\ [])

    @spec delete(Stripe.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, Stripe.Error.t()}

Delete a subscription item

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

# list(client, params \\ %{}, opts \\ [])

    @spec list(Stripe.Client.t(), map(), keyword()) ::
      {:ok, term()} | {:error, Stripe.Error.t()}

List all subscription items

Returns a list of your subscription items for a given subscription.

# retrieve(client, item, params \\ %{}, opts \\ [])

    @spec retrieve(Stripe.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, Stripe.Error.t()}

Retrieve a subscription item

Retrieves the subscription item with the given ID.

# update(client, item, params \\ %{}, opts \\ [])

    @spec update(Stripe.Client.t(), String.t(), map(), keyword()) ::
      {:ok, term()} | {:error, Stripe.Error.t()}

Update a subscription item

Updates the plan or quantity of an item on a current subscription.