Class: CyberSourceMergedSpec::PointOfSaleInformation14

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

Overview

PointOfSaleInformation14 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(terminal_id: SKIP, entry_mode: SKIP, terminal_capability: SKIP, cardholder_verification_method_used: SKIP, emv: SKIP, additional_properties: nil) ⇒ PointOfSaleInformation14

Returns a new instance of PointOfSaleInformation14.



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information14.rb', line 169

def initialize(terminal_id: SKIP, entry_mode: SKIP,
               terminal_capability: SKIP,
               cardholder_verification_method_used: SKIP, emv: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @terminal_id = terminal_id unless terminal_id == SKIP
  @entry_mode = entry_mode unless entry_mode == SKIP
  @terminal_capability = terminal_capability unless terminal_capability == SKIP
  unless cardholder_verification_method_used == SKIP
    @cardholder_verification_method_used =
      cardholder_verification_method_used
  end
  @emv = emv unless emv == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#cardholder_verification_method_usedInteger

Method that was used to verify the cardholder's identity. Possible values:

- `0`: No verification
- `1`: Signature
- `2`: PIN
- `3`: Cardholder device CVM
- `4`: Biometric
- `5`: OTP

Returns:

  • (Integer)


129
130
131
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information14.rb', line 129

def cardholder_verification_method_used
  @cardholder_verification_method_used
end

#emvEmv2

Method that was used to verify the cardholder's identity. Possible values:

- `0`: No verification
- `1`: Signature
- `2`: PIN
- `3`: Cardholder device CVM
- `4`: Biometric
- `5`: OTP

Returns:



139
140
141
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information14.rb', line 139

def emv
  @emv
end

#entry_modeString

Method of entering payment card information into the POS terminal. Possible values:

  • contact: Read from direct contact with chip card.
  • contactless: Read from a contactless interface using chip data.
  • keyed: Manually keyed into POS terminal. This value is not supported on OmniPay Direct.
  • msd: Read from a contactless interface using magnetic stripe data (MSD). This value is not supported on OmniPay Direct.
  • swiped: Read from credit card magnetic stripe. The contact, contactless, and msd values are supported only for EMV transactions.

Used by

Authorization Required field.

Card Present

Card present information about EMV applies only to credit card processing and PIN debit processing. All other card present information applies only to credit card processing.

PIN debit

Required for a PIN debit purchase and a PIN debit credit request.

Returns:

  • (String)


88
89
90
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information14.rb', line 88

def entry_mode
  @entry_mode
end

#terminal_capabilityInteger

POS terminal’s capability. Possible values:

  • 1: Terminal has a magnetic stripe reader only.
  • 2: Terminal has a magnetic stripe reader and manual entry capability.
  • 3: Terminal has manual entry capability only.
  • 4: Terminal can read chip cards.
  • 5: Terminal can read contactless chip cards; cannot use contact to read chip cards. For an EMV transaction, the value of this field must be 4 or 5.

PIN debit

Required for PIN debit purchase and PIN debit credit request.

Used by

Authorization Required for the following processors:

  • American Express Direct
  • Chase Paymentech Solutions
  • Credit Mutuel-CIC
  • FDC Nashville Global
  • FDMS Nashville
  • OmniPay Direct
  • SIX
  • Worldpay VAP Optional for the following processors:
  • CyberSource through VisaNet
  • GPN
  • GPX
  • JCN Gateway
  • RBS WorldPay Atlanta
  • TSYS Acquiring Solutions

Returns:

  • (Integer)


119
120
121
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information14.rb', line 119

def terminal_capability
  @terminal_capability
end

#terminal_idString

Identifier for the terminal at your retail location. You can define this value yourself, but consult the processor for requirements.

CyberSource through VisaNet

A list of all possible values is stored in your CyberSource account. If terminal ID validation is enabled for your CyberSource account, the value you send for this field is validated against the list each time you include the field in a request. To enable or disable terminal ID validation, contact CyberSource Customer Support. When you do not include this field in a request, CyberSource uses the default value that is defined in your CyberSource account.

FDC Nashville Global

To have your account configured to support this field, contact CyberSource Customer Support. This value must be a value that FDC Nashville Global issued to you.

For Payouts

This field is applicable for CyberSource through VisaNet.

GPX

Identifier for the terminal at your retail location. A list of all possible values is stored in your account. If terminal ID validation is enabled for your account, the value you send for this field is validated against the list each time you include the field in a request. To enable or disable terminal ID validation, contact customer support. When you do not include this field in a request, the default value that is defined in your account is used. Optional for authorizations.

Used by

Authorization Optional for the following processors. When you do not include this field in a request, the default value that is defined in your account is used.

  • American Express Direct
  • Credit Mutuel-CIC
  • FDC Nashville Global
  • SIX
  • Chase Paymentech Solutions: Optional field. If you include this field in your request, you must also include pointOfSaleInformation.catLevel.
  • FDMS Nashville: The default value that is defined in your account is used.
  • GPX
  • OmniPay Direct: Optional field. For the following processors, this field is not used.
  • GPN
  • JCN Gateway
  • RBS WorldPay Atlanta
  • TSYS Acquiring Solutions
  • Worldpay VAP

Card Present reply

Terminal identifier assigned by the acquirer. This value must be printed on the receipt.

Returns:

  • (String)


65
66
67
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information14.rb', line 65

def terminal_id
  @terminal_id
end

Class Method Details

.from_element(root) ⇒ Object



216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information14.rb', line 216

def self.from_element(root)
  terminal_id = XmlUtilities.from_element(root, 'terminalId', String)
  entry_mode = XmlUtilities.from_element(root, 'entryMode', String)
  terminal_capability = XmlUtilities.from_element(root,
                                                  'terminalCapability',
                                                  Integer)
  cardholder_verification_method_used = XmlUtilities.from_element(
    root, 'cardholderVerificationMethodUsed', Integer
  )
  emv = XmlUtilities.from_element(root, 'Emv2', Emv2)

  new(terminal_id: terminal_id,
      entry_mode: entry_mode,
      terminal_capability: terminal_capability,
      cardholder_verification_method_used: cardholder_verification_method_used,
      emv: emv,
      additional_properties: additional_properties)
end

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  terminal_id = hash.key?('terminalId') ? hash['terminalId'] : SKIP
  entry_mode = hash.key?('entryMode') ? hash['entryMode'] : SKIP
  terminal_capability =
    hash.key?('terminalCapability') ? hash['terminalCapability'] : SKIP
  cardholder_verification_method_used =
    hash.key?('cardholderVerificationMethodUsed') ? hash['cardholderVerificationMethodUsed'] : SKIP
  emv = Emv2.from_hash(hash['emv']) if hash['emv']

  # 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.
  PointOfSaleInformation14.new(terminal_id: terminal_id,
                               entry_mode: entry_mode,
                               terminal_capability: terminal_capability,
                               cardholder_verification_method_used: cardholder_verification_method_used,
                               emv: emv,
                               additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



142
143
144
145
146
147
148
149
150
151
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information14.rb', line 142

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['terminal_id'] = 'terminalId'
  @_hash['entry_mode'] = 'entryMode'
  @_hash['terminal_capability'] = 'terminalCapability'
  @_hash['cardholder_verification_method_used'] =
    'cardholderVerificationMethodUsed'
  @_hash['emv'] = 'emv'
  @_hash
end

.nullablesObject

An array for nullable fields



165
166
167
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information14.rb', line 165

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    terminal_id
    entry_mode
    terminal_capability
    cardholder_verification_method_used
    emv
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



262
263
264
265
266
267
268
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information14.rb', line 262

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} terminal_id: #{@terminal_id.inspect}, entry_mode: #{@entry_mode.inspect},"\
  " terminal_capability: #{@terminal_capability.inspect}, cardholder_verification_method_used:"\
  " #{@cardholder_verification_method_used.inspect}, emv: #{@emv.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



253
254
255
256
257
258
259
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information14.rb', line 253

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} terminal_id: #{@terminal_id}, entry_mode: #{@entry_mode},"\
  " terminal_capability: #{@terminal_capability}, cardholder_verification_method_used:"\
  " #{@cardholder_verification_method_used}, emv: #{@emv}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_xml_element(doc, root_name) ⇒ Object



235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information14.rb', line 235

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

  XmlUtilities.add_as_subelement(doc, root, 'terminalId', terminal_id)
  XmlUtilities.add_as_subelement(doc, root, 'entryMode', entry_mode)
  XmlUtilities.add_as_subelement(doc, root, 'terminalCapability',
                                 terminal_capability)
  XmlUtilities.add_as_subelement(doc, root,
                                 'cardholderVerificationMethodUsed',
                                 cardholder_verification_method_used)
  XmlUtilities.add_as_subelement(doc, root, 'Emv2', emv)
  XmlUtilities.add_as_subelement(doc, root, 'additional_properties',
                                 additional_properties)

  root
end