Class: VisaAcceptanceMergedSpec::Card15
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::Card15
- Defined in:
- lib/visa_acceptance_merged_spec/models/card15.rb
Overview
Card15 Model.
Instance Attribute Summary collapse
-
#brand_name ⇒ String
This field contains the card brand name.
-
#brands ⇒ Array[Brand]
Array of brands.
-
#credential_type ⇒ String
This field contains the type of the payment credential.
-
#currency ⇒ String
This field indicates the 3-letter [ISO Standard Currency Codes]( for the card currency..
-
#max_length ⇒ String
This field contains the max length of the card.
-
#type ⇒ String
This field contains a 3-digit numeric value that indicates the card type within Visa Acceptance eco-system.
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(type: SKIP, brand_name: SKIP, currency: SKIP, max_length: SKIP, credential_type: SKIP, brands: SKIP, additional_properties: nil) ⇒ Card15
constructor
A new instance of Card15.
-
#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(type: SKIP, brand_name: SKIP, currency: SKIP, max_length: SKIP, credential_type: SKIP, brands: SKIP, additional_properties: nil) ⇒ Card15
Returns a new instance of Card15.
231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/visa_acceptance_merged_spec/models/card15.rb', line 231 def initialize(type: SKIP, brand_name: SKIP, currency: SKIP, max_length: SKIP, credential_type: SKIP, brands: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @type = type unless type == SKIP @brand_name = brand_name unless brand_name == SKIP @currency = currency unless currency == SKIP @max_length = max_length unless max_length == SKIP @credential_type = credential_type unless credential_type == SKIP @brands = brands unless brands == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#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
- MADA
- ELO
- CAPITAL ONE PRIVATE LABEL
- CARNET
- RUPAY
- CHINA UNION PAY
- FALABELLA PRIVATE LABEL
- PROMPTCARD
- KOREAN DOMESTIC
- BANRICOMPRAS
- MEEZA
- PAYPAK
- JAYWAN
- TPN
180 181 182 |
# File 'lib/visa_acceptance_merged_spec/models/card15.rb', line 180 def brand_name @brand_name end |
#brands ⇒ Array[Brand]
Array of brands
200 201 202 |
# File 'lib/visa_acceptance_merged_spec/models/card15.rb', line 200 def brands @brands end |
#credential_type ⇒ String
This field contains the type of the payment credential. Possible values:
- PAN
- TOKEN
196 197 198 |
# File 'lib/visa_acceptance_merged_spec/models/card15.rb', line 196 def credential_type @credential_type end |
#currency ⇒ String
This field indicates the 3-letter [ISO Standard Currency Codes]( for the card currency.
185 186 187 |
# File 'lib/visa_acceptance_merged_spec/models/card15.rb', line 185 def currency @currency end |
#max_length ⇒ String
This field contains the max length of the card.
189 190 191 |
# File 'lib/visa_acceptance_merged_spec/models/card15.rb', line 189 def max_length @max_length end |
#type ⇒ String
This field contains a 3-digit numeric value that indicates the card type within Visa Acceptance eco-system. Possible values from BIN Lookup Service (based on availability and enablement):
000: Unsupported Card Type001: Visa002: Mastercard003: American Express004: Discover005: Diners Club007: JCB036: Cartes Bancaire042: Maestro054: Elo058: Carnet060: MADA061: RuPay062: China UnionPay064: Prompt Card067: Meeza068: PayPak070: EFTPOS081: Jaywan082: TPN Glossary of possible values in the payments ecosystem:001: Visa002: Mastercard003: 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 Sportwear019: Casual Corner020: Sears021: JAL023: Disney Card024: Switch/Solo025: Sam's Club Consumer026: Sam's Club Business027: Nico's028: Paymentech Bill Me Later029: Bebe030: Restoration Hardware031: Delta Online032: Solo033: Visa Electron034: Dankort035: Laser036: Cartes Bancaire037: Carta Si040: UATP041: HOUSEHOLD042: Maestro043: GE MONEY044: Korean Cards045: Style Cards046: J.Crew047: Payeasecn eWallet048: Payeasecn Bank Transfer049: Meijer050: Hipercard051: Aura052: Redecard053: Orico Card054: Elo055: Capital One Private Label057: 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: Jaywan082: TPN
115 116 117 |
# File 'lib/visa_acceptance_merged_spec/models/card15.rb', line 115 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/visa_acceptance_merged_spec/models/card15.rb', line 247 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. type = hash.key?('type') ? hash['type'] : SKIP brand_name = hash.key?('brandName') ? hash['brandName'] : SKIP currency = hash.key?('currency') ? hash['currency'] : SKIP max_length = hash.key?('maxLength') ? hash['maxLength'] : SKIP credential_type = hash.key?('credentialType') ? hash['credentialType'] : SKIP # Parameter is an array, so we need to iterate through it brands = nil unless hash['brands'].nil? brands = [] hash['brands'].each do |structure| brands << (Brand.from_hash(structure) if structure) end end brands = SKIP unless hash.key?('brands') # 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. Card15.new(type: type, brand_name: brand_name, currency: currency, max_length: max_length, credential_type: credential_type, brands: brands, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
203 204 205 206 207 208 209 210 211 212 |
# File 'lib/visa_acceptance_merged_spec/models/card15.rb', line 203 def self.names @_hash = {} if @_hash.nil? @_hash['type'] = 'type' @_hash['brand_name'] = 'brandName' @_hash['currency'] = 'currency' @_hash['max_length'] = 'maxLength' @_hash['credential_type'] = 'credentialType' @_hash['brands'] = 'brands' @_hash end |
.nullables ⇒ Object
An array for nullable fields
227 228 229 |
# File 'lib/visa_acceptance_merged_spec/models/card15.rb', line 227 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
215 216 217 218 219 220 221 222 223 224 |
# File 'lib/visa_acceptance_merged_spec/models/card15.rb', line 215 def self.optionals %w[ type brand_name currency max_length credential_type brands ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
294 295 296 297 298 299 300 |
# File 'lib/visa_acceptance_merged_spec/models/card15.rb', line 294 def inspect class_name = self.class.name.split('::').last "<#{class_name} type: #{@type.inspect}, brand_name: #{@brand_name.inspect}, currency:"\ " #{@currency.inspect}, max_length: #{@max_length.inspect}, credential_type:"\ " #{@credential_type.inspect}, brands: #{@brands.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
286 287 288 289 290 291 |
# File 'lib/visa_acceptance_merged_spec/models/card15.rb', line 286 def to_s class_name = self.class.name.split('::').last "<#{class_name} type: #{@type}, brand_name: #{@brand_name}, currency: #{@currency},"\ " max_length: #{@max_length}, credential_type: #{@credential_type}, brands: #{@brands},"\ " additional_properties: #{@additional_properties}>" end |