Class: CyberSourceMergedSpec::ClearingInformation

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/cyber_source_merged_spec/models/clearing_information.rb

Overview

ClearingInformation Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(authorization_characteristics_indicator: SKIP, accountfunding_source: SKIP, cardholder_id_method: SKIP, market_specific_data_identifier: SKIP, pos_entry_mode: SKIP, electronic_commerce_indicator: SKIP, spend_qualified_indicator: SKIP, validation_code: SKIP, additional_properties: nil) ⇒ ClearingInformation

Returns a new instance of ClearingInformation.



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
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 171

def initialize(authorization_characteristics_indicator: SKIP,
               accountfunding_source: SKIP, cardholder_id_method: SKIP,
               market_specific_data_identifier: SKIP, pos_entry_mode: SKIP,
               electronic_commerce_indicator: SKIP,
               spend_qualified_indicator: SKIP, validation_code: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  unless authorization_characteristics_indicator == SKIP
    @authorization_characteristics_indicator =
      authorization_characteristics_indicator
  end
  @accountfunding_source = accountfunding_source unless accountfunding_source == SKIP
  @cardholder_id_method = cardholder_id_method unless cardholder_id_method == SKIP
  unless market_specific_data_identifier == SKIP
    @market_specific_data_identifier =
      market_specific_data_identifier
  end
  @pos_entry_mode = pos_entry_mode unless pos_entry_mode == SKIP
  unless electronic_commerce_indicator == SKIP
    @electronic_commerce_indicator =
      electronic_commerce_indicator
  end
  unless spend_qualified_indicator == SKIP
    @spend_qualified_indicator =
      spend_qualified_indicator
  end
  @validation_code = validation_code unless validation_code == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#accountfunding_sourceString

This field contains the product account funding source value from Visa required for Clearing. Use this field only for clearing with your acquirer. Possible values:

  • C (Credit)
  • D (Debit)
  • H (Charge)
  • P (Prepaid)
  • R (Deferred debit)

Returns:

  • (String)


30
31
32
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 30

def accountfunding_source
  @accountfunding_source
end

#authorization_characteristics_indicatorString

This field contains the code used by the acquirer to request CPS qualification. If applicable, V.I.P. changes the code to reflect the results of its CPS evaluation. Use this field only for clearing with your acquirer.

Returns:

  • (String)


18
19
20
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 18

def authorization_characteristics_indicator
  @authorization_characteristics_indicator
end

#cardholder_id_methodString

This 1-digit code identifies the cardholder identification method used for a transaction. Use this field only for clearing with your acquirer. Possible values:

  • 0 - Not specified
  • 1 - Signature
  • 2 - Online PIN
  • 3 - Unattended terminal, no PIN pad
  • 4 - Mail/Telephone/Electronic Commerce

Returns:

  • (String)


42
43
44
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 42

def cardholder_id_method
  @cardholder_id_method
end

#electronic_commerce_indicatorString

This field contains 2-digit code that identifies the level of security used in an electronic commerce transaction over an open network (for example, the Internet) or the type of mail or telephone order. Use this field only for clearing with your acquirer. Possible values:

  • 00 - Not applicable
  • 01 - Single transaction of a mail/phone order
  • 02 - Recurring transaction
  • 03 - Installment payment
  • 04 - Unknown classification
  • 05 - Secure electronic commerce transaction
  • 06 - Non-authenticated security transaction at a 3-D Secure-capable merchant, and merchant attempted to authenticate the cardholder using 3-D Secure
  • 07 - Non-authenticated Security Transaction
  • 08 - Non-secure transaction

Returns:

  • (String)


116
117
118
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 116

def electronic_commerce_indicator
  @electronic_commerce_indicator
end

#market_specific_data_identifierString

This field contains the industry for which market-specific data has been provided. Use this field only for clearing with your acquirer. Possible values:

  • A: Auto Rental
  • B: Bill Payment
  • E: Electronic commerce transaction aggregation
  • H: Hotel
  • J: B2B invoice payments
  • M: Healthcare (medical)
  • N: Failed Market-Specific Data edit, or not applicable
  • T: Transit (in healthcare transactions only)
  • X: Extended Authorization

Returns:

  • (String)


58
59
60
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 58

def market_specific_data_identifier
  @market_specific_data_identifier
end

#pos_entry_modeString

This field contains a 4-digit code indicating the method used to enter the account number and card expiration date and, if an electronic terminal is used, the capability of the terminal to capture online PINs for transactions processed through VisaNet. Use this field only for clearing with your acquirer. Possible Values: Positions 1-2: PAN and Date Entry Mode

  • 00 - Unknown or terminal not used.
  • 01 - Manual (key entry).
  • 02 - Visa: Magnetic stripe read; CVV checking may not be possible. PLUS: Track 2 contents read, but transaction not eligible for CVV checking.
  • 03 - Optical code
  • 04 - Reserved for future use.
  • 05 - Contact integrated circuit card read using VSDC chip data rules; Online CAM authentication method; iCVV checking possible.
  • 06 - Reserved for future use.
  • 07 - Contactless device-read-originated using qVSDC chip data rules; Online CAM authentication method; iCVV checking possible.
  • 10 - Credential on file: Transaction initiated using a credential that has previously been stored on file.
  • 90 - Magnetic stripe read and exact content of Track 1 or Track 2 included (CVV check possible).
  • 91 - Contactless device-read-originated using magnetic stripe data rules; dCVV checking is possible; Online CAM checking possible for MSD CVN 17 only.
  • 95 - Integrated circuit card read; CVV or iCVV checking may not be possible. Position 3: PIN Entry Capability
  • 0 - Unknown.
  • 1 - Indicates terminal can accept and forward online PINs.
  • 2 - Indicates terminal cannot accept and forward online PINs.
  • 8 - Terminal PIN pad down.
  • 9 - Reserved for future use. Position 4: Fill
  • 0 - Unused.

Returns:

  • (String)


97
98
99
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 97

def pos_entry_mode
  @pos_entry_mode
end

#spend_qualified_indicatorString

This field is determined using the point-of-sale spend history and the defined product-level spend requirement for the country of issuance. Use this field only for clearing with your acquirer. Possible values:

  • Space - Spend-processing does not apply.
  • B - Base spend-assessment threshold defined by Visa has been met.
  • N - Spend-assessment threshold defined by Visa has not been met.
  • Q - Qualified spend-assessment threshold defined by Visa has been met.

Returns:

  • (String)


128
129
130
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 128

def spend_qualified_indicator
  @spend_qualified_indicator
end

#validation_codeString

This field ensures that key fields used in authorization messages match their respective fields in clearing transaction. Use this field only for clearing with your acquirer.

Returns:

  • (String)


134
135
136
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 134

def validation_code
  @validation_code
end

Class Method Details

.from_element(root) ⇒ Object



243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 243

def self.from_element(root)
  authorization_characteristics_indicator = XmlUtilities.from_element(
    root, 'authorizationCharacteristicsIndicator', String
  )
  accountfunding_source = XmlUtilities.from_element(root,
                                                    'accountfundingSource',
                                                    String)
  cardholder_id_method = XmlUtilities.from_element(root,
                                                   'cardholderIdMethod',
                                                   String)
  market_specific_data_identifier = XmlUtilities.from_element(
    root, 'marketSpecificDataIdentifier', String
  )
  pos_entry_mode = XmlUtilities.from_element(root, 'posEntryMode', String)
  electronic_commerce_indicator = XmlUtilities.from_element(
    root, 'electronicCommerceIndicator', String
  )
  spend_qualified_indicator = XmlUtilities.from_element(
    root, 'spendQualifiedIndicator', String
  )
  validation_code = XmlUtilities.from_element(root, 'validationCode',
                                              String)

  new(authorization_characteristics_indicator: authorization_characteristics_indicator,
      accountfunding_source: accountfunding_source,
      cardholder_id_method: cardholder_id_method,
      market_specific_data_identifier: market_specific_data_identifier,
      pos_entry_mode: pos_entry_mode,
      electronic_commerce_indicator: electronic_commerce_indicator,
      spend_qualified_indicator: spend_qualified_indicator,
      validation_code: validation_code,
      additional_properties: additional_properties)
end

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 204

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  authorization_characteristics_indicator =
    hash.key?('authorizationCharacteristicsIndicator') ? hash['authorizationCharacteristicsIndicator'] : SKIP
  accountfunding_source =
    hash.key?('accountfundingSource') ? hash['accountfundingSource'] : SKIP
  cardholder_id_method =
    hash.key?('cardholderIdMethod') ? hash['cardholderIdMethod'] : SKIP
  market_specific_data_identifier =
    hash.key?('marketSpecificDataIdentifier') ? hash['marketSpecificDataIdentifier'] : SKIP
  pos_entry_mode = hash.key?('posEntryMode') ? hash['posEntryMode'] : SKIP
  electronic_commerce_indicator =
    hash.key?('electronicCommerceIndicator') ? hash['electronicCommerceIndicator'] : SKIP
  spend_qualified_indicator =
    hash.key?('spendQualifiedIndicator') ? hash['spendQualifiedIndicator'] : SKIP
  validation_code =
    hash.key?('validationCode') ? hash['validationCode'] : SKIP

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  ClearingInformation.new(authorization_characteristics_indicator: authorization_characteristics_indicator,
                          accountfunding_source: accountfunding_source,
                          cardholder_id_method: cardholder_id_method,
                          market_specific_data_identifier: market_specific_data_identifier,
                          pos_entry_mode: pos_entry_mode,
                          electronic_commerce_indicator: electronic_commerce_indicator,
                          spend_qualified_indicator: spend_qualified_indicator,
                          validation_code: validation_code,
                          additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 137

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['authorization_characteristics_indicator'] =
    'authorizationCharacteristicsIndicator'
  @_hash['accountfunding_source'] = 'accountfundingSource'
  @_hash['cardholder_id_method'] = 'cardholderIdMethod'
  @_hash['market_specific_data_identifier'] =
    'marketSpecificDataIdentifier'
  @_hash['pos_entry_mode'] = 'posEntryMode'
  @_hash['electronic_commerce_indicator'] = 'electronicCommerceIndicator'
  @_hash['spend_qualified_indicator'] = 'spendQualifiedIndicator'
  @_hash['validation_code'] = 'validationCode'
  @_hash
end

.nullablesObject

An array for nullable fields



167
168
169
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 167

def self.nullables
  []
end

.optionalsObject

An array for optional fields



153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 153

def self.optionals
  %w[
    authorization_characteristics_indicator
    accountfunding_source
    cardholder_id_method
    market_specific_data_identifier
    pos_entry_mode
    electronic_commerce_indicator
    spend_qualified_indicator
    validation_code
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



315
316
317
318
319
320
321
322
323
324
325
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 315

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} authorization_characteristics_indicator:"\
  " #{@authorization_characteristics_indicator.inspect}, accountfunding_source:"\
  " #{@accountfunding_source.inspect}, cardholder_id_method: #{@cardholder_id_method.inspect},"\
  " market_specific_data_identifier: #{@market_specific_data_identifier.inspect},"\
  " pos_entry_mode: #{@pos_entry_mode.inspect}, electronic_commerce_indicator:"\
  " #{@electronic_commerce_indicator.inspect}, spend_qualified_indicator:"\
  " #{@spend_qualified_indicator.inspect}, validation_code: #{@validation_code.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



303
304
305
306
307
308
309
310
311
312
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 303

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} authorization_characteristics_indicator:"\
  " #{@authorization_characteristics_indicator}, accountfunding_source:"\
  " #{@accountfunding_source}, cardholder_id_method: #{@cardholder_id_method},"\
  " market_specific_data_identifier: #{@market_specific_data_identifier}, pos_entry_mode:"\
  " #{@pos_entry_mode}, electronic_commerce_indicator: #{@electronic_commerce_indicator},"\
  " spend_qualified_indicator: #{@spend_qualified_indicator}, validation_code:"\
  " #{@validation_code}, additional_properties: #{@additional_properties}>"
end

#to_xml_element(doc, root_name) ⇒ Object



277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
# File 'lib/cyber_source_merged_spec/models/clearing_information.rb', line 277

def to_xml_element(doc, root_name)
  root = doc.create_element(root_name)

  XmlUtilities.add_as_subelement(doc, root,
                                 'authorizationCharacteristicsIndicator',
                                 authorization_characteristics_indicator)
  XmlUtilities.add_as_subelement(doc, root, 'accountfundingSource',
                                 accountfunding_source)
  XmlUtilities.add_as_subelement(doc, root, 'cardholderIdMethod',
                                 cardholder_id_method)
  XmlUtilities.add_as_subelement(doc, root, 'marketSpecificDataIdentifier',
                                 market_specific_data_identifier)
  XmlUtilities.add_as_subelement(doc, root, 'posEntryMode', pos_entry_mode)
  XmlUtilities.add_as_subelement(doc, root, 'electronicCommerceIndicator',
                                 electronic_commerce_indicator)
  XmlUtilities.add_as_subelement(doc, root, 'spendQualifiedIndicator',
                                 spend_qualified_indicator)
  XmlUtilities.add_as_subelement(doc, root, 'validationCode',
                                 validation_code)
  XmlUtilities.add_as_subelement(doc, root, 'additional_properties',
                                 additional_properties)

  root
end