Class: Worldline::Connect::SDK::V1::Domain::AbstractRedirectPaymentMethodSpecificInput

Inherits:
AbstractPaymentMethodSpecificInput show all
Defined in:
lib/worldline/connect/sdk/v1/domain/abstract_redirect_payment_method_specific_input.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractPaymentMethodSpecificInput

#payment_product_id

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#expiration_periodInteger

Returns the current value of expiration_period.

Returns:

  • (Integer)

    the current value of expiration_period



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/abstract_redirect_payment_method_specific_input.rb', line 17

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



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/abstract_redirect_payment_method_specific_input.rb', line 17

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



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/abstract_redirect_payment_method_specific_input.rb', line 17

def requires_approval
  @requires_approval
end

#tokenString

Returns the current value of token.

Returns:

  • (String)

    the current value of token



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/abstract_redirect_payment_method_specific_input.rb', line 17

def token
  @token
end

#tokenizetrue/false

Returns the current value of tokenize.

Returns:

  • (true/false)

    the current value of tokenize



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/abstract_redirect_payment_method_specific_input.rb', line 17

def tokenize
  @tokenize
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

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)


30
31
32
33
34
35
36
37
38
# File 'lib/worldline/connect/sdk/v1/domain/abstract_redirect_payment_method_specific_input.rb', line 30

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