Class: SchwabRb::DataObjects::UserPreferences::Offer

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) ⇒ Offer

Returns a new instance of Offer.



111
112
113
114
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 111

def initialize(data)
  @level2_permissions = data[:level2Permissions]
  @mkt_data_permission = data[:mktDataPermission]
end

Instance Attribute Details

#level2_permissionsObject (readonly)

Returns the value of attribute level2_permissions.



109
110
111
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 109

def level2_permissions
  @level2_permissions
end

#mkt_data_permissionObject (readonly)

Returns the value of attribute mkt_data_permission.



109
110
111
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 109

def mkt_data_permission
  @mkt_data_permission
end

Instance Method Details

#level2_permissions?Boolean

Returns:

  • (Boolean)


116
117
118
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 116

def level2_permissions?
  @level2_permissions
end

#to_hObject



120
121
122
123
124
125
# File 'lib/schwab_rb/data_objects/user_preferences.rb', line 120

def to_h
  {
    level2Permissions: @level2_permissions,
    mktDataPermission: @mkt_data_permission
  }
end