Class: SchwabRb::DataObjects::UserPreferences::UserAccount

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ UserAccount

Returns a new instance of UserAccount.



52
53
54
55
56
57
58
59
60
61
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 52

def initialize(data)
  @account_number = data[:accountNumber]
   = data[:primaryAccount]
  @type = data[:type]
  @nick_name = data[:nickName]
  @display_acct_id = data[:displayAcctId]
  @auto_position_effect = data[:autoPositionEffect]
  @account_color = data[:accountColor]
  @lot_selection_method = data[:lotSelectionMethod]
end

Instance Attribute Details

#account_colorObject (readonly)

Returns the value of attribute account_color.



49
50
51
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 49

def 
  @account_color
end

#account_numberObject (readonly)

Returns the value of attribute account_number.



49
50
51
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 49

def 
  @account_number
end

#auto_position_effectObject (readonly)

Returns the value of attribute auto_position_effect.



49
50
51
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 49

def auto_position_effect
  @auto_position_effect
end

#display_acct_idObject (readonly)

Returns the value of attribute display_acct_id.



49
50
51
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 49

def display_acct_id
  @display_acct_id
end

#lot_selection_methodObject (readonly)

Returns the value of attribute lot_selection_method.



49
50
51
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 49

def lot_selection_method
  @lot_selection_method
end

#nick_nameObject (readonly)

Returns the value of attribute nick_name.



49
50
51
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 49

def nick_name
  @nick_name
end

#primary_accountObject (readonly)

Returns the value of attribute primary_account.



49
50
51
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 49

def 
  
end

#typeObject (readonly)

Returns the value of attribute type.



49
50
51
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 49

def type
  @type
end

Instance Method Details

#auto_position_effect?Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 67

def auto_position_effect?
  @auto_position_effect
end

#primary_account?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 63

def primary_account?
  
end

#to_hObject



71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 71

def to_h
  {
    accountNumber: @account_number,
    primaryAccount: ,
    type: @type,
    nickName: @nick_name,
    displayAcctId: @display_acct_id,
    autoPositionEffect: @auto_position_effect,
    accountColor: @account_color,
    lotSelectionMethod: @lot_selection_method
  }
end