Class: VisaAcceptanceMergedSpec::PersonalIdentification
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::PersonalIdentification
- Defined in:
- lib/visa_acceptance_merged_spec/models/personal_identification.rb
Overview
PersonalIdentification Model.
Instance Attribute Summary collapse
-
#id ⇒ String
The value of the identification type.
-
#issued_by ⇒ String
The government agency that issued the driver's license or passport.
-
#type ⇒ String
The type of the identification.
-
#verification_results ⇒ String
Verification results received from Issuer or Card Network for verification transactions.
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, id: SKIP, issued_by: SKIP, verification_results: SKIP, additional_properties: nil) ⇒ PersonalIdentification
constructor
A new instance of PersonalIdentification.
-
#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, id: SKIP, issued_by: SKIP, verification_results: SKIP, additional_properties: nil) ⇒ PersonalIdentification
Returns a new instance of PersonalIdentification.
108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/visa_acceptance_merged_spec/models/personal_identification.rb', line 108 def initialize(type: SKIP, id: SKIP, issued_by: SKIP, verification_results: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @type = type unless type == SKIP @id = id unless id == SKIP @issued_by = issued_by unless issued_by == SKIP @verification_results = verification_results unless verification_results == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#id ⇒ String
The value of the identification type. This field is supported only on the following processors.
ComercioLatino
Set this field to the Cadastro de Pessoas Fisicas (CPF).
Visa Acceptance Latin American Processing
Supported for Redecard in Brazil. Set this field to the Cadastro de Pessoas Fisicas (CPF), which is required for AVS for Redecard in Brazil. Note Visa Acceptance Latin American Processing is the name of a specific processing connection that Visa Acceptance supports. In the Visa Acceptance API documentation, Visa Acceptance Latin American Processing does not refer to the general topic of processing in Latin America. The information in this field description is for the specific processing connection called Visa Acceptance Latin American Processing. It is not for any other Latin American processors that Visa Acceptance supports.
If type = PASSPORT, this is the cardholder's passport number.
Recommended for Discover ProtectBuy.
61 62 63 |
# File 'lib/visa_acceptance_merged_spec/models/personal_identification.rb', line 61 def id @id end |
#issued_by ⇒ String
The government agency that issued the driver's license or passport.
If type = DRIVER_LICENSE, this is the State or province where the
customer’s driver’s license was issued.
If type = PASSPORT, this is the Issuing country for the cardholder’s
passport. Recommended for Discover ProtectBuy.
Use the two-character [State, Province, and Territory Codes for the United
States and Canada](
TeleCheck
Contact your TeleCheck representative to find out whether this field is required or optional.
All Other Processors
Not used.
76 77 78 |
# File 'lib/visa_acceptance_merged_spec/models/personal_identification.rb', line 76 def issued_by @issued_by end |
#type ⇒ String
The type of the identification. Possible values:
- `NATIONAL`
- `CPF`
- `CPNJ`
- `CURP`
- `SSN`
- `DRIVER_LICENSE`
- `PASSPORT_NUMBER`
- `PERSONAL_ID`
- `TAX_ID`
- `BR_CPF` The individual tax ID type, typically is 11 characters
long
BR_CNPJThe business tax ID type, typically is 14 characters long. This field is supported only on the following processors.
ComercioLatino
Set this field to the Cadastro de Pessoas Fisicas (CPF).
Visa Acceptance Latin American Processing
Supported for Redecard in Brazil. Set this field to the Cadastro de Pessoas Fisicas (CPF), which is required for AVS for Redecard in Brazil. Note Visa Acceptance Latin American Processing is the name of a specific processing connection that Visa Acceptance supports. In the Visa Acceptance API documentation, Visa Acceptance Latin American Processing does not refer to the general topic of processing in Latin America. The information in this field description is for the specific processing connection called Visa Acceptance Latin American Processing. It is not for any other Latin American processors that Visa Acceptance supports.
41 42 43 |
# File 'lib/visa_acceptance_merged_spec/models/personal_identification.rb', line 41 def type @type end |
#verification_results ⇒ String
Verification results received from Issuer or Card Network for verification transactions. Response Only Field.
81 82 83 |
# File 'lib/visa_acceptance_merged_spec/models/personal_identification.rb', line 81 def verification_results @verification_results end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/visa_acceptance_merged_spec/models/personal_identification.rb', line 121 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. type = hash.key?('type') ? hash['type'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP issued_by = hash.key?('issuedBy') ? hash['issuedBy'] : SKIP verification_results = hash.key?('verificationResults') ? hash['verificationResults'] : 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. PersonalIdentification.new(type: type, id: id, issued_by: issued_by, verification_results: verification_results, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
84 85 86 87 88 89 90 91 |
# File 'lib/visa_acceptance_merged_spec/models/personal_identification.rb', line 84 def self.names @_hash = {} if @_hash.nil? @_hash['type'] = 'type' @_hash['id'] = 'id' @_hash['issued_by'] = 'issuedBy' @_hash['verification_results'] = 'verificationResults' @_hash end |
.nullables ⇒ Object
An array for nullable fields
104 105 106 |
# File 'lib/visa_acceptance_merged_spec/models/personal_identification.rb', line 104 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
94 95 96 97 98 99 100 101 |
# File 'lib/visa_acceptance_merged_spec/models/personal_identification.rb', line 94 def self.optionals %w[ type id issued_by verification_results ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
154 155 156 157 158 159 |
# File 'lib/visa_acceptance_merged_spec/models/personal_identification.rb', line 154 def inspect class_name = self.class.name.split('::').last "<#{class_name} type: #{@type.inspect}, id: #{@id.inspect}, issued_by:"\ " #{@issued_by.inspect}, verification_results: #{@verification_results.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
147 148 149 150 151 |
# File 'lib/visa_acceptance_merged_spec/models/personal_identification.rb', line 147 def to_s class_name = self.class.name.split('::').last "<#{class_name} type: #{@type}, id: #{@id}, issued_by: #{@issued_by}, verification_results:"\ " #{@verification_results}, additional_properties: #{@additional_properties}>" end |