Class: CyberSource::UnifiedriskPaymentCardTokenDetails
- Inherits:
-
Object
- Object
- CyberSource::UnifiedriskPaymentCardTokenDetails
- Defined in:
- lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb
Instance Attribute Summary collapse
-
#additional_data ⇒ Object
Supplementary data associated with the network token, such as merchant category restrictions, wallet provider metadata, or tokenization service payload extensions.
-
#assurance_method ⇒ Object
Indicates the authentication assurance level of the token provisioning process (e.g., APP_VERIFIED, CARDHOLDER_VERIFIED), impacting liability shift decisions.
-
#bin ⇒ Object
BIN from underlying card.
-
#cryptogra_validity ⇒ Object
Indicates the validity or expiry state of the cryptogram, helping detect stale or replayed token authentication attempts.
-
#cryptogram ⇒ Object
A cryptographic value generated during tokenization (TAVV or CAVV) that authenticates the token for a specific transaction, preventing token replay attacks.
-
#expiration_date ⇒ Object
Combined expiration date of the network token in MMYYYY format, used when the token's lifecycle is managed separately from the underlying PAN.
-
#expiration_month ⇒ Object
Token expiration month.
-
#expiration_year ⇒ Object
Token expiration year.
-
#jti ⇒ Object
Transient Token JWT ID.
-
#last4 ⇒ Object
Last 4 digits of card.
-
#number ⇒ Object
Token number replacing PAN.
-
#provider_type ⇒ Object
Token provider type: network_token or merchant_token Possible values: - network_token - merchant_token.
-
#requestor_id ⇒ Object
Unique identifier of the token requestor (e.g., merchant or PSP) registered with the token service provider for DPAN provisioning and lifecycle management.
-
#status ⇒ Object
Current lifecycle status of the network token (e.g., ACTIVE, SUSPENDED, DEACTIVATED).
-
#type ⇒ Object
Type of payment credential being used.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UnifiedriskPaymentCardTokenDetails
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ UnifiedriskPaymentCardTokenDetails
Initializes the object
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_payment_card_token_details.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?(:'providerType') self.provider_type = attributes[:'providerType'] end if attributes.has_key?(:'type') self.type = attributes[:'type'] end if attributes.has_key?(:'jti') self.jti = attributes[:'jti'] end if attributes.has_key?(:'number') self.number = attributes[:'number'] end if attributes.has_key?(:'expirationMonth') self.expiration_month = attributes[:'expirationMonth'] end if attributes.has_key?(:'expirationYear') self.expiration_year = attributes[:'expirationYear'] end if attributes.has_key?(:'bin') self.bin = attributes[:'bin'] end if attributes.has_key?(:'last4') self.last4 = attributes[:'last4'] end if attributes.has_key?(:'expirationDate') self.expiration_date = attributes[:'expirationDate'] end if attributes.has_key?(:'requestorId') self.requestor_id = attributes[:'requestorId'] end if attributes.has_key?(:'cryptogram') self.cryptogram = attributes[:'cryptogram'] end if attributes.has_key?(:'status') self.status = attributes[:'status'] end if attributes.has_key?(:'cryptograValidity') self.cryptogra_validity = attributes[:'cryptograValidity'] end if attributes.has_key?(:'assuranceMethod') self.assurance_method = attributes[:'assuranceMethod'] end if attributes.has_key?(:'additionalData') self.additional_data = attributes[:'additionalData'] end end |
Instance Attribute Details
#additional_data ⇒ Object
Supplementary data associated with the network token, such as merchant category restrictions, wallet provider metadata, or tokenization service payload extensions
59 60 61 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 59 def additional_data @additional_data end |
#assurance_method ⇒ Object
Indicates the authentication assurance level of the token provisioning process (e.g., APP_VERIFIED, CARDHOLDER_VERIFIED), impacting liability shift decisions
56 57 58 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 56 def assurance_method @assurance_method end |
#bin ⇒ Object
BIN from underlying card
35 36 37 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 35 def bin @bin end |
#cryptogra_validity ⇒ Object
Indicates the validity or expiry state of the cryptogram, helping detect stale or replayed token authentication attempts
53 54 55 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 53 def cryptogra_validity @cryptogra_validity end |
#cryptogram ⇒ Object
A cryptographic value generated during tokenization (TAVV or CAVV) that authenticates the token for a specific transaction, preventing token replay attacks
47 48 49 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 47 def cryptogram @cryptogram end |
#expiration_date ⇒ Object
Combined expiration date of the network token in MMYYYY format, used when the token's lifecycle is managed separately from the underlying PAN
41 42 43 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 41 def expiration_date @expiration_date end |
#expiration_month ⇒ Object
Token expiration month
29 30 31 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 29 def expiration_month @expiration_month end |
#expiration_year ⇒ Object
Token expiration year
32 33 34 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 32 def expiration_year @expiration_year end |
#jti ⇒ Object
Transient Token JWT ID
23 24 25 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 23 def jti @jti end |
#last4 ⇒ Object
Last 4 digits of card
38 39 40 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 38 def last4 @last4 end |
#number ⇒ Object
Token number replacing PAN
26 27 28 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 26 def number @number end |
#provider_type ⇒ Object
Token provider type: network_token or merchant_token Possible values: - network_token - merchant_token
17 18 19 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 17 def provider_type @provider_type end |
#requestor_id ⇒ Object
Unique identifier of the token requestor (e.g., merchant or PSP) registered with the token service provider for DPAN provisioning and lifecycle management
44 45 46 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 44 def requestor_id @requestor_id end |
#status ⇒ Object
Current lifecycle status of the network token (e.g., ACTIVE, SUSPENDED, DEACTIVATED). Tokens that are not ACTIVE should not be used for payment
50 51 52 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 50 def status @status end |
#type ⇒ Object
Type of payment credential being used. Visa, MasterCard, AMEX
20 21 22 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 20 def type @type end |
Class Method Details
.attribute_map ⇒ Object
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_payment_card_token_details.rb', line 62 def self.attribute_map { :'provider_type' => :'providerType', :'type' => :'type', :'jti' => :'jti', :'number' => :'number', :'expiration_month' => :'expirationMonth', :'expiration_year' => :'expirationYear', :'bin' => :'bin', :'last4' => :'last4', :'expiration_date' => :'expirationDate', :'requestor_id' => :'requestorId', :'cryptogram' => :'cryptogram', :'status' => :'status', :'cryptogra_validity' => :'cryptograValidity', :'assurance_method' => :'assuranceMethod', :'additional_data' => :'additionalData' } end |
.json_map ⇒ Object
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_payment_card_token_details.rb', line 83 def self.json_map { :'provider_type' => :'provider_type', :'type' => :'type', :'jti' => :'jti', :'number' => :'number', :'expiration_month' => :'expiration_month', :'expiration_year' => :'expiration_year', :'bin' => :'bin', :'last4' => :'last4', :'expiration_date' => :'expiration_date', :'requestor_id' => :'requestor_id', :'cryptogram' => :'cryptogram', :'status' => :'status', :'cryptogra_validity' => :'cryptogra_validity', :'assurance_method' => :'assurance_method', :'additional_data' => :'additional_data' } end |
.swagger_types ⇒ Object
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_payment_card_token_details.rb', line 104 def self.swagger_types { :'provider_type' => :'String', :'type' => :'String', :'jti' => :'String', :'number' => :'String', :'expiration_month' => :'String', :'expiration_year' => :'String', :'bin' => :'String', :'last4' => :'String', :'expiration_date' => :'String', :'requestor_id' => :'String', :'cryptogram' => :'String', :'status' => :'String', :'cryptogra_validity' => :'String', :'assurance_method' => :'String', :'additional_data' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 244 def ==(o) return true if self.equal?(o) self.class == o.class && provider_type == o.provider_type && type == o.type && jti == o.jti && number == o.number && expiration_month == o.expiration_month && expiration_year == o.expiration_year && bin == o.bin && last4 == o.last4 && expiration_date == o.expiration_date && requestor_id == o.requestor_id && cryptogram == o.cryptogram && status == o.status && cryptogra_validity == o.cryptogra_validity && assurance_method == o.assurance_method && additional_data == o.additional_data end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 300 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
366 367 368 369 370 371 372 373 374 375 376 377 378 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 366 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
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 279 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
266 267 268 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 266 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
272 273 274 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 272 def hash [provider_type, type, jti, number, expiration_month, expiration_year, bin, last4, expiration_date, requestor_id, cryptogram, status, cryptogra_validity, assurance_method, additional_data].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
195 196 197 198 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 195 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
346 347 348 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 346 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
352 353 354 355 356 357 358 359 360 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 352 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_s ⇒ String
Returns the string representation of the object
340 341 342 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 340 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
202 203 204 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card_token_details.rb', line 202 def valid? true end |