trinsic_api 3.2.1 → 3.3.0.pre.alpha2

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 (146) hide show
  1. checksums.yaml +4 -4
  2. data/docs/BrazilCnhProviderOutput.md +2 -0
  3. data/docs/BrazilCpfCheckInput.md +3 -3
  4. data/docs/BrazilCpfProviderOutput.md +1 -1
  5. data/docs/BrazilDigitalCnhInput.md +1 -1
  6. data/docs/ConnectIdAgeVerification.md +9 -1
  7. data/docs/ConnectIdInput.md +18 -0
  8. data/docs/CreateDirectProviderSessionRequest.md +2 -0
  9. data/docs/CreateHostedProviderSessionRequest.md +2 -0
  10. data/docs/CzechBankIdInput.md +18 -0
  11. data/docs/DeveloperApi.md +153 -0
  12. data/docs/DigilockerAadhaarProviderOutput.md +1 -1
  13. data/docs/FinnishTrustNetworkAddressOutput.md +22 -0
  14. data/docs/FinnishTrustNetworkInput.md +18 -0
  15. data/docs/FinnishTrustNetworkProviderOutput.md +2 -0
  16. data/docs/GetAttachmentResponse.md +2 -0
  17. data/docs/GetSessionResultRequest.md +3 -1
  18. data/docs/GetSessionResultResponse.md +3 -1
  19. data/docs/HPKETestRequest.md +22 -0
  20. data/docs/HPKETestVPRequest.md +20 -0
  21. data/docs/IdemiaMobileIdProviderOutput.md +1 -5
  22. data/docs/IndiaPanLookupProviderOutput.md +1 -1
  23. data/docs/IndonesiaDukcapilMatchInput.md +1 -1
  24. data/docs/JapanMyNumberProviderOutput.md +24 -0
  25. data/docs/JordanSanadInput.md +18 -0
  26. data/docs/MitIdAddressOutput.md +28 -0
  27. data/docs/MitIdProviderOutput.md +3 -1
  28. data/docs/PolandMobywatelMatchInput.md +1 -1
  29. data/docs/Provider.md +2 -0
  30. data/docs/ProviderInput.md +10 -0
  31. data/docs/ProviderOutput.md +8 -0
  32. data/docs/RecommendProviderInformation.md +2 -0
  33. data/docs/RecommendProvidersRequest.md +1 -1
  34. data/docs/RevolutProviderOutput.md +28 -0
  35. data/docs/SanadProviderOutput.md +28 -0
  36. data/docs/SaudiArabiaNafathAddress.md +50 -0
  37. data/docs/SaudiArabiaNafathCitizenAttributes.md +68 -0
  38. data/docs/SaudiArabiaNafathHeadOfHousehold.md +26 -0
  39. data/docs/SaudiArabiaNafathProviderOutput.md +38 -0
  40. data/docs/SaudiArabiaNafathResidentAttributes.md +68 -0
  41. data/docs/SaudiArabiaNafathVisitorAttributes.md +72 -0
  42. data/docs/SessionsApi.md +2 -2
  43. data/docs/SignzyIndiaAadhaarFetchProviderOutput.md +1 -1
  44. data/docs/SingpassPersonalCatalog.md +2 -2
  45. data/docs/SwedenBankIdProviderOutput.md +7 -3
  46. data/docs/TrinsicHPKEBundle.md +24 -0
  47. data/docs/TrinsicHPKEMetadata.md +30 -0
  48. data/docs/TrinsicTestDatabaseLookupInput.md +1 -1
  49. data/docs/UkEvisaLookupInput.md +1 -1
  50. data/docs/UsaArizonaWalletInput.md +18 -0
  51. data/docs/VerificationProfileResponse.md +2 -0
  52. data/docs/VerificationProfilesApi.md +3 -1
  53. data/docs/YotiStructuredPostalAddress.md +1 -1
  54. data/lib/trinsic_api/api/developer_api.rb +156 -0
  55. data/lib/trinsic_api/api/verification_profiles_api.rb +3 -0
  56. data/lib/trinsic_api/api_client.rb +1 -0
  57. data/lib/trinsic_api/models/brazil_cnh_provider_output.rb +12 -1
  58. data/lib/trinsic_api/models/brazil_cpf_check_input.rb +12 -22
  59. data/lib/trinsic_api/models/brazil_cpf_provider_output.rb +1 -1
  60. data/lib/trinsic_api/models/brazil_digital_cnh_input.rb +1 -1
  61. data/lib/trinsic_api/models/connect_id_age_verification.rb +46 -2
  62. data/lib/trinsic_api/models/connect_id_input.rb +149 -0
  63. data/lib/trinsic_api/models/create_direct_provider_session_request.rb +28 -1
  64. data/lib/trinsic_api/models/create_hosted_provider_session_request.rb +28 -1
  65. data/lib/trinsic_api/models/czech_bank_id_input.rb +149 -0
  66. data/lib/trinsic_api/models/digilocker_aadhaar_provider_output.rb +1 -1
  67. data/lib/trinsic_api/models/finnish_trust_network_address_output.rb +171 -0
  68. data/lib/trinsic_api/models/finnish_trust_network_input.rb +149 -0
  69. data/lib/trinsic_api/models/finnish_trust_network_provider_output.rb +12 -1
  70. data/lib/trinsic_api/models/get_attachment_response.rb +12 -1
  71. data/lib/trinsic_api/models/get_session_result_request.rb +15 -4
  72. data/lib/trinsic_api/models/get_session_result_response.rb +16 -5
  73. data/lib/trinsic_api/models/hpke_test_request.rb +219 -0
  74. data/lib/trinsic_api/models/hpke_test_vp_request.rb +192 -0
  75. data/lib/trinsic_api/models/idemia_mobile_id_provider_output.rb +1 -23
  76. data/lib/trinsic_api/models/india_pan_lookup_provider_output.rb +1 -1
  77. data/lib/trinsic_api/models/indonesia_dukcapil_match_input.rb +1 -1
  78. data/lib/trinsic_api/models/japan_my_number_provider_output.rb +183 -0
  79. data/lib/trinsic_api/models/jordan_sanad_input.rb +164 -0
  80. data/lib/trinsic_api/models/mit_id_address_output.rb +204 -0
  81. data/lib/trinsic_api/models/mit_id_provider_output.rb +16 -5
  82. data/lib/trinsic_api/models/poland_mobywatel_match_input.rb +1 -1
  83. data/lib/trinsic_api/models/provider.rb +14 -1
  84. data/lib/trinsic_api/models/provider_input.rb +56 -1
  85. data/lib/trinsic_api/models/provider_output.rb +45 -1
  86. data/lib/trinsic_api/models/recommend_provider_information.rb +14 -1
  87. data/lib/trinsic_api/models/recommend_providers_request.rb +1 -1
  88. data/lib/trinsic_api/models/revolut_provider_output.rb +204 -0
  89. data/lib/trinsic_api/models/sanad_provider_output.rb +205 -0
  90. data/lib/trinsic_api/models/saudi_arabia_nafath_address.rb +325 -0
  91. data/lib/trinsic_api/models/saudi_arabia_nafath_citizen_attributes.rb +426 -0
  92. data/lib/trinsic_api/models/saudi_arabia_nafath_head_of_household.rb +193 -0
  93. data/lib/trinsic_api/models/saudi_arabia_nafath_provider_output.rb +260 -0
  94. data/lib/trinsic_api/models/saudi_arabia_nafath_resident_attributes.rb +426 -0
  95. data/lib/trinsic_api/models/saudi_arabia_nafath_visitor_attributes.rb +446 -0
  96. data/lib/trinsic_api/models/signzy_india_aadhaar_fetch_provider_output.rb +1 -1
  97. data/lib/trinsic_api/models/singpass_personal_catalog.rb +9 -9
  98. data/lib/trinsic_api/models/sweden_bank_id_provider_output.rb +24 -2
  99. data/lib/trinsic_api/models/trinsic_hpke_bundle.rb +246 -0
  100. data/lib/trinsic_api/models/trinsic_hpke_metadata.rb +327 -0
  101. data/lib/trinsic_api/models/trinsic_test_database_lookup_input.rb +1 -1
  102. data/lib/trinsic_api/models/uk_evisa_lookup_input.rb +1 -1
  103. data/lib/trinsic_api/models/usa_arizona_wallet_input.rb +149 -0
  104. data/lib/trinsic_api/models/verification_profile_response.rb +28 -1
  105. data/lib/trinsic_api/version.rb +1 -1
  106. data/lib/trinsic_api.rb +21 -0
  107. data/spec/api/developer_api_spec.rb +60 -0
  108. data/spec/api/verification_profiles_api_spec.rb +1 -0
  109. data/spec/models/brazil_cnh_provider_output_spec.rb +6 -0
  110. data/spec/models/connect_id_age_verification_spec.rb +24 -0
  111. data/spec/models/connect_id_input_spec.rb +36 -0
  112. data/spec/models/create_direct_provider_session_request_spec.rb +6 -0
  113. data/spec/models/create_hosted_provider_session_request_spec.rb +6 -0
  114. data/spec/models/czech_bank_id_input_spec.rb +36 -0
  115. data/spec/models/finnish_trust_network_address_output_spec.rb +48 -0
  116. data/spec/models/finnish_trust_network_input_spec.rb +36 -0
  117. data/spec/models/finnish_trust_network_provider_output_spec.rb +6 -0
  118. data/spec/models/get_attachment_response_spec.rb +6 -0
  119. data/spec/models/get_session_result_request_spec.rb +6 -0
  120. data/spec/models/get_session_result_response_spec.rb +6 -0
  121. data/spec/models/hpke_test_request_spec.rb +48 -0
  122. data/spec/models/hpke_test_vp_request_spec.rb +42 -0
  123. data/spec/models/idemia_mobile_id_provider_output_spec.rb +0 -12
  124. data/spec/models/japan_my_number_provider_output_spec.rb +54 -0
  125. data/spec/models/jordan_sanad_input_spec.rb +36 -0
  126. data/spec/models/mit_id_address_output_spec.rb +66 -0
  127. data/spec/models/mit_id_provider_output_spec.rb +6 -0
  128. data/spec/models/provider_input_spec.rb +30 -0
  129. data/spec/models/provider_output_spec.rb +24 -0
  130. data/spec/models/provider_spec.rb +6 -0
  131. data/spec/models/recommend_provider_information_spec.rb +6 -0
  132. data/spec/models/revolut_provider_output_spec.rb +66 -0
  133. data/spec/models/sanad_provider_output_spec.rb +66 -0
  134. data/spec/models/saudi_arabia_nafath_address_spec.rb +132 -0
  135. data/spec/models/saudi_arabia_nafath_citizen_attributes_spec.rb +186 -0
  136. data/spec/models/saudi_arabia_nafath_head_of_household_spec.rb +60 -0
  137. data/spec/models/saudi_arabia_nafath_provider_output_spec.rb +96 -0
  138. data/spec/models/saudi_arabia_nafath_resident_attributes_spec.rb +186 -0
  139. data/spec/models/saudi_arabia_nafath_visitor_attributes_spec.rb +198 -0
  140. data/spec/models/singpass_personal_catalog_spec.rb +1 -1
  141. data/spec/models/sweden_bank_id_provider_output_spec.rb +12 -0
  142. data/spec/models/trinsic_hpke_bundle_spec.rb +54 -0
  143. data/spec/models/trinsic_hpke_metadata_spec.rb +72 -0
  144. data/spec/models/usa_arizona_wallet_input_spec.rb +36 -0
  145. data/spec/models/verification_profile_response_spec.rb +6 -0
  146. metadata +375 -291
