trinsic_api 3.1.0.pre.preview1 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/docs/AgeOverOutput.md +20 -0
  3. data/docs/AppleWalletProviderOutput.md +2 -0
  4. data/docs/EudiAgeVerificationCredential.md +22 -0
  5. data/docs/EudiPidCredential.md +70 -0
  6. data/docs/FranceIdentiteProviderOutput.md +4 -0
  7. data/docs/GoogleWalletIdPassCredential.md +40 -0
  8. data/docs/GoogleWalletProviderOutput.md +4 -0
  9. data/docs/Iso180132BiometricDataBlockProduct.md +20 -0
  10. data/docs/Iso180132BiometricGroupTemplate.md +18 -0
  11. data/docs/Iso180132BiometricTemplate.md +24 -0
  12. data/docs/Iso180132BiometricTemplateHeader.md +36 -0
  13. data/docs/Iso180132BiometricValidityPeriod.md +20 -0
  14. data/docs/Iso180135AamvaDomesticDrivingPrivilege.md +22 -0
  15. data/docs/Iso180135AamvaDomesticVehicleClass.md +24 -0
  16. data/docs/Iso180135AamvaDomesticVehicleEndorsement.md +20 -0
  17. data/docs/Iso180135AamvaDomesticVehicleRestriction.md +20 -0
  18. data/docs/Iso180135AamvaNamespaceOutput.md +70 -0
  19. data/docs/Iso180135AamvaWeightRange.md +20 -0
  20. data/docs/Iso180135DrivingPrivilege.md +24 -0
  21. data/docs/Iso180135DrivingPrivilegeCode.md +22 -0
  22. data/docs/Iso180135MobileDriversLicenseCredential.md +20 -0
  23. data/docs/Iso180135StandardNamespaceOutput.md +86 -0
  24. data/docs/SamsungWalletProviderOutput.md +2 -0
  25. data/lib/trinsic_api/models/age_over_output.rb +193 -0
  26. data/lib/trinsic_api/models/apple_wallet_provider_output.rb +12 -1
  27. data/lib/trinsic_api/models/eudi_age_verification_credential.rb +174 -0
  28. data/lib/trinsic_api/models/eudi_pid_credential.rb +438 -0
  29. data/lib/trinsic_api/models/france_identite_provider_output.rb +23 -1
  30. data/lib/trinsic_api/models/google_wallet_id_pass_credential.rb +273 -0
  31. data/lib/trinsic_api/models/google_wallet_provider_output.rb +23 -1
  32. data/lib/trinsic_api/models/iso180132_biometric_data_block_product.rb +193 -0
  33. data/lib/trinsic_api/models/iso180132_biometric_group_template.rb +168 -0
  34. data/lib/trinsic_api/models/iso180132_biometric_template.rb +231 -0
  35. data/lib/trinsic_api/models/iso180132_biometric_template_header.rb +297 -0
  36. data/lib/trinsic_api/models/iso180132_biometric_validity_period.rb +193 -0
  37. data/lib/trinsic_api/models/iso180135_aamva_domestic_driving_privilege.rb +176 -0
  38. data/lib/trinsic_api/models/iso180135_aamva_domestic_vehicle_class.rb +215 -0
  39. data/lib/trinsic_api/models/iso180135_aamva_domestic_vehicle_endorsement.rb +177 -0
  40. data/lib/trinsic_api/models/iso180135_aamva_domestic_vehicle_restriction.rb +177 -0
  41. data/lib/trinsic_api/models/iso180135_aamva_namespace_output.rb +438 -0
  42. data/lib/trinsic_api/models/iso180135_aamva_weight_range.rb +177 -0
  43. data/lib/trinsic_api/models/iso180135_driving_privilege.rb +201 -0
  44. data/lib/trinsic_api/models/iso180135_driving_privilege_code.rb +188 -0
  45. data/lib/trinsic_api/models/iso180135_mobile_drivers_license_credential.rb +161 -0
  46. data/lib/trinsic_api/models/iso180135_standard_namespace_output.rb +528 -0
  47. data/lib/trinsic_api/models/samsung_wallet_provider_output.rb +12 -1
  48. data/lib/trinsic_api/version.rb +1 -1
  49. data/lib/trinsic_api.rb +19 -0
  50. data/spec/models/age_over_output_spec.rb +42 -0
  51. data/spec/models/apple_wallet_provider_output_spec.rb +6 -0
  52. data/spec/models/eudi_age_verification_credential_spec.rb +48 -0
  53. data/spec/models/eudi_pid_credential_spec.rb +192 -0
  54. data/spec/models/france_identite_provider_output_spec.rb +12 -0
  55. data/spec/models/google_wallet_id_pass_credential_spec.rb +102 -0
  56. data/spec/models/google_wallet_provider_output_spec.rb +12 -0
  57. data/spec/models/iso180132_biometric_data_block_product_spec.rb +42 -0
  58. data/spec/models/iso180132_biometric_group_template_spec.rb +36 -0
  59. data/spec/models/iso180132_biometric_template_header_spec.rb +90 -0
  60. data/spec/models/iso180132_biometric_template_spec.rb +54 -0
  61. data/spec/models/iso180132_biometric_validity_period_spec.rb +42 -0
  62. data/spec/models/iso180135_aamva_domestic_driving_privilege_spec.rb +48 -0
  63. data/spec/models/iso180135_aamva_domestic_vehicle_class_spec.rb +54 -0
  64. data/spec/models/iso180135_aamva_domestic_vehicle_endorsement_spec.rb +42 -0
  65. data/spec/models/iso180135_aamva_domestic_vehicle_restriction_spec.rb +42 -0
  66. data/spec/models/iso180135_aamva_namespace_output_spec.rb +192 -0
  67. data/spec/models/iso180135_aamva_weight_range_spec.rb +42 -0
  68. data/spec/models/iso180135_driving_privilege_code_spec.rb +48 -0
  69. data/spec/models/iso180135_driving_privilege_spec.rb +54 -0
  70. data/spec/models/iso180135_mobile_drivers_license_credential_spec.rb +42 -0
  71. data/spec/models/iso180135_standard_namespace_output_spec.rb +240 -0
  72. data/spec/models/samsung_wallet_provider_output_spec.rb +6 -0
  73. metadata +78 -2
