Class: Falsify::ClientDetails

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#accept_languageString

The languages and locales that the browser understands.

Returns:

  • (String)


6
7
8
# File 'lib/falsify/models/order/client_details.rb', line 6

def accept_language
  @accept_language
end

#browser_heightInteger

The browser screen height in pixels, if available.

Returns:

  • (Integer)


9
10
11
# File 'lib/falsify/models/order/client_details.rb', line 9

def browser_height
  @browser_height
end

#browser_ipString

The browser IP address.

Returns:

  • (String)


12
13
14
# File 'lib/falsify/models/order/client_details.rb', line 12

def browser_ip
  @browser_ip
end

#browser_widthInteger

The browser screen width in pixels, if available.

Returns:

  • (Integer)


15
16
17
# File 'lib/falsify/models/order/client_details.rb', line 15

def browser_width
  @browser_width
end

#session_hashString

A hash of the session.

Returns:

  • (String)


18
19
20
# File 'lib/falsify/models/order/client_details.rb', line 18

def session_hash
  @session_hash
end

#user_agentString

Details of the browsing client, including software and operating versions.

Returns:

  • (String)


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

Parameters:

  • hash (Hash)

Returns:



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