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.
- checksums.yaml +4 -4
- data/docs/BrazilCnhProviderOutput.md +2 -0
- data/docs/BrazilCpfCheckInput.md +3 -3
- data/docs/BrazilCpfProviderOutput.md +1 -1
- data/docs/BrazilDigitalCnhInput.md +1 -1
- data/docs/ConnectIdAgeVerification.md +9 -1
- data/docs/ConnectIdInput.md +18 -0
- data/docs/CreateDirectProviderSessionRequest.md +2 -0
- data/docs/CreateHostedProviderSessionRequest.md +2 -0
- data/docs/CzechBankIdInput.md +18 -0
- data/docs/DeveloperApi.md +153 -0
- data/docs/DigilockerAadhaarProviderOutput.md +1 -1
- data/docs/FinnishTrustNetworkAddressOutput.md +22 -0
- data/docs/FinnishTrustNetworkInput.md +18 -0
- data/docs/FinnishTrustNetworkProviderOutput.md +2 -0
- data/docs/GetAttachmentResponse.md +2 -0
- data/docs/GetSessionResultRequest.md +3 -1
- data/docs/GetSessionResultResponse.md +3 -1
- data/docs/HPKETestRequest.md +22 -0
- data/docs/HPKETestVPRequest.md +20 -0
- data/docs/IdemiaMobileIdProviderOutput.md +1 -5
- data/docs/IndiaPanLookupProviderOutput.md +1 -1
- data/docs/IndonesiaDukcapilMatchInput.md +1 -1
- data/docs/JapanMyNumberProviderOutput.md +24 -0
- data/docs/JordanSanadInput.md +18 -0
- data/docs/MitIdAddressOutput.md +28 -0
- data/docs/MitIdProviderOutput.md +3 -1
- data/docs/PolandMobywatelMatchInput.md +1 -1
- data/docs/Provider.md +2 -0
- data/docs/ProviderInput.md +10 -0
- data/docs/ProviderOutput.md +8 -0
- data/docs/RecommendProviderInformation.md +2 -0
- data/docs/RecommendProvidersRequest.md +1 -1
- data/docs/RevolutProviderOutput.md +28 -0
- data/docs/SanadProviderOutput.md +28 -0
- data/docs/SaudiArabiaNafathAddress.md +50 -0
- data/docs/SaudiArabiaNafathCitizenAttributes.md +68 -0
- data/docs/SaudiArabiaNafathHeadOfHousehold.md +26 -0
- data/docs/SaudiArabiaNafathProviderOutput.md +38 -0
- data/docs/SaudiArabiaNafathResidentAttributes.md +68 -0
- data/docs/SaudiArabiaNafathVisitorAttributes.md +72 -0
- data/docs/SessionsApi.md +2 -2
- data/docs/SignzyIndiaAadhaarFetchProviderOutput.md +1 -1
- data/docs/SingpassPersonalCatalog.md +2 -2
- data/docs/SwedenBankIdProviderOutput.md +7 -3
- data/docs/TrinsicHPKEBundle.md +24 -0
- data/docs/TrinsicHPKEMetadata.md +30 -0
- data/docs/TrinsicTestDatabaseLookupInput.md +1 -1
- data/docs/UkEvisaLookupInput.md +1 -1
- data/docs/UsaArizonaWalletInput.md +18 -0
- data/docs/VerificationProfileResponse.md +2 -0
- data/docs/VerificationProfilesApi.md +3 -1
- data/docs/YotiStructuredPostalAddress.md +1 -1
- data/lib/trinsic_api/api/developer_api.rb +156 -0
- data/lib/trinsic_api/api/verification_profiles_api.rb +3 -0
- data/lib/trinsic_api/api_client.rb +1 -0
- data/lib/trinsic_api/models/brazil_cnh_provider_output.rb +12 -1
- data/lib/trinsic_api/models/brazil_cpf_check_input.rb +12 -22
- data/lib/trinsic_api/models/brazil_cpf_provider_output.rb +1 -1
- data/lib/trinsic_api/models/brazil_digital_cnh_input.rb +1 -1
- data/lib/trinsic_api/models/connect_id_age_verification.rb +46 -2
- data/lib/trinsic_api/models/connect_id_input.rb +149 -0
- data/lib/trinsic_api/models/create_direct_provider_session_request.rb +28 -1
- data/lib/trinsic_api/models/create_hosted_provider_session_request.rb +28 -1
- data/lib/trinsic_api/models/czech_bank_id_input.rb +149 -0
- data/lib/trinsic_api/models/digilocker_aadhaar_provider_output.rb +1 -1
- data/lib/trinsic_api/models/finnish_trust_network_address_output.rb +171 -0
- data/lib/trinsic_api/models/finnish_trust_network_input.rb +149 -0
- data/lib/trinsic_api/models/finnish_trust_network_provider_output.rb +12 -1
- data/lib/trinsic_api/models/get_attachment_response.rb +12 -1
- data/lib/trinsic_api/models/get_session_result_request.rb +15 -4
- data/lib/trinsic_api/models/get_session_result_response.rb +16 -5
- data/lib/trinsic_api/models/hpke_test_request.rb +219 -0
- data/lib/trinsic_api/models/hpke_test_vp_request.rb +192 -0
- data/lib/trinsic_api/models/idemia_mobile_id_provider_output.rb +1 -23
- data/lib/trinsic_api/models/india_pan_lookup_provider_output.rb +1 -1
- data/lib/trinsic_api/models/indonesia_dukcapil_match_input.rb +1 -1
- data/lib/trinsic_api/models/japan_my_number_provider_output.rb +183 -0
- data/lib/trinsic_api/models/jordan_sanad_input.rb +164 -0
- data/lib/trinsic_api/models/mit_id_address_output.rb +204 -0
- data/lib/trinsic_api/models/mit_id_provider_output.rb +16 -5
- data/lib/trinsic_api/models/poland_mobywatel_match_input.rb +1 -1
- data/lib/trinsic_api/models/provider.rb +14 -1
- data/lib/trinsic_api/models/provider_input.rb +56 -1
- data/lib/trinsic_api/models/provider_output.rb +45 -1
- data/lib/trinsic_api/models/recommend_provider_information.rb +14 -1
- data/lib/trinsic_api/models/recommend_providers_request.rb +1 -1
- data/lib/trinsic_api/models/revolut_provider_output.rb +204 -0
- data/lib/trinsic_api/models/sanad_provider_output.rb +205 -0
- data/lib/trinsic_api/models/saudi_arabia_nafath_address.rb +325 -0
- data/lib/trinsic_api/models/saudi_arabia_nafath_citizen_attributes.rb +426 -0
- data/lib/trinsic_api/models/saudi_arabia_nafath_head_of_household.rb +193 -0
- data/lib/trinsic_api/models/saudi_arabia_nafath_provider_output.rb +260 -0
- data/lib/trinsic_api/models/saudi_arabia_nafath_resident_attributes.rb +426 -0
- data/lib/trinsic_api/models/saudi_arabia_nafath_visitor_attributes.rb +446 -0
- data/lib/trinsic_api/models/signzy_india_aadhaar_fetch_provider_output.rb +1 -1
- data/lib/trinsic_api/models/singpass_personal_catalog.rb +9 -9
- data/lib/trinsic_api/models/sweden_bank_id_provider_output.rb +24 -2
- data/lib/trinsic_api/models/trinsic_hpke_bundle.rb +246 -0
- data/lib/trinsic_api/models/trinsic_hpke_metadata.rb +327 -0
- data/lib/trinsic_api/models/trinsic_test_database_lookup_input.rb +1 -1
- data/lib/trinsic_api/models/uk_evisa_lookup_input.rb +1 -1
- data/lib/trinsic_api/models/usa_arizona_wallet_input.rb +149 -0
- data/lib/trinsic_api/models/verification_profile_response.rb +28 -1
- data/lib/trinsic_api/version.rb +1 -1
- data/lib/trinsic_api.rb +21 -0
- data/spec/api/developer_api_spec.rb +60 -0
- data/spec/api/verification_profiles_api_spec.rb +1 -0
- data/spec/models/brazil_cnh_provider_output_spec.rb +6 -0
- data/spec/models/connect_id_age_verification_spec.rb +24 -0
- data/spec/models/connect_id_input_spec.rb +36 -0
- data/spec/models/create_direct_provider_session_request_spec.rb +6 -0
- data/spec/models/create_hosted_provider_session_request_spec.rb +6 -0
- data/spec/models/czech_bank_id_input_spec.rb +36 -0
- data/spec/models/finnish_trust_network_address_output_spec.rb +48 -0
- data/spec/models/finnish_trust_network_input_spec.rb +36 -0
- data/spec/models/finnish_trust_network_provider_output_spec.rb +6 -0
- data/spec/models/get_attachment_response_spec.rb +6 -0
- data/spec/models/get_session_result_request_spec.rb +6 -0
- data/spec/models/get_session_result_response_spec.rb +6 -0
- data/spec/models/hpke_test_request_spec.rb +48 -0
- data/spec/models/hpke_test_vp_request_spec.rb +42 -0
- data/spec/models/idemia_mobile_id_provider_output_spec.rb +0 -12
- data/spec/models/japan_my_number_provider_output_spec.rb +54 -0
- data/spec/models/jordan_sanad_input_spec.rb +36 -0
- data/spec/models/mit_id_address_output_spec.rb +66 -0
- data/spec/models/mit_id_provider_output_spec.rb +6 -0
- data/spec/models/provider_input_spec.rb +30 -0
- data/spec/models/provider_output_spec.rb +24 -0
- data/spec/models/provider_spec.rb +6 -0
- data/spec/models/recommend_provider_information_spec.rb +6 -0
- data/spec/models/revolut_provider_output_spec.rb +66 -0
- data/spec/models/sanad_provider_output_spec.rb +66 -0
- data/spec/models/saudi_arabia_nafath_address_spec.rb +132 -0
- data/spec/models/saudi_arabia_nafath_citizen_attributes_spec.rb +186 -0
- data/spec/models/saudi_arabia_nafath_head_of_household_spec.rb +60 -0
- data/spec/models/saudi_arabia_nafath_provider_output_spec.rb +96 -0
- data/spec/models/saudi_arabia_nafath_resident_attributes_spec.rb +186 -0
- data/spec/models/saudi_arabia_nafath_visitor_attributes_spec.rb +198 -0
- data/spec/models/singpass_personal_catalog_spec.rb +1 -1
- data/spec/models/sweden_bank_id_provider_output_spec.rb +12 -0
- data/spec/models/trinsic_hpke_bundle_spec.rb +54 -0
- data/spec/models/trinsic_hpke_metadata_spec.rb +72 -0
- data/spec/models/usa_arizona_wallet_input_spec.rb +36 -0
- data/spec/models/verification_profile_response_spec.rb +6 -0
- metadata +375 -291
|
@@ -0,0 +1,149 @@
|
|
|
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 FinnishTrustNetworkInput < ApiModelBase
|
|
18
|
+
# The ID of the FTN bank or mobile ID to invoke. If omitted, the user selects a sub-provider.
|
|
19
|
+
attr_accessor :sub_provider_id
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'sub_provider_id' => :'subProviderId'
|
|
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
|
+
:'sub_provider_id' => :'String'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
:'sub_provider_id'
|
|
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::FinnishTrustNetworkInput` 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::FinnishTrustNetworkInput`. 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?(:'sub_provider_id')
|
|
69
|
+
self.sub_provider_id = attributes[:'sub_provider_id']
|
|
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
|
+
invalid_properties
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Check to see if the all the properties in the model are valid
|
|
82
|
+
# @return true if the model is valid
|
|
83
|
+
def valid?
|
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
85
|
+
true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def ==(o)
|
|
91
|
+
return true if self.equal?(o)
|
|
92
|
+
self.class == o.class &&
|
|
93
|
+
sub_provider_id == o.sub_provider_id
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# @see the `==` method
|
|
97
|
+
# @param [Object] Object to be compared
|
|
98
|
+
def eql?(o)
|
|
99
|
+
self == o
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Calculates hash code according to all attributes.
|
|
103
|
+
# @return [Integer] Hash code
|
|
104
|
+
def hash
|
|
105
|
+
[sub_provider_id].hash
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Builds the object from hash
|
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
110
|
+
# @return [Object] Returns the model itself
|
|
111
|
+
def self.build_from_hash(attributes)
|
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
|
113
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
114
|
+
transformed_hash = {}
|
|
115
|
+
openapi_types.each_pair do |key, type|
|
|
116
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
117
|
+
transformed_hash["#{key}"] = nil
|
|
118
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
119
|
+
# check to ensure the input is an array given that the attribute
|
|
120
|
+
# is documented as an array but the input is not
|
|
121
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
122
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
123
|
+
end
|
|
124
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
125
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
new(transformed_hash)
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Returns the object in the form of hash
|
|
132
|
+
# @return [Hash] Returns the object in the form of hash
|
|
133
|
+
def to_hash
|
|
134
|
+
hash = {}
|
|
135
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
136
|
+
value = self.send(attr)
|
|
137
|
+
if value.nil?
|
|
138
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
139
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
hash[param] = _to_hash(value)
|
|
143
|
+
end
|
|
144
|
+
hash
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
end
|
|
@@ -43,6 +43,9 @@ module TrinsicApi
|
|
|
43
43
|
# The phone number of the verified individual. This is only returned if the individual authenticated with MobileID (Mobiilivarmenne).
|
|
44
44
|
attr_accessor :phone_number
|
|
45
45
|
|
|
46
|
+
# The address of the individual.
|
|
47
|
+
attr_accessor :address
|
|
48
|
+
|
|
46
49
|
# The organization name that the individual is associated with. This is returned for requests that contain the organization scope.
|
|
47
50
|
attr_accessor :organization_name
|
|
48
51
|
|
|
@@ -61,6 +64,7 @@ module TrinsicApi
|
|
|
61
64
|
:'level_of_assurance' => :'levelOfAssurance',
|
|
62
65
|
:'bank' => :'bank',
|
|
63
66
|
:'phone_number' => :'phoneNumber',
|
|
67
|
+
:'address' => :'address',
|
|
64
68
|
:'organization_name' => :'organizationName',
|
|
65
69
|
:'vat_number' => :'vatNumber'
|
|
66
70
|
}
|
|
@@ -88,6 +92,7 @@ module TrinsicApi
|
|
|
88
92
|
:'level_of_assurance' => :'String',
|
|
89
93
|
:'bank' => :'String',
|
|
90
94
|
:'phone_number' => :'String',
|
|
95
|
+
:'address' => :'FinnishTrustNetworkAddressOutput',
|
|
91
96
|
:'organization_name' => :'String',
|
|
92
97
|
:'vat_number' => :'String'
|
|
93
98
|
}
|
|
@@ -105,6 +110,7 @@ module TrinsicApi
|
|
|
105
110
|
:'level_of_assurance',
|
|
106
111
|
:'bank',
|
|
107
112
|
:'phone_number',
|
|
113
|
+
:'address',
|
|
108
114
|
:'organization_name',
|
|
109
115
|
:'vat_number'
|
|
110
116
|
])
|
|
@@ -162,6 +168,10 @@ module TrinsicApi
|
|
|
162
168
|
self.phone_number = attributes[:'phone_number']
|
|
163
169
|
end
|
|
164
170
|
|
|
171
|
+
if attributes.key?(:'address')
|
|
172
|
+
self.address = attributes[:'address']
|
|
173
|
+
end
|
|
174
|
+
|
|
165
175
|
if attributes.key?(:'organization_name')
|
|
166
176
|
self.organization_name = attributes[:'organization_name']
|
|
167
177
|
end
|
|
@@ -200,6 +210,7 @@ module TrinsicApi
|
|
|
200
210
|
level_of_assurance == o.level_of_assurance &&
|
|
201
211
|
bank == o.bank &&
|
|
202
212
|
phone_number == o.phone_number &&
|
|
213
|
+
address == o.address &&
|
|
203
214
|
organization_name == o.organization_name &&
|
|
204
215
|
vat_number == o.vat_number
|
|
205
216
|
end
|
|
@@ -213,7 +224,7 @@ module TrinsicApi
|
|
|
213
224
|
# Calculates hash code according to all attributes.
|
|
214
225
|
# @return [Integer] Hash code
|
|
215
226
|
def hash
|
|
216
|
-
[full_name, date_of_birth, personal_identification_code, unique_identification_number, given_name, family_name, level_of_assurance, bank, phone_number, organization_name, vat_number].hash
|
|
227
|
+
[full_name, date_of_birth, personal_identification_code, unique_identification_number, given_name, family_name, level_of_assurance, bank, phone_number, address, organization_name, vat_number].hash
|
|
217
228
|
end
|
|
218
229
|
|
|
219
230
|
# Builds the object from hash
|
|
@@ -18,6 +18,9 @@ module TrinsicApi
|
|
|
18
18
|
# The file contents of the Attachment. When using an SDK, this can be a raw byte array. In raw JSON form this is Base64. Combine this with the Content type to reconstruct the file. This is empty when `encryptedContent` is present.
|
|
19
19
|
attr_accessor :content
|
|
20
20
|
|
|
21
|
+
# The HPKE Bundle containing the encrypted contents of the Attachment, if secured via HPKE. Decrypt it using the HPKE info string `trinsic-hpke:1:attachment-contents:{sessionId}:{attachmentId}`.
|
|
22
|
+
attr_accessor :encrypted_content
|
|
23
|
+
|
|
21
24
|
# The MIME type of the Attachment data
|
|
22
25
|
attr_accessor :content_type
|
|
23
26
|
|
|
@@ -25,6 +28,7 @@ module TrinsicApi
|
|
|
25
28
|
def self.attribute_map
|
|
26
29
|
{
|
|
27
30
|
:'content' => :'content',
|
|
31
|
+
:'encrypted_content' => :'encryptedContent',
|
|
28
32
|
:'content_type' => :'contentType'
|
|
29
33
|
}
|
|
30
34
|
end
|
|
@@ -43,6 +47,7 @@ module TrinsicApi
|
|
|
43
47
|
def self.openapi_types
|
|
44
48
|
{
|
|
45
49
|
:'content' => :'String',
|
|
50
|
+
:'encrypted_content' => :'TrinsicHPKEBundle',
|
|
46
51
|
:'content_type' => :'String'
|
|
47
52
|
}
|
|
48
53
|
end
|
|
@@ -50,6 +55,7 @@ module TrinsicApi
|
|
|
50
55
|
# List of attributes with nullable: true
|
|
51
56
|
def self.openapi_nullable
|
|
52
57
|
Set.new([
|
|
58
|
+
:'encrypted_content',
|
|
53
59
|
])
|
|
54
60
|
end
|
|
55
61
|
|
|
@@ -75,6 +81,10 @@ module TrinsicApi
|
|
|
75
81
|
self.content = nil
|
|
76
82
|
end
|
|
77
83
|
|
|
84
|
+
if attributes.key?(:'encrypted_content')
|
|
85
|
+
self.encrypted_content = attributes[:'encrypted_content']
|
|
86
|
+
end
|
|
87
|
+
|
|
78
88
|
if attributes.key?(:'content_type')
|
|
79
89
|
self.content_type = attributes[:'content_type']
|
|
80
90
|
else
|
|
@@ -133,6 +143,7 @@ module TrinsicApi
|
|
|
133
143
|
return true if self.equal?(o)
|
|
134
144
|
self.class == o.class &&
|
|
135
145
|
content == o.content &&
|
|
146
|
+
encrypted_content == o.encrypted_content &&
|
|
136
147
|
content_type == o.content_type
|
|
137
148
|
end
|
|
138
149
|
|
|
@@ -145,7 +156,7 @@ module TrinsicApi
|
|
|
145
156
|
# Calculates hash code according to all attributes.
|
|
146
157
|
# @return [Integer] Hash code
|
|
147
158
|
def hash
|
|
148
|
-
[content, content_type].hash
|
|
159
|
+
[content, encrypted_content, content_type].hash
|
|
149
160
|
end
|
|
150
161
|
|
|
151
162
|
# Builds the object from hash
|
|
@@ -18,10 +18,14 @@ module TrinsicApi
|
|
|
18
18
|
# The Results Access Key to exchange
|
|
19
19
|
attr_accessor :results_access_key
|
|
20
20
|
|
|
21
|
+
# The `redirectToken` which Trinsic appended to your Redirect URL before sending the user back to your application. This is only relevant for Sessions which involve a redirect flow. If a `redirectToken` is required for a Session, it is only required for the first call to `GetSessionResult`. Future calls do not require a `redirectToken`.
|
|
22
|
+
attr_accessor :redirect_token
|
|
23
|
+
|
|
21
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
25
|
def self.attribute_map
|
|
23
26
|
{
|
|
24
|
-
:'results_access_key' => :'resultsAccessKey'
|
|
27
|
+
:'results_access_key' => :'resultsAccessKey',
|
|
28
|
+
:'redirect_token' => :'redirectToken'
|
|
25
29
|
}
|
|
26
30
|
end
|
|
27
31
|
|
|
@@ -38,13 +42,15 @@ module TrinsicApi
|
|
|
38
42
|
# Attribute type mapping.
|
|
39
43
|
def self.openapi_types
|
|
40
44
|
{
|
|
41
|
-
:'results_access_key' => :'String'
|
|
45
|
+
:'results_access_key' => :'String',
|
|
46
|
+
:'redirect_token' => :'String'
|
|
42
47
|
}
|
|
43
48
|
end
|
|
44
49
|
|
|
45
50
|
# List of attributes with nullable: true
|
|
46
51
|
def self.openapi_nullable
|
|
47
52
|
Set.new([
|
|
53
|
+
:'redirect_token'
|
|
48
54
|
])
|
|
49
55
|
end
|
|
50
56
|
|
|
@@ -69,6 +75,10 @@ module TrinsicApi
|
|
|
69
75
|
else
|
|
70
76
|
self.results_access_key = nil
|
|
71
77
|
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'redirect_token')
|
|
80
|
+
self.redirect_token = attributes[:'redirect_token']
|
|
81
|
+
end
|
|
72
82
|
end
|
|
73
83
|
|
|
74
84
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -106,7 +116,8 @@ module TrinsicApi
|
|
|
106
116
|
def ==(o)
|
|
107
117
|
return true if self.equal?(o)
|
|
108
118
|
self.class == o.class &&
|
|
109
|
-
results_access_key == o.results_access_key
|
|
119
|
+
results_access_key == o.results_access_key &&
|
|
120
|
+
redirect_token == o.redirect_token
|
|
110
121
|
end
|
|
111
122
|
|
|
112
123
|
# @see the `==` method
|
|
@@ -118,7 +129,7 @@ module TrinsicApi
|
|
|
118
129
|
# Calculates hash code according to all attributes.
|
|
119
130
|
# @return [Integer] Hash code
|
|
120
131
|
def hash
|
|
121
|
-
[results_access_key].hash
|
|
132
|
+
[results_access_key, redirect_token].hash
|
|
122
133
|
end
|
|
123
134
|
|
|
124
135
|
# Builds the object from hash
|
|
@@ -21,11 +21,15 @@ module TrinsicApi
|
|
|
21
21
|
# The IdentityData which resulted from the Session, if not HPKE-encrypted.
|
|
22
22
|
attr_accessor :identity_data
|
|
23
23
|
|
|
24
|
+
# The HPKE-encrypted IdentityData which resulted from the Session, if HPKE-encrypted.
|
|
25
|
+
attr_accessor :encrypted_identity_data
|
|
26
|
+
|
|
24
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
28
|
def self.attribute_map
|
|
26
29
|
{
|
|
27
30
|
:'session' => :'session',
|
|
28
|
-
:'identity_data' => :'identityData'
|
|
31
|
+
:'identity_data' => :'identityData',
|
|
32
|
+
:'encrypted_identity_data' => :'encryptedIdentityData'
|
|
29
33
|
}
|
|
30
34
|
end
|
|
31
35
|
|
|
@@ -43,14 +47,16 @@ module TrinsicApi
|
|
|
43
47
|
def self.openapi_types
|
|
44
48
|
{
|
|
45
49
|
:'session' => :'Session',
|
|
46
|
-
:'identity_data' => :'IdentityData'
|
|
50
|
+
:'identity_data' => :'IdentityData',
|
|
51
|
+
:'encrypted_identity_data' => :'TrinsicHPKEBundle'
|
|
47
52
|
}
|
|
48
53
|
end
|
|
49
54
|
|
|
50
55
|
# List of attributes with nullable: true
|
|
51
56
|
def self.openapi_nullable
|
|
52
57
|
Set.new([
|
|
53
|
-
:'identity_data'
|
|
58
|
+
:'identity_data',
|
|
59
|
+
:'encrypted_identity_data'
|
|
54
60
|
])
|
|
55
61
|
end
|
|
56
62
|
|
|
@@ -79,6 +85,10 @@ module TrinsicApi
|
|
|
79
85
|
if attributes.key?(:'identity_data')
|
|
80
86
|
self.identity_data = attributes[:'identity_data']
|
|
81
87
|
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'encrypted_identity_data')
|
|
90
|
+
self.encrypted_identity_data = attributes[:'encrypted_identity_data']
|
|
91
|
+
end
|
|
82
92
|
end
|
|
83
93
|
|
|
84
94
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -117,7 +127,8 @@ module TrinsicApi
|
|
|
117
127
|
return true if self.equal?(o)
|
|
118
128
|
self.class == o.class &&
|
|
119
129
|
session == o.session &&
|
|
120
|
-
identity_data == o.identity_data
|
|
130
|
+
identity_data == o.identity_data &&
|
|
131
|
+
encrypted_identity_data == o.encrypted_identity_data
|
|
121
132
|
end
|
|
122
133
|
|
|
123
134
|
# @see the `==` method
|
|
@@ -129,7 +140,7 @@ module TrinsicApi
|
|
|
129
140
|
# Calculates hash code according to all attributes.
|
|
130
141
|
# @return [Integer] Hash code
|
|
131
142
|
def hash
|
|
132
|
-
[session, identity_data].hash
|
|
143
|
+
[session, identity_data, encrypted_identity_data].hash
|
|
133
144
|
end
|
|
134
145
|
|
|
135
146
|
# Builds the object from hash
|
|
@@ -0,0 +1,219 @@
|
|
|
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 HPKETestRequest < ApiModelBase
|
|
18
|
+
# The data to encrypt. Must be between 0 and 1024 bytes.
|
|
19
|
+
attr_accessor :data
|
|
20
|
+
|
|
21
|
+
# A 32-character suffix appended to the fixed info prefix to form the HPKE info parameter.
|
|
22
|
+
attr_accessor :info_suffix
|
|
23
|
+
|
|
24
|
+
# The recipient's public key, as a JWK or PEM string.
|
|
25
|
+
attr_accessor :public_key
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'data' => :'data',
|
|
31
|
+
:'info_suffix' => :'infoSuffix',
|
|
32
|
+
:'public_key' => :'publicKey'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'data' => :'String',
|
|
50
|
+
:'info_suffix' => :'String',
|
|
51
|
+
:'public_key' => :'String'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::HPKETestRequest` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::HPKETestRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
73
|
+
end
|
|
74
|
+
h[k.to_sym] = v
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'data')
|
|
78
|
+
self.data = attributes[:'data']
|
|
79
|
+
else
|
|
80
|
+
self.data = nil
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'info_suffix')
|
|
84
|
+
self.info_suffix = attributes[:'info_suffix']
|
|
85
|
+
else
|
|
86
|
+
self.info_suffix = nil
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'public_key')
|
|
90
|
+
self.public_key = attributes[:'public_key']
|
|
91
|
+
else
|
|
92
|
+
self.public_key = nil
|
|
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
|
+
if @data.nil?
|
|
102
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if @info_suffix.nil?
|
|
106
|
+
invalid_properties.push('invalid value for "info_suffix", info_suffix cannot be nil.')
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if @public_key.nil?
|
|
110
|
+
invalid_properties.push('invalid value for "public_key", public_key cannot be nil.')
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
invalid_properties
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Check to see if the all the properties in the model are valid
|
|
117
|
+
# @return true if the model is valid
|
|
118
|
+
def valid?
|
|
119
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
120
|
+
return false if @data.nil?
|
|
121
|
+
return false if @info_suffix.nil?
|
|
122
|
+
return false if @public_key.nil?
|
|
123
|
+
true
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Custom attribute writer method with validation
|
|
127
|
+
# @param [Object] data Value to be assigned
|
|
128
|
+
def data=(data)
|
|
129
|
+
if data.nil?
|
|
130
|
+
fail ArgumentError, 'data cannot be nil'
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
@data = data
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Custom attribute writer method with validation
|
|
137
|
+
# @param [Object] info_suffix Value to be assigned
|
|
138
|
+
def info_suffix=(info_suffix)
|
|
139
|
+
if info_suffix.nil?
|
|
140
|
+
fail ArgumentError, 'info_suffix cannot be nil'
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
@info_suffix = info_suffix
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Custom attribute writer method with validation
|
|
147
|
+
# @param [Object] public_key Value to be assigned
|
|
148
|
+
def public_key=(public_key)
|
|
149
|
+
if public_key.nil?
|
|
150
|
+
fail ArgumentError, 'public_key cannot be nil'
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
@public_key = public_key
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Checks equality by comparing each attribute.
|
|
157
|
+
# @param [Object] Object to be compared
|
|
158
|
+
def ==(o)
|
|
159
|
+
return true if self.equal?(o)
|
|
160
|
+
self.class == o.class &&
|
|
161
|
+
data == o.data &&
|
|
162
|
+
info_suffix == o.info_suffix &&
|
|
163
|
+
public_key == o.public_key
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# @see the `==` method
|
|
167
|
+
# @param [Object] Object to be compared
|
|
168
|
+
def eql?(o)
|
|
169
|
+
self == o
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Calculates hash code according to all attributes.
|
|
173
|
+
# @return [Integer] Hash code
|
|
174
|
+
def hash
|
|
175
|
+
[data, info_suffix, public_key].hash
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Builds the object from hash
|
|
179
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
180
|
+
# @return [Object] Returns the model itself
|
|
181
|
+
def self.build_from_hash(attributes)
|
|
182
|
+
return nil unless attributes.is_a?(Hash)
|
|
183
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
184
|
+
transformed_hash = {}
|
|
185
|
+
openapi_types.each_pair do |key, type|
|
|
186
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
187
|
+
transformed_hash["#{key}"] = nil
|
|
188
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
189
|
+
# check to ensure the input is an array given that the attribute
|
|
190
|
+
# is documented as an array but the input is not
|
|
191
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
192
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
193
|
+
end
|
|
194
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
195
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
new(transformed_hash)
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Returns the object in the form of hash
|
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
|
203
|
+
def to_hash
|
|
204
|
+
hash = {}
|
|
205
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
206
|
+
value = self.send(attr)
|
|
207
|
+
if value.nil?
|
|
208
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
209
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
hash[param] = _to_hash(value)
|
|
213
|
+
end
|
|
214
|
+
hash
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
end
|