Class: SchwabRb::DataObjects::CurrentBalances

Inherits:
Object
  • Object
show all
Defined in:
lib/schwab_rb/data_objects/account.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(accrued_interest:, cash_balance:, cash_receipts:, long_option_market_value:, liquidation_value:, long_market_value:, money_market_fund:, savings:, short_market_value:, pending_deposits:, mutual_fund_value:, bond_value:, short_option_market_value:, available_funds:, available_funds_non_marginable_trade:, buying_power:, buying_power_non_marginable_trade:, day_trading_buying_power:, equity:, equity_percentage:, long_margin_value:, maintenance_call:, maintenance_requirement:, margin_balance:, reg_t_call:, short_balance:, short_margin_value:, sma:) ⇒ CurrentBalances

Returns a new instance of CurrentBalances.



149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/schwab_rb/data_objects/account.rb', line 149

def initialize(
  accrued_interest:, cash_balance:, cash_receipts:, long_option_market_value:, liquidation_value:,
  long_market_value:, money_market_fund:, savings:, short_market_value:, pending_deposits:,
  mutual_fund_value:, bond_value:, short_option_market_value:, available_funds:,
  available_funds_non_marginable_trade:, buying_power:, buying_power_non_marginable_trade:,
  day_trading_buying_power:, equity:, equity_percentage:, long_margin_value:, maintenance_call:,
  maintenance_requirement:, margin_balance:, reg_t_call:, short_balance:, short_margin_value:,
  sma:
)
  @accrued_interest = accrued_interest
  @cash_balance = cash_balance
  @cash_receipts = cash_receipts
  @long_option_market_value = long_option_market_value
  @liquidation_value = liquidation_value
  @long_market_value = long_market_value
  @money_market_fund = money_market_fund
  @savings = savings
  @short_market_value = short_market_value
  @pending_deposits = pending_deposits
  @mutual_fund_value = mutual_fund_value
  @bond_value = bond_value
  @short_option_market_value = short_option_market_value
  @available_funds = available_funds
  @available_funds_non_marginable_trade = available_funds_non_marginable_trade
  @buying_power = buying_power
  @buying_power_non_marginable_trade = buying_power_non_marginable_trade
  @day_trading_buying_power = day_trading_buying_power
  @equity = equity
  @equity_percentage = equity_percentage
  @long_margin_value = long_margin_value
  @maintenance_call = maintenance_call
  @maintenance_requirement = maintenance_requirement
  @margin_balance = margin_balance
  @reg_t_call = reg_t_call
  @short_balance = short_balance
  @short_margin_value = short_margin_value
  @sma = sma
end

Instance Attribute Details

#accrued_interestObject (readonly)

Returns the value of attribute accrued_interest.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def accrued_interest
  @accrued_interest
end

#available_fundsObject (readonly)

Returns the value of attribute available_funds.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def available_funds
  @available_funds
end

#available_funds_non_marginable_tradeObject (readonly)

Returns the value of attribute available_funds_non_marginable_trade.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def available_funds_non_marginable_trade
  @available_funds_non_marginable_trade
end

#bond_valueObject (readonly)

Returns the value of attribute bond_value.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def bond_value
  @bond_value
end

#buying_powerObject (readonly)

Returns the value of attribute buying_power.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def buying_power
  @buying_power
end

#buying_power_non_marginable_tradeObject (readonly)

Returns the value of attribute buying_power_non_marginable_trade.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def buying_power_non_marginable_trade
  @buying_power_non_marginable_trade
end

#cash_balanceObject (readonly)

Returns the value of attribute cash_balance.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def cash_balance
  @cash_balance
end

#cash_receiptsObject (readonly)

Returns the value of attribute cash_receipts.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def cash_receipts
  @cash_receipts
end

#day_trading_buying_powerObject (readonly)

Returns the value of attribute day_trading_buying_power.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def day_trading_buying_power
  @day_trading_buying_power
end

#equityObject (readonly)

