View Source Stripe.Capability (stripity_stripe v3.2.0)

This is an object representing a capability for a Stripe account.

Related guide: Account capabilities

Summary

Types

t()

The capability type.

Functions

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

Retrieves information about the specified Account Capability.

Updates an existing Account Capability. Request or remove a capability by updating its requested parameter.

Types

@type t() :: %Stripe.Capability{
  account: binary() | Stripe.Account.t(),
  future_requirements: term(),
  id: binary(),
  object: binary(),
  requested: boolean(),
  requested_at: integer() | nil,
  requirements: term(),
  status: binary()
}

The capability type.

  • account The account for which the capability enables functionality.
  • future_requirements
  • id The identifier for the capability.
  • object String representing the object's type. Objects of the same type share the same value.
  • requested Whether the capability has been requested.
  • requested_at Time at which the capability was requested. Measured in seconds since the Unix epoch.
  • requirements
  • status The status of the capability. Can be active, inactive, pending, or unrequested.

Functions

Link to this function

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

View Source
@spec list(
  account :: binary(),
  params :: %{optional(:expand) => [binary()]},
  opts :: Keyword.t()
) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

Details

  • Method: get
  • Path: /v1/accounts/{account}/capabilities
Link to this function

retrieve(account, capability, params \\ %{}, opts \\ [])

View Source
@spec retrieve(
  account :: binary(),
  capability :: binary(),
  params :: %{optional(:expand) => [binary()]},
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Retrieves information about the specified Account Capability.

Details

  • Method: get
  • Path: /v1/accounts/{account}/capabilities/{capability}
Link to this function

update(account, capability, params \\ %{}, opts \\ [])

View Source
@spec update(
  account :: binary(),
  capability :: binary(),
  params :: %{
    optional(:expand) => [binary()],
    optional(:requested) => boolean()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Updates an existing Account Capability. Request or remove a capability by updating its requested parameter.

Details

  • Method: post
  • Path: /v1/accounts/{account}/capabilities/{capability}