Class: Worldline::Connect::SDK::V1::Domain::RedirectPaymentMethodSpecificInputBase

Inherits:
AbstractRedirectPaymentMethodSpecificInput show all
Defined in:
lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input_base.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractRedirectPaymentMethodSpecificInput

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

Attributes inherited from AbstractPaymentMethodSpecificInput

#payment_product_id

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#payment_product4101_specific_inputWorldline::Connect::SDK::V1::Domain::RedirectPaymentProduct4101SpecificInputBase

Returns the current value of payment_product4101_specific_input.

Returns:



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

def payment_product4101_specific_input
  @payment_product4101_specific_input
end

#payment_product838_specific_inputWorldline::Connect::SDK::V1::Domain::RedirectPaymentProduct838SpecificInputBase

Returns the current value of payment_product838_specific_input.

Returns:



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

def payment_product838_specific_input
  @payment_product838_specific_input
end

#payment_product840_specific_inputWorldline::Connect::SDK::V1::Domain::RedirectPaymentProduct840SpecificInputBase

Returns the current value of payment_product840_specific_input.

Returns:



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

def payment_product840_specific_input
  @payment_product840_specific_input
end

Instance Method Details

#from_hash(hash) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input_base.rb', line 35

def from_hash(hash)
  super
  if hash.has_key? 'paymentProduct4101SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct4101SpecificInput']] unless hash['paymentProduct4101SpecificInput'].is_a? Hash
    @payment_product4101_specific_input = Worldline::Connect::SDK::V1::Domain::RedirectPaymentProduct4101SpecificInputBase.new_from_hash(hash['paymentProduct4101SpecificInput'])
  end
  if hash.has_key? 'paymentProduct838SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct838SpecificInput']] unless hash['paymentProduct838SpecificInput'].is_a? Hash
    @payment_product838_specific_input = Worldline::Connect::SDK::V1::Domain::RedirectPaymentProduct838SpecificInputBase.new_from_hash(hash['paymentProduct838SpecificInput'])
  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 = Worldline::Connect::SDK::V1::Domain::RedirectPaymentProduct840SpecificInputBase.new_from_hash(hash['paymentProduct840SpecificInput'])
  end
end

#to_hHash

Returns:

  • (Hash)


27
28
29
30
31
32
33
# File 'lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input_base.rb', line 27

def to_h
  hash = super
  hash['paymentProduct4101SpecificInput'] = @payment_product4101_specific_input.to_h unless @payment_product4101_specific_input.nil?
  hash['paymentProduct838SpecificInput'] = @payment_product838_specific_input.to_h unless @payment_product838_specific_input.nil?
  hash['paymentProduct840SpecificInput'] = @payment_product840_specific_input.to_h unless @payment_product840_specific_input.nil?
  hash
end