Class: CyberSource::RiskV1AuthenticationResultsPost201ResponseConsumerAuthenticationInformation

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ RiskV1AuthenticationResultsPost201ResponseConsumerAuthenticationInformation

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 91

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?(:'authenticationResult')
    self.authentication_result = attributes[:'authenticationResult']
  end

  if attributes.has_key?(:'authenticationStatusMsg')
    self.authentication_status_msg = attributes[:'authenticationStatusMsg']
  end

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

  if attributes.has_key?(:'cavvAlgorithm')
    self.cavv_algorithm = attributes[:'cavvAlgorithm']
  end

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

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

  if attributes.has_key?(:'eciRaw')
    self.eci_raw = attributes[:'eciRaw']
  end

  if attributes.has_key?(:'paresStatus')
    self.pares_status = attributes[:'paresStatus']
  end

  if attributes.has_key?(:'specificationVersion')
    self.specification_version = attributes[:'specificationVersion']
  end

  if attributes.has_key?(:'ucafAuthenticationData')
    self.ucaf_authentication_data = attributes[:'ucafAuthenticationData']
  end

  if attributes.has_key?(:'ucafCollectionIndicator')
    self.ucaf_collection_indicator = attributes[:'ucafCollectionIndicator']
  end

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

Instance Attribute Details

#authentication_resultObject

Raw authentication data that comes from the cardissuing bank. Primary authentication field that indicates if authentication was successful and if liability shift occurred. You should examine first the result of this field. This field contains one of these values: - ‘-1`: Invalid PARes. - `0`: Successful validation. - `1`: Cardholder is not participating, but the attempt to authenticate was recorded. - `6`: Issuer unable to perform authentication. - `9`: Cardholder did not complete authentication.



18
19
20
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 18

def authentication_result
  @authentication_result
end

#authentication_status_msgObject

Message that explains the authenticationResult reply field.



21
22
23
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 21

def authentication_status_msg
  @authentication_status_msg
end

#cavvObject

Unique identifier generated by the card-issuing bank for Visa, American Express, JCB, Diners Club, and Discover transactions after the customer is authenticated. The value is in base64. When you request the card authorization service, CyberSource automatically converts the value, not the field name, to the format required by your payment processor.



24
25
26
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 24

def cavv
  @cavv
end

#cavv_algorithmObject

Field that is returned only when the CAVV is generated, which occurs when paresStatus contains the values Y (successful authentication) or A (attempted authentication). If you use the ATOS processor, send the value of this field in the ‘cavv_algorithm` request field of the authorization service. This field contains one of these values: - `2`: Visa, American Express, JCB, Diners Club, and Discover - `3`: Mastercard



27
28
29
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 27

def cavv_algorithm
  @cavv_algorithm
end

#eciObject

Note This field applies only to non-U.S-issued cards. For enroll, Numeric electronic commerce indicator (ECI) returned only for Visa, American Express, JCB, Diners Club, and Discover transactions when the card is not enrolled. For more information, see "Interpreting the Reply," page 22. If you are not using the CyberSource payment services, you must send this value to your payment processor in the subsequent request for card authorization. This field contains one of these values: - ‘06`: The card can be enrolled. Liability shift. - `07`: The card cannot be enrolled. No liability shift. For validate, Numeric electronic commerce indicator (ECI) returned only for Visa, American Express, JCB, Diners Club, and Discover transactions. The field is absent when authentication fails. You must send this value to your payment processor in the subsequent request for card authorization. This field contains one of these values: - `05`: Successful authentication - `06`: Authentication attempted - `07`: Failed authentication (No response from the merchant because of a problem.)



33
34
35
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 33

def eci
  @eci
end

#eci_rawObject

ECI value that can be returned for Visa, Mastercard, American Express, JCB, Diners Club, and Discover. The field is absent when authentication fails. If your payment processor is Streamline, you must pass the value of this field instead of the value of ‘eci` or `ucafCollectionIndicator`. This field can contain one of these values: - `01`: Authentication attempted (Mastercard) - `02`: Successful authentication (Mastercard) - `05`: Successful authentication (Visa, American Express, JCB, Diners Club, and Discover) - `06`: Authentication attempted (Visa, American Express, JCB, Diners Club, and Discover)



36
37
38
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 36

def eci_raw
  @eci_raw
end

#indicatorObject

Indicator used to differentiate Internet transactions from other types. The authentication failed if this field is not returned. For Visa, if your payment processor is Streamline, Barclays, AIBMS, or FDC Germany, you receive the value vbv_failure instead of internet when eci is 07. The value of this field is passed automatically to the authorization service if you request the services together. This field contains one of these values: - ‘aesk`: American Express SafeKey authentication verified successfully. - `aesk_attempted`: Card not enrolled in American Express SafeKey, but the attempt to authenticate was recorded. - `dipb`: Discover ProtectBuy authentication verified successfully. - `dipb_attempted`: Card not enrolled in Discover ProtectBuy, but the attempt to authenticate was recorded. - `internet`: Authentication was not verified successfully. - `js`: J/Secure authentication verified successfully. - `js_attempted`: Card not enrolled in J/Secure, but the attempt to authenticate was recorded. - `moto`: Mail or telephone order. - `pb_attempted`: Card not enrolled in Diners Club ProtectBuy, but the attempt to authenticate was recorded. - `recurring`: Recurring transaction. - `spa`: Mastercard SecureCode authentication verified successfully. - `spa_failure`: Mastercard SecureCode failed authentication. - `vbv`: Visa Secure authentication verified successfully. - `vbv_attempted`: Card not enrolled in Visa Secure, but the attempt to authenticate was recorded. - `vbv_failure`: Visa Secure authentication unavailable.



30
31
32
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 30

def indicator
  @indicator
end

#pares_statusObject

Raw result of the authentication check. If you are configured for Asia, Middle East, and Africa Gateway Processing, you need to send the value of this field in your authorization request. This field can contain one of these values: - ‘A`: Proof of authentication attempt was generated. - `B`: Bypassed authentication. - `N`: Customer failed or canceled authentication. Transaction denied. - `R`: Authentication rejected (used for 3D Secure 2.0 transactions only) - `U`: Authentication not completed regardless of the reason. - `Y`: Customer was successfully authenticated.



