Class: CyberSourceMergedSpec::Card131
- Defined in:
- lib/cyber_source_merged_spec/models/card131.rb
Overview
Card131 Model.
Instance Attribute Summary collapse
-
#account_encoder_id ⇒ String
Identifier for the issuing bank that provided the customer’s encoded account number.
-
#brand_name ⇒ String
This field contains the card brand name.
-
#currency ⇒ String
This field indicates the 3-letter [ISO Standard Currency Codes](http://apps.cybersource.com/library/documentation/sbc/quickref/curr encies.pdf) for the card currency.
-
#expiration_month ⇒ String
Two-digit month in which the payment card expires.
-
#expiration_year ⇒ String
Four-digit year in which the payment card expires.
-
#issue_number ⇒ String
Number of times a Maestro (UK Domestic) card has been issued to the account holder.
-
#prefix ⇒ String
Bank Identification Number (BIN).
-
#start_month ⇒ String
Month of the start of the Maestro (UK Domestic) card validity period.
-
#start_year ⇒ String
Year of the start of the Maestro (UK Domestic) card validity period.
-
#suffix ⇒ String
Last four digits of the cardholder’s account number.
-
#type ⇒ String
Three-digit value that indicates the card type.
-
#use_as ⇒ String
Flag that specifies the type of account associated with the card.
Class Method Summary collapse
- .from_element(root) ⇒ Object
-
.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(suffix: SKIP, prefix: SKIP, expiration_month: SKIP, expiration_year: SKIP, start_month: SKIP, start_year: SKIP, issue_number: SKIP, type: SKIP, brand_name: SKIP, currency: SKIP, account_encoder_id: SKIP, use_as: SKIP, additional_properties: nil) ⇒ Card131
constructor
A new instance of Card131.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
- #to_xml_element(doc, root_name) ⇒ 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(suffix: SKIP, prefix: SKIP, expiration_month: SKIP, expiration_year: SKIP, start_month: SKIP, start_year: SKIP, issue_number: SKIP, type: SKIP, brand_name: SKIP, currency: SKIP, account_encoder_id: SKIP, use_as: SKIP, additional_properties: nil) ⇒ Card131
Returns a new instance of Card131.
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 410 def initialize(suffix: SKIP, prefix: SKIP, expiration_month: SKIP, expiration_year: SKIP, start_month: SKIP, start_year: SKIP, issue_number: SKIP, type: SKIP, brand_name: SKIP, currency: SKIP, account_encoder_id: SKIP, use_as: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @suffix = suffix unless suffix == SKIP @prefix = prefix unless prefix == SKIP @expiration_month = expiration_month unless expiration_month == SKIP @expiration_year = expiration_year unless expiration_year == SKIP @start_month = start_month unless start_month == SKIP @start_year = start_year unless start_year == SKIP @issue_number = issue_number unless issue_number == SKIP @type = type unless type == SKIP @brand_name = brand_name unless brand_name == SKIP @currency = currency unless currency == SKIP @account_encoder_id = account_encoder_id unless account_encoder_id == SKIP @use_as = use_as unless use_as == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_encoder_id ⇒ String
Identifier for the issuing bank that provided the customer’s encoded account number. Contact your processor for the bank’s ID.
329 330 331 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 329 def account_encoder_id @account_encoder_id end |
#brand_name ⇒ String
This field contains the card brand name. Some of the possible values (not an exhaustive list) are -
- VISA
- MASTERCARD
- AMERICAN EXPRESS
- DISCOVER
- DINERS CLUB
- CARTE BLANCHE
- JCB
- OPTIMA
- TWINPAY CREDIT CARD
- TWINPAY DEBIT CARD
- WALMART
- ENROUTE
- LOWES CONSUMER
- HOME DEPOT CONSUMER
- MBNA
- DICKS SPORTWEAR
- CASUAL CORNER
- SEARS
- JAL
- DISNEY CARD
- SWITCH/SOLO
- SAMS CLUB CONSUMER
- SAMS CLUB BUSINESS
- NICOS HOUSE CARD
- BEBE
- RESTORATION HARDWARE
- DELTA ONLINE
- SOLO
- VISA ELECTRON
- DANKORT
- LASER
- CARTE BANCAIRE
- CARTA SI
- ENCODED ACCOUNT
- UATP
- HOUSEHOLD
- MAESTRO
- GE CAPITAL
- KOREAN CARDS
- STYLE CARDS
- JCREW
- MEIJER
- HIPERCARD
- AURA
- REDECARD
- ORICO HOUSE CARD
- ELO
- CAPITAL ONE PRIVATE LABEL
- CARNET
- RUPAY
- CHINA UNION PAY
- FALABELLA PRIVATE LABEL
- PROMPTCARD
- KOREAN DOMESTIC
- BANRICOMPRAS
318 319 320 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 318 def brand_name @brand_name end |
#currency ⇒ String
This field indicates the 3-letter [ISO Standard Currency Codes](http://apps.cybersource.com/library/documentation/sbc/quickref/curr encies.pdf) for the card currency.
324 325 326 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 324 def currency @currency end |
#expiration_month ⇒ String
Two-digit month in which the payment card expires.
Format: MM.
Valid values: 01 through 12. Leading 0 is required.
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 CyberSource to reject your request. However, an
invalid expiration date might cause
the issuer to reject your request.
Encoded Account Numbers
For encoded account numbers (type=039), if there is no expiration date
on the card, use 12.
FDMS Nashville
Required field.
All other processors
Required if pointOfSaleInformation.entryMode=keyed. However, this field
is optional if your account is configured
for relaxed requirements for address data and expiration date.
Important It is your responsibility to determine
whether a field is required for the transaction you are requesting.
Google Pay transactions
For PAN-based Google Pay transactions, this field is returned in the API response.
68 69 70 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 68 def expiration_month @expiration_month end |
#expiration_year ⇒ String
Four-digit year in which the payment card expires.
Format: YYYY.
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 CyberSource to reject your
request. However, an invalid expiration date might cause the issuer to
reject your request.
Encoded Account Numbers
For encoded account numbers (**type**=039), if there is no expiration
date on the card, use 2021.
FDMS Nashville
Required field.
FDC Nashville Global and FDMS South
You can send in 2 digits or 4 digits. If you send in 2 digits, they must be the last 2 digits of the year.
All other processors
Required if pointOfSaleInformation.entryMode=keyed. However, this field
is optional if your account is configured
for relaxed requirements for address data and expiration date.
Important It is your responsibility to determine
whether a field is required for the transaction you are requesting.
Google Pay transactions
For PAN-based Google Pay transactions, this field is returned in the API response.
97 98 99 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 97 def expiration_year @expiration_year end |
#issue_number ⇒ String
Number of times a Maestro (UK Domestic) card has been issued to the account holder. The card might or might not have an issue number. The number can consist of one or two digits, and the first digit might be a zero. When you include this value in your request, include exactly what is printed on the card. A value of 2 is different than a value of 02. Do not include the field, even with a blank value, if the card is not a Maestro (UK Domestic) card. Note The issue number is not required for Maestro (UK Domestic) transactions.
125 126 127 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 125 def issue_number @issue_number end |
#prefix ⇒ String
Bank Identification Number (BIN). This is the initial four to six numbers on a credit card account number.
Google Pay transactions
For PAN-based Google Pay transactions, this field is returned in the API response.
40 41 42 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 40 def prefix @prefix end |
#start_month ⇒ String
Month of the start of the Maestro (UK Domestic) card validity period. Do
not include the field, even with a blank value, if the card is not a
Maestro (UK Domestic) card. Format: MM. Possible values: 01 through 12.
Note The start date is not required for Maestro (UK Domestic)
transactions.
105 106 107 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 105 def start_month @start_month end |
#start_year ⇒ String
Year of the start of the Maestro (UK Domestic) card validity period. Do
not include the field, even with a blank value, if the card is not a
Maestro (UK Domestic) card. Format: YYYY.
Note The start date is not required for Maestro (UK Domestic)
transactions.
113 114 115 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 113 def start_year @start_year end |
#suffix ⇒ String
Last four digits of the cardholder’s account number. 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.
Google Pay transactions
For PAN-based Google Pay transactions, this field is returned in the API response.
PIN debit
This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. Returned by PIN debit credit and PIN debit purchase. This field is supported only by the following processors:
- American Express Direct
- Credit Mutuel-CIC
- FDC Nashville Global
- OmniPay Direct
- SIX
32 33 34 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 32 def suffix @suffix 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
258 259 260 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 258 def type @type end |
#use_as ⇒ String
Flag that specifies the type of account associated with the card. This field is available only for China UnionPay, Cielo, Comercio Latino and Visa Platform Connect. The cardholder provides this information during the payment process. This field is required for:
- Debit transactions on Cielo and Comercio Latino.
- Transactions with Brazilian-issued cards on CyberSource through VisaNet. China UnionPayCard Transactions on China UnionPay: Possible values:
- C: Domestic credit card
- D: Domestic debit card
- F: International credit card
- I: International debit card When the value is D, the e-commerce indicator and CAVV fields must be included in the authorization request. When the value is C, F or I the card verification number, expiration month and expiration year fields must in included in the authorization request. Cielo and Comercio Latino Credit Card Transactions: On these processors, this field is supported only for authorizations. Possible values:
- CR: Credit card
- DB: Debit card
Visa Platform Connect Credit Card Transactions: This field is supported for all card types on Visa Platform Connect. For combo card present transactions with Mastercard on Brazilian-issued cards, possible values: - CR: Credit card
- DB: Debit Card For combo card not present transactions with Mastercard on Brazilian-issued cards, possible values:
- C: Credit card
- D: Debit card A value of CR or DB in the useAs field takes precedence over any value in the Source Account Type field.
367 368 369 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 367 def use_as @use_as end |
Class Method Details
.from_element(root) ⇒ Object
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 477 def self.from_element(root) suffix = XmlUtilities.from_element(root, 'suffix', String) prefix = XmlUtilities.from_element(root, 'prefix', String) expiration_month = XmlUtilities.from_element(root, 'expirationMonth', String) expiration_year = XmlUtilities.from_element(root, 'expirationYear', String) start_month = XmlUtilities.from_element(root, 'startMonth', String) start_year = XmlUtilities.from_element(root, 'startYear', String) issue_number = XmlUtilities.from_element(root, 'issueNumber', String) type = XmlUtilities.from_element(root, 'type', String) brand_name = XmlUtilities.from_element(root, 'brandName', String) currency = XmlUtilities.from_element(root, 'currency', String) account_encoder_id = XmlUtilities.from_element(root, 'accountEncoderId', String) use_as = XmlUtilities.from_element(root, 'useAs', String) new(suffix: suffix, prefix: prefix, expiration_month: expiration_month, expiration_year: expiration_year, start_month: start_month, start_year: start_year, issue_number: issue_number, type: type, brand_name: brand_name, currency: currency, account_encoder_id: account_encoder_id, use_as: use_as, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 434 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. suffix = hash.key?('suffix') ? hash['suffix'] : SKIP prefix = hash.key?('prefix') ? hash['prefix'] : SKIP expiration_month = hash.key?('expirationMonth') ? hash['expirationMonth'] : SKIP expiration_year = hash.key?('expirationYear') ? hash['expirationYear'] : SKIP start_month = hash.key?('startMonth') ? hash['startMonth'] : SKIP start_year = hash.key?('startYear') ? hash['startYear'] : SKIP issue_number = hash.key?('issueNumber') ? hash['issueNumber'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP brand_name = hash.key?('brandName') ? hash['brandName'] : SKIP currency = hash.key?('currency') ? hash['currency'] : SKIP account_encoder_id = hash.key?('accountEncoderId') ? hash['accountEncoderId'] : SKIP use_as = hash.key?('useAs') ? hash['useAs'] : 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. Card131.new(suffix: suffix, prefix: prefix, expiration_month: expiration_month, expiration_year: expiration_year, start_month: start_month, start_year: start_year, issue_number: issue_number, type: type, brand_name: brand_name, currency: currency, account_encoder_id: account_encoder_id, use_as: use_as, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 370 def self.names @_hash = {} if @_hash.nil? @_hash['suffix'] = 'suffix' @_hash['prefix'] = 'prefix' @_hash['expiration_month'] = 'expirationMonth' @_hash['expiration_year'] = 'expirationYear' @_hash['start_month'] = 'startMonth' @_hash['start_year'] = 'startYear' @_hash['issue_number'] = 'issueNumber' @_hash['type'] = 'type' @_hash['brand_name'] = 'brandName' @_hash['currency'] = 'currency' @_hash['account_encoder_id'] = 'accountEncoderId' @_hash['use_as'] = 'useAs' @_hash end |
.nullables ⇒ Object
An array for nullable fields
406 407 408 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 406 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 388 def self.optionals %w[ suffix prefix expiration_month expiration_year start_month start_year issue_number type brand_name currency account_encoder_id use_as ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
544 545 546 547 548 549 550 551 552 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 544 def inspect class_name = self.class.name.split('::').last "<#{class_name} suffix: #{@suffix.inspect}, prefix: #{@prefix.inspect}, expiration_month:"\ " #{@expiration_month.inspect}, expiration_year: #{@expiration_year.inspect}, start_month:"\ " #{@start_month.inspect}, start_year: #{@start_year.inspect}, issue_number:"\ " #{@issue_number.inspect}, type: #{@type.inspect}, brand_name: #{@brand_name.inspect},"\ " currency: #{@currency.inspect}, account_encoder_id: #{@account_encoder_id.inspect},"\ " use_as: #{@use_as.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
534 535 536 537 538 539 540 541 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 534 def to_s class_name = self.class.name.split('::').last "<#{class_name} suffix: #{@suffix}, prefix: #{@prefix}, expiration_month:"\ " #{@expiration_month}, expiration_year: #{@expiration_year}, start_month: #{@start_month},"\ " start_year: #{@start_year}, issue_number: #{@issue_number}, type: #{@type}, brand_name:"\ " #{@brand_name}, currency: #{@currency}, account_encoder_id: #{@account_encoder_id},"\ " use_as: #{@use_as}, additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 |
# File 'lib/cyber_source_merged_spec/models/card131.rb', line 509 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'suffix', suffix) XmlUtilities.add_as_subelement(doc, root, 'prefix', prefix) XmlUtilities.add_as_subelement(doc, root, 'expirationMonth', expiration_month) XmlUtilities.add_as_subelement(doc, root, 'expirationYear', expiration_year) XmlUtilities.add_as_subelement(doc, root, 'startMonth', start_month) XmlUtilities.add_as_subelement(doc, root, 'startYear', start_year) XmlUtilities.add_as_subelement(doc, root, 'issueNumber', issue_number) XmlUtilities.add_as_subelement(doc, root, 'type', type) XmlUtilities.add_as_subelement(doc, root, 'brandName', brand_name) XmlUtilities.add_as_subelement(doc, root, 'currency', currency) XmlUtilities.add_as_subelement(doc, root, 'accountEncoderId', account_encoder_id) XmlUtilities.add_as_subelement(doc, root, 'useAs', use_as) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |