Class: Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentMethodSpecificInput

Inherits:
RedirectPaymentMethodSpecificInputBase show all
Defined in:
lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input.rb

Overview

Instance Attribute Summary collapse

Attributes inherited from RedirectPaymentMethodSpecificInputBase

#recurring_payment_sequence_indicator, #token

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

#is_recurringObject

true/false



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

def is_recurring
  @is_recurring
end

#payment_product809_specific_inputObject



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

def payment_product809_specific_input
  @payment_product809_specific_input
end

#payment_product816_specific_inputObject



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

def payment_product816_specific_input
  @payment_product816_specific_input
end

#payment_product882_specific_inputObject



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

def payment_product882_specific_input
  @payment_product882_specific_input
end

#return_urlObject

String



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

def return_url
  @return_url
end

Instance Method Details

#from_hash(hash) ⇒ Object



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input.rb', line 42

def from_hash(hash)
  super
  if hash.has_key?('isRecurring')
    @is_recurring = hash['isRecurring']
  end
  if hash.has_key?('paymentProduct809SpecificInput')
    if !(hash['paymentProduct809SpecificInput'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct809SpecificInput']]
    end
    @payment_product809_specific_input = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct809SpecificInput.new_from_hash(hash['paymentProduct809SpecificInput'])
  end
  if hash.has_key?('paymentProduct816SpecificInput')
    if !(hash['paymentProduct816SpecificInput'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct816SpecificInput']]
    end
    @payment_product816_specific_input = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct816SpecificInput.new_from_hash(hash['paymentProduct816SpecificInput'])
  end
  if hash.has_key?('paymentProduct882SpecificInput')
    if !(hash['paymentProduct882SpecificInput'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct882SpecificInput']]
    end
    @payment_product882_specific_input = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct882SpecificInput.new_from_hash(hash['paymentProduct882SpecificInput'])
  end
  if hash.has_key?('returnUrl')
    @return_url = hash['returnUrl']
  end
end

#to_hObject



32
33
34
35
36
37
38
39
40
# File 'lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input.rb', line 32

def to_h
  hash = super
  add_to_hash(hash, 'isRecurring', @is_recurring)
  add_to_hash(hash, 'paymentProduct809SpecificInput', @payment_product809_specific_input)
  add_to_hash(hash, 'paymentProduct816SpecificInput', @payment_product816_specific_input)
  add_to_hash(hash, 'paymentProduct882SpecificInput', @payment_product882_specific_input)
  add_to_hash(hash, 'returnUrl', @return_url)
  hash
end