Class: VisaAcceptanceMergedSpec::GetTokenizedCardResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::GetTokenizedCardResponse
- Defined in:
- lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb
Overview
GetTokenizedCardResponse Model.
Instance Attribute Summary collapse
-
#account_reference_id ⇒ String
An identifier provided by the issuer for the account.
-
#card ⇒ Card5
Payment account reference.
-
#consumer_id ⇒ String
Identifier of the consumer within the wallet.
-
#create_instrument_identifier ⇒ TrueClass | FalseClass
Specifies whether the InstrumentId should be created (true) or not (false).
-
#cryptogram ⇒ String
Value generated by the card association to be used alongside the network token for processing a payment.
-
#eci ⇒ String
Raw Electronic Commerce Indicator provided by the card association with the result of the cardholder authentication.
-
#enrollment_id ⇒ String
Unique id to identify this PAN/ enrollment.
-
#expiration_month ⇒ String
Two-digit month in which the network token expires.
-
#expiration_year ⇒ String
Four-digit year in which the network token expires.
-
#id ⇒ String
The Id of the Tokenized Card.
-
#links ⇒ Links22
TODO: Write general description for this method.
-
#metadata ⇒ Metadata36
Payment account reference.
-
#number ⇒ String
The token requestor's network token for the provided PAN and consumer Id, if available.
-
#object ⇒ String
The type.
-
#passcode ⇒ Passcode2
Payment account reference.
-
#payment_account_reference ⇒ String
Payment account reference.
-
#reason ⇒ String
Issuers state for the network token Possible Values: - INVALID_REQUEST : The network token provision request contained invalid data.
-
#requestor_id ⇒ String
11-digit identifier that uniquely identifies the Token Requestor.
-
#security_code ⇒ String
4-digit number generated by the card association to be used alogside the network token for processing a payment.
-
#source ⇒ String
Source of the payment instrument.
-
#state ⇒ String
State of the network token or network token provision.
-
#token_reference_id ⇒ String
Unique ID for netwrok token.
-
#type ⇒ String
The type of card (Card Network).
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(links: SKIP, id: SKIP, object: SKIP, account_reference_id: SKIP, consumer_id: SKIP, create_instrument_identifier: SKIP, source: SKIP, state: SKIP, reason: SKIP, number: SKIP, expiration_month: SKIP, expiration_year: SKIP, type: SKIP, cryptogram: SKIP, security_code: SKIP, eci: SKIP, requestor_id: SKIP, enrollment_id: SKIP, token_reference_id: SKIP, payment_account_reference: SKIP, card: SKIP, passcode: SKIP, metadata: SKIP, additional_properties: nil) ⇒ GetTokenizedCardResponse
constructor
A new instance of GetTokenizedCardResponse.
-
#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(links: SKIP, id: SKIP, object: SKIP, account_reference_id: SKIP, consumer_id: SKIP, create_instrument_identifier: SKIP, source: SKIP, state: SKIP, reason: SKIP, number: SKIP, expiration_month: SKIP, expiration_year: SKIP, type: SKIP, cryptogram: SKIP, security_code: SKIP, eci: SKIP, requestor_id: SKIP, enrollment_id: SKIP, token_reference_id: SKIP, payment_account_reference: SKIP, card: SKIP, passcode: SKIP, metadata: SKIP, additional_properties: nil) ⇒ GetTokenizedCardResponse
Returns a new instance of GetTokenizedCardResponse.
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 209 def initialize(links: SKIP, id: SKIP, object: SKIP, account_reference_id: SKIP, consumer_id: SKIP, create_instrument_identifier: SKIP, source: SKIP, state: SKIP, reason: SKIP, number: SKIP, expiration_month: SKIP, expiration_year: SKIP, type: SKIP, cryptogram: SKIP, security_code: SKIP, eci: SKIP, requestor_id: SKIP, enrollment_id: SKIP, token_reference_id: SKIP, payment_account_reference: SKIP, card: SKIP, passcode: SKIP, metadata: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @links = links unless links == SKIP @id = id unless id == SKIP @object = object unless object == SKIP @account_reference_id = account_reference_id unless account_reference_id == SKIP @consumer_id = consumer_id unless consumer_id == SKIP unless create_instrument_identifier == SKIP @create_instrument_identifier = create_instrument_identifier end @source = source unless source == SKIP @state = state unless state == SKIP @reason = reason unless reason == SKIP @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 @security_code = security_code unless security_code == SKIP @eci = eci unless eci == SKIP @requestor_id = requestor_id unless requestor_id == SKIP @enrollment_id = enrollment_id unless enrollment_id == SKIP @token_reference_id = token_reference_id unless token_reference_id == SKIP unless payment_account_reference == SKIP @payment_account_reference = payment_account_reference end @card = card unless card == SKIP @passcode = passcode unless passcode == SKIP @metadata = unless == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_reference_id ⇒ String
An identifier provided by the issuer for the account.
28 29 30 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 28 def account_reference_id @account_reference_id end |
#card ⇒ Card5
Payment account reference.
136 137 138 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 136 def card @card end |
#consumer_id ⇒ String
Identifier of the consumer within the wallet. Maximum 24 characters for VTS.
33 34 35 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 33 def consumer_id @consumer_id end |
#create_instrument_identifier ⇒ TrueClass | FalseClass
Specifies whether the InstrumentId should be created (true) or not (false). Possible Values:
true: The InstrumentId should be created.false: The InstrumentId should be created.
41 42 43 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 41 def create_instrument_identifier @create_instrument_identifier end |
#cryptogram ⇒ String
Value generated by the card association to be used alongside the network token for processing a payment.
106 107 108 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 106 def cryptogram @cryptogram end |
#eci ⇒ String
Raw Electronic Commerce Indicator provided by the card association with the result of the cardholder authentication.
116 117 118 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 116 def eci @eci end |
#enrollment_id ⇒ String
Unique id to identify this PAN/ enrollment.
124 125 126 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 124 def enrollment_id @enrollment_id end |
#expiration_month ⇒ String
Two-digit month in which the network token expires.
Format: MM.
Possible Values: 01 through 12.
88 89 90 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 88 def expiration_month @expiration_month end |
#expiration_year ⇒ String
Four-digit year in which the network token expires.
Format: YYYY.
93 94 95 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 93 def expiration_year @expiration_year end |
#id ⇒ String
The Id of the Tokenized Card.
18 19 20 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 18 def id @id end |
#links ⇒ Links22
TODO: Write general description for this method
14 15 16 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 14 def links @links end |
#metadata ⇒ Metadata36
Payment account reference.
144 145 146 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 144 def @metadata end |
#number ⇒ String
The token requestor's network token for the provided PAN and consumer Id, if available.
82 83 84 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 82 def number @number end |
#object ⇒ String
The type. Possible Values:
- tokenizedCard
24 25 26 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 24 def object @object end |
#passcode ⇒ Passcode2
Payment account reference.
140 141 142 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 140 def passcode @passcode end |
#payment_account_reference ⇒ String
Payment account reference.
132 133 134 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 132 def payment_account_reference @payment_account_reference end |
#reason ⇒ String
Issuers state for the network token Possible Values:
- INVALID_REQUEST : The network token provision request contained invalid data.
- CARD_VERIFICATION_FAILED : The network token provision request contained data that could not be verified.
- CARD_NOT_ELIGIBLE : Card can currently not be used with issuer for tokenization.
- CARD_NOT_ALLOWED : Card can currently not be used with card association for tokenization.
- DECLINED : Card can currently not be used with issuer for tokenization.
- SERVICE_UNAVAILABLE : The network token service was unavailable or timed out.
- SYSTEM_ERROR : An unexpected error occurred with network token service, check configuration.
77 78 79 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 77 def reason @reason end |
#requestor_id ⇒ String
11-digit identifier that uniquely identifies the Token Requestor.
120 121 122 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 120 def requestor_id @requestor_id end |
#security_code ⇒ String
4-digit number generated by the card association to be used alogside the network token for processing a payment. Only supported for Amex and SCOF.
111 112 113 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 111 def security_code @security_code end |
#source ⇒ String
Source of the payment instrument. Possible Values:
- ONFILE
- TOKEN
- ISSUER
49 50 51 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 49 def source @source end |
#state ⇒ String
State of the network token or network token provision. Possible Values:
ACTIVE : Network token is active.
SUSPENDED : Network token is suspended. This state can change back to
ACTIVE. DELETED : This is a final state for a network token instance. UNPROVISIONED : A previous network token.
59 60 61 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 59 def state @state end |
#token_reference_id ⇒ String
Unique ID for netwrok token.
128 129 130 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 128 def token_reference_id @token_reference_id end |
#type ⇒ String
The type of card (Card Network). Possible Values:
- visa
- mastercard
- americanexpress
101 102 103 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 101 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 255 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. links = Links22.from_hash(hash['_links']) if hash['_links'] id = hash.key?('id') ? hash['id'] : SKIP object = hash.key?('object') ? hash['object'] : SKIP account_reference_id = hash.key?('accountReferenceId') ? hash['accountReferenceId'] : SKIP consumer_id = hash.key?('consumerId') ? hash['consumerId'] : SKIP create_instrument_identifier = hash.key?('createInstrumentIdentifier') ? hash['createInstrumentIdentifier'] : SKIP source = hash.key?('source') ? hash['source'] : SKIP state = hash.key?('state') ? hash['state'] : SKIP reason = hash.key?('reason') ? hash['reason'] : SKIP 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 security_code = hash.key?('securityCode') ? hash['securityCode'] : SKIP eci = hash.key?('eci') ? hash['eci'] : SKIP requestor_id = hash.key?('requestorId') ? hash['requestorId'] : SKIP enrollment_id = hash.key?('enrollmentId') ? hash['enrollmentId'] : SKIP token_reference_id = hash.key?('tokenReferenceId') ? hash['tokenReferenceId'] : SKIP payment_account_reference = hash.key?('paymentAccountReference') ? hash['paymentAccountReference'] : SKIP card = Card5.from_hash(hash['card']) if hash['card'] passcode = Passcode2.from_hash(hash['passcode']) if hash['passcode'] = Metadata36.from_hash(hash['metadata']) if hash['metadata'] # 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. GetTokenizedCardResponse.new(links: links, id: id, object: object, account_reference_id: account_reference_id, consumer_id: consumer_id, create_instrument_identifier: create_instrument_identifier, source: source, state: state, reason: reason, number: number, expiration_month: expiration_month, expiration_year: expiration_year, type: type, cryptogram: cryptogram, security_code: security_code, eci: eci, requestor_id: requestor_id, enrollment_id: enrollment_id, token_reference_id: token_reference_id, payment_account_reference: payment_account_reference, card: card, passcode: passcode, metadata: , additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 147 def self.names @_hash = {} if @_hash.nil? @_hash['links'] = '_links' @_hash['id'] = 'id' @_hash['object'] = 'object' @_hash['account_reference_id'] = 'accountReferenceId' @_hash['consumer_id'] = 'consumerId' @_hash['create_instrument_identifier'] = 'createInstrumentIdentifier' @_hash['source'] = 'source' @_hash['state'] = 'state' @_hash['reason'] = 'reason' @_hash['number'] = 'number' @_hash['expiration_month'] = 'expirationMonth' @_hash['expiration_year'] = 'expirationYear' @_hash['type'] = 'type' @_hash['cryptogram'] = 'cryptogram' @_hash['security_code'] = 'securityCode' @_hash['eci'] = 'eci' @_hash['requestor_id'] = 'requestorId' @_hash['enrollment_id'] = 'enrollmentId' @_hash['token_reference_id'] = 'tokenReferenceId' @_hash['payment_account_reference'] = 'paymentAccountReference' @_hash['card'] = 'card' @_hash['passcode'] = 'passcode' @_hash['metadata'] = 'metadata' @_hash end |
.nullables ⇒ Object
An array for nullable fields
205 206 207 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 205 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 176 def self.optionals %w[ links id object account_reference_id consumer_id create_instrument_identifier source state reason number expiration_month expiration_year type cryptogram security_code eci requestor_id enrollment_id token_reference_id payment_account_reference card passcode metadata ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 338 def inspect class_name = self.class.name.split('::').last "<#{class_name} links: #{@links.inspect}, id: #{@id.inspect}, object: #{@object.inspect},"\ " account_reference_id: #{@account_reference_id.inspect}, consumer_id:"\ " #{@consumer_id.inspect}, create_instrument_identifier:"\ " #{@create_instrument_identifier.inspect}, source: #{@source.inspect}, state:"\ " #{@state.inspect}, reason: #{@reason.inspect}, number: #{@number.inspect},"\ " expiration_month: #{@expiration_month.inspect}, expiration_year:"\ " #{@expiration_year.inspect}, type: #{@type.inspect}, cryptogram: #{@cryptogram.inspect},"\ " security_code: #{@security_code.inspect}, eci: #{@eci.inspect}, requestor_id:"\ " #{@requestor_id.inspect}, enrollment_id: #{@enrollment_id.inspect}, token_reference_id:"\ " #{@token_reference_id.inspect}, payment_account_reference:"\ " #{@payment_account_reference.inspect}, card: #{@card.inspect}, passcode:"\ " #{@passcode.inspect}, metadata: #{@metadata.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
324 325 326 327 328 329 330 331 332 333 334 335 |
# File 'lib/visa_acceptance_merged_spec/models/get_tokenized_card_response.rb', line 324 def to_s class_name = self.class.name.split('::').last "<#{class_name} links: #{@links}, id: #{@id}, object: #{@object}, account_reference_id:"\ " #{@account_reference_id}, consumer_id: #{@consumer_id}, create_instrument_identifier:"\ " #{@create_instrument_identifier}, source: #{@source}, state: #{@state}, reason:"\ " #{@reason}, number: #{@number}, expiration_month: #{@expiration_month}, expiration_year:"\ " #{@expiration_year}, type: #{@type}, cryptogram: #{@cryptogram}, security_code:"\ " #{@security_code}, eci: #{@eci}, requestor_id: #{@requestor_id}, enrollment_id:"\ " #{@enrollment_id}, token_reference_id: #{@token_reference_id}, payment_account_reference:"\ " #{@payment_account_reference}, card: #{@card}, passcode: #{@passcode}, metadata:"\ " #{@metadata}, additional_properties: #{@additional_properties}>" end |