Class: Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentMethodSpecificInputBase

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

Direct Known Subclasses

RedirectPaymentMethodSpecificInput

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

#expiration_periodObject

Integer



14
15
16
# File 'lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input_base.rb', line 14

def expiration_period
  @expiration_period
end

#recurring_payment_sequence_indicatorObject

String



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

def recurring_payment_sequence_indicator
  @recurring_payment_sequence_indicator
end

#requires_approvalObject

true/false



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

def requires_approval
  @requires_approval
end

#tokenObject

String



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

def token
  @token
end

#tokenizeObject

true/false



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

def tokenize
  @tokenize
end

Instance Method Details

#from_hash(hash) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input_base.rb', line 38

def from_hash(hash)
  super
  if hash.has_key?('expirationPeriod')
    @expiration_period = hash['expirationPeriod']
  end
  if hash.has_key?('recurringPaymentSequenceIndicator')
    @recurring_payment_sequence_indicator = hash['recurringPaymentSequenceIndicator']
  end
  if hash.has_key?('requiresApproval')
    @requires_approval = hash['requiresApproval']
  end
  if hash.has_key?('token')
    @token = hash['token']
  end
  if hash.has_key?('tokenize')
    @tokenize = hash['tokenize']
  end
end

#to_hObject



28
29
30
31
32
33
34
35
36
# File 'lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input_base.rb', line 28

def to_h
  hash = super
  add_to_hash(hash, 'expirationPeriod', @expiration_period)
  add_to_hash(hash, 'recurringPaymentSequenceIndicator', @recurring_payment_sequence_indicator)
  add_to_hash(hash, 'requiresApproval', @requires_approval)
  add_to_hash(hash, 'token', @token)
  add_to_hash(hash, 'tokenize', @tokenize)
  hash
end