Class: Io::Flow::V0::Models::DeviceFingerprintDetailsBrowser

Inherits:
DeviceFingerprintDetails show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Overview

Used to identify device during 3ds verification.

Instance Attribute Summary collapse

Attributes inherited from DeviceFingerprintDetails

#type

Instance Method Summary collapse

Methods inherited from DeviceFingerprintDetails

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ DeviceFingerprintDetailsBrowser

Returns a new instance of DeviceFingerprintDetailsBrowser.



39675
39676
39677
39678
39679
39680
39681
39682
39683
39684
39685
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39675

def initialize(incoming={})
  super(:type => DeviceFingerprintDetails::Types::DEVICE_FINGERPRINT_DETAILS_BROWSER)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:java_enabled, :color_depth, :screen_height, :screen_width, :time_zone_offset], 'DeviceFingerprintDetailsBrowser')
  @accept = (x = opts.delete(:accept); x.nil? ? nil : HttpClient::Preconditions.assert_class('accept', x, String))
  @java_enabled = HttpClient::Preconditions.assert_boolean('java_enabled', opts.delete(:java_enabled))
  @color_depth = HttpClient::Preconditions.assert_class('color_depth', opts.delete(:color_depth), Integer)
  @screen_height = HttpClient::Preconditions.assert_class('screen_height', opts.delete(:screen_height), Integer)
  @screen_width = HttpClient::Preconditions.assert_class('screen_width', opts.delete(:screen_width), Integer)
  @time_zone_offset = HttpClient::Preconditions.assert_class('time_zone_offset', opts.delete(:time_zone_offset), Integer)
end

Instance Attribute Details

#acceptObject (readonly)

Returns the value of attribute accept.



39673
39674
39675
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39673

def accept
  @accept
end

#color_depthObject (readonly)

Returns the value of attribute color_depth.



39673
39674
39675
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39673

def color_depth
  @color_depth
end

#java_enabledObject (readonly)

Returns the value of attribute java_enabled.



39673
39674
39675
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39673

def java_enabled
  @java_enabled
end

#screen_heightObject (readonly)

Returns the value of attribute screen_height.



39673
39674
39675
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39673

def screen_height
  @screen_height
end

#screen_widthObject (readonly)

Returns the value of attribute screen_width.



39673
39674
39675
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39673

def screen_width
  @screen_width
end

#time_zone_offsetObject (readonly)

Returns the value of attribute time_zone_offset.



39673
39674
39675
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39673

def time_zone_offset
  @time_zone_offset
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



39691
39692
39693
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39691

def copy(incoming={})
  DeviceFingerprintDetailsBrowser.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



39695
39696
39697
39698
39699
39700
39701
39702
39703
39704
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39695

def subtype_to_hash
  {
    :accept => accept,
    :java_enabled => java_enabled,
    :color_depth => color_depth,
    :screen_height => screen_height,
    :screen_width => screen_width,
    :time_zone_offset => time_zone_offset
  }
end

#to_jsonObject



39687
39688
39689
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39687

def to_json
  JSON.dump(to_hash)
end