Class: Ingenico::Connect::SDK::Domain::Payment::NonSepaDirectDebitPaymentMethodSpecificInput

Inherits:
Definitions::AbstractPaymentMethodSpecificInput show all
Defined in:
lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb

Instance Attribute Summary collapse

Attributes inherited from Definitions::AbstractPaymentMethodSpecificInput

#payment_product_id

Instance Method Summary collapse

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

new_from_hash

Instance Attribute Details

#date_collectObject

String



16
17
18
# File 'lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb', line 16

def date_collect
  @date_collect
end

#direct_debit_textObject

String



19
20
21
# File 'lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb', line 19

def direct_debit_text
  @direct_debit_text
end

#is_recurringObject

true/false



22
23
24
# File 'lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb', line 22

def is_recurring
  @is_recurring
end

#payment_product705_specific_inputObject



25
26
27
# File 'lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb', line 25

def payment_product705_specific_input
  @payment_product705_specific_input
end

#payment_product730_specific_inputObject



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb', line 28

def payment_product730_specific_input
  @payment_product730_specific_input
end

#recurring_payment_sequence_indicatorObject

String



31
32
33
# File 'lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb', line 31

def recurring_payment_sequence_indicator
  @recurring_payment_sequence_indicator
end

#tokenObject

String



34
35
36
# File 'lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb', line 34

def token
  @token
end

#tokenizeObject

true/false



37
38
39
# File 'lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb', line 37

def tokenize
  @tokenize
end

Instance Method Details

#from_hash(hash) ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb', line 52

def from_hash(hash)
  super
  if hash.has_key?('dateCollect')
    @date_collect = hash['dateCollect']
  end
  if hash.has_key?('directDebitText')
    @direct_debit_text = hash['directDebitText']
  end
  if hash.has_key?('isRecurring')
    @is_recurring = hash['isRecurring']
  end
  if hash.has_key?('paymentProduct705SpecificInput')
    if !(hash['paymentProduct705SpecificInput'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct705SpecificInput']]
    end
    @payment_product705_specific_input = Ingenico::Connect::SDK::Domain::Payment::NonSepaDirectDebitPaymentProduct705SpecificInput.new_from_hash(hash['paymentProduct705SpecificInput'])
  end
  if hash.has_key?('paymentProduct730SpecificInput')
    if !(hash['paymentProduct730SpecificInput'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct730SpecificInput']]
    end
    @payment_product730_specific_input = Ingenico::Connect::SDK::Domain::Payment::NonSepaDirectDebitPaymentProduct730SpecificInput.new_from_hash(hash['paymentProduct730SpecificInput'])
  end
  if hash.has_key?('recurringPaymentSequenceIndicator')
    @recurring_payment_sequence_indicator = hash['recurringPaymentSequenceIndicator']
  end
  if hash.has_key?('token')
    @token = hash['token']
  end
  if hash.has_key?('tokenize')
    @tokenize = hash['tokenize']
  end
end

#to_hObject



39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb', line 39

def to_h
  hash = super
  add_to_hash(hash, 'dateCollect', @date_collect)
  add_to_hash(hash, 'directDebitText', @direct_debit_text)
  add_to_hash(hash, 'isRecurring', @is_recurring)
  add_to_hash(hash, 'paymentProduct705SpecificInput', @payment_product705_specific_input)
  add_to_hash(hash, 'paymentProduct730SpecificInput', @payment_product730_specific_input)
  add_to_hash(hash, 'recurringPaymentSequenceIndicator', @recurring_payment_sequence_indicator)
  add_to_hash(hash, 'token', @token)
  add_to_hash(hash, 'tokenize', @tokenize)
  hash
end