Method: ProcessOut::Device#initialize
- Defined in:
- lib/processout/device.rb
#initialize(client, data = {}) ⇒ Device
Initializes the Device object Params:
client-
ProcessOutclient instance data-
data that can be used to fill the object
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/processout/device.rb', line 83 def initialize(client, data = {}) @client = client self.request_origin = data.fetch(:request_origin, nil) self.id = data.fetch(:id, nil) self.channel = data.fetch(:channel, nil) self.ip_address = data.fetch(:ip_address, nil) self.user_agent = data.fetch(:user_agent, nil) self.header_accept = data.fetch(:header_accept, nil) self.header_referer = data.fetch(:header_referer, nil) self.app_color_depth = data.fetch(:app_color_depth, nil) self.app_java_enabled = data.fetch(:app_java_enabled, nil) self.app_language = data.fetch(:app_language, nil) self.app_screen_height = data.fetch(:app_screen_height, nil) self.app_screen_width = data.fetch(:app_screen_width, nil) self.app_timezone_offset = data.fetch(:app_timezone_offset, nil) end |