Class: CyberSource::UnifiedriskDevicePointOfSale

Inherits:
Object
  • Object
show all
Defined in:
lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UnifiedriskDevicePointOfSale

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



126
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
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 126

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'attendedIndicator')
    self.attended_indicator = attributes[:'attendedIndicator']
  end

  if attributes.has_key?(:'cardDataEntryMode')
    self.card_data_entry_mode = attributes[:'cardDataEntryMode']
  end

  if attributes.has_key?(:'cardPresent')
    self.card_present = attributes[:'cardPresent']
  end

  if attributes.has_key?(:'cardholderActivated')
    self.cardholder_activated = attributes[:'cardholderActivated']
  end

  if attributes.has_key?(:'cardholderPresent')
    self.cardholder_present = attributes[:'cardholderPresent']
  end

  if attributes.has_key?(:'eCommerceData')
    self.e_commerce_data = attributes[:'eCommerceData']
  end

  if attributes.has_key?(:'eCommerceIndicator')
    self.e_commerce_indicator = attributes[:'eCommerceIndicator']
  end

  if attributes.has_key?(:'iccFallbackIndicator')
    self.icc_fallback_indicator = attributes[:'iccFallbackIndicator']
  end

  if attributes.has_key?(:'ipAddress')
    self.ip_address = attributes[:'ipAddress']
  end

  if attributes.has_key?(:'magneticStripeFallbackIndicator')
    self.magnetic_stripe_fallback_indicator = attributes[:'magneticStripeFallbackIndicator']
  end

  if attributes.has_key?(:'motoIndicator')
    self.moto_indicator = attributes[:'motoIndicator']
  end

  if attributes.has_key?(:'partialApprovalSupported')
    self.partial_approval_supported = attributes[:'partialApprovalSupported']
  end

  if attributes.has_key?(:'securityCharacteristics')
    self.security_characteristics = attributes[:'securityCharacteristics']
  end

  if attributes.has_key?(:'storageLocation')
    self.storage_location = attributes[:'storageLocation']
  end

  if attributes.has_key?(:'unattendedLevelCategory')
    self.unattended_level_category = attributes[:'unattendedLevelCategory']
  end
end

Instance Attribute Details

#attended_indicatorObject

Card acceptor representative in attendance at the point of service during the transaction. When an acceptor's terminal is semi-attended (for example, multiple terminals supervised by a single clerk),



17
18
19
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 17

def attended_indicator
  @attended_indicator
end

#card_data_entry_modeObject

Entry mode of the card data for the transaction; possible values are: CDFL CardOnFile Card information are stored on a file. ICPY ICCProximity ICC contactless proximity MGST MagneticStripe ICCY ICCCon



20
21
22
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 20

def card_data_entry_mode
  @card_data_entry_mode
end

#card_presentObject

Indicates whether the transaction has been initiated by a card physically present (true) or not (false).



23
24
25
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 23

def card_present
  @card_present
end

#cardholder_activatedObject

Indicates whether the automated device was operated solely by the cardholder or not (for example, vending machine, automated fuel dispenser, ATM, kiosk, etc.).



26
27
28
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 26

def cardholder_activated
  @cardholder_activated
end

#cardholder_presentObject

Indicates whether the transaction has been initiated in presence of the cardholder or not. It can assume multiple values (e.g. "cardholder present", "cardholder not present telephone", etc).



29
30
31
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 29

def cardholder_present
  @cardholder_present
end

#e_commerce_dataObject

This is a free text field that can be used if additional e-commerce data is available. Please note that this field should not contain any cardholder data or sensitive authentication data (SAD), as def



32
33
34
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 32

def e_commerce_data
  @e_commerce_data
end

#e_commerce_indicatorObject

Indicates whether the point of service is an e-commerce one (true) or not (false). When true, the cardPresent field is expected to be set to false.



35
36
37
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 35

def e_commerce_indicator
  @e_commerce_indicator
end

#icc_fallback_indicatorObject

Indicates a chip data fallback, where the chip cannot be read due to a technical issue with the chip which results in the technology "falling back" from ICC to a magnetic stripe transaction.



38
39
40
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 38

def icc_fallback_indicator
  @icc_fallback_indicator
end

#ip_addressObject

IP address of point of service terminal



41
42
43
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 41

def ip_address
  @ip_address
end

#magnetic_stripe_fallback_indicatorObject

Indicates a magstripe fallback where the magnetic strip cannot be read which results in the technology "falling back" to manually keying the card details into the pos.



44
45
46
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 44

def magnetic_stripe_fallback_indicator
  @magnetic_stripe_fallback_indicator
end

#moto_indicatorObject

Indicates whether the context of the point of service is a MOTO one (true) or not (false). When true, the cardPresent field is expected to be set to false.



47
48
49
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 47

def moto_indicator
  @moto_indicator
end

#partial_approval_supportedObject

Indicates whether the point of service supports partial approval or not. true: partial approval is supported false: partial approval is not supported



50
51
52
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 50

def partial_approval_supported
  @partial_approval_supported
end

#security_characteristicsObject

