Class: Worldline::Connect::SDK::V1::Domain::MandateSepaDirectDebit

Inherits:
MandateSepaDirectDebitWithMandateId show all
Defined in:
lib/worldline/connect/sdk/v1/domain/mandate_sepa_direct_debit.rb

Instance Attribute Summary collapse

Attributes inherited from MandateSepaDirectDebitWithMandateId

#mandate_id

Attributes inherited from MandateSepaDirectDebitWithoutCreditor

#bank_account_iban, #customer_contract_identifier, #debtor, #is_recurring, #mandate_approval, #pre_notification

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#creditorWorldline::Connect::SDK::V1::Domain::Creditor

Returns the current value of creditor.

Returns:



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

def creditor
  @creditor
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

def from_hash(hash)
  super
  if hash.has_key? 'creditor'
    raise TypeError, "value '%s' is not a Hash" % [hash['creditor']] unless hash['creditor'].is_a? Hash
    @creditor = Worldline::Connect::SDK::V1::Domain::Creditor.new_from_hash(hash['creditor'])
  end
end

#to_hHash

Returns:

  • (Hash)


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

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