Class: Ingenico::Connect::SDK::Domain::Payment::CashPaymentMethodSpecificInput

Inherits:
CashPaymentMethodSpecificInputBase show all
Defined in:
lib/ingenico/connect/sdk/domain/payment/cash_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

#payment_product1503_specific_inputObject



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

def payment_product1503_specific_input
  @payment_product1503_specific_input
end

#payment_product1504_specific_inputObject



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

def payment_product1504_specific_input
  @payment_product1504_specific_input
end

Instance Method Details

#from_hash(hash) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/ingenico/connect/sdk/domain/payment/cash_payment_method_specific_input.rb', line 28

def from_hash(hash)
  super
  if hash.has_key?('paymentProduct1503SpecificInput')
    if !(hash['paymentProduct1503SpecificInput'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct1503SpecificInput']]
    end
    @payment_product1503_specific_input = Ingenico::Connect::SDK::Domain::Payment::CashPaymentProduct1503SpecificInput.new_from_hash(hash['paymentProduct1503SpecificInput'])
  end
  if hash.has_key?('paymentProduct1504SpecificInput')
    if !(hash['paymentProduct1504SpecificInput'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct1504SpecificInput']]
    end
    @payment_product1504_specific_input = Ingenico::Connect::SDK::Domain::Payment::CashPaymentProduct1504SpecificInput.new_from_hash(hash['paymentProduct1504SpecificInput'])
  end
end

#to_hObject



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

def to_h
  hash = super
  add_to_hash(hash, 'paymentProduct1503SpecificInput', @payment_product1503_specific_input)
  add_to_hash(hash, 'paymentProduct1504SpecificInput', @payment_product1504_specific_input)
  hash
end