Class: Ingenico::Connect::SDK::Domain::Payment::SepaDirectDebitPaymentMethodSpecificInputBase

Inherits:
AbstractSepaDirectDebitPaymentMethodSpecificInput show all
Defined in:
lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_method_specific_input_base.rb

Instance Attribute Summary collapse

Attributes inherited from Definitions::AbstractPaymentMethodSpecificInput

#payment_product_id

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#payment_product771_specific_inputIngenico::Connect::SDK::Domain::Payment::SepaDirectDebitPaymentProduct771SpecificInputBase

Returns the current value of payment_product771_specific_input.

Returns:



13
14
15
# File 'lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_method_specific_input_base.rb', line 13

def payment_product771_specific_input
  @payment_product771_specific_input
end

Instance Method Details

#from_hash(hash) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_method_specific_input_base.rb', line 24

def from_hash(hash)
  super
  if hash.has_key? 'paymentProduct771SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct771SpecificInput']] unless hash['paymentProduct771SpecificInput'].is_a? Hash
    @payment_product771_specific_input = Ingenico::Connect::SDK::Domain::Payment::SepaDirectDebitPaymentProduct771SpecificInputBase.new_from_hash(hash['paymentProduct771SpecificInput'])
  end
end

#to_hHash

Returns:

  • (Hash)


18
19
20
21
22
# File 'lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_method_specific_input_base.rb', line 18

def to_h
  hash = super
  hash['paymentProduct771SpecificInput'] = @payment_product771_specific_input.to_h unless @payment_product771_specific_input.nil?
  hash
end