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

Instance Attribute Summary collapse

Attributes inherited from RedirectPaymentMethodSpecificInputBase

#expiration_period, #recurring_payment_sequence_indicator, #requires_approval, #token, #tokenize

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_product840_specific_inputObject



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

def payment_product840_specific_input
  @payment_product840_specific_input
end

#payment_product882_specific_inputObject



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

def payment_product882_specific_input
  @payment_product882_specific_input
end

#return_urlObject

String



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

def return_url
  @return_url
end

Instance Method Details

#from_hash(hash) ⇒ Object



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
75
76
77
78
# File 'lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input.rb', line 46

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?('paymentProduct840SpecificInput')
    if !(hash['paymentProduct840SpecificInput'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct840SpecificInput']]
    end
    @payment_product840_specific_input = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct840SpecificInput.new_from_hash(hash['paymentProduct840SpecificInput'])
  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



35
36
37
38
39
40
41
42
43
44
# File 'lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input.rb', line 35

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, 'paymentProduct840SpecificInput', @payment_product840_specific_input)
  add_to_hash(hash, 'paymentProduct882SpecificInput', @payment_product882_specific_input)
  add_to_hash(hash, 'returnUrl', @return_url)
  hash
end