Class: CyberSourceMergedSpec::PersonalIdentification32
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::PersonalIdentification32
- Defined in:
- lib/cyber_source_merged_spec/models/personal_identification32.rb
Overview
PersonalIdentification32 Model.
Instance Attribute Summary collapse
-
#id ⇒ String
The ID number/value.
-
#issuing_country ⇒ String
Issuing country of the identification.
-
#personal_id_type ⇒ String
It denotes whether the tax ID is a business or individual tax ID.
-
#type ⇒ String
Visa Direct This tag will contain the type of sender identification.
Class Method Summary collapse
- .from_element(root) ⇒ Object
-
.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(issuing_country: SKIP, id: SKIP, type: SKIP, personal_id_type: SKIP, additional_properties: nil) ⇒ PersonalIdentification32
constructor
A new instance of PersonalIdentification32.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
- #to_xml_element(doc, root_name) ⇒ 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(issuing_country: SKIP, id: SKIP, type: SKIP, personal_id_type: SKIP, additional_properties: nil) ⇒ PersonalIdentification32
Returns a new instance of PersonalIdentification32.
86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/cyber_source_merged_spec/models/personal_identification32.rb', line 86 def initialize(issuing_country: SKIP, id: SKIP, type: SKIP, personal_id_type: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @issuing_country = issuing_country unless issuing_country == SKIP @id = id unless id == SKIP @type = type unless type == SKIP @personal_id_type = personal_id_type unless personal_id_type == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#id ⇒ String
The ID number/value.
Visa Direct(35 characters)
This tag will contain an acquirer-populated id value associated with the
API.
If senderInformation.personalIdentification.type=BTHD, then the id
format must be YYYYMMDD.
24 25 26 |
# File 'lib/cyber_source_merged_spec/models/personal_identification32.rb', line 24 def id @id end |
#issuing_country ⇒ String
Issuing country of the identification.
The field format should be a 2 character ISO 3166-1 alpha-2 country code.
15 16 17 |
# File 'lib/cyber_source_merged_spec/models/personal_identification32.rb', line 15 def issuing_country @issuing_country end |
#personal_id_type ⇒ String
It denotes whether the tax ID is a business or individual tax ID.
The valid values are:
• B (Business)
• I (Individual)
Visa Direct
This field is required when
senderInformation.personalIdentification.type has the value of TXIN
(Tax identification).
A value for senderInformation.personalInformation.id is required when
senderInformation.personalIdentification.personalIdType is present in a
request.
59 60 61 |
# File 'lib/cyber_source_merged_spec/models/personal_identification32.rb', line 59 def personal_id_type @personal_id_type end |
#type ⇒ String
Visa Direct
This tag will contain the type of sender identification.
The valid values are:
• BTHD (Date of birth)
• CUID (Customer identification (unspecified))
• NTID (National identification)
• PASN (Passport number)
• DRLN (Driver license)
• TXIN (Tax identification)
• CPNY (Company registration number)
• PRXY (Proxy identification)
• SSNB (Social security number)
• ARNB (Alien registration number)
• LAWE (Law enforcement identification)
• MILI (Military identification)
• TRVL (Travel identification (non-passport))
• EMAL (Email)
• PHON (Phone number)
45 46 47 |
# File 'lib/cyber_source_merged_spec/models/personal_identification32.rb', line 45 def type @type end |
Class Method Details
.from_element(root) ⇒ Object
125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/cyber_source_merged_spec/models/personal_identification32.rb', line 125 def self.from_element(root) issuing_country = XmlUtilities.from_element(root, 'issuingCountry', String) id = XmlUtilities.from_element(root, 'id', String) type = XmlUtilities.from_element(root, 'type', String) personal_id_type = XmlUtilities.from_element(root, 'personalIdType', String) new(issuing_country: issuing_country, id: id, type: type, personal_id_type: personal_id_type, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/cyber_source_merged_spec/models/personal_identification32.rb', line 99 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. issuing_country = hash.key?('issuingCountry') ? hash['issuingCountry'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP personal_id_type = hash.key?('personalIdType') ? hash['personalIdType'] : 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. PersonalIdentification32.new(issuing_country: issuing_country, id: id, type: type, personal_id_type: personal_id_type, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
62 63 64 65 66 67 68 69 |
# File 'lib/cyber_source_merged_spec/models/personal_identification32.rb', line 62 def self.names @_hash = {} if @_hash.nil? @_hash['issuing_country'] = 'issuingCountry' @_hash['id'] = 'id' @_hash['type'] = 'type' @_hash['personal_id_type'] = 'personalIdType' @_hash end |
.nullables ⇒ Object
An array for nullable fields
82 83 84 |
# File 'lib/cyber_source_merged_spec/models/personal_identification32.rb', line 82 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
72 73 74 75 76 77 78 79 |
# File 'lib/cyber_source_merged_spec/models/personal_identification32.rb', line 72 def self.optionals %w[ issuing_country id type personal_id_type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
163 164 165 166 167 168 |
# File 'lib/cyber_source_merged_spec/models/personal_identification32.rb', line 163 def inspect class_name = self.class.name.split('::').last "<#{class_name} issuing_country: #{@issuing_country.inspect}, id: #{@id.inspect}, type:"\ " #{@type.inspect}, personal_id_type: #{@personal_id_type.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
156 157 158 159 160 |
# File 'lib/cyber_source_merged_spec/models/personal_identification32.rb', line 156 def to_s class_name = self.class.name.split('::').last "<#{class_name} issuing_country: #{@issuing_country}, id: #{@id}, type: #{@type},"\ " personal_id_type: #{@personal_id_type}, additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/cyber_source_merged_spec/models/personal_identification32.rb', line 140 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'issuingCountry', issuing_country) XmlUtilities.add_as_subelement(doc, root, 'id', id) XmlUtilities.add_as_subelement(doc, root, 'type', type) XmlUtilities.add_as_subelement(doc, root, 'personalIdType', personal_id_type) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |