Stripe.ExternalAccount (stripity_stripe v2.17.3) View Source

Work with Stripe external account objects.

You can:

  • Create an external account
  • Retrieve an external account
  • Update an external account
  • Delete an external account

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

Link to this section Summary

Functions

Create an external account.

Delete an external account.

List all external accounts.

Retrieve an external account.

Update an external account.

Link to this section Types

Specs

create_params() :: %{
  default_for_currency: boolean() | nil,
  external_account: String.t(),
  metadata: Stripe.Types.metadata() | nil
}

Specs

Link to this section Functions

Link to this function

create(params, opts \\ [])

View Source

Specs

create(map(), Keyword.t()) :: {:ok, t()} | {:error, Stripe.Error.t()}

Create an external account.

Only accepts a token and not a hash of values.

Link to this function

delete(id, params, opts \\ [])

View Source

Specs

delete(Stripe.id() | t(), map(), Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}

Delete an external account.

Link to this function

list(atom, params, opts \\ [])

View Source

Specs

list(atom(), params, Stripe.options()) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()}
when params: %{
       :account => Stripe.id(),
       optional(:ending_before) => t() | Stripe.id(),
       optional(:limit) => 1..100,
       optional(:starting_after) => t() | Stripe.id()
     }

List all external accounts.

Takes either :bank_account or :card to determine which object to list.

Link to this function

retrieve(id, params, opts \\ [])

View Source

Specs

retrieve(Stripe.id() | t(), map(), Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}

Retrieve an external account.

Link to this function

update(id, params, opts \\ [])

View Source

Specs

update(Stripe.id() | t(), map(), Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}

Update an external account.