Class: Ingenico::Connect::SDK::Domain::Payment::SepaDirectDebitPaymentProduct771SpecificInputBase

Inherits:
AbstractSepaDirectDebitPaymentProduct771SpecificInput show all
Defined in:
lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_product771_specific_input_base.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractSepaDirectDebitPaymentProduct771SpecificInput

#mandate_reference

Instance Method Summary collapse

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

new_from_hash

Instance Attribute Details

#existing_unique_mandate_referenceString

Returns the current value of existing_unique_mandate_reference.

Returns:

  • (String)

    the current value of existing_unique_mandate_reference



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

def existing_unique_mandate_reference
  @existing_unique_mandate_reference
end

#mandateIngenico::Connect::SDK::Domain::Mandates::CreateMandateBase

Returns the current value of mandate.

Returns:



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

def mandate
  @mandate
end

Instance Method Details

#from_hash(hash) ⇒ Object



28
29
30
31
32
33
34
35
36
37
# File 'lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_product771_specific_input_base.rb', line 28

def from_hash(hash)
  super
  if hash.has_key? 'existingUniqueMandateReference'
    @existing_unique_mandate_reference = hash['existingUniqueMandateReference']
  end
  if hash.has_key? 'mandate'
    raise TypeError, "value '%s' is not a Hash" % [hash['mandate']] unless hash['mandate'].is_a? Hash
    @mandate = Ingenico::Connect::SDK::Domain::Mandates::CreateMandateBase.new_from_hash(hash['mandate'])
  end
end

#to_hHash

Returns:

  • (Hash)


21
22
23
24
25
26
# File 'lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_product771_specific_input_base.rb', line 21

def to_h
  hash = super
  hash['existingUniqueMandateReference'] = @existing_unique_mandate_reference unless @existing_unique_mandate_reference.nil?
  hash['mandate'] = @mandate.to_h unless @mandate.nil?
  hash
end