Class: VisaAcceptanceMergedSpec::TokenizedCard
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::TokenizedCard
- Defined in:
- lib/visa_acceptance_merged_spec/models/tokenized_card.rb
Overview
TokenizedCard Model.
Instance Attribute Summary collapse
-
#assurance_level ⇒ String
Confidence level of the tokenization.
-
#assurance_method ⇒ String
Confidence level of the tokenization.
-
#cryptogram ⇒ String
This field contains token information.
-
#expiration_month ⇒ String
One of two possible meanings: - The two-digit month in which a token expires.
-
#expiration_year ⇒ String
One of two possible meanings: - The four-digit year in which a token expires.
-
#number ⇒ String
Customer’s payment network token value.
-
#requestor_id ⇒ String
Value that identifies your business and indicates that the cardholder’s account number is tokenized.
-
#security_code ⇒ String
Card Verification Number (CVN).
-
#security_code_indicator ⇒ String
Indicates whether a CVN code was sent.
-
#storage_method ⇒ String
Type of technology used in the device to store token data.
-
#transaction_type ⇒ String
Type of transaction that provided the token data.
-
#type ⇒ String
Three-digit value that indicates the card type.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(number: SKIP, expiration_month: SKIP, expiration_year: SKIP, type: SKIP, cryptogram: SKIP, requestor_id: SKIP, transaction_type: SKIP, assurance_level: SKIP, storage_method: SKIP, security_code: SKIP, security_code_indicator: SKIP, assurance_method: SKIP, additional_properties: nil) ⇒ TokenizedCard
constructor
A new instance of TokenizedCard.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(number: SKIP, expiration_month: SKIP, expiration_year: SKIP, type: SKIP, cryptogram: SKIP, requestor_id: SKIP, transaction_type: SKIP, assurance_level: SKIP, storage_method: SKIP, security_code: SKIP, security_code_indicator: SKIP, assurance_method: SKIP, additional_properties: nil) ⇒ TokenizedCard
Returns a new instance of TokenizedCard.
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 346 def initialize(number: SKIP, expiration_month: SKIP, expiration_year: SKIP, type: SKIP, cryptogram: SKIP, requestor_id: SKIP, transaction_type: SKIP, assurance_level: SKIP, storage_method: SKIP, security_code: SKIP, security_code_indicator: SKIP, assurance_method: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @number = number unless number == SKIP @expiration_month = expiration_month unless expiration_month == SKIP @expiration_year = expiration_year unless expiration_year == SKIP @type = type unless type == SKIP @cryptogram = cryptogram unless cryptogram == SKIP @requestor_id = requestor_id unless requestor_id == SKIP @transaction_type = transaction_type unless transaction_type == SKIP @assurance_level = assurance_level unless assurance_level == SKIP @storage_method = storage_method unless storage_method == SKIP @security_code = security_code unless security_code == SKIP @security_code_indicator = security_code_indicator unless security_code_indicator == SKIP @assurance_method = assurance_method unless assurance_method == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#assurance_level ⇒ String
Confidence level of the tokenization. This value is assigned by the token service provider. Note This field is supported only for Visa Acceptance through VisaNet and FDC Nashville Global. Returned by PIN debit credit or PIN debit purchase. Note Merchants supported for Visa Acceptance through VisaNet/Visa Platform Connect are advised not to use this field.
256 257 258 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 256 def assurance_level @assurance_level end |
#assurance_method ⇒ String
Confidence level of the tokenization. This value is assigned by the token service provider. Note This field is supported only for Visa Platform Connect
303 304 305 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 303 def assurance_method @assurance_method end |
#cryptogram ⇒ String
This field contains token information.
211 212 213 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 211 def cryptogram @cryptogram end |
#expiration_month ⇒ String
One of two possible meanings:
- The two-digit month in which a token expires.
- The two-digit month in which a card expires.
Format:
MMPossible values:01through12NOTE The meaning of this field is dependent on the payment processor that is returning the value in an authorization reply. Please see the processor-specific details below.
Barclays and Streamline
For Maestro (UK Domestic) and Maestro (International) cards on Barclays
and Streamline, this must be a valid value (01 through 12) but is not
required to be a valid expiration date. In other words, an expiration date
that is in the past does not cause Visa Acceptance to reject your request.
However, an invalid expiration date might cause the issuer to reject your
request.
Encoded Account Numbers
For encoded account numbers (card_type=039), if there is no expiration
date on the card, use 12.
Important It is your responsibility to determine whether a field is
required for the transaction you are requesting.
Samsung Pay and Apple Pay
Month in which the token expires. Visa Acceptance includes this field in the reply message when it decrypts the payment blob for the tokenized transaction.
41 42 43 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 41 def expiration_month @expiration_month end |
#expiration_year ⇒ String
One of two possible meanings:
- The four-digit year in which a token expires.
- The four-digit year in which a card expires.
Format:
YYYYPossible values:1900through3000Data type: Non-negative integer NOTE The meaning of this field is dependent on the payment processor that is returning the value in an authorization reply. Please see the processor-specific details below.
Barclays and Streamline
For Maestro (UK Domestic) and Maestro (International) cards on Barclays and Streamline, this must be a valid value (1900 through 3000) but is not required to be a valid expiration date. In other words, an expiration date that is in the past does not cause Visa Acceptance to reject your request. However, an invalid expiration date might cause the issuer to reject your request.
Encoded Account Numbers
For encoded account numbers (card_ type=039), if there is no expiration
date on the card, use 2021.
FDC Nashville Global and FDMS South
You can send in 2 digits or 4 digits. When you send in 2 digits, they must be the last 2 digits of the year.
Samsung Pay and Apple Pay
Year in which the token expires. Visa Acceptance includes this field in the reply message when it decrypts the payment blob for the tokenized transaction. Important It is your responsibility to determine whether a field is required for the transaction you are requesting.
74 75 76 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 74 def expiration_year @expiration_year end |
#number ⇒ String
Customer’s payment network token value.
14 15 16 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 14 def number @number end |
#requestor_id ⇒ String
Value that identifies your business and indicates that the cardholder’s account number is tokenized. This value is assigned by the token service provider and is unique within the token service provider’s database. Note This field is supported only for Visa Acceptance through VisaNet and FDC Nashville Global.
PIN debit
Optional field for PIN debit credit or PIN debit purchase transactions that use payment network tokens; otherwise, not used.
223 224 225 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 223 def requestor_id @requestor_id end |
#security_code ⇒ String
Card Verification Number (CVN).
Ingenico ePayments
Do not include this field when commerceIndicator=recurring. Note Ingenico ePayments was previously called Global Collect.
279 280 281 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 279 def security_code @security_code end |
#security_code_indicator ⇒ String
Indicates whether a CVN code was sent. Possible values:
0(default): CVN service not requested. This default value is used when you do not includesecurityCodefield in the request.1(default): CVN service requested and supported. This default value is used when you includesecurityCodefield in the request.2: CVN on credit card is illegible.9: CVN was not imprinted on credit card.
FDMS Nashville
Required for American Express cards; otherwise, optional.
TSYS Acquiring Solutions
Optional if pointOfSaleInformation.entryMode=keyed; otherwise, not used.
All other processors
Optional.
297 298 299 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 297 def security_code_indicator @security_code_indicator end |
#storage_method ⇒ String
Type of technology used in the device to store token data. Possible values:
001: Secure Element (SE). Smart card or memory with restricted access and encryption to prevent data tampering. For storing payment credentials, a SE is tested against a set of requirements defined by the payment networks. Note This field is supported only for FDC Compass.- 002: Host Card Emulation (HCE). Emulation of a smart card by using software to create a virtual and exact representation of the card. Sensitive data is stored in a database that is hosted in the cloud. For storing payment credentials, a database must meet very stringent security requirements that exceed PCI DSS. Note This field is supported only for FDC Compass.
272 273 274 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 272 def storage_method @storage_method end |
#transaction_type ⇒ String
Type of transaction that provided the token data. This value does not specify the token service provider; it specifies the entity that provided you with information about the token. Possible value:
2: Near-field communication (NFC) transaction. The customer’s mobile device provided the token data for a contactless EMV transaction. For recurring transactions, use this value if the original transaction was a contactless EMV transaction.
Visa Platform Connect
1: For Rupay and In App tokenization. Example: InApp apple pay.3: Card/Credential On File Tokenization. NOTE No Visa Acceptance through VisaNet acquirers support EMV at this time. Required field for PIN debit credit or PIN debit purchase transactions that use payment network tokens; otherwise, not used.
Rupay
3: Card/Credential On File Tokenization.4: Tokenizined Transaction. Should be used for Guest Checkout transactions with token.
246 247 248 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 246 def transaction_type @transaction_type end |
#type ⇒ String
Three-digit value that indicates the card type. IMPORTANT It is strongly recommended that you include the card type field in request messages even if it is optional for your processor and card type. Omitting the card type can cause the transaction to be processed with the wrong card type. Possible values:
001: Visa. Use card type value001for Visa Electron.002: Mastercard, Eurocard, which is a European regional brand of Mastercard.003: American Express004: Discover005: Diners Club006: Carte Blanche007: JCB008: Optima009: GE Private Label010: Beneficial Private Label011: Twinpay Credit Card012: Twinpay Debit Card013: WalMart014: Enroute015: Lowe's Consumer016: Home Depot Consumer017: MBNA018: Dick's Sportswear019: Casual Corner020: Sears021: JAL023: Disney Card024: Maestro (UK Domestic)[^1]025: Sam's Club Consumer026: Sam's Club Business027: Nico's028: Paymentech Bill Me Later029: Bebe030: Restoration Hardware031: Delta Online032: Solo033: Visa Electron. Do not use this value. Use001for all Visa card types.034: Dankort035: Laser036: Cartes Bancaires037: Carta Si038: Pinless Debit039: Encoded account number040: UATP041: HOUSEHOLD042: Maestro (International)[^1]043: GE MONEY044: Korean Cards045: Style Cards046: JCrew047: Payeasecn eWallet048: Payeasecn Bank Transfer049: Meijer050: Hipercard051: Aura052: Redecard053: Orico card054: Elo055: Capitol One Private Label056: Carnet057: Costco Private Label058: Carnet059: ValueLink060: MADA061: RuPay062: China UnionPay063: Falabella Private Label064: Prompt Card065: Korean Domestic066: Banricompras067: MEEZA068: PayPak070: EFTPOS071: Codensa072: Olimpica073: Colsubsidio074: Tuya075: Sodexo076: Naranja077: Cabal078: DINELCO079: PANAL080: EPM081: Jaywan [^1]: For this card type, you must include thepaymentInformation.card.typeorpaymentInformation.tokenizedCard.typefield in your request for an authorization or a stand-alone credit. [^2]: For this card type on Cielo 3.0, you must include thepaymentInformation.card.typeorpaymentInformation.tokenizedCard.typefield in a request for an authorization or a stand-alone credit. This card type is not supported on Cielo 1.5. [^3]: For this card type on Getnet and Rede, you must include thepaymentInformation.card.typeorpaymentInformation.tokenizedCard.typefield in a request for an authorization or a stand-alone credit. [^4]: For this card type, you must include thepaymentInformation.card.typein your request for any payer authentication services.
Used by
Authorization Required for Carte Blanche and JCB. Optional for all other card types.
Card Present reply
This field is included in the reply message when the client software that is installed on the POS terminal uses the token management service (TMS) to retrieve tokenized payment details. You must contact customer support to have your account enabled to receive these fields in the credit reply message. Returned by the Credit service. This reply field is only supported by the following processors:
- American Express Direct
- Credit Mutuel-CIC
- FDC Nashville Global
- OmniPay Direct
- SIX
Google Pay transactions
For PAN-based Google Pay transactions, this field is returned in the API response.
GPX
This field only supports transactions from the following card types:
- Visa
- Mastercard
- AMEX
- Discover
- Diners
- JCB
- Union Pay International
207 208 209 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 207 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
371 372 373 374 375 376 377 378 379 380 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 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 371 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. number = hash.key?('number') ? hash['number'] : SKIP expiration_month = hash.key?('expirationMonth') ? hash['expirationMonth'] : SKIP expiration_year = hash.key?('expirationYear') ? hash['expirationYear'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP cryptogram = hash.key?('cryptogram') ? hash['cryptogram'] : SKIP requestor_id = hash.key?('requestorId') ? hash['requestorId'] : SKIP transaction_type = hash.key?('transactionType') ? hash['transactionType'] : SKIP assurance_level = hash.key?('assuranceLevel') ? hash['assuranceLevel'] : SKIP storage_method = hash.key?('storageMethod') ? hash['storageMethod'] : SKIP security_code = hash.key?('securityCode') ? hash['securityCode'] : SKIP security_code_indicator = hash.key?('securityCodeIndicator') ? hash['securityCodeIndicator'] : SKIP assurance_method = hash.key?('assuranceMethod') ? hash['assuranceMethod'] : SKIP # 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. TokenizedCard.new(number: number, expiration_month: expiration_month, expiration_year: expiration_year, type: type, cryptogram: cryptogram, requestor_id: requestor_id, transaction_type: transaction_type, assurance_level: assurance_level, storage_method: storage_method, security_code: security_code, security_code_indicator: security_code_indicator, assurance_method: assurance_method, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 306 def self.names @_hash = {} if @_hash.nil? @_hash['number'] = 'number' @_hash['expiration_month'] = 'expirationMonth' @_hash['expiration_year'] = 'expirationYear' @_hash['type'] = 'type' @_hash['cryptogram'] = 'cryptogram' @_hash['requestor_id'] = 'requestorId' @_hash['transaction_type'] = 'transactionType' @_hash['assurance_level'] = 'assuranceLevel' @_hash['storage_method'] = 'storageMethod' @_hash['security_code'] = 'securityCode' @_hash['security_code_indicator'] = 'securityCodeIndicator' @_hash['assurance_method'] = 'assuranceMethod' @_hash end |
.nullables ⇒ Object
An array for nullable fields
342 343 344 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 342 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 324 def self.optionals %w[ number expiration_month expiration_year type cryptogram requestor_id transaction_type assurance_level storage_method security_code security_code_indicator assurance_method ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
429 430 431 432 433 434 435 436 437 438 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 429 def inspect class_name = self.class.name.split('::').last "<#{class_name} number: #{@number.inspect}, expiration_month: #{@expiration_month.inspect},"\ " expiration_year: #{@expiration_year.inspect}, type: #{@type.inspect}, cryptogram:"\ " #{@cryptogram.inspect}, requestor_id: #{@requestor_id.inspect}, transaction_type:"\ " #{@transaction_type.inspect}, assurance_level: #{@assurance_level.inspect},"\ " storage_method: #{@storage_method.inspect}, security_code: #{@security_code.inspect},"\ " security_code_indicator: #{@security_code_indicator.inspect}, assurance_method:"\ " #{@assurance_method.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
418 419 420 421 422 423 424 425 426 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_card.rb', line 418 def to_s class_name = self.class.name.split('::').last "<#{class_name} number: #{@number}, expiration_month: #{@expiration_month},"\ " expiration_year: #{@expiration_year}, type: #{@type}, cryptogram: #{@cryptogram},"\ " requestor_id: #{@requestor_id}, transaction_type: #{@transaction_type}, assurance_level:"\ " #{@assurance_level}, storage_method: #{@storage_method}, security_code: #{@security_code},"\ " security_code_indicator: #{@security_code_indicator}, assurance_method:"\ " #{@assurance_method}, additional_properties: #{@additional_properties}>" end |