GoCardless Balances API.
Returns balance information for the Payment Account(s) associated with your creditor. Balances are read-only — there is no create or update endpoint.
Example
{:ok, %{items: balances}} = GoCardlessClient.Resources.Balances.list(client)
Enum.each(balances, fn b ->
IO.puts("#{b["currency"]}: #{b["amount"]}")
end)
Summary
Functions
@spec collect_all(GoCardlessClient.Client.t(), map(), keyword()) :: {:ok, [map()]} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Eagerly collects all balances into a list.
@spec list(GoCardlessClient.Client.t(), map(), keyword()) :: {:ok, %{items: [map()], meta: map()}} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Returns a page of balances. Accepts optional filter params.
@spec stream(GoCardlessClient.Client.t(), map(), keyword()) :: Enumerable.t()
Returns a lazy Stream over all pages of balances.