Class: Io::Flow::V0::Models::BrowserInfo
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::BrowserInfo
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Shopper browser info used as part of card authentication. All of these fields are required if you are using 3DS2.
Instance Attribute Summary collapse
-
#accept ⇒ Object
readonly
Returns the value of attribute accept.
-
#color_depth ⇒ Object
readonly
Returns the value of attribute color_depth.
-
#java_enabled ⇒ Object
readonly
Returns the value of attribute java_enabled.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
-
#screen_height ⇒ Object
readonly
Returns the value of attribute screen_height.
-
#screen_width ⇒ Object
readonly
Returns the value of attribute screen_width.
-
#time_zone_offset ⇒ Object
readonly
Returns the value of attribute time_zone_offset.
-
#user_agent ⇒ Object
readonly
Returns the value of attribute user_agent.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ BrowserInfo
constructor
A new instance of BrowserInfo.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ BrowserInfo
Returns a new instance of BrowserInfo.
32638 32639 32640 32641 32642 32643 32644 32645 32646 32647 32648 32649 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32638 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @origin = (x = opts.delete(:origin); x.nil? ? nil : HttpClient::Preconditions.assert_class('origin', x, String)) @language = (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)) @java_enabled = (x = opts.delete(:java_enabled); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('java_enabled', x)) @color_depth = (x = opts.delete(:color_depth); x.nil? ? nil : HttpClient::Preconditions.assert_class('color_depth', x, Integer)) @screen_height = (x = opts.delete(:screen_height); x.nil? ? nil : HttpClient::Preconditions.assert_class('screen_height', x, Integer)) @screen_width = (x = opts.delete(:screen_width); x.nil? ? nil : HttpClient::Preconditions.assert_class('screen_width', x, Integer)) @time_zone_offset = (x = opts.delete(:time_zone_offset); x.nil? ? nil : HttpClient::Preconditions.assert_class('time_zone_offset', x, Integer)) @user_agent = (x = opts.delete(:user_agent); x.nil? ? nil : HttpClient::Preconditions.assert_class('user_agent', x, String)) @accept = (x = opts.delete(:accept); x.nil? ? nil : HttpClient::Preconditions.assert_class('accept', x, String)) end |
Instance Attribute Details
#accept ⇒ Object (readonly)
Returns the value of attribute accept.
32636 32637 32638 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32636 def accept @accept end |
#color_depth ⇒ Object (readonly)
Returns the value of attribute color_depth.
32636 32637 32638 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32636 def color_depth @color_depth end |
#java_enabled ⇒ Object (readonly)
Returns the value of attribute java_enabled.
32636 32637 32638 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32636 def java_enabled @java_enabled end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
32636 32637 32638 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32636 def language @language end |
#origin ⇒ Object (readonly)
Returns the value of attribute origin.
32636 32637 32638 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32636 def origin @origin end |
#screen_height ⇒ Object (readonly)
Returns the value of attribute screen_height.
32636 32637 32638 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32636 def screen_height @screen_height end |
#screen_width ⇒ Object (readonly)
Returns the value of attribute screen_width.
32636 32637 32638 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32636 def screen_width @screen_width end |
#time_zone_offset ⇒ Object (readonly)
Returns the value of attribute time_zone_offset.
32636 32637 32638 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32636 def time_zone_offset @time_zone_offset end |
#user_agent ⇒ Object (readonly)
Returns the value of attribute user_agent.
32636 32637 32638 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32636 def user_agent @user_agent end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
32655 32656 32657 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32655 def copy(incoming={}) BrowserInfo.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
32659 32660 32661 32662 32663 32664 32665 32666 32667 32668 32669 32670 32671 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32659 def to_hash { :origin => origin, :language => language, :java_enabled => java_enabled, :color_depth => color_depth, :screen_height => screen_height, :screen_width => screen_width, :time_zone_offset => time_zone_offset, :user_agent => user_agent, :accept => accept } end |
#to_json ⇒ Object
32651 32652 32653 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32651 def to_json JSON.dump(to_hash) end |