Class: Ingenico::Connect::SDK::Domain::Definitions::CardFraudResults

Inherits:
FraudResults show all
Defined in:
lib/ingenico/connect/sdk/domain/definitions/card_fraud_results.rb

Instance Attribute Summary collapse

Attributes inherited from FraudResults

#fraud_service_result

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#avs_resultObject

String



15
16
17
# File 'lib/ingenico/connect/sdk/domain/definitions/card_fraud_results.rb', line 15

def avs_result
  @avs_result
end

#cvv_resultObject

String



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

def cvv_result
  @cvv_result
end

#retail_decisionsObject



21
22
23
# File 'lib/ingenico/connect/sdk/domain/definitions/card_fraud_results.rb', line 21

def retail_decisions
  @retail_decisions
end

Instance Method Details

#from_hash(hash) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/ingenico/connect/sdk/domain/definitions/card_fraud_results.rb', line 31

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?('retailDecisions')
    if !(hash['retailDecisions'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['retailDecisions']]
    end
    @retail_decisions = Ingenico::Connect::SDK::Domain::Definitions::FraudResultsRetailDecisions.new_from_hash(hash['retailDecisions'])
  end
end

#to_hObject



23
24
25
26
27
28
29
# File 'lib/ingenico/connect/sdk/domain/definitions/card_fraud_results.rb', line 23

def to_h
  hash = super
  add_to_hash(hash, 'avsResult', @avs_result)
  add_to_hash(hash, 'cvvResult', @cvv_result)
  add_to_hash(hash, 'retailDecisions', @retail_decisions)
  hash
end