Class: Ingenico::Connect::SDK::Domain::Definitions::InAuth

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/definitions/in_auth.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#device_categoryString



16
17
18
# File 'lib/ingenico/connect/sdk/domain/definitions/in_auth.rb', line 16

def device_category
  @device_category
end

#device_idString



16
17
18
# File 'lib/ingenico/connect/sdk/domain/definitions/in_auth.rb', line 16

def device_id
  @device_id
end

#risk_scoreString



16
17
18
# File 'lib/ingenico/connect/sdk/domain/definitions/in_auth.rb', line 16

def risk_score
  @risk_score
end

#true_ip_addressString



16
17
18
# File 'lib/ingenico/connect/sdk/domain/definitions/in_auth.rb', line 16

def true_ip_address
  @true_ip_address
end

#true_ip_address_countryString



16
17
18
# File 'lib/ingenico/connect/sdk/domain/definitions/in_auth.rb', line 16

def true_ip_address_country
  @true_ip_address_country
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

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



29
30
31
32
33
34
35
36
37
# File 'lib/ingenico/connect/sdk/domain/definitions/in_auth.rb', line 29

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