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

#fraud_service_resultString

Returns the current value of fraud_service_result.

Returns:

  • (String)

    the current value of fraud_service_result



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

def fraud_service_result
  @fraud_service_result
end

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

Returns the current value of in_auth.

Returns:



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

def in_auth
  @in_auth
end

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

Returns the current value of microsoft_fraud_protection.

Returns:



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

def microsoft_fraud_protection
  @microsoft_fraud_protection
end

Instance Method Details

#from_hash(hash) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/worldline/connect/sdk/v1/domain/fraud_results.rb', line 34

def from_hash(hash)
  super
  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)


26
27
28
29
30
31
32
# File 'lib/worldline/connect/sdk/v1/domain/fraud_results.rb', line 26

def to_h
  hash = super
  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