Stripe.CustomerBalanceTransaction (stripity_stripe v2.17.3) View Source

Work with Stripe Customer Balance Transactions objects.

You can:

  • Create a customer balance transaction
  • Retrieve a customer balance transaction
  • Update a customer balance transaction
  • List customer balance transactions

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

Link to this section Summary

Functions

Create a customer balance transaction.

List all Customer Balance Transactions.

Retrieve a Customer Balance Transaction.

Update a Customer Balance Transaction.

Link to this section Types

Specs

t() :: %{
  id: Stripe.id(),
  object: String.t(),
  amount: integer(),
  created: Stripe.timestamp(),
  credit_note: String.t() | Stripe.CreditNote.t() | nil,
  currency: String.t(),
  customer: Stripe.id() | Stripe.Customer.t(),
  description: String.t() | nil,
  ending_balance: integer(),
  invoice: Stripe.id() | Stripe.Invoice.t() | nil,
  livemode: boolean(),
  metadata: Stripe.Types.metadata(),
  type: String.t()
}

Link to this section Functions

Link to this function

create(customer, params, opts \\ [])

View Source

Specs

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

Create a customer balance transaction.

Link to this function

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

View Source

Specs

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

List all Customer Balance Transactions.

Link to this function

retrieve(customer, balance_transaction, opts \\ [])

View Source

Specs

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

Retrieve a Customer Balance Transaction.

Link to this function

update(customer, balance_transaction, params, opts \\ [])

View Source

Specs

update(
  Stripe.id() | Stripe.Customer.t(),
  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 Customer Balance Transaction.