Class: InvestecOpenApi::Models::Balance

Inherits:
Base
  • Object
show all
Defined in:
lib/investec_open_api/models/balance.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Base

convert_param_value_to_date, convert_param_value_to_money, #initialize, rewrite_param_key

Constructor Details

This class inherits a constructor from InvestecOpenApi::Models::Base

Instance Attribute Details

#available_balanceObject (readonly)

Returns the value of attribute available_balance.



5
6
7
# File 'lib/investec_open_api/models/balance.rb', line 5

def available_balance
  @available_balance
end

#budget_balanceObject (readonly)

Returns the value of attribute budget_balance.



5
6
7
# File 'lib/investec_open_api/models/balance.rb', line 5

def budget_balance
  @budget_balance
end

#cash_balanceObject (readonly)

Returns the value of attribute cash_balance.



5
6
7
# File 'lib/investec_open_api/models/balance.rb', line 5

def cash_balance
  @cash_balance
end

#currencyObject (readonly)

Returns the value of attribute currency.



5
6
7
# File 'lib/investec_open_api/models/balance.rb', line 5

def currency
  @currency
end

#current_balanceObject (readonly)

Returns the value of attribute current_balance.



5
6
7
# File 'lib/investec_open_api/models/balance.rb', line 5

def current_balance
  @current_balance
end

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/investec_open_api/models/balance.rb', line 5

def id
  @id
end

#straight_balanceObject (readonly)

Returns the value of attribute straight_balance.



5
6
7
# File 'lib/investec_open_api/models/balance.rb', line 5

def straight_balance
  @straight_balance
end

Class Method Details

.from_api(params = {}) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/investec_open_api/models/balance.rb', line 13

def self.from_api(params = {})
  rewrite_param_key(params, "accountId", "id")

  convert_param_value_to_money(params, "currentBalance")
  convert_param_value_to_money(params, "availableBalance")
  convert_param_value_to_money(params, "budgetBalance")
  convert_param_value_to_money(params, "straightBalance")
  convert_param_value_to_money(params, "cashBalance")

  new params
end