Class: FdxV660Api::GovernmentIssuedPartyIdentificationEntity
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::GovernmentIssuedPartyIdentificationEntity
- Defined in:
- lib/fdx_v660_api/models/government_issued_party_identification_entity.rb
Overview
Government issued identification document that is used to uniquely identify a person or business
Instance Attribute Summary collapse
-
#expiry_date ⇒ String
Expiry date.
-
#id_number ⇒ String
Identification number.
-
#issued_date ⇒ String
Issued date.
-
#issuing_country_name ⇒ String
Name of the issuing country.
-
#type ⇒ GovernmentIssuedIdType2
Type of the identification.
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(id_number: SKIP, issued_date: SKIP, expiry_date: SKIP, type: SKIP, issuing_country_name: SKIP, additional_properties: nil) ⇒ GovernmentIssuedPartyIdentificationEntity
constructor
A new instance of GovernmentIssuedPartyIdentificationEntity.
-
#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(id_number: SKIP, issued_date: SKIP, expiry_date: SKIP, type: SKIP, issuing_country_name: SKIP, additional_properties: nil) ⇒ GovernmentIssuedPartyIdentificationEntity
Returns a new instance of GovernmentIssuedPartyIdentificationEntity.
60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/fdx_v660_api/models/government_issued_party_identification_entity.rb', line 60 def initialize(id_number: SKIP, issued_date: SKIP, expiry_date: SKIP, type: SKIP, issuing_country_name: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @id_number = id_number unless id_number == SKIP @issued_date = issued_date unless issued_date == SKIP @expiry_date = expiry_date unless expiry_date == SKIP @type = type unless type == SKIP @issuing_country_name = issuing_country_name unless issuing_country_name == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#expiry_date ⇒ String
Expiry date
23 24 25 |
# File 'lib/fdx_v660_api/models/government_issued_party_identification_entity.rb', line 23 def expiry_date @expiry_date end |
#id_number ⇒ String
Identification number
15 16 17 |
# File 'lib/fdx_v660_api/models/government_issued_party_identification_entity.rb', line 15 def id_number @id_number end |
#issued_date ⇒ String
Issued date
19 20 21 |
# File 'lib/fdx_v660_api/models/government_issued_party_identification_entity.rb', line 19 def issued_date @issued_date end |
#issuing_country_name ⇒ String
Name of the issuing country
31 32 33 |
# File 'lib/fdx_v660_api/models/government_issued_party_identification_entity.rb', line 31 def issuing_country_name @issuing_country_name end |
#type ⇒ GovernmentIssuedIdType2
Type of the identification
27 28 29 |
# File 'lib/fdx_v660_api/models/government_issued_party_identification_entity.rb', line 27 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/fdx_v660_api/models/government_issued_party_identification_entity.rb', line 75 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id_number = hash.key?('idNumber') ? hash['idNumber'] : SKIP issued_date = hash.key?('issuedDate') ? hash['issuedDate'] : SKIP expiry_date = hash.key?('expiryDate') ? hash['expiryDate'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP issuing_country_name = hash.key?('issuingCountryName') ? hash['issuingCountryName'] : 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. GovernmentIssuedPartyIdentificationEntity.new(id_number: id_number, issued_date: issued_date, expiry_date: expiry_date, type: type, issuing_country_name: issuing_country_name, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
34 35 36 37 38 39 40 41 42 |
# File 'lib/fdx_v660_api/models/government_issued_party_identification_entity.rb', line 34 def self.names @_hash = {} if @_hash.nil? @_hash['id_number'] = 'idNumber' @_hash['issued_date'] = 'issuedDate' @_hash['expiry_date'] = 'expiryDate' @_hash['type'] = 'type' @_hash['issuing_country_name'] = 'issuingCountryName' @_hash end |
.nullables ⇒ Object
An array for nullable fields
56 57 58 |
# File 'lib/fdx_v660_api/models/government_issued_party_identification_entity.rb', line 56 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
45 46 47 48 49 50 51 52 53 |
# File 'lib/fdx_v660_api/models/government_issued_party_identification_entity.rb', line 45 def self.optionals %w[ id_number issued_date expiry_date type issuing_country_name ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
111 112 113 114 115 116 |
# File 'lib/fdx_v660_api/models/government_issued_party_identification_entity.rb', line 111 def inspect class_name = self.class.name.split('::').last "<#{class_name} id_number: #{@id_number.inspect}, issued_date: #{@issued_date.inspect},"\ " expiry_date: #{@expiry_date.inspect}, type: #{@type.inspect}, issuing_country_name:"\ " #{@issuing_country_name.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
103 104 105 106 107 108 |
# File 'lib/fdx_v660_api/models/government_issued_party_identification_entity.rb', line 103 def to_s class_name = self.class.name.split('::').last "<#{class_name} id_number: #{@id_number}, issued_date: #{@issued_date}, expiry_date:"\ " #{@expiry_date}, type: #{@type}, issuing_country_name: #{@issuing_country_name},"\ " additional_properties: #{@additional_properties}>" end |