Class: Worldline::Connect::SDK::V1::Domain::PaymentProduct

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/payment_product.rb

Direct Known Subclasses

PaymentProductResponse

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#accounts_on_fileArray<Worldline::Connect::SDK::V1::Domain::AccountOnFile>

Returns the current value of accounts_on_file.

Returns:



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def accounts_on_file
  @accounts_on_file
end

#acquirer_countryString

Returns the current value of acquirer_country.

Returns:

  • (String)

    the current value of acquirer_country



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def acquirer_country
  @acquirer_country
end

#allows_installmentstrue/false

Returns the current value of allows_installments.

Returns:

  • (true/false)

    the current value of allows_installments



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def allows_installments
  @allows_installments
end

#allows_recurringtrue/false

Returns the current value of allows_recurring.

Returns:

  • (true/false)

    the current value of allows_recurring



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def allows_recurring
  @allows_recurring
end

#allows_tokenizationtrue/false

Returns the current value of allows_tokenization.

Returns:

  • (true/false)

    the current value of allows_tokenization



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def allows_tokenization
  @allows_tokenization
end

#authentication_indicatorWorldline::Connect::SDK::V1::Domain::AuthenticationIndicator

Returns the current value of authentication_indicator.

Returns:



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def authentication_indicator
  @authentication_indicator
end

#auto_tokenizedtrue/false

Returns the current value of auto_tokenized.

Returns:

  • (true/false)

    the current value of auto_tokenized



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def auto_tokenized
  @auto_tokenized
end

#can_be_iframedtrue/false

Returns the current value of can_be_iframed.

Returns:

  • (true/false)

    the current value of can_be_iframed



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def can_be_iframed
  @can_be_iframed
end

#device_fingerprint_enabledtrue/false

Returns the current value of device_fingerprint_enabled.

Returns:

  • (true/false)

    the current value of device_fingerprint_enabled



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def device_fingerprint_enabled
  @device_fingerprint_enabled
end

#display_hintsWorldline::Connect::SDK::V1::Domain::PaymentProductDisplayHints

Returns the current value of display_hints.

Returns:



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def display_hints
  @display_hints
end

#fieldsArray<Worldline::Connect::SDK::V1::Domain::PaymentProductField>

Returns the current value of fields.

Returns:



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def fields
  @fields
end

#fields_warningString

Returns the current value of fields_warning.

Returns:

  • (String)

    the current value of fields_warning



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def fields_warning
  @fields_warning
end

#idInteger

Returns the current value of id.

Returns:

  • (Integer)

    the current value of id



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def id
  @id
end

#is_authentication_supportedtrue/false

Returns the current value of is_authentication_supported.

Returns:

  • (true/false)

    the current value of is_authentication_supported



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def is_authentication_supported
  @is_authentication_supported
end

#is_java_script_requiredtrue/false

Returns the current value of is_java_script_required.

Returns:

  • (true/false)

    the current value of is_java_script_required



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def is_java_script_required
  @is_java_script_required
end

#max_amountInteger

Returns the current value of max_amount.

Returns:

  • (Integer)

    the current value of max_amount



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def max_amount
  @max_amount
end

#min_amountInteger

Returns the current value of min_amount.

Returns:

  • (Integer)

    the current value of min_amount



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def min_amount
  @min_amount
end

#mobile_integration_levelString

Returns the current value of mobile_integration_level.

Returns:

  • (String)

    the current value of mobile_integration_level



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def mobile_integration_level
  @mobile_integration_level
end

#payment_methodString

Returns the current value of payment_method.

Returns:

  • (String)

    the current value of payment_method



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def payment_method
  @payment_method
end

#payment_product302_specific_dataWorldline::Connect::SDK::V1::Domain::PaymentProduct302SpecificData

Returns the current value of payment_product302_specific_data.

Returns:



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def payment_product302_specific_data
  @payment_product302_specific_data
end

#payment_product320_specific_dataWorldline::Connect::SDK::V1::Domain::PaymentProduct320SpecificData

Returns the current value of payment_product320_specific_data.

