class Ingenico::Connect::SDK::Domain::Definitions::CardFraudResults

@attr [String] avs_result @attr [String] cvv_result @attr [Ingenico::Connect::SDK::Domain::Definitions::FraugsterResults] fraugster @attr [Ingenico::Connect::SDK::Domain::Definitions::FraudResultsRetailDecisions] retail_decisions

Attributes

avs_result[RW]
cvv_result[RW]
fraugster[RW]
retail_decisions[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/definitions/card_fraud_results.rb, line 37
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 = Ingenico::Connect::SDK::Domain::Definitions::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 = Ingenico::Connect::SDK::Domain::Definitions::FraudResultsRetailDecisions.new_from_hash(hash['retailDecisions'])
  end
end
to_h() click to toggle source

@return (Hash)

# File lib/ingenico/connect/sdk/domain/definitions/card_fraud_results.rb, line 28
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