Class: VisaAcceptanceMergedSpec::TokenizedInformation
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::TokenizedInformation
- Defined in:
- lib/visa_acceptance_merged_spec/models/tokenized_information.rb
Overview
TokenizedInformation Model.
Instance Attribute Summary collapse
-
#requestor_id ⇒ String
Value that identifies your business and indicates that the cardholder’s account number is tokenized.
-
#transaction_type ⇒ String
Type of transaction that provided the token data.
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(requestor_id: SKIP, transaction_type: SKIP, additional_properties: nil) ⇒ TokenizedInformation
constructor
A new instance of TokenizedInformation.
-
#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(requestor_id: SKIP, transaction_type: SKIP, additional_properties: nil) ⇒ TokenizedInformation
Returns a new instance of TokenizedInformation.
50 51 52 53 54 55 56 57 58 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_information.rb', line 50 def initialize(requestor_id: SKIP, transaction_type: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @requestor_id = requestor_id unless requestor_id == SKIP @transaction_type = transaction_type unless transaction_type == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#requestor_id ⇒ String
Value that identifies your business and indicates that the cardholder’s account number is tokenized. This value is assigned by the token service provider and is unique within the token service provider’s database. Note This field is supported only through VisaNet and FDC Nashville Global.
19 20 21 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_information.rb', line 19 def requestor_id @requestor_id end |
#transaction_type ⇒ String
Type of transaction that provided the token data. This value does not specify the token service provider; it specifies the entity that provided you with information about the token. Set the value for this field to 1. An application on the customer’s mobile device provided the token data.
27 28 29 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_information.rb', line 27 def transaction_type @transaction_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_information.rb', line 61 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. requestor_id = hash.key?('requestorID') ? hash['requestorID'] : SKIP transaction_type = hash.key?('transactionType') ? hash['transactionType'] : 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. TokenizedInformation.new(requestor_id: requestor_id, transaction_type: transaction_type, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
30 31 32 33 34 35 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_information.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['requestor_id'] = 'requestorID' @_hash['transaction_type'] = 'transactionType' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_information.rb', line 46 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
38 39 40 41 42 43 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_information.rb', line 38 def self.optionals %w[ requestor_id transaction_type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
90 91 92 93 94 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_information.rb', line 90 def inspect class_name = self.class.name.split('::').last "<#{class_name} requestor_id: #{@requestor_id.inspect}, transaction_type:"\ " #{@transaction_type.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
83 84 85 86 87 |
# File 'lib/visa_acceptance_merged_spec/models/tokenized_information.rb', line 83 def to_s class_name = self.class.name.split('::').last "<#{class_name} requestor_id: #{@requestor_id}, transaction_type: #{@transaction_type},"\ " additional_properties: #{@additional_properties}>" end |