Class: Worldline::Connect::SDK::V1::Domain::MicrosoftFraudResults

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#clause_nameString

Returns the current value of clause_name.

Returns:

  • (String)

    the current value of clause_name



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/microsoft_fraud_results.rb', line 20

def clause_name
  @clause_name
end

#device_country_codeString

Returns the current value of device_country_code.

Returns:

  • (String)

    the current value of device_country_code



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/microsoft_fraud_results.rb', line 20

def device_country_code
  @device_country_code
end

#device_idString

Returns the current value of device_id.

Returns:

  • (String)

    the current value of device_id



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/microsoft_fraud_results.rb', line 20

def device_id
  @device_id
end

#fraud_scoreInteger

Returns the current value of fraud_score.

Returns:

  • (Integer)

    the current value of fraud_score



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/microsoft_fraud_results.rb', line 20

def fraud_score
  @fraud_score
end

#policy_appliedString

Returns the current value of policy_applied.

Returns:

  • (String)

    the current value of policy_applied



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/microsoft_fraud_results.rb', line 20

def policy_applied
  @policy_applied
end

#reason_codesArray<String>

Returns the current value of reason_codes.

Returns:

  • (Array<String>)

    the current value of reason_codes



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/microsoft_fraud_results.rb', line 20

def reason_codes
  @reason_codes
end

#true_ip_addressString

Returns the current value of true_ip_address.

Returns:

  • (String)

    the current value of true_ip_address



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/microsoft_fraud_results.rb', line 20

def true_ip_address
  @true_ip_address
end

#user_device_typeString

Returns the current value of user_device_type.

Returns:

  • (String)

    the current value of user_device_type



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/microsoft_fraud_results.rb', line 20

def user_device_type
  @user_device_type
end

Instance Method Details

#from_hash(hash) ⇒ Object



52
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
81
82
# File 'lib/worldline/connect/sdk/v1/domain/microsoft_fraud_results.rb', line 52

def from_hash(hash)
  super
  if hash.has_key? 'clauseName'
    @clause_name = hash['clauseName']
  end
  if hash.has_key? 'deviceCountryCode'
    @device_country_code = hash['deviceCountryCode']
  end
  if hash.has_key? 'deviceId'
    @device_id = hash['deviceId']
  end
  if hash.has_key? 'fraudScore'
    @fraud_score = hash['fraudScore']
  end
  if hash.has_key? 'policyApplied'
    @policy_applied = hash['policyApplied']
  end
  if hash.has_key? 'reasonCodes'
    raise TypeError, "value '%s' is not an Array" % [hash['reasonCodes']] unless hash['reasonCodes'].is_a? Array
    @reason_codes = []
    hash['reasonCodes'].each do |e|
      @reason_codes << e
    end
  end
  if hash.has_key? 'trueIpAddress'
    @true_ip_address = hash['trueIpAddress']
  end
  if hash.has_key? 'userDeviceType'
    @user_device_type = hash['userDeviceType']
  end
end

#to_hHash

Returns:

  • (Hash)


39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/worldline/connect/sdk/v1/domain/microsoft_fraud_results.rb', line 39

def to_h
  hash = super
  hash['clauseName'] = @clause_name unless @clause_name.nil?
  hash['deviceCountryCode'] = @device_country_code unless @device_country_code.nil?
  hash['deviceId'] = @device_id unless @device_id.nil?
  hash['fraudScore'] = @fraud_score unless @fraud_score.nil?
  hash['policyApplied'] = @policy_applied unless @policy_applied.nil?
  hash['reasonCodes'] = @reason_codes unless @reason_codes.nil?
  hash['trueIpAddress'] = @true_ip_address unless @true_ip_address.nil?
  hash['userDeviceType'] = @user_device_type unless @user_device_type.nil?
  hash
end