class Ingenico::Connect::SDK::Domain::Payment::BrowserData

@attr [Integer] color_depth @attr [String] inner_height @attr [String] inner_width @attr [true/false] java_enabled @attr [true/false] java_script_enabled @attr [String] screen_height @attr [String] screen_width

Attributes

color_depth[RW]
inner_height[RW]
inner_width[RW]
java_enabled[RW]
java_script_enabled[RW]
screen_height[RW]
screen_width[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/payment/browser_data.rb, line 47
def from_hash(hash)
  super
  if hash.has_key? 'colorDepth'
    @color_depth = hash['colorDepth']
  end
  if hash.has_key? 'innerHeight'
    @inner_height = hash['innerHeight']
  end
  if hash.has_key? 'innerWidth'
    @inner_width = hash['innerWidth']
  end
  if hash.has_key? 'javaEnabled'
    @java_enabled = hash['javaEnabled']
  end
  if hash.has_key? 'javaScriptEnabled'
    @java_script_enabled = hash['javaScriptEnabled']
  end
  if hash.has_key? 'screenHeight'
    @screen_height = hash['screenHeight']
  end
  if hash.has_key? 'screenWidth'
    @screen_width = hash['screenWidth']
  end
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/payment/browser_data.rb, line 35
def to_h
  hash = super
  hash['colorDepth'] = @color_depth unless @color_depth.nil?
  hash['innerHeight'] = @inner_height unless @inner_height.nil?
  hash['innerWidth'] = @inner_width unless @inner_width.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