This fields identifies the security characteristics of the communication link in the card acceptance process; possible values are: CETE CardholderEndToEndEncryption CPTE CardholderPointToPointEncrypti



53
54
55
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 53

def security_characteristics
  @security_characteristics
end

#storage_locationObject

This field details the location where the payments credentials (tipically a card number or payment token) are stored. This is only applicable to payments where the credentials are stored by or on beha



56
57
58
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 56

def storage_location
  @storage_location
end

#unattended_level_categoryObject

Card scheme defined transaction category level on an unattended terminal. It identifies the type of terminal. The values are typically mandated by the card scheme being used. Examples for Mastercard a



59
60
61
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 59

def unattended_level_category
  @unattended_level_category
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 62

def self.attribute_map
  {
    :'attended_indicator' => :'attendedIndicator',
    :'card_data_entry_mode' => :'cardDataEntryMode',
    :'card_present' => :'cardPresent',
    :'cardholder_activated' => :'cardholderActivated',
    :'cardholder_present' => :'cardholderPresent',
    :'e_commerce_data' => :'eCommerceData',
    :'e_commerce_indicator' => :'eCommerceIndicator',
    :'icc_fallback_indicator' => :'iccFallbackIndicator',
    :'ip_address' => :'ipAddress',
    :'magnetic_stripe_fallback_indicator' => :'magneticStripeFallbackIndicator',
    :'moto_indicator' => :'motoIndicator',
    :'partial_approval_supported' => :'partialApprovalSupported',
    :'security_characteristics' => :'securityCharacteristics',
    :'storage_location' => :'storageLocation',
    :'unattended_level_category' => :'unattendedLevelCategory'
  }
end

.json_mapObject

Attribute mapping from JSON key to ruby-style variable name.



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 83

def self.json_map
  {
    :'attended_indicator' => :'attended_indicator',
    :'card_data_entry_mode' => :'card_data_entry_mode',
    :'card_present' => :'card_present',
    :'cardholder_activated' => :'cardholder_activated',
    :'cardholder_present' => :'cardholder_present',
    :'e_commerce_data' => :'e_commerce_data',
    :'e_commerce_indicator' => :'e_commerce_indicator',
    :'icc_fallback_indicator' => :'icc_fallback_indicator',
    :'ip_address' => :'ip_address',
    :'magnetic_stripe_fallback_indicator' => :'magnetic_stripe_fallback_indicator',
    :'moto_indicator' => :'moto_indicator',
    :'partial_approval_supported' => :'partial_approval_supported',
    :'security_characteristics' => :'security_characteristics',
    :'storage_location' => :'storage_location',
    :'unattended_level_category' => :'unattended_level_category'
  }
end

.swagger_typesObject

Attribute type mapping.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 104

def self.swagger_types
  {
    :'attended_indicator' => :'BOOLEAN',
    :'card_data_entry_mode' => :'String',
    :'card_present' => :'BOOLEAN',
    :'cardholder_activated' => :'BOOLEAN',
    :'cardholder_present' => :'String',
    :'e_commerce_data' => :'String',
    :'e_commerce_indicator' => :'BOOLEAN',
    :'icc_fallback_indicator' => :'BOOLEAN',
    :'ip_address' => :'String',
    :'magnetic_stripe_fallback_indicator' => :'BOOLEAN',
    :'moto_indicator' => :'BOOLEAN',
    :'partial_approval_supported' => :'BOOLEAN',
    :'security_characteristics' => :'String',
    :'storage_location' => :'String',
    :'unattended_level_category' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 208

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      attended_indicator == o.attended_indicator &&
      card_data_entry_mode == o.card_data_entry_mode &&
      card_present == o.card_present &&
      cardholder_activated == o.cardholder_activated &&
      cardholder_present == o.cardholder_present &&
      e_commerce_data == o.e_commerce_data &&
      e_commerce_indicator == o.e_commerce_indicator &&
      icc_fallback_indicator == o.icc_fallback_indicator &&
      ip_address == o.ip_address &&
      magnetic_stripe_fallback_indicator == o.magnetic_stripe_fallback_indicator &&
      moto_indicator == o.moto_indicator &&
      partial_approval_supported == o.partial_approval_supported &&
      security_characteristics == o.security_characteristics &&
      storage_location == o.storage_location &&
      unattended_level_category == o.unattended_level_category
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



264
265
266
267
268
269
270
271
272
273
274
275
276
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/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 264

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = CyberSource.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 330

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 243

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


230
231
232
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 230

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



236
237
238
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 236

def hash
  [attended_indicator, card_data_entry_mode, card_present, cardholder_activated, cardholder_present, e_commerce_data, e_commerce_indicator, icc_fallback_indicator, ip_address, magnetic_stripe_fallback_indicator, moto_indicator, partial_approval_supported, security_characteristics, storage_location, unattended_level_category].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



195
196
197
198
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 195

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



310
311
312
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 310

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



316
317
318
319
320
321
322
323
324
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 316

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



304
305
306
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 304

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



202
203
204
# File 'lib/cybersource_rest_client/models/unifiedrisk_device_point_of_sale.rb', line 202

def valid?
  true
end