Class: Ingenico::Connect::SDK::Domain::Token::MandateSepaDirectDebitWithoutCreditor

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/token/mandate_sepa_direct_debit_without_creditor.rb

Direct Known Subclasses

MandateSepaDirectDebitWithMandateId

Instance Attribute Summary collapse

Instance Method Summary collapse

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

new_from_hash

Instance Attribute Details

#bank_account_ibanObject



17
18
19
# File 'lib/ingenico/connect/sdk/domain/token/mandate_sepa_direct_debit_without_creditor.rb', line 17

def 
  
end

#customer_contract_identifierObject

String



20
21
22
# File 'lib/ingenico/connect/sdk/domain/token/mandate_sepa_direct_debit_without_creditor.rb', line 20

def customer_contract_identifier
  @customer_contract_identifier
end

#debtorObject



23
24
25
# File 'lib/ingenico/connect/sdk/domain/token/mandate_sepa_direct_debit_without_creditor.rb', line 23

def debtor
  @debtor
end

#is_recurringObject

true/false



26
27
28
# File 'lib/ingenico/connect/sdk/domain/token/mandate_sepa_direct_debit_without_creditor.rb', line 26

def is_recurring
  @is_recurring
end

#mandate_approvalObject



29
30
31
# File 'lib/ingenico/connect/sdk/domain/token/mandate_sepa_direct_debit_without_creditor.rb', line 29

def mandate_approval
  @mandate_approval
end

#pre_notificationObject

String



32
33
34
# File 'lib/ingenico/connect/sdk/domain/token/mandate_sepa_direct_debit_without_creditor.rb', line 32

def pre_notification
  @pre_notification
end

Instance Method Details

#from_hash(hash) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/ingenico/connect/sdk/domain/token/mandate_sepa_direct_debit_without_creditor.rb', line 45

def from_hash(hash)
  super
  if hash.has_key?('bankAccountIban')
    if !(hash['bankAccountIban'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['bankAccountIban']]
    end
     = Ingenico::Connect::SDK::Domain::Definitions::BankAccountIban.new_from_hash(hash['bankAccountIban'])
  end
  if hash.has_key?('customerContractIdentifier')
    @customer_contract_identifier = hash['customerContractIdentifier']
  end
  if hash.has_key?('debtor')
    if !(hash['debtor'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['debtor']]
    end
    @debtor = Ingenico::Connect::SDK::Domain::Token::Debtor.new_from_hash(hash['debtor'])
  end
  if hash.has_key?('isRecurring')
    @is_recurring = hash['isRecurring']
  end
  if hash.has_key?('mandateApproval')
    if !(hash['mandateApproval'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['mandateApproval']]
    end
    @mandate_approval = Ingenico::Connect::SDK::Domain::Token::MandateApproval.new_from_hash(hash['mandateApproval'])
  end
  if hash.has_key?('preNotification')
    @pre_notification = hash['preNotification']
  end
end

#to_hObject



34
35
36
37
38
39
40
41
42
43
# File 'lib/ingenico/connect/sdk/domain/token/mandate_sepa_direct_debit_without_creditor.rb', line 34

def to_h
  hash = super
  add_to_hash(hash, 'bankAccountIban', )
  add_to_hash(hash, 'customerContractIdentifier', @customer_contract_identifier)
  add_to_hash(hash, 'debtor', @debtor)
  add_to_hash(hash, 'isRecurring', @is_recurring)
  add_to_hash(hash, 'mandateApproval', @mandate_approval)
  add_to_hash(hash, 'preNotification', @pre_notification)
  hash
end