@@ -0,0 +1,86 @@
1
+ # TrinsicApi::Iso180135StandardNamespaceOutput
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **given_name** | **String** | First name(s), other name(s), or secondary identifier of the individual. | [optional] |
8
+ | **given_name_national_character** | **String** | The given name of the individual using the full UTF-8 character set. | [optional] |
9
+ | **family_name** | **String** | Last name, surname, or primary identifier of the individual. | [optional] |
10
+ | **family_name_national_character** | **String** | The family name of the individual using the full UTF-8 character set. | [optional] |
11
+ | **date_of_birth** | **Date** | The date of birth of the individual. | [optional] |
12
+ | **issue_date** | **Date** | The date when the mDL was issued. This date marks the beginning of the Administrative Validity Period of the mDL, which is usually (but not necessarily always) the same as the issue date of the underlying physical document used to create the mDL, if one exists. | [optional] |
13
+ | **expiry_date** | **Date** | The date when the mDL expires. This date marks the end of the Administrative Validity Period of the mDL, which is usually (but not necessarily always) the same as the expiration date of the underlying physical document used to create the mDL, if one exists. | [optional] |
14
+ | **issuing_country** | **String** | Alpha-2 country code of the issuing authority's country or territory. | [optional] |
15
+ | **issuing_authority** | **String** | Name or identifier of the mDL issuing authority. This field's contents are arbitrary; it has no guaranteed format. | [optional] |
16
+ | **issuing_jurisdiction** | **String** | ISO 3166-2 country-subdivision code for the jurisdiction that issued the mDL. | [optional] |
17
+ | **nationality** | **String** | Nationality of the individual as an ISO 3166-1 alpha-2 country code. | [optional] |
18
+ | **document_number** | **String** | The document number assigned to the mDL. This is typically the same as the document number of the underlying physical document used to create the mDL, if one exists. | [optional] |
19
+ | **driving_privileges** | [**Array<Iso180135DrivingPrivilege>**](Iso180135DrivingPrivilege.md) | Driving privileges of the individual, parsed per ISO 18013-5. | [optional] |
20
+ | **un_distinguishing_sign** | **String** | The UN Distinguishing sign of the issuing country according to ISO/IEC 18013-1. | [optional] |
21
+ | **administrative_number** | **String** | Audit control number assigned by the issuing authority. The meaning and semantics of this field are defined by the issuing authority in question. | [optional] |
22
+ | **sex** | **Integer** | The individual's sex as an ISO/IEC 5218 code. Possible values: - 0: Unknown - 1: Male - 2: Female - 9: Not Applicable | [optional] |
23
+ | **height_centimeters** | **Integer** | The individual's height in centimeters. | [optional] |
24
+ | **weight_kilograms** | **Integer** | The individual's weight in kilograms. | [optional] |
25
+ | **eye_color** | **String** | The individual's eye color. Possible values: - \"black\" - \"blue\" - \"brown\" - \"dichromatic\" - \"grey\" - \"green\" - \"hazel\" - \"maroon\" - \"pink\" - \"unknown\" | [optional] |
26
+ | **hair_color** | **String** | The individual's hair color. Possible values: - \"bald\" - \"black\" - \"blond\" - \"brown\" - \"grey\" - \"red\" - \"auburn\" - \"sandy\" - \"white\" - \"unknown\" | [optional] |
27
+ | **birth_place** | **String** | Country and municipality or state/province where the individual was born. | [optional] |
28
+ | **resident_address** | **String** | Address where the individual resides. The exact format of this field is variable and depends on the issuer. It may map exactly to a \"Line1\", or it may include city, state, and/or zip code as well. | [optional] |
29
+ | **resident_city** | **String** | City where the individual resides. | [optional] |
30
+ | **resident_state** | **String** | State, province, or district where the individual resides. | [optional] |
31
+ | **resident_postal_code** | **String** | Postal code where the individual resides. | [optional] |
32
+ | **resident_country** | **String** | Country where the individual resides as an ISO 3166-1 alpha-2 country code. | [optional] |
33
+ | **portrait_capture_date** | **Time** | Date and time when the portrait image was captured. | [optional] |
34
+ | **age_in_years** | **Integer** | Age of the individual in years. | [optional] |
35
+ | **age_birth_year** | **Integer** | Year of birth of the individual. | [optional] |
36
+ | **age_over** | [**Array<AgeOverOutput>**](AgeOverOutput.md) | Processed age-over claims returned by the mDL. | [optional] |
37
+ | **biometric_template_face** | [**Iso180132BiometricGroupTemplate**](Iso180132BiometricGroupTemplate.md) | Facial biometric template group from `biometric_template_face`, parsed per ISO 18013-2 Annex C. | [optional] |
38
+ | **biometric_template_voice** | [**Iso180132BiometricGroupTemplate**](Iso180132BiometricGroupTemplate.md) | Vocal biometric template group from `biometric_template_voice`, parsed per ISO 18013-2 Annex C. | [optional] |
39
+ | **biometric_template_finger** | [**Iso180132BiometricGroupTemplate**](Iso180132BiometricGroupTemplate.md) | Fingerprint biometric template group from `biometric_template_finger`, parsed per ISO 18013-2 Annex C. | [optional] |
40
+ | **biometric_template_iris** | [**Iso180132BiometricGroupTemplate**](Iso180132BiometricGroupTemplate.md) | Iris biometric template group from `biometric_template_iris`, parsed per ISO 18013-2 Annex C. | [optional] |
41
+ | **biometric_template_retina** | [**Iso180132BiometricGroupTemplate**](Iso180132BiometricGroupTemplate.md) | Retinal biometric template group from `biometric_template_retina`, parsed per ISO 18013-2 Annex C. | [optional] |
42
+
43
+ ## Example
44
+
45
+ ```ruby
46
+ require 'trinsic_api'
47
+
48
+ instance = TrinsicApi::Iso180135StandardNamespaceOutput.new(
49
+ given_name: JOHN,
50
+ given_name_national_character: JOHN,
51
+ family_name: DOE,
52
+ family_name_national_character: DOE,
53
+ date_of_birth: Wed Jan 31 00:00:00 UTC 1990,
54
+ issue_date: Fri Jan 31 00:00:00 UTC 2020,
55
+ expiry_date: Thu Jan 31 00:00:00 UTC 2030,
56
+ issuing_country: US,
57
+ issuing_authority: CA,USA,
58
+ issuing_jurisdiction: US-CA,
59
+ nationality: US,
60
+ document_number: D1234567,
61
+ driving_privileges: [{"vehicleCategoryCode":"C","issueDate":"2020-01-31","expiryDate":"2030-01-31"}],
62
+ un_distinguishing_sign: USA,
63
+ administrative_number: 123456789,
64
+ sex: 1,
65
+ height_centimeters: 180,
66
+ weight_kilograms: 75,
67
+ eye_color: brown,
68
+ hair_color: black,
69
+ birth_place: SACRAMENTO, CA,
70
+ resident_address: 123 MAIN ST,
71
+ resident_city: SACRAMENTO,
72
+ resident_state: CA,
73
+ resident_postal_code: 95814,
74
+ resident_country: US,
75
+ portrait_capture_date: 2020-01-31T12:34:56Z,
76
+ age_in_years: 35,
77
+ age_birth_year: 1990,
78
+ age_over: [{"age":18,"isOver":true},{"age":21,"isOver":true}],
79
+ biometric_template_face: null,
80
+ biometric_template_voice: null,
81
+ biometric_template_finger: null,
82
+ biometric_template_iris: null,
83
+ biometric_template_retina: null
84
+ )
85
+ ```
86
+
@@ -4,6 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
+ | **mobile_drivers_license** | [**Iso180135MobileDriversLicenseCredential**](Iso180135MobileDriversLicenseCredential.md) | A standard 18013-5 Mobile Driver's License credential, retrieved from the individual's wallet. | [optional] |
7
8
  | **raw_mdl_output** | [**MdlOutput**](MdlOutput.md) | The raw output of the mDL exchange performed through Samsung Wallet. | |