Returns:



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def payment_product320_specific_data
  @payment_product320_specific_data
end

#payment_product863_specific_dataWorldline::Connect::SDK::V1::Domain::PaymentProduct863SpecificData

Returns the current value of payment_product863_specific_data.

Returns:



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def payment_product863_specific_data
  @payment_product863_specific_data
end

#payment_product_groupString

Returns the current value of payment_product_group.

Returns:

  • (String)

    the current value of payment_product_group



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def payment_product_group
  @payment_product_group
end

#supports_mandatestrue/false

Returns the current value of supports_mandates.

Returns:

  • (true/false)

    the current value of supports_mandates



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def supports_mandates
  @supports_mandates
end

#uses_redirection_to3rd_partytrue/false

Returns the current value of uses_redirection_to3rd_party.

Returns:

  • (true/false)

    the current value of uses_redirection_to3rd_party



44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 44

def uses_redirection_to3rd_party
  @uses_redirection_to3rd_party
end

Instance Method Details

#from_hash(hash) ⇒ Object



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 127

def from_hash(hash)
  super
  if hash.has_key? 'accountsOnFile'
    raise TypeError, "value '%s' is not an Array" % [hash['accountsOnFile']] unless hash['accountsOnFile'].is_a? Array
    @accounts_on_file = []
    hash['accountsOnFile'].each do |e|
      @accounts_on_file << Worldline::Connect::SDK::V1::Domain::AccountOnFile.new_from_hash(e)
    end
  end
  if hash.has_key? 'acquirerCountry'
    @acquirer_country = hash['acquirerCountry']
  end
  if hash.has_key? 'allowsInstallments'
    @allows_installments = hash['allowsInstallments']
  end
  if hash.has_key? 'allowsRecurring'
    @allows_recurring = hash['allowsRecurring']
  end
  if hash.has_key? 'allowsTokenization'
    @allows_tokenization = hash['allowsTokenization']
  end
  if hash.has_key? 'authenticationIndicator'
    raise TypeError, "value '%s' is not a Hash" % [hash['authenticationIndicator']] unless hash['authenticationIndicator'].is_a? Hash
    @authentication_indicator = Worldline::Connect::SDK::V1::Domain::AuthenticationIndicator.new_from_hash(hash['authenticationIndicator'])
  end
  if hash.has_key? 'autoTokenized'
    @auto_tokenized = hash['autoTokenized']
  end
  if hash.has_key? 'canBeIframed'
    @can_be_iframed = hash['canBeIframed']
  end
  if hash.has_key? 'deviceFingerprintEnabled'
    @device_fingerprint_enabled = hash['deviceFingerprintEnabled']
  end
  if hash.has_key? 'displayHints'
    raise TypeError, "value '%s' is not a Hash" % [hash['displayHints']] unless hash['displayHints'].is_a? Hash
    @display_hints = Worldline::Connect::SDK::V1::Domain::PaymentProductDisplayHints.new_from_hash(hash['displayHints'])
  end
  if hash.has_key? 'fields'
    raise TypeError, "value '%s' is not an Array" % [hash['fields']] unless hash['fields'].is_a? Array
    @fields = []
    hash['fields'].each do |e|
      @fields << Worldline::Connect::SDK::V1::Domain::PaymentProductField.new_from_hash(e)
    end
  end
  if hash.has_key? 'fieldsWarning'
    @fields_warning = hash['fieldsWarning']
  end
  if hash.has_key? 'id'
    @id = hash['id']
  end
  if hash.has_key? 'isAuthenticationSupported'
    @is_authentication_supported = hash['isAuthenticationSupported']
  end
  if hash.has_key? 'isJavaScriptRequired'
    @is_java_script_required = hash['isJavaScriptRequired']
  end
  if hash.has_key? 'maxAmount'
    @max_amount = hash['maxAmount']
  end
  if hash.has_key? 'minAmount'
    @min_amount = hash['minAmount']
  end
  if hash.has_key? 'mobileIntegrationLevel'
    @mobile_integration_level = hash['mobileIntegrationLevel']
  end
  if hash.has_key? 'paymentMethod'
    @payment_method = hash['paymentMethod']
  end
  if hash.has_key? 'paymentProduct302SpecificData'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct302SpecificData']] unless hash['paymentProduct302SpecificData'].is_a? Hash
    @payment_product302_specific_data = Worldline::Connect::SDK::V1::Domain::PaymentProduct302SpecificData.new_from_hash(hash['paymentProduct302SpecificData'])
  end
  if hash.has_key? 'paymentProduct320SpecificData'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct320SpecificData']] unless hash['paymentProduct320SpecificData'].is_a? Hash
    @payment_product320_specific_data = Worldline::Connect::SDK::V1::Domain::PaymentProduct320SpecificData.new_from_hash(hash['paymentProduct320SpecificData'])
  end
  if hash.has_key? 'paymentProduct863SpecificData'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct863SpecificData']] unless hash['paymentProduct863SpecificData'].is_a? Hash
    @payment_product863_specific_data = Worldline::Connect::SDK::V1::Domain::PaymentProduct863SpecificData.new_from_hash(hash['paymentProduct863SpecificData'])
  end
  if hash.has_key? 'paymentProductGroup'
    @payment_product_group = hash['paymentProductGroup']
  end
  if hash.has_key? 'supportsMandates'
    @supports_mandates = hash['supportsMandates']
  end
  if hash.has_key? 'usesRedirectionTo3rdParty'
    @uses_redirection_to3rd_party = hash['usesRedirectionTo3rdParty']
  end
