Method: ProcessOut::Device#prefill
- Defined in:
- lib/processout/device.rb
#prefill(data) ⇒ Object
Prefills the object with the data passed as parameters Params:
data-
Hashof data
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/processout/device.rb', line 179 def prefill(data) if data.nil? return self end self.request_origin = data.fetch(:request_origin, self.request_origin) self.id = data.fetch(:id, self.id) self.channel = data.fetch(:channel, self.channel) self.ip_address = data.fetch(:ip_address, self.ip_address) self.user_agent = data.fetch(:user_agent, self.user_agent) self.header_accept = data.fetch(:header_accept, self.header_accept) self.header_referer = data.fetch(:header_referer, self.header_referer) self.app_color_depth = data.fetch(:app_color_depth, self.app_color_depth) self.app_java_enabled = data.fetch(:app_java_enabled, self.app_java_enabled) self.app_language = data.fetch(:app_language, self.app_language) self.app_screen_height = data.fetch(:app_screen_height, self.app_screen_height) self.app_screen_width = data.fetch(:app_screen_width, self.app_screen_width) self.app_timezone_offset = data.fetch(:app_timezone_offset, self.app_timezone_offset) self end |