Class: Ingenico::Connect::SDK::Domain::Payment::AbstractRedirectPaymentMethodSpecificInput

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

#expiration_periodInteger

Returns the current value of expiration_period.

Returns:

  • (Integer)

    the current value of expiration_period



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

def expiration_period
  @expiration_period
end

#recurring_payment_sequence_indicatorString

Returns the current value of recurring_payment_sequence_indicator.

Returns:

  • (String)

    the current value of recurring_payment_sequence_indicator



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

def recurring_payment_sequence_indicator
  @recurring_payment_sequence_indicator
end

#requires_approvaltrue/false

Returns the current value of requires_approval.

Returns:

  • (true/false)

    the current value of requires_approval



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

def requires_approval
  @requires_approval
end

#tokenString

Returns the current value of token.

Returns:

  • (String)

    the current value of token



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

def token
  @token
end

#tokenizetrue/false

Returns the current value of tokenize.

Returns:

  • (true/false)

    the current value of tokenize



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

def tokenize
  @tokenize
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

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_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['expirationPeriod'] = @expiration_period unless @expiration_period.nil?
  hash['recurringPaymentSequenceIndicator'] = @recurring_payment_sequence_indicator unless @recurring_payment_sequence_indicator.nil?
  hash['requiresApproval'] = @requires_approval unless @requires_approval.nil?
  hash['token'] = @token unless @token.nil?
  hash['tokenize'] = @tokenize unless @tokenize.nil?
  hash
end