8
9
 
9
10
  ## Example
@@ -12,6 +13,7 @@
12
13
  require 'trinsic_api'
13
14
 
14
15
  instance = TrinsicApi::SamsungWalletProviderOutput.new(
16
+ mobile_drivers_license: null,
15
17
  raw_mdl_output: null
16
18
  )
17
19
  ```
@@ -0,0 +1,193 @@
1
+ =begin
2
+ #Trinsic API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TrinsicApi
17
+ # Processed result of an \"age over X\" claim present in a credential.
18
+ class AgeOverOutput < ApiModelBase
19
+ # The age threshold from the `age over X` claim.
20
+ attr_accessor :age
21
+
22
+ # Whether the individual is at least the given age.
23
+ attr_accessor :is_over
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'age' => :'age',
29
+ :'is_over' => :'isOver'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'age' => :'Integer',
47
+ :'is_over' => :'Boolean'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::AgeOverOutput` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ acceptable_attribute_map = self.class.acceptable_attribute_map
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!acceptable_attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::AgeOverOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
72
+
73
+ if attributes.key?(:'age')
74
+ self.age = attributes[:'age']
75
+ else
76
+ self.age = nil
77
+ end
78
+
79
+ if attributes.key?(:'is_over')
80
+ self.is_over = attributes[:'is_over']
81
+ else
82
+ self.is_over = nil
83
+ end
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properties with the reasons
88
+ def list_invalid_properties
89
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
90
+ invalid_properties = Array.new
91
+ if @age.nil?
92
+ invalid_properties.push('invalid value for "age", age cannot be nil.')
93
+ end
94
+
95
+ if @is_over.nil?
96
+ invalid_properties.push('invalid value for "is_over", is_over cannot be nil.')
97
+ end
98
+
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ warn '[DEPRECATED] the `valid?` method is obsolete'
106
+ return false if @age.nil?
107
+ return false if @is_over.nil?
108
+ true
109
+ end
110
+
111
+ # Custom attribute writer method with validation
112
+ # @param [Object] age Value to be assigned
113
+ def age=(age)
114
+ if age.nil?
115
+ fail ArgumentError, 'age cannot be nil'
116
+ end
117
+
118
+ @age = age
119
+ end
120
+
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] is_over Value to be assigned
123
+ def is_over=(is_over)
124
+ if is_over.nil?
125
+ fail ArgumentError, 'is_over cannot be nil'
126
+ end
127
+
128
+ @is_over = is_over
129
+ end
130
+
131
+ # Checks equality by comparing each attribute.
132
+ # @param [Object] Object to be compared
133
+ def ==(o)
134
+ return true if self.equal?(o)
135
+ self.class == o.class &&
136
+ age == o.age &&
137
+ is_over == o.is_over
138
+ end
139
+
140
+ # @see the `==` method
141
+ # @param [Object] Object to be compared
142
+ def eql?(o)
143
+ self == o
144
+ end
145
+
146
+ # Calculates hash code according to all attributes.
147
+ # @return [Integer] Hash code
148
+ def hash
149
+ [age, is_over].hash
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def self.build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ attributes = attributes.transform_keys(&:to_sym)
158
+ transformed_hash = {}
159
+ openapi_types.each_pair do |key, type|
160
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = nil
162
+ elsif type =~ /\AArray<(.*)>/i
163
+ # check to ensure the input is an array given that the attribute
164
+ # is documented as an array but the input is not
165
+ if attributes[attribute_map[key]].is_a?(Array)
166
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
167
+ end
168
+ elsif !attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
170
+ end
171
+ end
172
+ new(transformed_hash)
173
+ end
174
+
175
+ # Returns the object in the form of hash
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_hash
178
+ hash = {}
179
+ self.class.attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ if value.nil?
182
+ is_nullable = self.class.openapi_nullable.include?(attr)
183
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
184
+ end
185
+
186
+ hash[param] = _to_hash(value)
187
+ end
188
+ hash
189
+ end
190
+
191
+ end
192
+
193
+ end
@@ -16,12 +16,16 @@ require 'time'
16
16
  module TrinsicApi
