Class: Worldline::Connect::SDK::V1::Domain::MicrosoftFraudResults
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::MicrosoftFraudResults
- Defined in:
- lib/worldline/connect/sdk/v1/domain/microsoft_fraud_results.rb
Instance Attribute Summary collapse
-
#clause_name ⇒ String
The current value of clause_name.
-
#device_country_code ⇒ String
The current value of device_country_code.
-
#device_id ⇒ String
The current value of device_id.
-
#fraud_score ⇒ Integer
The current value of fraud_score.
-
#policy_applied ⇒ String
The current value of policy_applied.
-
#reason_codes ⇒ Array<String>
The current value of reason_codes.
-
#true_ip_address ⇒ String
The current value of true_ip_address.
-
#user_device_type ⇒ String
The current value of user_device_type.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#clause_name ⇒ String
Returns 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_code ⇒ String
Returns 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_id ⇒ String
Returns 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_score ⇒ Integer
Returns 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_applied ⇒ String
Returns 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_codes ⇒ Array<String>
Returns 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_address ⇒ String
Returns 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_type ⇒ String
Returns 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_h ⇒ 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 |