Class: Worldline::Connect::SDK::V1::Domain::FraudResults

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

Direct Known Subclasses

CardFraudResults

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#cybersource_decision_managerWorldline::Connect::SDK::V1::Domain::CybersourceDecisionManager

Returns the current value of cybersource_decision_manager.

Returns:



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

def cybersource_decision_manager
  @cybersource_decision_manager
end

#fraud_service_resultString

Returns the current value of fraud_service_result.

Returns:

  • (String)

    the current value of fraud_service_result



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

def fraud_service_result
  @fraud_service_result
end

#in_authWorldline::Connect::SDK::V1::Domain::InAuth

Returns the current value of in_auth.

Returns:



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

def in_auth
  @in_auth
end

#microsoft_fraud_protectionWorldline::Connect::SDK::V1::Domain::MicrosoftFraudResults

Returns the current value of microsoft_fraud_protection.

Returns:



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

def microsoft_fraud_protection
  @microsoft_fraud_protection
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/worldline/connect/sdk/v1/domain/fraud_results.rb', line 39

def from_hash(hash)
  super
  if hash.has_key? 'cybersourceDecisionManager'
    raise TypeError, "value '%s' is not a Hash" % [hash['cybersourceDecisionManager']] unless hash['cybersourceDecisionManager'].is_a? Hash
    @cybersource_decision_manager = Worldline::Connect::SDK::V1::Domain::CybersourceDecisionManager.new_from_hash(hash['cybersourceDecisionManager'])
  end
  if hash.has_key? 'fraudServiceResult'
    @fraud_service_result = hash['fraudServiceResult']
  end
  if hash.has_key? 'inAuth'
    raise TypeError, "value '%s' is not a Hash" % [hash['inAuth']] unless hash['inAuth'].is_a? Hash
    @in_auth = Worldline::Connect::SDK::V1::Domain::InAuth.new_from_hash(hash['inAuth'])
  end
  if hash.has_key? 'microsoftFraudProtection'
    raise TypeError, "value '%s' is not a Hash" % [hash['microsoftFraudProtection']] unless hash['microsoftFraudProtection'].is_a? Hash
    @microsoft_fraud_protection = Worldline::Connect::SDK::V1::Domain::MicrosoftFraudResults.new_from_hash(hash['microsoftFraudProtection'])
  end
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['cybersourceDecisionManager'] = @cybersource_decision_manager.to_h unless @cybersource_decision_manager.nil?
  hash['fraudServiceResult'] = @fraud_service_result unless @fraud_service_result.nil?
  hash['inAuth'] = @in_auth.to_h unless @in_auth.nil?
  hash['microsoftFraudProtection'] = @microsoft_fraud_protection.to_h unless @microsoft_fraud_protection.nil?
  hash
end