Class: Falsify::ClientDetails
- Inherits:
-
Object
- Object
- Falsify::ClientDetails
- Defined in:
- lib/falsify/models/order/client_details.rb
Overview
Information about the browser that the customer used when they placed their order.
Instance Attribute Summary collapse
-
#accept_language ⇒ String
The languages and locales that the browser understands.
-
#browser_height ⇒ Integer
The browser screen height in pixels, if available.
-
#browser_ip ⇒ String
The browser IP address.
-
#browser_width ⇒ Integer
The browser screen width in pixels, if available.
-
#session_hash ⇒ String
A hash of the session.
-
#user_agent ⇒ String
Details of the browsing client, including software and operating versions.
Instance Method Summary collapse
Instance Attribute Details
#accept_language ⇒ String
The languages and locales that the browser understands.
6 7 8 |
# File 'lib/falsify/models/order/client_details.rb', line 6 def accept_language @accept_language end |
#browser_height ⇒ Integer
The browser screen height in pixels, if available.
9 10 11 |
# File 'lib/falsify/models/order/client_details.rb', line 9 def browser_height @browser_height end |
#browser_ip ⇒ String
The browser IP address.
12 13 14 |
# File 'lib/falsify/models/order/client_details.rb', line 12 def browser_ip @browser_ip end |
#browser_width ⇒ Integer
The browser screen width in pixels, if available.
15 16 17 |
# File 'lib/falsify/models/order/client_details.rb', line 15 def browser_width @browser_width end |
#session_hash ⇒ String
A hash of the session.
18 19 20 |
# File 'lib/falsify/models/order/client_details.rb', line 18 def session_hash @session_hash end |
#user_agent ⇒ String
Details of the browsing client, including software and operating versions.
21 22 23 |
# File 'lib/falsify/models/order/client_details.rb', line 21 def user_agent @user_agent end |
Instance Method Details
#create_from_hash(hash) ⇒ ClientDetails
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/falsify/models/order/client_details.rb', line 25 def create_from_hash(hash) cd = ClientDetails.new cd.accept_language = hash[:accept_language] cd.browser_height = hash[:browser_height] cd.browser_ip = hash[:browser_ip] cd.browser_width = hash[:browser_width] cd.session_hash = hash[:session_hash] cd.user_agent = hash[:user_agent] return cd end |