Class: Worldline::Connect::SDK::V1::Domain::CustomerDevice
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::CustomerDevice
- Defined in:
- lib/worldline/connect/sdk/v1/domain/customer_device.rb
Instance Attribute Summary collapse
-
#accept_header ⇒ String
The current value of accept_header.
-
#browser_data ⇒ Worldline::Connect::SDK::V1::Domain::BrowserData
The current value of browser_data.
-
#default_form_fill ⇒ String
The current value of default_form_fill.
-
#device_fingerprint_transaction_id ⇒ String
The current value of device_fingerprint_transaction_id.
-
#ip_address ⇒ String
The current value of ip_address.
-
#locale ⇒ String
The current value of locale.
-
#timezone_offset_utc_minutes ⇒ String
The current value of timezone_offset_utc_minutes.
-
#user_agent ⇒ String
The current value of user_agent.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#accept_header ⇒ String
Returns the current value of accept_header.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_device.rb', line 21 def accept_header @accept_header end |
#browser_data ⇒ Worldline::Connect::SDK::V1::Domain::BrowserData
Returns the current value of browser_data.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_device.rb', line 21 def browser_data @browser_data end |
#default_form_fill ⇒ String
Returns the current value of default_form_fill.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_device.rb', line 21 def default_form_fill @default_form_fill end |
#device_fingerprint_transaction_id ⇒ String
Returns the current value of device_fingerprint_transaction_id.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_device.rb', line 21 def device_fingerprint_transaction_id @device_fingerprint_transaction_id end |
#ip_address ⇒ String
Returns the current value of ip_address.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_device.rb', line 21 def ip_address @ip_address end |
#locale ⇒ String
Returns the current value of locale.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_device.rb', line 21 def locale @locale end |
#timezone_offset_utc_minutes ⇒ String
Returns the current value of timezone_offset_utc_minutes.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_device.rb', line 21 def timezone_offset_utc_minutes @timezone_offset_utc_minutes end |
#user_agent ⇒ String
Returns the current value of user_agent.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_device.rb', line 21 def user_agent @user_agent end |
Instance Method Details
#from_hash(hash) ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_device.rb', line 53 def from_hash(hash) super if hash.has_key? 'acceptHeader' @accept_header = hash['acceptHeader'] end if hash.has_key? 'browserData' raise TypeError, "value '%s' is not a Hash" % [hash['browserData']] unless hash['browserData'].is_a? Hash @browser_data = Worldline::Connect::SDK::V1::Domain::BrowserData.new_from_hash(hash['browserData']) end if hash.has_key? 'defaultFormFill' @default_form_fill = hash['defaultFormFill'] end if hash.has_key? 'deviceFingerprintTransactionId' @device_fingerprint_transaction_id = hash['deviceFingerprintTransactionId'] end if hash.has_key? 'ipAddress' @ip_address = hash['ipAddress'] end if hash.has_key? 'locale' @locale = hash['locale'] end if hash.has_key? 'timezoneOffsetUtcMinutes' @timezone_offset_utc_minutes = hash['timezoneOffsetUtcMinutes'] end if hash.has_key? 'userAgent' @user_agent = hash['userAgent'] end end |
#to_h ⇒ Hash
40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_device.rb', line 40 def to_h hash = super hash['acceptHeader'] = @accept_header unless @accept_header.nil? hash['browserData'] = @browser_data.to_h unless @browser_data.nil? hash['defaultFormFill'] = @default_form_fill unless @default_form_fill.nil? hash['deviceFingerprintTransactionId'] = @device_fingerprint_transaction_id unless @device_fingerprint_transaction_id.nil? hash['ipAddress'] = @ip_address unless @ip_address.nil? hash['locale'] = @locale unless @locale.nil? hash['timezoneOffsetUtcMinutes'] = @timezone_offset_utc_minutes unless @timezone_offset_utc_minutes.nil? hash['userAgent'] = @user_agent unless @user_agent.nil? hash end |