Class: Ingenico::Direct::SDK::Domain::SepaDirectDebitPaymentMethodSpecificOutput

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

new_from_hash

Instance Attribute Details

#fraud_resultsIngenico::Direct::SDK::Domain::FraudResults

Returns the current value of fraud_results.

Returns:



15
16
17
# File 'lib/ingenico/direct/sdk/domain/sepa_direct_debit_payment_method_specific_output.rb', line 15

def fraud_results
  @fraud_results
end

#payment_product771_specific_outputIngenico::Direct::SDK::Domain::PaymentProduct771SpecificOutput

Returns the current value of payment_product771_specific_output.

Returns:



15
16
17
# File 'lib/ingenico/direct/sdk/domain/sepa_direct_debit_payment_method_specific_output.rb', line 15

def payment_product771_specific_output
  @payment_product771_specific_output
end

#payment_product_idInteger

Returns the current value of payment_product_id.

Returns:

  • (Integer)

    the current value of payment_product_id



15
16
17
# File 'lib/ingenico/direct/sdk/domain/sepa_direct_debit_payment_method_specific_output.rb', line 15

def payment_product_id
  @payment_product_id
end

Instance Method Details

#from_hash(hash) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/ingenico/direct/sdk/domain/sepa_direct_debit_payment_method_specific_output.rb', line 29

def from_hash(hash)
  super
  if hash.key? 'fraudResults'
    raise TypeError, "value '%s' is not a Hash" % [hash['fraudResults']] unless hash['fraudResults'].is_a? Hash
    @fraud_results = Ingenico::Direct::SDK::Domain::FraudResults.new_from_hash(hash['fraudResults'])
  end
  if hash.key? 'paymentProduct771SpecificOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct771SpecificOutput']] unless hash['paymentProduct771SpecificOutput'].is_a? Hash
    @payment_product771_specific_output = Ingenico::Direct::SDK::Domain::PaymentProduct771SpecificOutput.new_from_hash(hash['paymentProduct771SpecificOutput'])
  end
  @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
end

#to_hHash

Returns:

  • (Hash)


21
22
23
24
25
26
27
# File 'lib/ingenico/direct/sdk/domain/sepa_direct_debit_payment_method_specific_output.rb', line 21

def to_h
  hash = super
  hash['fraudResults'] = @fraud_results.to_h if @fraud_results
  hash['paymentProduct771SpecificOutput'] = @payment_product771_specific_output.to_h if @payment_product771_specific_output
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
  hash
end