39
40
41
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 39

def pares_status
  @pares_status
end

#specification_versionObject

This field contains the 3D Secure version that was used to process the transaction. For example, 1.0.2 or 2.0.0.



42
43
44
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 42

def specification_version
  @specification_version
end

#ucaf_authentication_dataObject

AAV is a unique identifier generated by the cardissuing bank for Mastercard SecureCode transactions after the customer is authenticated. The value is in base64. Include the data in the card authorization request.



45
46
47
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 45

def ucaf_authentication_data
  @ucaf_authentication_data
end

#ucaf_collection_indicatorObject

For enroll, Returned only for Mastercard transactions. Indicates that authentication is not required because the customer is not enrolled. Add the value of this field to the authorization field ucaf_collection_indicator. This field can contain these values: 0, 1. For validate, Numeric electronic commerce indicator (ECI) returned only for Mastercard SecureCode transactions. The field is absent when authentication fails. You must send this value to your payment processor in the request for card authorization. This field contain one of these values: - ‘0`: Authentication data not collected, and customer authentication was not completed. - `1`: Authentication data not collected because customer authentication was not completed. - `2`: Authentication data collected because customer completed authentication.



48
49
50
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 48

def ucaf_collection_indicator
  @ucaf_collection_indicator
end

#xidObject

Transaction identifier generated by CyberSource for successful enrollment or validation checks. Use this value, which is in base64, to match an outgoing PAReq with an incoming PARes. CyberSource forwards the XID with the card authorization service to these payment processors in these cases: - Barclays - Streamline (when the ecommerceIndicator`=spa`)



51
52
53
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 51

def xid
  @xid
end

Class Method Details

.attribute_mapObject

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



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 54

def self.attribute_map
  {
    :'authentication_result' => :'authenticationResult',
    :'authentication_status_msg' => :'authenticationStatusMsg',
    :'cavv' => :'cavv',
    :'cavv_algorithm' => :'cavvAlgorithm',
    :'indicator' => :'indicator',
    :'eci' => :'eci',
    :'eci_raw' => :'eciRaw',
    :'pares_status' => :'paresStatus',
    :'specification_version' => :'specificationVersion',
    :'ucaf_authentication_data' => :'ucafAuthenticationData',
    :'ucaf_collection_indicator' => :'ucafCollectionIndicator',
    :'xid' => :'xid'
  }
end

.swagger_typesObject

Attribute type mapping.



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 72

def self.swagger_types
  {
    :'authentication_result' => :'String',
    :'authentication_status_msg' => :'String',
    :'cavv' => :'String',
    :'cavv_algorithm' => :'String',
    :'indicator' => :'String',
    :'eci' => :'String',
    :'eci_raw' => :'String',
    :'pares_status' => :'String',
    :'specification_version' => :'String',
    :'ucaf_authentication_data' => :'String',
    :'ucaf_collection_indicator' => :'Float',
    :'xid' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 191

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      authentication_result == o.authentication_result &&
      authentication_status_msg == o.authentication_status_msg &&
      cavv == o.cavv &&
      cavv_algorithm == o.cavv_algorithm &&
      indicator == o.indicator &&
      eci == o.eci &&
      eci_raw == o.eci_raw &&
      pares_status == o.pares_status &&
      specification_version == o.specification_version &&
      ucaf_authentication_data == o.ucaf_authentication_data &&
      ucaf_collection_indicator == o.ucaf_collection_indicator &&
      xid == o.xid
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



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
276
277
278
279
280
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 244

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



310
311
312
313
314
315
316
317
318
319
320
321
322
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 310

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



223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 223

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("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{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


210
211
212
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 210

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



216
217
218
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 216

def hash
  [authentication_result, authentication_status_msg, cavv, cavv_algorithm, indicator, eci, eci_raw, pares_status, specification_version, ucaf_authentication_data, ucaf_collection_indicator, xid].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 148

def list_invalid_properties
  invalid_properties = Array.new
  if !@cavv.nil? && @cavv.to_s.length > 255
    invalid_properties.push('invalid value for "cavv", the character length must be smaller than or equal to 255.')
  end

  if !@cavv_algorithm.nil? && @cavv_algorithm.to_s.length > 1
    invalid_properties.push('invalid value for "cavv_algorithm", the character length must be smaller than or equal to 1.')
  end

  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



290
291
292
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 290

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



296
297
298
299
300
301
302
303
304
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 296

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



284
285
286
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 284

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



163
164
165
166
167
# File 'lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb', line 163

def valid?
  return false if !@cavv.nil? && @cavv.to_s.length > 255
  return false if !@cavv_algorithm.nil? && @cavv_algorithm.to_s.length > 1
  true
end