@@ -0,0 +1,192 @@
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
+ class HPKETestVPRequest < ApiModelBase
18
+ # The data to encrypt. Must be between 0 and 1024 bytes.
19
+ attr_accessor :data
20
+
21
+ # A 32-byte suffix appended to the fixed info prefix to form the HPKE info parameter.
22
+ attr_accessor :info_suffix
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'data' => :'data',
28
+ :'info_suffix' => :'infoSuffix'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'data' => :'String',
46
+ :'info_suffix' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::HPKETestVPRequest` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::HPKETestVPRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'data')
73
+ self.data = attributes[:'data']
74
+ else
75
+ self.data = nil
76
+ end
77
+
78
+ if attributes.key?(:'info_suffix')
79
+ self.info_suffix = attributes[:'info_suffix']
80
+ else
81
+ self.info_suffix = nil
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
+ invalid_properties = Array.new
90
+ if @data.nil?
91
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
92
+ end
93
+
94
+ if @info_suffix.nil?
95
+ invalid_properties.push('invalid value for "info_suffix", info_suffix cannot be nil.')
96
+ end
97
+
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ return false if @data.nil?
106
+ return false if @info_suffix.nil?
107
+ true
108
+ end
109
+
110
+ # Custom attribute writer method with validation
111
+ # @param [Object] data Value to be assigned
112
+ def data=(data)
113
+ if data.nil?
114
+ fail ArgumentError, 'data cannot be nil'
115
+ end
116
+
117
+ @data = data
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param [Object] info_suffix Value to be assigned
122
+ def info_suffix=(info_suffix)
123
+ if info_suffix.nil?
124
+ fail ArgumentError, 'info_suffix cannot be nil'
125
+ end
126
+
127
+ @info_suffix = info_suffix
128
+ end
129
+
130
+ # Checks equality by comparing each attribute.
131
+ # @param [Object] Object to be compared
132
+ def ==(o)
133
+ return true if self.equal?(o)
134
+ self.class == o.class &&
135
+ data == o.data &&
136
+ info_suffix == o.info_suffix
137
+ end
138
+
139
+ # @see the `==` method
140
+ # @param [Object] Object to be compared
141
+ def eql?(o)
142
+ self == o
143
+ end
144
+
145
+ # Calculates hash code according to all attributes.
146
+ # @return [Integer] Hash code
147
+ def hash
148
+ [data, info_suffix].hash
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def self.build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ attributes = attributes.transform_keys(&:to_sym)
157
+ transformed_hash = {}
158
+ openapi_types.each_pair do |key, type|
159
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
161
+ elsif type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[attribute_map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
166
+ end
167
+ elsif !attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
169
+ end
170
+ end
171
+ new(transformed_hash)
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ if value.nil?
181
+ is_nullable = self.class.openapi_nullable.include?(attr)
182
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
+ end
184
+
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
189
+
190
+ end
191
+
192
+ end
@@ -58,12 +58,6 @@ module TrinsicApi
58
58
  # The individual's resident city.
59
59
  attr_accessor :resident_city
60
60
 
61
- # The individual's email address.
62
- attr_accessor :email
63
-
64
- # Whether the individual's email address has been verified.
65
- attr_accessor :email_verified
66
-
67
61
  # The individual's document number.
68
62
  attr_accessor :document_number
69
63
 
@@ -105,8 +99,6 @@ module TrinsicApi
105
99
  :'resident_country' => :'residentCountry',
106
100
  :'resident_postal_code' => :'residentPostalCode',
107
101
  :'resident_city' => :'residentCity',
108
- :'email' => :'email',
109
- :'email_verified' => :'emailVerified',
110
102
  :'document_number' => :'documentNumber',
111
103
  :'issue_date' => :'issueDate',
112
104
  :'issuing_country' => :'issuingCountry',
@@ -145,8 +137,6 @@ module TrinsicApi
145
137
  :'resident_country' => :'String',
146
138
  :'resident_postal_code' => :'String',
147
139
  :'resident_city' => :'String',
148
- :'email' => :'String',
149
- :'email_verified' => :'Boolean',
150
140
  :'document_number' => :'String',
151
141
  :'issue_date' => :'String',
152
142
  :'issuing_country' => :'String',
@@ -175,8 +165,6 @@ module TrinsicApi
175
165
  :'resident_country',
176
166
  :'resident_postal_code',
177
167
  :'resident_city',
178
- :'email',
179
- :'email_verified',
180
168
  :'document_number',
181
169
  :'issue_date',
182
170
  :'issuing_country',
@@ -260,14 +248,6 @@ module TrinsicApi
260
248
  self.resident_city = attributes[:'resident_city']
261
249
  end
262
250
 
263
- if attributes.key?(:'email')
264
- self.email = attributes[:'email']
265
- end
266
-
267
- if attributes.key?(:'email_verified')
268
- self.email_verified = attributes[:'email_verified']
269
- end
270
-
271
251
  if attributes.key?(:'document_number')
272
252
  self.document_number = attributes[:'document_number']
273
253
  end
@@ -335,8 +315,6 @@ module TrinsicApi
335
315
  resident_country == o.resident_country &&
336
316
  resident_postal_code == o.resident_postal_code &&
337
317
  resident_city == o.resident_city &&
338
- email == o.email &&
339
- email_verified == o.email_verified &&
340
318
  document_number == o.document_number &&
341
319
  issue_date == o.issue_date &&
342
320
  issuing_country == o.issuing_country &&
@@ -356,7 +334,7 @@ module TrinsicApi
356
334
  # Calculates hash code according to all attributes.
357
335
  # @return [Integer] Hash code
358
336
  def hash
359
- [sub, name_suffix, full_name, given_name, family_name, birth_date, age_over18, age_over21, age_over25, resident_address, resident_state, resident_country, resident_postal_code, resident_city, email, email_verified, document_number, issue_date, issuing_country, issuing_authority, expiry_date, issuing_jurisdiction, document_type, sex].hash
337
+ [sub, name_suffix, full_name, given_name, family_name, birth_date, age_over18, age_over21, age_over25, resident_address, resident_state, resident_country, resident_postal_code, resident_city, document_number, issue_date, issuing_country, issuing_authority, expiry_date, issuing_jurisdiction, document_type, sex].hash
360
338
  end
361
339
 
362
340
  # Builds the object from hash
@@ -37,7 +37,7 @@ module TrinsicApi
37
37
  # Date of birth of the individual. NOTE: Only available when PAN status is VALID and the verification is for an individual person.
38
38
  attr_accessor :date_of_birth
39
39
 
40
- # PAN card status from Signzy for the lookup. Possible values: - VALID - FAKE - DEACTIVATED - DELETED - INVALID - AMALGAMATION - ACQUISITION - DEATH - DISSOLUTION - LIQUIDATED - MERGER - PARTITION - SPLIT - UNDER LIQUIDATION - INOPERATIVE
40
+ # PAN card status returned by the lookup provider. Possible values: - VALID - FAKE - DEACTIVATED - DELETED - INVALID - AMALGAMATION - ACQUISITION - DEATH - DISSOLUTION - LIQUIDATED - MERGER - PARTITION - SPLIT - UNDER LIQUIDATION - INOPERATIVE
41
41
  attr_accessor :pan_status
42
42
 
43
43
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -30,7 +30,7 @@ module TrinsicApi
30
30
  # The phone number of the individual. Either email or phone number must be provided.
31
31
  attr_accessor :phone_number
32
32
 
33
- # The raw bytes of the selfie image of the individual. Must be JPEG or PNG format; 10MB maximum.
33
+ # The raw bytes of the selfie image of the individual. Must be JPEG or PNG format; 10MB maximum. When using an SDK, this can be a raw byte array. In raw JSON form this is Base64.
34
34
  attr_accessor :selfie_image
35
35
 
36
36
  # The raw bytes of the image of the individual's KTP government ID. Must be JPEG format; 1MB maximum. Optional.
@@ -0,0 +1,183 @@
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
+ # Verified attributes for the `japan-mynumber` provider, including the original sex code.
18
+ class JapanMyNumberProviderOutput < ApiModelBase
19
+ # The individual's full name as recorded on the card, preserving its original script and spacing.
20
+ attr_accessor :name
21
+
22
+ # The individual's full address as recorded on the card, preserving its original script and spacing.
23
+ attr_accessor :address
24
+
25
+ # The individual's Gregorian date of birth in YYYY-MM-DD format.
26
+ attr_accessor :date_of_birth
27
+
28
+ # The original sex code returned for the verified individual. Known values: - 1: Male. - 2: Female. - 9: Other; omitted from normalized sex because it has no equivalent value. An absent code means it was not supplied.
29
+ attr_accessor :sex
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'name' => :'name',
35
+ :'address' => :'address',
36
+ :'date_of_birth' => :'dateOfBirth',
37
+ :'sex' => :'sex'
38
+ }
39
+ end
40
+
41
+ # Returns attribute mapping this model knows about
42
+ def self.acceptable_attribute_map
43
+ attribute_map
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ acceptable_attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'name' => :'String',
55
+ :'address' => :'String',
56
+ :'date_of_birth' => :'Date',
57
+ :'sex' => :'String'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ :'name',
65
+ :'address',
66
+ :'date_of_birth',
67
+ :'sex'
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::JapanMyNumberProviderOutput` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ acceptable_attribute_map = self.class.acceptable_attribute_map
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!acceptable_attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::JapanMyNumberProviderOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'name')
88
+ self.name = attributes[:'name']
89
+ end
90
+
91
+ if attributes.key?(:'address')
92
+ self.address = attributes[:'address']
93
+ end
94
+
95
+ if attributes.key?(:'date_of_birth')
96
+ self.date_of_birth = attributes[:'date_of_birth']
97
+ end
98
+
99
+ if attributes.key?(:'sex')
100
+ self.sex = attributes[:'sex']
101
+ end
102
+ end
103
+
104
+ # Show invalid properties with the reasons. Usually used together with valid?
105
+ # @return Array for valid properties with the reasons
106
+ def list_invalid_properties
107
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
108
+ invalid_properties = Array.new
109
+ invalid_properties
110
+ end
111
+
112
+ # Check to see if the all the properties in the model are valid
113
+ # @return true if the model is valid
114
+ def valid?
115
+ warn '[DEPRECATED] the `valid?` method is obsolete'
116
+ true
117
+ end
118
+
119
+ # Checks equality by comparing each attribute.
120
+ # @param [Object] Object to be compared
121
+ def ==(o)
122
+ return true if self.equal?(o)
123
+ self.class == o.class &&
124
+ name == o.name &&
125
+ address == o.address &&
126
+ date_of_birth == o.date_of_birth &&
127
+ sex == o.sex
128
+ end
129
+
130
+ # @see the `==` method
131
+ # @param [Object] Object to be compared
132
+ def eql?(o)
133
+ self == o
134
+ end
135
+
136
+ # Calculates hash code according to all attributes.
137
+ # @return [Integer] Hash code
138
+ def hash
139
+ [name, address, date_of_birth, sex].hash
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def self.build_from_hash(attributes)
146
+ return nil unless attributes.is_a?(Hash)
147
+ attributes = attributes.transform_keys(&:to_sym)
148
+ transformed_hash = {}
149
+ openapi_types.each_pair do |key, type|
150
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = nil
152
+ elsif type =~ /\AArray<(.*)>/i
153
+ # check to ensure the input is an array given that the attribute
154
+ # is documented as an array but the input is not
155
+ if attributes[attribute_map[key]].is_a?(Array)
156
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
157
+ end
158
+ elsif !attributes[attribute_map[key]].nil?
159
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
160
+ end
161
+ end
162
+ new(transformed_hash)
163
+ end
164
+
165
+ # Returns the object in the form of hash
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_hash
168
+ hash = {}
169
+ self.class.attribute_map.each_pair do |attr, param|
170
+ value = self.send(attr)
171
+ if value.nil?
172
+ is_nullable = self.class.openapi_nullable.include?(attr)
173
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
174
+ end
175
+
176
+ hash[param] = _to_hash(value)
177
+ end
178
+ hash
179
+ end
180
+
181
+ end
182
+
183
+ end
@@ -0,0 +1,164 @@
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
+ class JordanSanadInput < ApiModelBase
18
+ # The decoded contents of the user's SANAD QR code.
19
+ attr_accessor :qr_code_text
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'qr_code_text' => :'qrCodeText'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'qr_code_text' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ :'qr_code_text'
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::JordanSanadInput` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ acceptable_attribute_map = self.class.acceptable_attribute_map
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!acceptable_attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::JordanSanadInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'qr_code_text')
69
+ self.qr_code_text = attributes[:'qr_code_text']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if !@qr_code_text.nil? && @qr_code_text.to_s.length > 16384
79
+ invalid_properties.push('invalid value for "qr_code_text", the character length must be smaller than or equal to 16384.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if !@qr_code_text.nil? && @qr_code_text.to_s.length > 16384
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] qr_code_text Value to be assigned
95
+ def qr_code_text=(qr_code_text)
96
+ if !qr_code_text.nil? && qr_code_text.to_s.length > 16384
97
+ fail ArgumentError, 'invalid value for "qr_code_text", the character length must be smaller than or equal to 16384.'
98
+ end
99
+
100
+ @qr_code_text = qr_code_text
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ qr_code_text == o.qr_code_text
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [qr_code_text].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end