View Source Stripe.Billing.CreditBalanceSummary (stripity_stripe v3.3.1)

Indicates the billing credit balance for billing credits granted to a customer.

Summary

Types

The billing credit applicability scope for which to fetch credit balance summary.

t()

The billing.credit_balance_summary type.

Functions

Retrieves the credit balance summary for a customer.

Types

@type applicability_scope() :: %{
  optional(:price_type) => :metered,
  optional(:prices) => [prices()]
}

The billing credit applicability scope for which to fetch credit balance summary.

@type filter() :: %{
  optional(:applicability_scope) => applicability_scope(),
  optional(:credit_grant) => binary(),
  optional(:type) => :applicability_scope | :credit_grant
}
@type prices() :: %{optional(:id) => binary()}
@type t() :: %Stripe.Billing.CreditBalanceSummary{
  balances: term(),
  customer: binary() | Stripe.Customer.t() | Stripe.DeletedCustomer.t(),
  livemode: boolean(),
  object: binary()
}

The billing.credit_balance_summary type.

  • balances The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry.
  • customer The customer the balance is for.
  • livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
  • object String representing the object's type. Objects of the same type share the same value.

Functions

Link to this function

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

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

Retrieves the credit balance summary for a customer.

Details

  • Method: get
  • Path: /v1/billing/credit_balance_summary