Class: VisaAcceptanceMergedSpec::Card12
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::Card12
- Defined in:
- lib/visa_acceptance_merged_spec/models/card12.rb
Overview
Card12 Model.
Instance Attribute Summary collapse
-
#expiration_month ⇒ String
Two-digit month in which the payment card expires.
-
#expiration_year ⇒ String
Four-digit year in which the credit card expires.
-
#hash ⇒ String
Hash value representing the card.
-
#issue_number ⇒ String
Number of times a Maestro (UK Domestic) card has been issued to the account holder.
-
#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.
-
#tokenized_information ⇒ TokenizedInformation
Hash value representing the card.
-
#type ⇒ String
Value that indicates the card type.
-
#use_as ⇒ String
'Payment Instrument was created / updated as part of a pinless debit transaction.'.
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(expiration_month: SKIP, expiration_year: SKIP, type: SKIP, issue_number: SKIP, start_month: SKIP, start_year: SKIP, use_as: SKIP, hash: SKIP, tokenized_information: SKIP, additional_properties: nil) ⇒ Card12
constructor
A new instance of Card12.
-
#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(expiration_month: SKIP, expiration_year: SKIP, type: SKIP, issue_number: SKIP, start_month: SKIP, start_year: SKIP, use_as: SKIP, hash: SKIP, tokenized_information: SKIP, additional_properties: nil) ⇒ Card12
Returns a new instance of Card12.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/visa_acceptance_merged_spec/models/card12.rb', line 160 def initialize(expiration_month: SKIP, expiration_year: SKIP, type: SKIP, issue_number: SKIP, start_month: SKIP, start_year: SKIP, use_as: SKIP, hash: SKIP, tokenized_information: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @expiration_month = expiration_month unless expiration_month == SKIP @expiration_year = expiration_year unless expiration_year == SKIP @type = type unless type == SKIP @issue_number = issue_number unless issue_number == SKIP @start_month = start_month unless start_month == SKIP @start_year = start_year unless start_year == SKIP @use_as = use_as unless use_as == SKIP @hash = hash unless hash == SKIP @tokenized_information = tokenized_information unless tokenized_information == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#expiration_month ⇒ String
Two-digit month in which the payment card expires.
Format: MM.
Possible Values: 01 through 12.
16 17 18 |
# File 'lib/visa_acceptance_merged_spec/models/card12.rb', line 16 def expiration_month @expiration_month end |
#expiration_year ⇒ String
Four-digit year in which the credit card expires.
Format: YYYY.
21 22 23 |
# File 'lib/visa_acceptance_merged_spec/models/card12.rb', line 21 def expiration_year @expiration_year end |
#hash ⇒ String
Hash value representing the card.
119 120 121 |
# File 'lib/visa_acceptance_merged_spec/models/card12.rb', line 119 def hash @hash 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.
93 94 95 |
# File 'lib/visa_acceptance_merged_spec/models/card12.rb', line 93 def issue_number @issue_number 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.
102 103 104 |
# File 'lib/visa_acceptance_merged_spec/models/card12.rb', line 102 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.
110 111 112 |
# File 'lib/visa_acceptance_merged_spec/models/card12.rb', line 110 def start_year @start_year end |
#tokenized_information ⇒ TokenizedInformation
Hash value representing the card.
123 124 125 |
# File 'lib/visa_acceptance_merged_spec/models/card12.rb', line 123 def tokenized_information @tokenized_information end |
#type ⇒ String
Value that indicates the card type. Possible Values v2 : v1:
* 001 : visa
* 002 : mastercard - Eurocard—European regional brand of Mastercard
* 003 : american express
* 004 : discover
* 005 : diners club
* 006 : carte blanche
* 007 : jcb
* 008 : optima
* 011 : twinpay credit
* 012 : twinpay debit
* 013 : walmart
* 014 : enRoute
* 015 : lowes consumer
* 016 : home depot consumer
* 017 : mbna
* 018 : dicks sportswear
* 019 : casual corner
* 020 : sears
* 021 : jal
* 023 : disney
* 024 : maestro uk domestic
* 025 : sams club consumer
* 026 : sams club business
* 028 : bill me later
* 029 : bebe
* 030 : restoration hardware
* 031 : delta online — use this value only for Ingenico ePayments. For
other processors, use 001 for all Visa card types.
- 032 : solo
- 033 : visa electron
- 034 : dankort
- 035 : laser
- 036 : carte bleue — formerly Cartes Bancaires
- 037 : carta si
- 038 : pinless debit
- 039 : encoded account
- 040 : uatp
- 041 : household
- 042 : maestro international
- 043 : ge money uk
- 044 : korean cards
- 045 : style
- 046 : jcrew
- 047 : payease china processing ewallet
- 048 : payease china processing bank transfer
- 049 : meijer private label
- 050 : hipercard — supported only by the Comercio Latino processor.
- 051 : aura — supported only by the Comercio Latino processor.
- 052 : redecard
- 054 : elo — supported only by the Comercio Latino processor.
- 055 : capital one private label
- 056 : synchrony private label
- 057 : costco private label
- 060 : mada
- 062 : china union pay
- 063 : falabella private label
81 82 83 |
# File 'lib/visa_acceptance_merged_spec/models/card12.rb', line 81 def type @type end |
#use_as ⇒ String
'Payment Instrument was created / updated as part of a pinless debit transaction.'
115 116 117 |
# File 'lib/visa_acceptance_merged_spec/models/card12.rb', line 115 def use_as @use_as end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/visa_acceptance_merged_spec/models/card12.rb', line 180 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. expiration_month = hash.key?('expirationMonth') ? hash['expirationMonth'] : SKIP expiration_year = hash.key?('expirationYear') ? hash['expirationYear'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP issue_number = hash.key?('issueNumber') ? hash['issueNumber'] : SKIP start_month = hash.key?('startMonth') ? hash['startMonth'] : SKIP start_year = hash.key?('startYear') ? hash['startYear'] : SKIP use_as = hash.key?('useAs') ? hash['useAs'] : SKIP hash = hash.key?('hash') ? hash['hash'] : SKIP tokenized_information = TokenizedInformation.from_hash(hash['tokenizedInformation']) if hash['tokenizedInformation'] # 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. Card12.new(expiration_month: expiration_month, expiration_year: expiration_year, type: type, issue_number: issue_number, start_month: start_month, start_year: start_year, use_as: use_as, hash: hash, tokenized_information: tokenized_information, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/visa_acceptance_merged_spec/models/card12.rb', line 126 def self.names @_hash = {} if @_hash.nil? @_hash['expiration_month'] = 'expirationMonth' @_hash['expiration_year'] = 'expirationYear' @_hash['type'] = 'type' @_hash['issue_number'] = 'issueNumber' @_hash['start_month'] = 'startMonth' @_hash['start_year'] = 'startYear' @_hash['use_as'] = 'useAs' @_hash['hash'] = 'hash' @_hash['tokenized_information'] = 'tokenizedInformation' @_hash end |
.nullables ⇒ Object
An array for nullable fields
156 157 158 |
# File 'lib/visa_acceptance_merged_spec/models/card12.rb', line 156 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/visa_acceptance_merged_spec/models/card12.rb', line 141 def self.optionals %w[ expiration_month expiration_year type issue_number start_month start_year use_as hash tokenized_information ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
228 229 230 231 232 233 234 235 236 |
# File 'lib/visa_acceptance_merged_spec/models/card12.rb', line 228 def inspect class_name = self.class.name.split('::').last "<#{class_name} expiration_month: #{@expiration_month.inspect}, expiration_year:"\ " #{@expiration_year.inspect}, type: #{@type.inspect}, issue_number:"\ " #{@issue_number.inspect}, start_month: #{@start_month.inspect}, start_year:"\ " #{@start_year.inspect}, use_as: #{@use_as.inspect}, hash: #{@hash.inspect},"\ " tokenized_information: #{@tokenized_information.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
218 219 220 221 222 223 224 225 |
# File 'lib/visa_acceptance_merged_spec/models/card12.rb', line 218 def to_s class_name = self.class.name.split('::').last "<#{class_name} expiration_month: #{@expiration_month}, expiration_year:"\ " #{@expiration_year}, type: #{@type}, issue_number: #{@issue_number}, start_month:"\ " #{@start_month}, start_year: #{@start_year}, use_as: #{@use_as}, hash: #{@hash},"\ " tokenized_information: #{@tokenized_information}, additional_properties:"\ " #{@additional_properties}>" end |