Class: SchwabRb::DataObjects::UserPreferences::UserAccount
- Inherits:
-
Object
- Object
- SchwabRb::DataObjects::UserPreferences::UserAccount
- Defined in:
- lib/schwab_rb/data_objects/user_preferences.rb
Instance Attribute Summary collapse
-
#account_color ⇒ Object
readonly
Returns the value of attribute account_color.
-
#account_number ⇒ Object
readonly
Returns the value of attribute account_number.
-
#auto_position_effect ⇒ Object
readonly
Returns the value of attribute auto_position_effect.
-
#display_acct_id ⇒ Object
readonly
Returns the value of attribute display_acct_id.
-
#lot_selection_method ⇒ Object
readonly
Returns the value of attribute lot_selection_method.
-
#nick_name ⇒ Object
readonly
Returns the value of attribute nick_name.
-
#primary_account ⇒ Object
readonly
Returns the value of attribute primary_account.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #auto_position_effect? ⇒ Boolean
-
#initialize(data) ⇒ UserAccount
constructor
A new instance of UserAccount.
- #primary_account? ⇒ Boolean
- #to_h ⇒ Object
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] @primary_account = 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_color ⇒ Object (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 @account_color end |
#account_number ⇒ Object (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 @account_number end |
#auto_position_effect ⇒ Object (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_id ⇒ Object (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_method ⇒ Object (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_name ⇒ Object (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_account ⇒ Object (readonly)
Returns the value of attribute primary_account.
49 50 51 |
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 49 def primary_account @primary_account end |
#type ⇒ Object (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
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
63 64 65 |
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 63 def primary_account? @primary_account end |
#to_h ⇒ Object
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: @primary_account, type: @type, nickName: @nick_name, displayAcctId: @display_acct_id, autoPositionEffect: @auto_position_effect, accountColor: @account_color, lotSelectionMethod: @lot_selection_method } end |