Class: CyberSourceMergedSpec::Card132
- Defined in:
- lib/cyber_source_merged_spec/models/card132.rb
Overview
Card132 Model.
Instance Attribute Summary collapse
-
#prefix ⇒ String
Bank Identification Number (BIN).
-
#suffix ⇒ String
Last four digits of the cardholder’s account number.
-
#type ⇒ String
Three-digit value that indicates the card type.
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, type: SKIP, additional_properties: nil) ⇒ Card132
constructor
A new instance of Card132.
-
#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, type: SKIP, additional_properties: nil) ⇒ Card132
Returns a new instance of Card132.
198 199 200 201 202 203 204 205 206 207 |
# File 'lib/cyber_source_merged_spec/models/card132.rb', line 198 def initialize(suffix: SKIP, prefix: SKIP, type: 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 @type = type unless type == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#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/card132.rb', line 40 def prefix @prefix 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/card132.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
173 174 175 |
# File 'lib/cyber_source_merged_spec/models/card132.rb', line 173 def type @type end |
Class Method Details
.from_element(root) ⇒ Object
232 233 234 235 236 237 238 239 240 241 |
# File 'lib/cyber_source_merged_spec/models/card132.rb', line 232 def self.from_element(root) suffix = XmlUtilities.from_element(root, 'suffix', String) prefix = XmlUtilities.from_element(root, 'prefix', String) type = XmlUtilities.from_element(root, 'type', String) new(suffix: suffix, prefix: prefix, type: type, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/cyber_source_merged_spec/models/card132.rb', line 210 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 type = hash.key?('type') ? hash['type'] : 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. Card132.new(suffix: suffix, prefix: prefix, type: type, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
176 177 178 179 180 181 182 |
# File 'lib/cyber_source_merged_spec/models/card132.rb', line 176 def self.names @_hash = {} if @_hash.nil? @_hash['suffix'] = 'suffix' @_hash['prefix'] = 'prefix' @_hash['type'] = 'type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
194 195 196 |
# File 'lib/cyber_source_merged_spec/models/card132.rb', line 194 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
185 186 187 188 189 190 191 |
# File 'lib/cyber_source_merged_spec/models/card132.rb', line 185 def self.optionals %w[ suffix prefix type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
263 264 265 266 267 |
# File 'lib/cyber_source_merged_spec/models/card132.rb', line 263 def inspect class_name = self.class.name.split('::').last "<#{class_name} suffix: #{@suffix.inspect}, prefix: #{@prefix.inspect}, type:"\ " #{@type.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
256 257 258 259 260 |
# File 'lib/cyber_source_merged_spec/models/card132.rb', line 256 def to_s class_name = self.class.name.split('::').last "<#{class_name} suffix: #{@suffix}, prefix: #{@prefix}, type: #{@type},"\ " additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/cyber_source_merged_spec/models/card132.rb', line 243 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, 'type', type) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |