Class: Worldline::Connect::SDK::V1::Domain::RedirectPaymentMethodSpecificInput

Inherits:
AbstractRedirectPaymentMethodSpecificInput show all
Defined in:
lib/worldline/connect/sdk/v1/domain/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 AbstractPaymentMethodSpecificInput

#payment_product_id

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#is_recurringtrue/false



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input.rb', line 32

def is_recurring
  @is_recurring
end

#payment_product4101_specific_inputWorldline::Connect::SDK::V1::Domain::RedirectPaymentProduct4101SpecificInput



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input.rb', line 32

def payment_product4101_specific_input
  @payment_product4101_specific_input
end

#payment_product809_specific_inputWorldline::Connect::SDK::V1::Domain::RedirectPaymentProduct809SpecificInput



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input.rb', line 32

def payment_product809_specific_input
  @payment_product809_specific_input
end

#payment_product838_specific_inputWorldline::Connect::SDK::V1::Domain::RedirectPaymentProduct838SpecificInput



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input.rb', line 32

def payment_product838_specific_input
  @payment_product838_specific_input
end

#payment_product840_specific_inputWorldline::Connect::SDK::V1::Domain::RedirectPaymentProduct840SpecificInput



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input.rb', line 32

def payment_product840_specific_input
  @payment_product840_specific_input
end

#payment_product861_specific_inputWorldline::Connect::SDK::V1::Domain::RedirectPaymentProduct861SpecificInput



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input.rb', line 32

def payment_product861_specific_input
  @payment_product861_specific_input
end

#payment_product863_specific_inputWorldline::Connect::SDK::V1::Domain::RedirectPaymentProduct863SpecificInput



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input.rb', line 32

def payment_product863_specific_input
  @payment_product863_specific_input
end

#payment_product869_specific_inputWorldline::Connect::SDK::V1::Domain::RedirectPaymentProduct869SpecificInput



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input.rb', line 32

def payment_product869_specific_input
  @payment_product869_specific_input
end

#payment_product882_specific_inputWorldline::Connect::SDK::V1::Domain::RedirectPaymentProduct882SpecificInput



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input.rb', line 32

def payment_product882_specific_input
  @payment_product882_specific_input
end

#redirection_dataWorldline::Connect::SDK::V1::Domain::RedirectionData



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input.rb', line 32

def redirection_data
  @redirection_data
end

#return_urlObject

Deprecated.

Use redirectionData.returnUrl instead



32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input.rb', line 32

def return_url
  @return_url
end

Instance Method Details

#from_hash(hash) ⇒ Object



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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input.rb', line 74

def from_hash(hash)
  super
  if hash.has_key? 'isRecurring'
    @is_recurring = hash['isRecurring']
  end
  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::RedirectPaymentProduct4101SpecificInput.new_from_hash(hash['paymentProduct4101SpecificInput'])
  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 = Worldline::Connect::SDK::V1::Domain::RedirectPaymentProduct809SpecificInput.new_from_hash(hash['paymentProduct809SpecificInput'])
  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::RedirectPaymentProduct838SpecificInput.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::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::RedirectPaymentProduct863SpecificInput.new_from_hash(hash['paymentProduct863SpecificInput'])
  end
  if hash.has_key? 'paymentProduct869SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct869SpecificInput']] unless hash['paymentProduct869SpecificInput'].is_a? Hash
    @payment_product869_specific_input = Worldline::Connect::SDK::V1::Domain::RedirectPaymentProduct869SpecificInput.new_from_hash(hash['paymentProduct869SpecificInput'])
  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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::RedirectionData.new_from_hash(hash['redirectionData'])
  end
  if hash.has_key? 'returnUrl'
    @return_url = hash['returnUrl']
  end
end

#to_hHash



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/worldline/connect/sdk/v1/domain/redirect_payment_method_specific_input.rb', line 58

def to_h
  hash = super
  hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
  hash['paymentProduct4101SpecificInput'] = @payment_product4101_specific_input.to_h unless @payment_product4101_specific_input.nil?
  hash['paymentProduct809SpecificInput'] = @payment_product809_specific_input.to_h unless @payment_product809_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['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['paymentProduct869SpecificInput'] = @payment_product869_specific_input.to_h unless @payment_product869_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