17
17
  # Exposed properties for the `apple-wallet` Provider which do not directly map to the normalized IdentityData model.
18
18
  class AppleWalletProviderOutput < ApiModelBase
19
+ # A standard 18013-5 Mobile Driver's License credential, retrieved from the individual's wallet.
20
+ attr_accessor :mobile_drivers_license
21
+
19
22
  # The raw output of the mDL exchange performed through Apple Wallet.
20
23
  attr_accessor :raw_mdl_output
21
24
 
22
25
  # Attribute mapping from ruby-style variable name to JSON key.
23
26
  def self.attribute_map
24
27
  {
28
+ :'mobile_drivers_license' => :'mobileDriversLicense',
25
29
  :'raw_mdl_output' => :'rawMdlOutput'
26
30
  }
27
31
  end
@@ -39,6 +43,7 @@ module TrinsicApi
39
43
  # Attribute type mapping.
40
44
  def self.openapi_types
41
45
  {
46
+ :'mobile_drivers_license' => :'Iso180135MobileDriversLicenseCredential',
42
47
  :'raw_mdl_output' => :'MdlOutput'
43
48
  }
44
49
  end
@@ -46,6 +51,7 @@ module TrinsicApi
46
51
  # List of attributes with nullable: true
47
52
  def self.openapi_nullable
