Stripe.Topup (stripity_stripe v2.17.3) View Source

Work with Stripe Connect top-up objects.

You can:

  • Create a top-up
  • Retrieve a top-up
  • Update a top-up
  • List all top-ups
  • Cancel a top-up

Stripe API reference: https://stripe.com/docs/api/topups

Link to this section Summary

Functions

Cancel a pending Top-up.

Create a Top-up.

Retrieve a Top-up.

Link to this section Types

Specs

t() :: %Stripe.Topup{
  amount: pos_integer(),
  balance_transaction: Stripe.id() | Stripe.BalanceTransaction.t() | nil,
  created: Stripe.timestamp(),
  currency: String.t(),
  description: String.t(),
  expected_availability_date: Stripe.timestamp() | nil,
  failure_code: String.t() | nil,
  failure_message: String.t() | nil,
  id: Stripe.id(),
  livemode: boolean(),
  metadata: Stripe.Types.metadata(),
  object: String.t(),
  source: Stripe.id() | Stripe.Source.t(),
  statement_descriptor: String.t() | nil,
  status: String.t(),
  transfer_group: String.t() | nil
}

Link to this section Functions

Specs

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

Cancel a pending Top-up.

Link to this function

create(params, opts \\ [])

View Source

Specs

create(params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
when params: %{
       :amount => pos_integer(),
       :currency => String.t(),
       optional(:description) => String.t(),
       optional(:metadata) => Stripe.Types.metadata(),
       optional(:source) => Stripe.Source.t(),
       optional(:statement_descriptor) => String.t(),
       optional(:transfer_group) => String.t()
     }

Create a Top-up.

Link to this function

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

View Source

Specs

list(params, Stripe.options()) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()}
when params: %{
       optional(:amount) => pos_integer() | Stripe.integer_query(),
       optional(:created) => Stripe.date_query(),
       optional(:ending_before) => t() | Stripe.id(),
       optional(:starting_after) => t() | Stripe.id(),
       optional(:limit) => 1..100,
       optional(:status) => String.t()
     }

List Top-ups.

Link to this function

retrieve(id, opts \\ [])

View Source

Specs

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

Retrieve a Top-up.

Link to this function

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

View Source

Specs

update(Stripe.id() | t(), params, Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}
when params: %{
       optional(:description) => String.t(),
       optional(:metadata) => Stripe.Types.metadata()
     }

Update a Top-up.