StripeElixir.Services.ProductFeatureService (stripe_elixir v0.1.0)

Copy Markdown View Source

ProductFeature

A product_feature represents an attachment between a feature and a product. When a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer.

Summary

Functions

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

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

Attach a feature to a product

Creates a product_feature, which represents a feature attachment to a product

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

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

Remove a feature from a product

Deletes the feature attachment to a product

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

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

List all features attached to a product

Retrieve a list of features for a product

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

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

Retrieve a product_feature

Retrieves a product_feature, which represents a feature attachment to a product