48
53
  Set.new([
54
+ :'mobile_drivers_license',
49
55
  ])
50
56
  end
51
57
 
@@ -65,6 +71,10 @@ module TrinsicApi
65
71
  h[k.to_sym] = v
66
72
  }
67
73
 
74
+ if attributes.key?(:'mobile_drivers_license')
75
+ self.mobile_drivers_license = attributes[:'mobile_drivers_license']
76
+ end
77
+
68
78
  if attributes.key?(:'raw_mdl_output')
69
79
  self.raw_mdl_output = attributes[:'raw_mdl_output']
70
80
  else
@@ -107,6 +117,7 @@ module TrinsicApi
107
117
  def ==(o)
108
118
  return true if self.equal?(o)
109
119
  self.class == o.class &&
120
+ mobile_drivers_license == o.mobile_drivers_license &&
110
121
  raw_mdl_output == o.raw_mdl_output
111
122
  end
112
123
 
@@ -119,7 +130,7 @@ module TrinsicApi
119
130
  # Calculates hash code according to all attributes.
120
131
  # @return [Integer] Hash code
121
132
  def hash
122
- [raw_mdl_output].hash
133
+ [mobile_drivers_license, raw_mdl_output].hash
123
134
  end
124
135
 
125
136
  # Builds the object from hash
