Class: OnlinePayments::SDK::Domain::BrowserData
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::BrowserData
- Defined in:
- lib/onlinepayments/sdk/domain/browser_data.rb
Instance Attribute Summary collapse
-
#color_depth ⇒ Integer
The current value of color_depth.
-
#java_enabled ⇒ true/false
The current value of java_enabled.
-
#java_script_enabled ⇒ true/false
The current value of java_script_enabled.
-
#screen_height ⇒ String
The current value of screen_height.
-
#screen_width ⇒ String
The current value of screen_width.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#color_depth ⇒ Integer
Returns the current value of color_depth.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/browser_data.rb', line 14 def color_depth @color_depth end |
#java_enabled ⇒ true/false
Returns the current value of java_enabled.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/browser_data.rb', line 14 def java_enabled @java_enabled end |
#java_script_enabled ⇒ true/false
Returns the current value of java_script_enabled.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/browser_data.rb', line 14 def java_script_enabled @java_script_enabled end |
#screen_height ⇒ String
Returns the current value of screen_height.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/browser_data.rb', line 14 def screen_height @screen_height end |
#screen_width ⇒ String
Returns the current value of screen_width.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/browser_data.rb', line 14 def screen_width @screen_width end |
Instance Method Details
#from_hash(hash) ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/onlinepayments/sdk/domain/browser_data.rb', line 32 def from_hash(hash) super @color_depth = hash['colorDepth'] if hash.key? 'colorDepth' @java_enabled = hash['javaEnabled'] if hash.key? 'javaEnabled' @java_script_enabled = hash['javaScriptEnabled'] if hash.key? 'javaScriptEnabled' @screen_height = hash['screenHeight'] if hash.key? 'screenHeight' @screen_width = hash['screenWidth'] if hash.key? 'screenWidth' end |
#to_h ⇒ Hash
22 23 24 25 26 27 28 29 30 |
# File 'lib/onlinepayments/sdk/domain/browser_data.rb', line 22 def to_h hash = super hash['colorDepth'] = @color_depth unless @color_depth.nil? hash['javaEnabled'] = @java_enabled unless @java_enabled.nil? hash['javaScriptEnabled'] = @java_script_enabled unless @java_script_enabled.nil? hash['screenHeight'] = @screen_height unless @screen_height.nil? hash['screenWidth'] = @screen_width unless @screen_width.nil? hash end |