Class: Worldline::Connect::SDK::V1::Domain::CashPaymentMethodSpecificOutput

Inherits:
AbstractPaymentMethodSpecificOutput show all
Defined in:
lib/worldline/connect/sdk/v1/domain/cash_payment_method_specific_output.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractPaymentMethodSpecificOutput

#payment_product_id

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#fraud_resultsWorldline::Connect::SDK::V1::Domain::FraudResults

Returns the current value of fraud_results.

Returns:



14
15
16
# File 'lib/worldline/connect/sdk/v1/domain/cash_payment_method_specific_output.rb', line 14

def fraud_results
  @fraud_results
end

Instance Method Details

#from_hash(hash) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/worldline/connect/sdk/v1/domain/cash_payment_method_specific_output.rb', line 25

def from_hash(hash)
  super
  if hash.has_key? 'fraudResults'
    raise TypeError, "value '%s' is not a Hash" % [hash['fraudResults']] unless hash['fraudResults'].is_a? Hash
    @fraud_results = Worldline::Connect::SDK::V1::Domain::FraudResults.new_from_hash(hash['fraudResults'])
  end
end

#to_hHash

Returns:

  • (Hash)


19
20
21
22
23
# File 'lib/worldline/connect/sdk/v1/domain/cash_payment_method_specific_output.rb', line 19

def to_h
  hash = super
  hash['fraudResults'] = @fraud_results.to_h unless @fraud_results.nil?
  hash
end