@@ -0,0 +1,174 @@
1
+ =begin
2
+ #Trinsic API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TrinsicApi
17
+ # An EUDI Age Verification credential, with document type `eu.europa.ec.eudi.av.1`. This is the age verification credential type defined in the EUDI Wallet framework.
18
+ class EudiAgeVerificationCredential < ApiModelBase
19
+ # Processed age-over claims returned by the credential.
20
+ attr_accessor :age_over
21
+
22
+ # Date when the age verification data expires.
23
+ attr_accessor :expiry_date
24
+
25
+ # ISO 3166-1 alpha-2 country code of the country or territory of the issuer of the credential.
26
+ attr_accessor :issuing_country
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'age_over' => :'ageOver',
32
+ :'expiry_date' => :'expiryDate',
33
+ :'issuing_country' => :'issuingCountry'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'age_over' => :'Array<AgeOverOutput>',
51
+ :'expiry_date' => :'Date',
52
+ :'issuing_country' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ :'age_over',
60
+ :'expiry_date',
61
+ :'issuing_country'
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::EudiAgeVerificationCredential` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ acceptable_attribute_map = self.class.acceptable_attribute_map
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!acceptable_attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::EudiAgeVerificationCredential`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'age_over')
82
+ if (value = attributes[:'age_over']).is_a?(Array)
83
+ self.age_over = value
84
+ end
85
+ end
86
+
87
+ if attributes.key?(:'expiry_date')
88
+ self.expiry_date = attributes[:'expiry_date']
89
+ end
90
+
91
+ if attributes.key?(:'issuing_country')
92
+ self.issuing_country = attributes[:'issuing_country']
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
+ invalid_properties = Array.new
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ warn '[DEPRECATED] the `valid?` method is obsolete'
108
+ true
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param [Object] Object to be compared
113
+ def ==(o)
114
+ return true if self.equal?(o)
115
+ self.class == o.class &&
116
+ age_over == o.age_over &&
117
+ expiry_date == o.expiry_date &&
118
+ issuing_country == o.issuing_country
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ def hash
130
+ [age_over, expiry_date, issuing_country].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ attributes = attributes.transform_keys(&:to_sym)
139
+ transformed_hash = {}
140
+ openapi_types.each_pair do |key, type|
141
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = nil
143
+ elsif type =~ /\AArray<(.*)>/i
144
+ # check to ensure the input is an array given that the attribute
145
+ # is documented as an array but the input is not
146
+ if attributes[attribute_map[key]].is_a?(Array)
147
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
148
+ end
149
+ elsif !attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
151
+ end
152
+ end
153
+ new(transformed_hash)
154
+ end
155
+
156
+ # Returns the object in the form of hash
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_hash
159
+ hash = {}
160
+ self.class.attribute_map.each_pair do |attr, param|
161
+ value = self.send(attr)
162
+ if value.nil?
163
+ is_nullable = self.class.openapi_nullable.include?(attr)
164
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
165
+ end
166
+
167
+ hash[param] = _to_hash(value)
168
+ end
169
+ hash
170
+ end
171
+
172
+ end
173
+
174
+ end