Returns the value of attribute equity.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def equity
  @equity
end

#equity_percentageObject (readonly)

Returns the value of attribute equity_percentage.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def equity_percentage
  @equity_percentage
end

#liquidation_valueObject (readonly)

Returns the value of attribute liquidation_value.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def liquidation_value
  @liquidation_value
end

#long_margin_valueObject (readonly)

Returns the value of attribute long_margin_value.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def long_margin_value
  @long_margin_value
end

#long_market_valueObject (readonly)

Returns the value of attribute long_market_value.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def long_market_value
  @long_market_value
end

#long_option_market_valueObject (readonly)

Returns the value of attribute long_option_market_value.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def long_option_market_value
  @long_option_market_value
end

#maintenance_callObject (readonly)

Returns the value of attribute maintenance_call.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def maintenance_call
  @maintenance_call
end

#maintenance_requirementObject (readonly)

Returns the value of attribute maintenance_requirement.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def maintenance_requirement
  @maintenance_requirement
end

#margin_balanceObject (readonly)

Returns the value of attribute margin_balance.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def margin_balance
  @margin_balance
end

#money_market_fundObject (readonly)

Returns the value of attribute money_market_fund.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def money_market_fund
  @money_market_fund
end

#mutual_fund_valueObject (readonly)

Returns the value of attribute mutual_fund_value.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def mutual_fund_value
  @mutual_fund_value
end

#pending_depositsObject (readonly)

Returns the value of attribute pending_deposits.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def pending_deposits
  @pending_deposits
end

#reg_t_callObject (readonly)

Returns the value of attribute reg_t_call.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def reg_t_call
  @reg_t_call
end

#savingsObject (readonly)

Returns the value of attribute savings.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def savings
  @savings
end

#short_balanceObject (readonly)

Returns the value of attribute short_balance.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def short_balance
  @short_balance
end

#short_margin_valueObject (readonly)

Returns the value of attribute short_margin_value.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def short_margin_value
  @short_margin_value
end

#short_market_valueObject (readonly)

Returns the value of attribute short_market_value.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def short_market_value
  @short_market_value
end

#short_option_market_valueObject (readonly)

Returns the value of attribute short_option_market_value.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def short_option_market_value
  @short_option_market_value
end

#smaObject (readonly)

Returns the value of attribute sma.



105
106
107
# File 'lib/schwab_rb/data_objects/account.rb', line 105

def sma
  @sma
end

Class Method Details

.build(data) ⇒ Object



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/schwab_rb/data_objects/account.rb', line 115

def build(data)
  new(
    accrued_interest: data[:accruedInterest],
    cash_balance: data[:cashBalance],
    cash_receipts: data[:cashReceipts],
    long_option_market_value: data[:longOptionMarketValue],
    liquidation_value: data[:liquidationValue],
    long_market_value: data[:longMarketValue],
    money_market_fund: data[:moneyMarketFund],
    savings: data[:savings],
    short_market_value: data[:shortMarketValue],
    pending_deposits: data[:pendingDeposits],
    mutual_fund_value: data[:mutualFundValue],
    bond_value: data[:bondValue],
    short_option_market_value: data[:shortOptionMarketValue],
    available_funds: data[:availableFunds],
    available_funds_non_marginable_trade: data[:availableFundsNonMarginableTrade],
    buying_power: data[:buyingPower],
    buying_power_non_marginable_trade: data[:buyingPowerNonMarginableTrade],
    day_trading_buying_power: data[:dayTradingBuyingPower],
    equity: data[:equity],
    equity_percentage: data[:equityPercentage],
    long_margin_value: data[:longMarginValue],
    maintenance_call: data[:maintenanceCall],
    maintenance_requirement: data[:maintenanceRequirement],
    margin_balance: data[:marginBalance],
    reg_t_call: data[:regTCall],
    short_balance: data[:shortBalance],
    short_margin_value: data[:shortMarginValue],
    sma: data[:sma]
  )
end