Class: Worldline::Connect::SDK::V1::Domain::CardFraudResults

Inherits:
FraudResults show all
Defined in:
lib/worldline/connect/sdk/v1/domain/card_fraud_results.rb

Instance Attribute Summary collapse

Attributes inherited from FraudResults

#fraud_service_result, #in_auth, #microsoft_fraud_protection

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#avs_resultString

Returns the current value of avs_result.

Returns:

  • (String)

    the current value of avs_result



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

def avs_result
  @avs_result
end

#cvv_resultString

Returns the current value of cvv_result.

Returns:

  • (String)

    the current value of cvv_result



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

def cvv_result
  @cvv_result
end

#fraugsterWorldline::Connect::SDK::V1::Domain::FraugsterResults

Returns the current value of fraugster.

Returns:



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

def fraugster
  @fraugster
end

#retail_decisionsWorldline::Connect::SDK::V1::Domain::FraudResultsRetailDecisions

Returns the current value of retail_decisions.

Returns:



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

def retail_decisions
  @retail_decisions
end

Instance Method Details

#from_hash(hash) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/worldline/connect/sdk/v1/domain/card_fraud_results.rb', line 38

def from_hash(hash)
  super
  if hash.has_key? 'avsResult'
    @avs_result = hash['avsResult']
  end
  if hash.has_key? 'cvvResult'
    @cvv_result = hash['cvvResult']
  end
  if hash.has_key? 'fraugster'
    raise TypeError, "value '%s' is not a Hash" % [hash['fraugster']] unless hash['fraugster'].is_a? Hash
    @fraugster = Worldline::Connect::SDK::V1::Domain::FraugsterResults.new_from_hash(hash['fraugster'])
  end
  if hash.has_key? 'retailDecisions'
    raise TypeError, "value '%s' is not a Hash" % [hash['retailDecisions']] unless hash['retailDecisions'].is_a? Hash
    @retail_decisions = Worldline::Connect::SDK::V1::Domain::FraudResultsRetailDecisions.new_from_hash(hash['retailDecisions'])
  end
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['avsResult'] = @avs_result unless @avs_result.nil?
  hash['cvvResult'] = @cvv_result unless @cvv_result.nil?
  hash['fraugster'] = @fraugster.to_h unless @fraugster.nil?
  hash['retailDecisions'] = @retail_decisions.to_h unless @retail_decisions.nil?
  hash
end