Class: Lithic::Resources::Balances

Inherits:
Object
  • Object
show all
Defined in:
lib/lithic/resources/balances.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Balances

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Balances.

Parameters:



42
43
44
# File 'lib/lithic/resources/balances.rb', line 42

def initialize(client:)
  @client = client
end

Instance Method Details

#list(account_token: nil, balance_date: nil, business_account_token: nil, financial_account_type: nil, request_options: {}) ⇒ Lithic::Internal::SinglePage<Lithic::Models::Balance>

Some parameter documentations has been truncated, see Models::BalanceListParams for more details.

Get the balances for a program, business, or a given end-user account

Parameters:

  • account_token (String)

    List balances for all financial accounts of a given account_token.

  • balance_date (Time)

    UTC date and time of the balances to retrieve. Defaults to latest available bala

  • business_account_token (String)

    List balances for all financial accounts of a given business_account_token.

  • financial_account_type (Symbol, Lithic::Models::BalanceListParams::FinancialAccountType)

    List balances for a given Financial Account type.

  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/lithic/resources/balances.rb', line 26

def list(params = {})
  parsed, options = Lithic::BalanceListParams.dump_request(params)
  query = Lithic::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "v1/balances",
    query: query,
    page: Lithic::Internal::SinglePage,
    model: Lithic::Balance,
    options: options
  )
end