Class: Worldline::Connect::SDK::V1::Domain::InAuth

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/in_auth.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#device_categoryString

Returns the current value of device_category.

Returns:

  • (String)

    the current value of device_category



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/in_auth.rb', line 17

def device_category
  @device_category
end

#device_idString

Returns the current value of device_id.

Returns:

  • (String)

    the current value of device_id



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/in_auth.rb', line 17

def device_id
  @device_id
end

#risk_scoreString

Returns the current value of risk_score.

Returns:

  • (String)

    the current value of risk_score



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/in_auth.rb', line 17

def risk_score
  @risk_score
end

#true_ip_addressString

Returns the current value of true_ip_address.

Returns:

  • (String)

    the current value of true_ip_address



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/in_auth.rb', line 17

def true_ip_address
  @true_ip_address
end

#true_ip_address_countryString

Returns the current value of true_ip_address_country.

Returns:

  • (String)

    the current value of true_ip_address_country



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/in_auth.rb', line 17

def true_ip_address_country
  @true_ip_address_country
end

Instance Method Details

#from_hash(hash) ⇒ Object



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/worldline/connect/sdk/v1/domain/in_auth.rb', line 40

def from_hash(hash)
  super
  if hash.has_key? 'deviceCategory'
    @device_category = hash['deviceCategory']
  end
  if hash.has_key? 'deviceId'
    @device_id = hash['deviceId']
  end
  if hash.has_key? 'riskScore'
    @risk_score = hash['riskScore']
  end
  if hash.has_key? 'trueIpAddress'
    @true_ip_address = hash['trueIpAddress']
  end
  if hash.has_key? 'trueIpAddressCountry'
    @true_ip_address_country = hash['trueIpAddressCountry']
  end
end

#to_hHash

Returns:

  • (Hash)


30
31
32
33
34
35
36
37
38
# File 'lib/worldline/connect/sdk/v1/domain/in_auth.rb', line 30

def to_h
  hash = super
  hash['deviceCategory'] = @device_category unless @device_category.nil?
  hash['deviceId'] = @device_id unless @device_id.nil?
  hash['riskScore'] = @risk_score unless @risk_score.nil?
  hash['trueIpAddress'] = @true_ip_address unless @true_ip_address.nil?
  hash['trueIpAddressCountry'] = @true_ip_address_country unless @true_ip_address_country.nil?
  hash
end