Class: CyberSource::UnifiedriskPaymentCard
- Inherits:
-
Object
- Object
- CyberSource::UnifiedriskPaymentCard
- Defined in:
- lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb
Instance Attribute Summary collapse
-
#added_at_checkout ⇒ Object
Whether the card was newly entered during checkout.
-
#bin ⇒ Object
Bank Identification Number (first 6 digits).
-
#bin_entity_id ⇒ Object
Entity identifier linked to the card's BIN, used to identify the issuing institution or program associated with the card's BIN range.
-
#brand ⇒ Object
Card network: VISA, MASTERCARD, AMEX, etc.
-
#card_network ⇒ Object
Card network: VISA, MASTERCARD, AMEX, etc.
-
#entity_id ⇒ Object
Unique entity identifier for the card as assigned by the card scheme or token service provider, used for lifecycle and risk management.
-
#expiration_month ⇒ Object
Card expiration month.
-
#expiration_year ⇒ Object
Card expiration year.
-
#expiry_date ⇒ Object
Card expiry date in MMYYYY or MMYY format, used for matching against the expiry date declared during enrollment and to flag expired or about-to-expire cards.
-
#issue_date ⇒ Object
Date card was issued.
-
#issuer_country ⇒ Object
Country where card was issued.
-
#last4 ⇒ Object
Last 4 digits of card number.
-
#name ⇒ Object
Name on the card.
-
#number ⇒ Object
Tokenized or masked card number.
-
#par_details ⇒ Object
Returns the value of attribute par_details.
-
#security_code ⇒ Object
Result or presence indicator for Card Security Code (CVV2/CVC2/CID) verification.
-
#sequence_number ⇒ Object
Sequence number for cards with same PAN.
-
#status ⇒ Object
Card status: ACTIVE, BLOCKED, CANCELLED.
-
#sub_type ⇒ Object
Card subtype: GOLD, PLATINUM, etc.
-
#token_details ⇒ Object
Returns the value of attribute token_details.
-
#token_transaction_type ⇒ Object
Transaction type that provided the token data.
-
#type ⇒ Object
Card type: CREDIT, DEBIT, PREPAID etc.
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 = {}) ⇒ UnifiedriskPaymentCard
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 = {}) ⇒ UnifiedriskPaymentCard
Initializes the object
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 192 193 194 195 196 197 198 199 200 201 202 203 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 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 166 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?(:'name') self.name = attributes[:'name'] end if attributes.has_key?(:'number') self.number = attributes[:'number'] end if attributes.has_key?(:'cardNetwork') self.card_network = attributes[:'cardNetwork'] end if attributes.has_key?(:'type') self.type = attributes[:'type'] end if attributes.has_key?(:'subType') self.sub_type = attributes[:'subType'] end if attributes.has_key?(:'bin') self.bin = attributes[:'bin'] 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?(:'issueDate') self.issue_date = attributes[:'issueDate'] end if attributes.has_key?(:'issuerCountry') self.issuer_country = attributes[:'issuerCountry'] end if attributes.has_key?(:'brand') self.brand = attributes[:'brand'] end if attributes.has_key?(:'sequenceNumber') self.sequence_number = attributes[:'sequenceNumber'] end if attributes.has_key?(:'last4') self.last4 = attributes[:'last4'] end if attributes.has_key?(:'status') self.status = attributes[:'status'] end if attributes.has_key?(:'tokenTransactionType') self.token_transaction_type = attributes[:'tokenTransactionType'] end if attributes.has_key?(:'tokenDetails') self.token_details = attributes[:'tokenDetails'] end if attributes.has_key?(:'addedAtCheckout') self.added_at_checkout = attributes[:'addedAtCheckout'] end if attributes.has_key?(:'parDetails') self.par_details = attributes[:'parDetails'] end if attributes.has_key?(:'expiryDate') self.expiry_date = attributes[:'expiryDate'] end if attributes.has_key?(:'entityId') self.entity_id = attributes[:'entityId'] end if attributes.has_key?(:'binEntityId') self.bin_entity_id = attributes[:'binEntityId'] end if attributes.has_key?(:'securityCode') self.security_code = attributes[:'securityCode'] end end |
Instance Attribute Details
#added_at_checkout ⇒ Object
Whether the card was newly entered during checkout
64 65 66 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 64 def added_at_checkout @added_at_checkout end |
#bin ⇒ Object
Bank Identification Number (first 6 digits)
32 33 34 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 32 def bin @bin end |
#bin_entity_id ⇒ Object
Entity identifier linked to the card's BIN, used to identify the issuing institution or program associated with the card's BIN range
75 76 77 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 75 def bin_entity_id @bin_entity_id end |
#brand ⇒ Object
Card network: VISA, MASTERCARD, AMEX, etc
47 48 49 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 47 def brand @brand end |
#card_network ⇒ Object
Card network: VISA, MASTERCARD, AMEX, etc
23 24 25 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 23 def card_network @card_network end |
#entity_id ⇒ Object
Unique entity identifier for the card as assigned by the card scheme or token service provider, used for lifecycle and risk management
72 73 74 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 72 def entity_id @entity_id end |
#expiration_month ⇒ Object
Card expiration month
35 36 37 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 35 def expiration_month @expiration_month end |
#expiration_year ⇒ Object
Card expiration year
38 39 40 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 38 def expiration_year @expiration_year end |
#expiry_date ⇒ Object
Card expiry date in MMYYYY or MMYY format, used for matching against the expiry date declared during enrollment and to flag expired or about-to-expire cards
69 70 71 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 69 def expiry_date @expiry_date end |
#issue_date ⇒ Object
Date card was issued
41 42 43 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 41 def issue_date @issue_date end |
#issuer_country ⇒ Object
Country where card was issued
44 45 46 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 44 def issuer_country @issuer_country end |
#last4 ⇒ Object
Last 4 digits of card number
53 54 55 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 53 def last4 @last4 end |
#name ⇒ Object
Name on the card
17 18 19 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 17 def name @name end |
#number ⇒ Object
Tokenized or masked card number
20 21 22 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 20 def number @number end |
#par_details ⇒ Object
Returns the value of attribute par_details.
66 67 68 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 66 def par_details @par_details end |
#security_code ⇒ Object
Result or presence indicator for Card Security Code (CVV2/CVC2/CID) verification. Indicates whether the security code was present, verified, or matched by the issuer
78 79 80 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 78 def security_code @security_code end |
#sequence_number ⇒ Object
Sequence number for cards with same PAN
50 51 52 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 50 def sequence_number @sequence_number end |
#status ⇒ Object
Card status: ACTIVE, BLOCKED, CANCELLED
56 57 58 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 56 def status @status end |
#sub_type ⇒ Object
Card subtype: GOLD, PLATINUM, etc
29 30 31 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 29 def sub_type @sub_type end |
#token_details ⇒ Object
Returns the value of attribute token_details.
61 62 63 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 61 def token_details @token_details end |
#token_transaction_type ⇒ Object
Transaction type that provided the token data
59 60 61 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 59 def token_transaction_type @token_transaction_type end |
#type ⇒ Object
Card type: CREDIT, DEBIT, PREPAID etc.
26 27 28 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 26 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 81 def self.attribute_map { :'name' => :'name', :'number' => :'number', :'card_network' => :'cardNetwork', :'type' => :'type', :'sub_type' => :'subType', :'bin' => :'bin', :'expiration_month' => :'expirationMonth', :'expiration_year' => :'expirationYear', :'issue_date' => :'issueDate', :'issuer_country' => :'issuerCountry', :'brand' => :'brand', :'sequence_number' => :'sequenceNumber', :'last4' => :'last4', :'status' => :'status', :'token_transaction_type' => :'tokenTransactionType', :'token_details' => :'tokenDetails', :'added_at_checkout' => :'addedAtCheckout', :'par_details' => :'parDetails', :'expiry_date' => :'expiryDate', :'entity_id' => :'entityId', :'bin_entity_id' => :'binEntityId', :'security_code' => :'securityCode' } end |
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
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 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 109 def self.json_map { :'name' => :'name', :'number' => :'number', :'card_network' => :'card_network', :'type' => :'type', :'sub_type' => :'sub_type', :'bin' => :'bin', :'expiration_month' => :'expiration_month', :'expiration_year' => :'expiration_year', :'issue_date' => :'issue_date', :'issuer_country' => :'issuer_country', :'brand' => :'brand', :'sequence_number' => :'sequence_number', :'last4' => :'last4', :'status' => :'status', :'token_transaction_type' => :'token_transaction_type', :'token_details' => :'token_details', :'added_at_checkout' => :'added_at_checkout', :'par_details' => :'par_details', :'expiry_date' => :'expiry_date', :'entity_id' => :'entity_id', :'bin_entity_id' => :'bin_entity_id', :'security_code' => :'security_code' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 137 def self.swagger_types { :'name' => :'String', :'number' => :'String', :'card_network' => :'String', :'type' => :'String', :'sub_type' => :'String', :'bin' => :'String', :'expiration_month' => :'String', :'expiration_year' => :'String', :'issue_date' => :'Date', :'issuer_country' => :'String', :'brand' => :'String', :'sequence_number' => :'Integer', :'last4' => :'String', :'status' => :'String', :'token_transaction_type' => :'String', :'token_details' => :'UnifiedriskPaymentCardTokenDetails', :'added_at_checkout' => :'BOOLEAN', :'par_details' => :'UnifiedriskPaymentCardParDetails', :'expiry_date' => :'String', :'entity_id' => :'String', :'bin_entity_id' => :'String', :'security_code' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 318 def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name && number == o.number && card_network == o.card_network && type == o.type && sub_type == o.sub_type && bin == o.bin && expiration_month == o.expiration_month && expiration_year == o.expiration_year && issue_date == o.issue_date && issuer_country == o.issuer_country && brand == o.brand && sequence_number == o.sequence_number && last4 == o.last4 && status == o.status && token_transaction_type == o.token_transaction_type && token_details == o.token_details && added_at_checkout == o.added_at_checkout && par_details == o.par_details && expiry_date == o.expiry_date && entity_id == o.entity_id && bin_entity_id == o.bin_entity_id && security_code == o.security_code end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 381 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
447 448 449 450 451 452 453 454 455 456 457 458 459 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 447 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
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 360 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
347 348 349 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 347 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
353 354 355 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 353 def hash [name, number, card_network, type, sub_type, bin, expiration_month, expiration_year, issue_date, issuer_country, brand, sequence_number, last4, status, token_transaction_type, token_details, added_at_checkout, par_details, expiry_date, entity_id, bin_entity_id, security_code].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
263 264 265 266 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 263 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
427 428 429 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 427 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
433 434 435 436 437 438 439 440 441 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 433 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
421 422 423 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 421 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
270 271 272 |
# File 'lib/cybersource_rest_client/models/unifiedrisk_payment_card.rb', line 270 def valid? true end |