class Ingenico::Direct::SDK::Domain::BrowserData
@attr [Integer] color_depth
@attr [true/false] java_enabled
@attr [true/false] java_script_enabled
@attr [String] screen_height
@attr [String] screen_width
Attributes
color_depth[RW]
java_enabled[RW]
java_script_enabled[RW]
screen_height[RW]
screen_width[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Direct::SDK::DataObject#from_hash
# File lib/ingenico/direct/sdk/domain/browser_data.rb, line 33 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()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/browser_data.rb, line 23 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