Class: Ingenico::Direct::SDK::Domain::CardFraudResults

Inherits:
Ingenico::Direct::SDK::DataObject show all
Defined in:
lib/ingenico/direct/sdk/domain/card_fraud_results.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Direct::SDK::DataObject

new_from_hash

Instance Attribute Details

#avs_resultString

Returns the current value of avs_result.

Returns:

  • (String)

    the current value of avs_result



13
14
15
# File 'lib/ingenico/direct/sdk/domain/card_fraud_results.rb', line 13

def avs_result
  @avs_result
end

#cvv_resultString

Returns the current value of cvv_result.

Returns:

  • (String)

    the current value of cvv_result



13
14
15
# File 'lib/ingenico/direct/sdk/domain/card_fraud_results.rb', line 13

def cvv_result
  @cvv_result
end

#fraud_service_resultString

Returns the current value of fraud_service_result.

Returns:

  • (String)

    the current value of fraud_service_result



13
14
15
# File 'lib/ingenico/direct/sdk/domain/card_fraud_results.rb', line 13

def fraud_service_result
  @fraud_service_result
end

Instance Method Details

#from_hash(hash) ⇒ Object



27
28
29
30
31
32
# File 'lib/ingenico/direct/sdk/domain/card_fraud_results.rb', line 27

def from_hash(hash)
  super
  @avs_result = hash['avsResult'] if hash.key? 'avsResult'
  @cvv_result = hash['cvvResult'] if hash.key? 'cvvResult'
  @fraud_service_result = hash['fraudServiceResult'] if hash.key? 'fraudServiceResult'
end

#to_hHash

Returns:

  • (Hash)


19
20
21
22
23
24
25
# File 'lib/ingenico/direct/sdk/domain/card_fraud_results.rb', line 19

def to_h
  hash = super
  hash['avsResult'] = @avs_result unless @avs_result.nil?
  hash['cvvResult'] = @cvv_result unless @cvv_result.nil?
  hash['fraudServiceResult'] = @fraud_service_result unless @fraud_service_result.nil?
  hash
end