class Ingenico::Connect::SDK::Domain::Payment::SepaDirectDebitPaymentProduct771SpecificInputBase

@attr [String] existing_unique_mandate_reference @attr [Ingenico::Connect::SDK::Domain::Mandates::CreateMandateBase] mandate

Attributes

existing_unique_mandate_reference[RW]
mandate[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# 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_h() click to toggle source

@return (Hash)

# 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