end

#to_hHash

Returns:

  • (Hash)


97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/worldline/connect/sdk/v1/domain/payment_product.rb', line 97

def to_h
  hash = super
  hash['accountsOnFile'] = @accounts_on_file.collect{|val| val.to_h} unless @accounts_on_file.nil?
  hash['acquirerCountry'] = @acquirer_country unless @acquirer_country.nil?
  hash['allowsInstallments'] = @allows_installments unless @allows_installments.nil?
  hash['allowsRecurring'] = @allows_recurring unless @allows_recurring.nil?
  hash['allowsTokenization'] = @allows_tokenization unless @allows_tokenization.nil?
  hash['authenticationIndicator'] = @authentication_indicator.to_h unless @authentication_indicator.nil?
  hash['autoTokenized'] = @auto_tokenized unless @auto_tokenized.nil?
  hash['canBeIframed'] = @can_be_iframed unless @can_be_iframed.nil?
  hash['deviceFingerprintEnabled'] = @device_fingerprint_enabled unless @device_fingerprint_enabled.nil?
  hash['displayHints'] = @display_hints.to_h unless @display_hints.nil?
  hash['fields'] = @fields.collect{|val| val.to_h} unless @fields.nil?
  hash['fieldsWarning'] = @fields_warning unless @fields_warning.nil?
  hash['id'] = @id unless @id.nil?
  hash['isAuthenticationSupported'] = @is_authentication_supported unless @is_authentication_supported.nil?
  hash['isJavaScriptRequired'] = @is_java_script_required unless @is_java_script_required.nil?
  hash['maxAmount'] = @max_amount unless @max_amount.nil?
  hash['minAmount'] = @min_amount unless @min_amount.nil?
  hash['mobileIntegrationLevel'] = @mobile_integration_level unless @mobile_integration_level.nil?
  hash['paymentMethod'] = @payment_method unless @payment_method.nil?
  hash['paymentProduct302SpecificData'] = @payment_product302_specific_data.to_h unless @payment_product302_specific_data.nil?
  hash['paymentProduct320SpecificData'] = @payment_product320_specific_data.to_h unless @payment_product320_specific_data.nil?
  hash['paymentProduct863SpecificData'] = @payment_product863_specific_data.to_h unless @payment_product863_specific_data.nil?
  hash['paymentProductGroup'] = @payment_product_group unless @payment_product_group.nil?
  hash['supportsMandates'] = @supports_mandates unless @supports_mandates.nil?
  hash['usesRedirectionTo3rdParty'] = @uses_redirection_to3rd_party unless @uses_redirection_to3rd_party.nil?
  hash
end