View Source Stripe.Entitlements.Feature (stripity_stripe v3.3.1)
A feature represents a monetizable ability or functionality in your system. Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer.
Summary
Functions
Creates a feature
Retrieve a list of features
Retrieves a feature
Update a feature’s metadata or permanently deactivate it.
Types
@type t() :: %Stripe.Entitlements.Feature{ active: boolean(), id: binary(), livemode: boolean(), lookup_key: binary(), metadata: term(), name: binary(), object: binary() }
The entitlements.feature type.
activeInactive features cannot be attached to new products and will not be returned from the features list endpoint.idUnique identifier for the object.livemodeHas the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.lookup_keyA unique key you provide as your own system identifier. This may be up to 80 characters.metadataSet of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.nameThe feature's name, for your own purpose, not meant to be displayable to the customer.objectString representing the object's type. Objects of the same type share the same value.
Functions
@spec create( params :: %{ optional(:expand) => [binary()], optional(:lookup_key) => binary(), optional(:metadata) => %{optional(binary()) => binary()}, optional(:name) => binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Creates a feature
Details
- Method:
post - Path:
/v1/entitlements/features
@spec list( params :: %{ optional(:archived) => boolean(), optional(:ending_before) => binary(), optional(:expand) => [binary()], optional(:limit) => integer(), optional(:lookup_key) => binary(), optional(:starting_after) => binary() }, opts :: Keyword.t() ) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Retrieve a list of features
Details
- Method:
get - Path:
/v1/entitlements/features
@spec retrieve( id :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Retrieves a feature
Details
- Method:
get - Path:
/v1/entitlements/features/{id}
@spec update( id :: binary(), params :: %{ optional(:active) => boolean(), optional(:expand) => [binary()], optional(:metadata) => %{optional(binary()) => binary()} | binary(), optional(:name) => binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Update a feature’s metadata or permanently deactivate it.
Details
- Method:
post - Path:
/v1/entitlements/features/{id}