Class: OnlinePayments::SDK::Domain::CardFraudResults

Inherits:
OnlinePayments::SDK::DataObject show all
Defined in:
lib/onlinepayments/sdk/domain/card_fraud_results.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::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



12
13
14
# File 'lib/onlinepayments/sdk/domain/card_fraud_results.rb', line 12

def avs_result
  @avs_result
end

#cvv_resultString

Returns the current value of cvv_result.

Returns:

  • (String)

    the current value of cvv_result



12
13
14
# File 'lib/onlinepayments/sdk/domain/card_fraud_results.rb', line 12

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



12
13
14
# File 'lib/onlinepayments/sdk/domain/card_fraud_results.rb', line 12

def fraud_service_result
  @fraud_service_result
end

Instance Method Details

#from_hash(hash) ⇒ Object



26
27
28
29
30
31
# File 'lib/onlinepayments/sdk/domain/card_fraud_results.rb', line 26

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)


18
19
20
21
22
23
24
# File 'lib/onlinepayments/sdk/domain/card_fraud_results.rb', line 18

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