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

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

Instance Attribute Summary collapse

Attributes inherited from AbstractRedirectPaymentMethodSpecificInput

#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_recurringtrue/false

Returns the current value of is_recurring.

Returns:

  • (true/false)

    the current value of is_recurring



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

def is_recurring
  @is_recurring
end

#payment_product809_specific_inputIngenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct809SpecificInput

Returns the current value of payment_product809_specific_input.

Returns:



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

def payment_product809_specific_input
  @payment_product809_specific_input
end

#payment_product816_specific_inputIngenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct816SpecificInput

Returns the current value of payment_product816_specific_input.

Returns:



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

def payment_product816_specific_input
  @payment_product816_specific_input
end

#payment_product840_specific_inputIngenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct840SpecificInput

Returns the current value of payment_product840_specific_input.

Returns:



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_product861_specific_inputIngenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct861SpecificInput

Returns the current value of payment_product861_specific_input.

Returns:



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

def payment_product861_specific_input
  @payment_product861_specific_input
end

#payment_product863_specific_inputIngenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct863SpecificInput

Returns the current value of payment_product863_specific_input.

Returns:



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

def payment_product863_specific_input
  @payment_product863_specific_input
end

#payment_product882_specific_inputIngenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct882SpecificInput

Returns the current value of payment_product882_specific_input.

Returns:



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

#redirection_dataIngenico::Connect::SDK::Domain::Payment::RedirectionData

Returns the current value of redirection_data.

Returns:



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

def redirection_data
  @redirection_data
end

#return_urlObject

Deprecated.

Use redirectionData.returnUrl instead



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

def return_url
  @return_url
end

Instance Method Details

#from_hash(hash) ⇒ Object



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input.rb', line 64

def from_hash(hash)
  super
  if hash.has_key? 'isRecurring'
    @is_recurring = hash['isRecurring']
  end
  if hash.has_key? 'paymentProduct809SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct809SpecificInput']] unless hash['paymentProduct809SpecificInput'].is_a? Hash
    @payment_product809_specific_input = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct809SpecificInput.new_from_hash(hash['paymentProduct809SpecificInput'])
  end
  if hash.has_key? 'paymentProduct816SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct816SpecificInput']] unless hash['paymentProduct816SpecificInput'].is_a? Hash
    @payment_product816_specific_input = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct816SpecificInput.new_from_hash(hash['paymentProduct816SpecificInput'])
  end
  if hash.has_key? 'paymentProduct840SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct840SpecificInput']] unless hash['paymentProduct840SpecificInput'].is_a? Hash
    @payment_product840_specific_input = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct840SpecificInput.new_from_hash(hash['paymentProduct840SpecificInput'])
  end
  if hash.has_key? 'paymentProduct861SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct861SpecificInput']] unless hash['paymentProduct861SpecificInput'].is_a? Hash
    @payment_product861_specific_input = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct861SpecificInput.new_from_hash(hash['paymentProduct861SpecificInput'])
  end
  if hash.has_key? 'paymentProduct863SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct863SpecificInput']] unless hash['paymentProduct863SpecificInput'].is_a? Hash
    @payment_product863_specific_input = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct863SpecificInput.new_from_hash(hash['paymentProduct863SpecificInput'])
  end
  if hash.has_key? 'paymentProduct882SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct882SpecificInput']] unless hash['paymentProduct882SpecificInput'].is_a? Hash
    @payment_product882_specific_input = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct882SpecificInput.new_from_hash(hash['paymentProduct882SpecificInput'])
  end
  if hash.has_key? 'redirectionData'
    raise TypeError, "value '%s' is not a Hash" % [hash['redirectionData']] unless hash['redirectionData'].is_a? Hash
    @redirection_data = Ingenico::Connect::SDK::Domain::Payment::RedirectionData.new_from_hash(hash['redirectionData'])
  end
  if hash.has_key? 'returnUrl'
    @return_url = hash['returnUrl']
  end
end

#to_hHash

Returns:

  • (Hash)


50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input.rb', line 50

def to_h
  hash = super
  hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
  hash['paymentProduct809SpecificInput'] = @payment_product809_specific_input.to_h unless @payment_product809_specific_input.nil?
  hash['paymentProduct816SpecificInput'] = @payment_product816_specific_input.to_h unless @payment_product816_specific_input.nil?
  hash['paymentProduct840SpecificInput'] = @payment_product840_specific_input.to_h unless @payment_product840_specific_input.nil?
  hash['paymentProduct861SpecificInput'] = @payment_product861_specific_input.to_h unless @payment_product861_specific_input.nil?
  hash['paymentProduct863SpecificInput'] = @payment_product863_specific_input.to_h unless @payment_product863_specific_input.nil?
  hash['paymentProduct882SpecificInput'] = @payment_product882_specific_input.to_h unless @payment_product882_specific_input.nil?
  hash['redirectionData'] = @redirection_data.to_h unless @redirection_data.nil?
  hash['returnUrl'] = @return_url unless @return_url.nil?
  hash
end