stripity_stripe v2.7.0 Stripe.Topup 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.
List Top-ups.
Retrieve a Top-up.
Update a Top-up.
Link to this section Types
Link to this type
t()
View Source
t()
View Source
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
}
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
Link to this function
cancel(id, opts \\ [])
View Source
cancel(id, opts \\ [])
View Source
cancel(Stripe.id() | t(), Stripe.options()) ::
{:ok, t()} | {:error, Stripe.Error.t()}
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
create(params, opts \\ [])
View Source
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(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
list(params \\ %{}, opts \\ [])
View Source
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(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
retrieve(id, opts \\ [])
View Source
retrieve(Stripe.id() | t(), Stripe.options()) ::
{:ok, t()} | {:error, Stripe.Error.t()}
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
update(id, params, opts \\ [])
View Source
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(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.