Class: Worldline::Connect::SDK::V1::Domain::SepaDirectDebitPaymentMethodSpecificInputBase

Inherits:
AbstractSepaDirectDebitPaymentMethodSpecificInput show all
Defined in:
lib/worldline/connect/sdk/v1/domain/sepa_direct_debit_payment_method_specific_input_base.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractPaymentMethodSpecificInput

#payment_product_id

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#payment_product771_specific_inputWorldline::Connect::SDK::V1::Domain::SepaDirectDebitPaymentProduct771SpecificInputBase

Returns the current value of payment_product771_specific_input.

Returns:



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

def payment_product771_specific_input
  @payment_product771_specific_input
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

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 = Worldline::Connect::SDK::V1::Domain::SepaDirectDebitPaymentProduct771SpecificInputBase.new_from_hash(hash['paymentProduct771SpecificInput'])
  end
end

#to_hHash

Returns:

  • (Hash)


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

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