trinsic_api 2.0.0.pre.alpha3 → 2.0.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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/docs/AttachmentsApi.md +1 -1
- data/docs/BrazilDigitalCnhInput.md +2 -2
- data/docs/CreateAdvancedProviderSessionRequest.md +3 -3
- data/docs/CreateHostedProviderSessionResponse.md +4 -2
- data/docs/CreateWidgetSessionRequest.md +3 -3
- data/docs/CreateWidgetSessionResponse.md +4 -2
- data/docs/IdentityData.md +2 -0
- data/docs/IdinInput.md +18 -0
- data/docs/Language.md +15 -0
- data/docs/ListProviderContractsResponse.md +18 -0
- data/docs/MobileIdInput.md +22 -0
- data/docs/NetworkApi.md +71 -4
- data/docs/ProviderContract.md +46 -0
- data/docs/ProviderInfo.md +1 -3
- data/docs/ProviderInformation.md +3 -3
- data/docs/ProviderInput.md +24 -12
- data/docs/RecommendRequest.md +2 -10
- data/docs/RecommendationInfo.md +24 -0
- data/docs/ResultCollection.md +2 -2
- data/docs/Session.md +3 -3
- data/docs/SessionsApi.md +2 -2
- data/docs/SmartIdInput.md +18 -0
- data/docs/SpidInput.md +18 -0
- data/docs/StepRefreshInfo.md +1 -1
- data/docs/SubProviderMetadata.md +24 -0
- data/docs/TrinsicTestDatabaseLookupInput.md +24 -0
- data/docs/TrinsicTestSubProvidersInput.md +18 -0
- data/lib/trinsic_api/api/attachments_api.rb +2 -2
- data/lib/trinsic_api/api/network_api.rb +59 -2
- data/lib/trinsic_api/api/sessions_api.rb +4 -4
- data/lib/trinsic_api/models/brazil_digital_cnh_input.rb +2 -2
- data/lib/trinsic_api/models/create_advanced_provider_session_request.rb +3 -3
- data/lib/trinsic_api/models/create_hosted_provider_session_response.rb +29 -6
- data/lib/trinsic_api/models/create_widget_session_request.rb +10 -10
- data/lib/trinsic_api/models/create_widget_session_response.rb +29 -6
- data/lib/trinsic_api/models/identity_data.rb +11 -1
- data/lib/trinsic_api/models/{known_identity_data.rb → idin_input.rb} +12 -13
- data/lib/trinsic_api/models/integration_launch_method.rb +2 -2
- data/lib/trinsic_api/models/language.rb +42 -0
- data/lib/trinsic_api/models/list_provider_contracts_response.rb +224 -0
- data/lib/trinsic_api/models/mobile_id_input.rb +260 -0
- data/lib/trinsic_api/models/provider_contract.rb +482 -0
- data/lib/trinsic_api/models/provider_info.rb +4 -17
- data/lib/trinsic_api/models/provider_input.rb +82 -16
- data/lib/trinsic_api/models/recommend_request.rb +9 -59
- data/lib/trinsic_api/models/recommendation_info.rb +256 -0
- data/lib/trinsic_api/models/result_collection.rb +8 -2
- data/lib/trinsic_api/models/session.rb +3 -3
- data/lib/trinsic_api/models/smart_id_input.rb +216 -0
- data/lib/trinsic_api/models/spid_input.rb +216 -0
- data/lib/trinsic_api/models/step_refresh_info.rb +1 -1
- data/lib/trinsic_api/models/{known_address.rb → sub_provider_metadata.rb} +59 -72
- data/lib/trinsic_api/models/{known_person_data.rb → trinsic_test_database_lookup_input.rb} +22 -66
- data/lib/trinsic_api/models/trinsic_test_sub_providers_input.rb +216 -0
- data/lib/trinsic_api/version.rb +1 -1
- data/lib/trinsic_api.rb +11 -3
- data/spec/api/attachments_api_spec.rb +1 -1
- data/spec/api/network_api_spec.rb +12 -1
- data/spec/api/sessions_api_spec.rb +2 -2
- data/spec/models/create_hosted_provider_session_response_spec.rb +6 -0
- data/spec/models/create_widget_session_request_spec.rb +1 -1
- data/spec/models/create_widget_session_response_spec.rb +6 -0
- data/spec/models/identity_data_spec.rb +6 -0
- data/spec/models/{known_identity_data_spec.rb → idin_input_spec.rb} +7 -7
- data/spec/models/language_spec.rb +30 -0
- data/spec/models/list_provider_contracts_response_spec.rb +36 -0
- data/spec/models/mobile_id_input_spec.rb +48 -0
- data/spec/models/provider_contract_spec.rb +120 -0
- data/spec/models/provider_info_spec.rb +0 -6
- data/spec/models/provider_input_spec.rb +36 -0
- data/spec/models/recommend_request_spec.rb +1 -25
- data/spec/models/recommendation_info_spec.rb +54 -0
- data/spec/models/smart_id_input_spec.rb +36 -0
- data/spec/models/spid_input_spec.rb +36 -0
- data/spec/models/sub_provider_metadata_spec.rb +54 -0
- data/spec/models/{known_person_data_spec.rb → trinsic_test_database_lookup_input_spec.rb} +8 -32
- data/spec/models/trinsic_test_sub_providers_input_spec.rb +36 -0
- metadata +46 -14
- data/docs/KnownAddress.md +0 -32
- data/docs/KnownIdentityData.md +0 -18
- data/docs/KnownPersonData.md +0 -32
- data/spec/models/known_address_spec.rb +0 -78
@@ -15,39 +15,57 @@ require 'time'
|
|
15
15
|
|
16
16
|
module TrinsicApi
|
17
17
|
class ProviderInput
|
18
|
-
# Input for the `f-indonesia-nik`
|
18
|
+
# Input for the `f-indonesia-nik` provider
|
19
19
|
attr_accessor :indonesia_nik
|
20
20
|
|
21
|
-
# Input for the `f-mexico-curp`
|
21
|
+
# Input for the `f-mexico-curp` provider
|
22
22
|
attr_accessor :mexico_curp
|
23
23
|
|
24
|
-
# Input for the `f-south-africa-nid`
|
24
|
+
# Input for the `f-south-africa-nid` provider
|
25
25
|
attr_accessor :south_africa_nid
|
26
26
|
|
27
|
-
# Input for the `f-kenya-nid`
|
27
|
+
# Input for the `f-kenya-nid` provider
|
28
28
|
attr_accessor :kenya_nid
|
29
29
|
|
30
|
-
# Input for the `f-nigeria-nin`
|
30
|
+
# Input for the `f-nigeria-nin` provider
|
31
31
|
attr_accessor :nigeria_nin
|
32
32
|
|
33
|
-
# Input for the `f-india-aadhaar-match`
|
33
|
+
# Input for the `f-india-aadhaar-match` provider
|
34
34
|
attr_accessor :aadhaar
|
35
35
|
|
36
|
-
# Input for the `bangladesh-nid`
|
36
|
+
# Input for the `bangladesh-nid` provider
|
37
37
|
attr_accessor :bangladesh_national_id
|
38
38
|
|
39
|
-
# Input for the `g-brazil-cpf`
|
39
|
+
# Input for the `g-brazil-cpf` provider
|
40
40
|
attr_accessor :brazil_cpf_check
|
41
41
|
|
42
|
-
# Input for the `g-brazil-digital-cnh`
|
42
|
+
# Input for the `g-brazil-digital-cnh` provider
|
43
43
|
attr_accessor :brazil_digital_cnh
|
44
44
|
|
45
|
-
# Input for the `b-philsys-biometric`
|
45
|
+
# Input for the `b-philsys-biometric` provider
|
46
46
|
attr_accessor :philippine_match
|
47
47
|
|
48
|
-
# Input for the `b-philippine-qr-digital-national-id` and `b-philippine-qr-ephill-id`
|
48
|
+
# Input for the `b-philippine-qr-digital-national-id` and `b-philippine-qr-ephill-id` providers
|
49
49
|
attr_accessor :philippine_qr
|
50
50
|
|
51
|
+
# Input for the `smart-id` provider
|
52
|
+
attr_accessor :smart_id
|
53
|
+
|
54
|
+
# Input for the `mobile-id` provider
|
55
|
+
attr_accessor :mobile_id
|
56
|
+
|
57
|
+
# Input for the `idin` provider
|
58
|
+
attr_accessor :idin
|
59
|
+
|
60
|
+
# Input for the `spid` provider
|
61
|
+
attr_accessor :spid
|
62
|
+
|
63
|
+
# *TEST MODE ONLY.* Input for the `trinsic-test-database-lookup` provider
|
64
|
+
attr_accessor :trinsic_test_database_lookup
|
65
|
+
|
66
|
+
# *TEST MODE ONLY.* Input for the `trinsic-test-sub-providers` provider
|
67
|
+
attr_accessor :trinsic_test_sub_providers
|
68
|
+
|
51
69
|
# Attribute mapping from ruby-style variable name to JSON key.
|
52
70
|
def self.attribute_map
|
53
71
|
{
|
@@ -61,7 +79,13 @@ module TrinsicApi
|
|
61
79
|
:'brazil_cpf_check' => :'brazilCpfCheck',
|
62
80
|
:'brazil_digital_cnh' => :'brazilDigitalCnh',
|
63
81
|
:'philippine_match' => :'philippineMatch',
|
64
|
-
:'philippine_qr' => :'philippineQR'
|
82
|
+
:'philippine_qr' => :'philippineQR',
|
83
|
+
:'smart_id' => :'smartId',
|
84
|
+
:'mobile_id' => :'mobileId',
|
85
|
+
:'idin' => :'idin',
|
86
|
+
:'spid' => :'spid',
|
87
|
+
:'trinsic_test_database_lookup' => :'trinsicTestDatabaseLookup',
|
88
|
+
:'trinsic_test_sub_providers' => :'trinsicTestSubProviders'
|
65
89
|
}
|
66
90
|
end
|
67
91
|
|
@@ -83,7 +107,13 @@ module TrinsicApi
|
|
83
107
|
:'brazil_cpf_check' => :'BrazilCpfCheckInput',
|
84
108
|
:'brazil_digital_cnh' => :'BrazilDigitalCnhInput',
|
85
109
|
:'philippine_match' => :'PhilippineMatchInput',
|
86
|
-
:'philippine_qr' => :'PhilippineQRInput'
|
110
|
+
:'philippine_qr' => :'PhilippineQRInput',
|
111
|
+
:'smart_id' => :'SmartIdInput',
|
112
|
+
:'mobile_id' => :'MobileIdInput',
|
113
|
+
:'idin' => :'IdinInput',
|
114
|
+
:'spid' => :'SpidInput',
|
115
|
+
:'trinsic_test_database_lookup' => :'TrinsicTestDatabaseLookupInput',
|
116
|
+
:'trinsic_test_sub_providers' => :'TrinsicTestSubProvidersInput'
|
87
117
|
}
|
88
118
|
end
|
89
119
|
|
@@ -100,7 +130,13 @@ module TrinsicApi
|
|
100
130
|
:'brazil_cpf_check',
|
101
131
|
:'brazil_digital_cnh',
|
102
132
|
:'philippine_match',
|
103
|
-
:'philippine_qr'
|
133
|
+
:'philippine_qr',
|
134
|
+
:'smart_id',
|
135
|
+
:'mobile_id',
|
136
|
+
:'idin',
|
137
|
+
:'spid',
|
138
|
+
:'trinsic_test_database_lookup',
|
139
|
+
:'trinsic_test_sub_providers'
|
104
140
|
])
|
105
141
|
end
|
106
142
|
|
@@ -162,6 +198,30 @@ module TrinsicApi
|
|
162
198
|
if attributes.key?(:'philippine_qr')
|
163
199
|
self.philippine_qr = attributes[:'philippine_qr']
|
164
200
|
end
|
201
|
+
|
202
|
+
if attributes.key?(:'smart_id')
|
203
|
+
self.smart_id = attributes[:'smart_id']
|
204
|
+
end
|
205
|
+
|
206
|
+
if attributes.key?(:'mobile_id')
|
207
|
+
self.mobile_id = attributes[:'mobile_id']
|
208
|
+
end
|
209
|
+
|
210
|
+
if attributes.key?(:'idin')
|
211
|
+
self.idin = attributes[:'idin']
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes.key?(:'spid')
|
215
|
+
self.spid = attributes[:'spid']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.key?(:'trinsic_test_database_lookup')
|
219
|
+
self.trinsic_test_database_lookup = attributes[:'trinsic_test_database_lookup']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.key?(:'trinsic_test_sub_providers')
|
223
|
+
self.trinsic_test_sub_providers = attributes[:'trinsic_test_sub_providers']
|
224
|
+
end
|
165
225
|
end
|
166
226
|
|
167
227
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -194,7 +254,13 @@ module TrinsicApi
|
|
194
254
|
brazil_cpf_check == o.brazil_cpf_check &&
|
195
255
|
brazil_digital_cnh == o.brazil_digital_cnh &&
|
196
256
|
philippine_match == o.philippine_match &&
|
197
|
-
philippine_qr == o.philippine_qr
|
257
|
+
philippine_qr == o.philippine_qr &&
|
258
|
+
smart_id == o.smart_id &&
|
259
|
+
mobile_id == o.mobile_id &&
|
260
|
+
idin == o.idin &&
|
261
|
+
spid == o.spid &&
|
262
|
+
trinsic_test_database_lookup == o.trinsic_test_database_lookup &&
|
263
|
+
trinsic_test_sub_providers == o.trinsic_test_sub_providers
|
198
264
|
end
|
199
265
|
|
200
266
|
# @see the `==` method
|
@@ -206,7 +272,7 @@ module TrinsicApi
|
|
206
272
|
# Calculates hash code according to all attributes.
|
207
273
|
# @return [Integer] Hash code
|
208
274
|
def hash
|
209
|
-
[indonesia_nik, mexico_curp, south_africa_nid, kenya_nid, nigeria_nin, aadhaar, bangladesh_national_id, brazil_cpf_check, brazil_digital_cnh, philippine_match, philippine_qr].hash
|
275
|
+
[indonesia_nik, mexico_curp, south_africa_nid, kenya_nid, nigeria_nin, aadhaar, bangladesh_national_id, brazil_cpf_check, brazil_digital_cnh, philippine_match, philippine_qr, smart_id, mobile_id, idin, spid, trinsic_test_database_lookup, trinsic_test_sub_providers].hash
|
210
276
|
end
|
211
277
|
|
212
278
|
# Builds the object from hash
|
@@ -15,29 +15,13 @@ require 'time'
|
|
15
15
|
|
16
16
|
module TrinsicApi
|
17
17
|
class RecommendRequest
|
18
|
-
#
|
19
|
-
attr_accessor :
|
20
|
-
|
21
|
-
# A list of countries, in alpha-2 ISO 3166 format, you wish to specify for the recommendation, this can include the user's country of residence, nationality, etc.
|
22
|
-
attr_accessor :countries
|
23
|
-
|
24
|
-
# If one of the countries has subdivisions, for example the US states, you can specify a list of these to further refine the recommendation (e.g., CA, UT, NY)
|
25
|
-
attr_accessor :subdivisions
|
26
|
-
|
27
|
-
# Provide the IP addresses of the user you wish to generate a recommendation for. Will be used to look up the user's geographic location.
|
28
|
-
attr_accessor :ip_addresses
|
29
|
-
|
30
|
-
# If true, the recommendation will include providers that are disabled for the app
|
31
|
-
attr_accessor :include_disabled_providers
|
18
|
+
# Information about the user you wish to generate a recommendation for.
|
19
|
+
attr_accessor :recommendation_info
|
32
20
|
|
33
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
34
22
|
def self.attribute_map
|
35
23
|
{
|
36
|
-
:'
|
37
|
-
:'countries' => :'countries',
|
38
|
-
:'subdivisions' => :'subdivisions',
|
39
|
-
:'ip_addresses' => :'ipAddresses',
|
40
|
-
:'include_disabled_providers' => :'includeDisabledProviders'
|
24
|
+
:'recommendation_info' => :'recommendationInfo'
|
41
25
|
}
|
42
26
|
end
|
43
27
|
|
@@ -49,22 +33,14 @@ module TrinsicApi
|
|
49
33
|
# Attribute type mapping.
|
50
34
|
def self.openapi_types
|
51
35
|
{
|
52
|
-
:'
|
53
|
-
:'countries' => :'Array<String>',
|
54
|
-
:'subdivisions' => :'Array<String>',
|
55
|
-
:'ip_addresses' => :'Array<String>',
|
56
|
-
:'include_disabled_providers' => :'Boolean'
|
36
|
+
:'recommendation_info' => :'RecommendationInfo'
|
57
37
|
}
|
58
38
|
end
|
59
39
|
|
60
40
|
# List of attributes with nullable: true
|
61
41
|
def self.openapi_nullable
|
62
42
|
Set.new([
|
63
|
-
:'
|
64
|
-
:'countries',
|
65
|
-
:'subdivisions',
|
66
|
-
:'ip_addresses',
|
67
|
-
:'include_disabled_providers'
|
43
|
+
:'recommendation_info'
|
68
44
|
])
|
69
45
|
end
|
70
46
|
|
@@ -83,30 +59,8 @@ module TrinsicApi
|
|
83
59
|
h[k.to_sym] = v
|
84
60
|
}
|
85
61
|
|
86
|
-
if attributes.key?(:'
|
87
|
-
self.
|
88
|
-
end
|
89
|
-
|
90
|
-
if attributes.key?(:'countries')
|
91
|
-
if (value = attributes[:'countries']).is_a?(Array)
|
92
|
-
self.countries = value
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
if attributes.key?(:'subdivisions')
|
97
|
-
if (value = attributes[:'subdivisions']).is_a?(Array)
|
98
|
-
self.subdivisions = value
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
|
-
if attributes.key?(:'ip_addresses')
|
103
|
-
if (value = attributes[:'ip_addresses']).is_a?(Array)
|
104
|
-
self.ip_addresses = value
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
if attributes.key?(:'include_disabled_providers')
|
109
|
-
self.include_disabled_providers = attributes[:'include_disabled_providers']
|
62
|
+
if attributes.key?(:'recommendation_info')
|
63
|
+
self.recommendation_info = attributes[:'recommendation_info']
|
110
64
|
end
|
111
65
|
end
|
112
66
|
|
@@ -130,11 +84,7 @@ module TrinsicApi
|
|
130
84
|
def ==(o)
|
131
85
|
return true if self.equal?(o)
|
132
86
|
self.class == o.class &&
|
133
|
-
|
134
|
-
countries == o.countries &&
|
135
|
-
subdivisions == o.subdivisions &&
|
136
|
-
ip_addresses == o.ip_addresses &&
|
137
|
-
include_disabled_providers == o.include_disabled_providers
|
87
|
+
recommendation_info == o.recommendation_info
|
138
88
|
end
|
139
89
|
|
140
90
|
# @see the `==` method
|
@@ -146,7 +96,7 @@ module TrinsicApi
|
|
146
96
|
# Calculates hash code according to all attributes.
|
147
97
|
# @return [Integer] Hash code
|
148
98
|
def hash
|
149
|
-
[
|
99
|
+
[recommendation_info].hash
|
150
100
|
end
|
151
101
|
|
152
102
|
# Builds the object from hash
|
@@ -0,0 +1,256 @@
|
|
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.8.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module TrinsicApi
|
17
|
+
# Information relating to a user; used to generated Identity Provider recommendations.
|
18
|
+
class RecommendationInfo
|
19
|
+
# The phone number of the user you wish to generate a recommendation for. Will be used to look up the user's identity in the network, as well as to determine the user's geographic location.
|
20
|
+
attr_accessor :phone_number
|
21
|
+
|
22
|
+
# A list of countries, in alpha-2 ISO 3166 format, which the user is related to. This can include the user's country of residence, nationality, etc.
|
23
|
+
attr_accessor :countries
|
24
|
+
|
25
|
+
# If one of the countries has subdivisions (for example: US states), specify those related to the user here (e.g., CA, UT, NY)
|
26
|
+
attr_accessor :subdivisions
|
27
|
+
|
28
|
+
# Any IP addresses related to the user. Will be used to determine the user's geographic location.
|
29
|
+
attr_accessor :ip_addresses
|
30
|
+
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'phone_number' => :'phoneNumber',
|
35
|
+
:'countries' => :'countries',
|
36
|
+
:'subdivisions' => :'subdivisions',
|
37
|
+
:'ip_addresses' => :'ipAddresses'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Returns all the JSON keys this model knows about
|
42
|
+
def self.acceptable_attributes
|
43
|
+
attribute_map.values
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute type mapping.
|
47
|
+
def self.openapi_types
|
48
|
+
{
|
49
|
+
:'phone_number' => :'String',
|
50
|
+
:'countries' => :'Array<String>',
|
51
|
+
:'subdivisions' => :'Array<String>',
|
52
|
+
:'ip_addresses' => :'Array<String>'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# List of attributes with nullable: true
|
57
|
+
def self.openapi_nullable
|
58
|
+
Set.new([
|
59
|
+
:'phone_number',
|
60
|
+
:'countries',
|
61
|
+
:'subdivisions',
|
62
|
+
:'ip_addresses'
|
63
|
+
])
|
64
|
+
end
|
65
|
+
|
66
|
+
# Initializes the object
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
68
|
+
def initialize(attributes = {})
|
69
|
+
if (!attributes.is_a?(Hash))
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::RecommendationInfo` initialize method"
|
71
|
+
end
|
72
|
+
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
75
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::RecommendationInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
77
|
+
end
|
78
|
+
h[k.to_sym] = v
|
79
|
+
}
|
80
|
+
|
81
|
+
if attributes.key?(:'phone_number')
|
82
|
+
self.phone_number = attributes[:'phone_number']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'countries')
|
86
|
+
if (value = attributes[:'countries']).is_a?(Array)
|
87
|
+
self.countries = value
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.key?(:'subdivisions')
|
92
|
+
if (value = attributes[:'subdivisions']).is_a?(Array)
|
93
|
+
self.subdivisions = value
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'ip_addresses')
|
98
|
+
if (value = attributes[:'ip_addresses']).is_a?(Array)
|
99
|
+
self.ip_addresses = value
|
100
|
+
end
|
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
|
+
phone_number == o.phone_number &&
|
125
|
+
countries == o.countries &&
|
126
|
+
subdivisions == o.subdivisions &&
|
127
|
+
ip_addresses == o.ip_addresses
|
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
|
+
[phone_number, countries, subdivisions, ip_addresses].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
|
+
# Deserializes the data based on type
|
166
|
+
# @param string type Data type
|
167
|
+
# @param string value Value to be deserialized
|
168
|
+
# @return [Object] Deserialized data
|
169
|
+
def self._deserialize(type, value)
|
170
|
+
case type.to_sym
|
171
|
+
when :Time
|
172
|
+
Time.parse(value)
|
173
|
+
when :Date
|
174
|
+
Date.parse(value)
|
175
|
+
when :String
|
176
|
+
value.to_s
|
177
|
+
when :Integer
|
178
|
+
value.to_i
|
179
|
+
when :Float
|
180
|
+
value.to_f
|
181
|
+
when :Boolean
|
182
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
183
|
+
true
|
184
|
+
else
|
185
|
+
false
|
186
|
+
end
|
187
|
+
when :Object
|
188
|
+
# generic object (usually a Hash), return directly
|
189
|
+
value
|
190
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
191
|
+
inner_type = Regexp.last_match[:inner_type]
|
192
|
+
value.map { |v| _deserialize(inner_type, v) }
|
193
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
194
|
+
k_type = Regexp.last_match[:k_type]
|
195
|
+
v_type = Regexp.last_match[:v_type]
|
196
|
+
{}.tap do |hash|
|
197
|
+
value.each do |k, v|
|
198
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
else # model
|
202
|
+
# models (e.g. Pet) or oneOf
|
203
|
+
klass = TrinsicApi.const_get(type)
|
204
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the string representation of the object
|
209
|
+
# @return [String] String presentation of the object
|
210
|
+
def to_s
|
211
|
+
to_hash.to_s
|
212
|
+
end
|
213
|
+
|
214
|
+
# to_body is an alias to to_hash (backward compatibility)
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_body
|
217
|
+
to_hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Returns the object in the form of hash
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
222
|
+
def to_hash
|
223
|
+
hash = {}
|
224
|
+
self.class.attribute_map.each_pair do |attr, param|
|
225
|
+
value = self.send(attr)
|
226
|
+
if value.nil?
|
227
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
228
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
229
|
+
end
|
230
|
+
|
231
|
+
hash[param] = _to_hash(value)
|
232
|
+
end
|
233
|
+
hash
|
234
|
+
end
|
235
|
+
|
236
|
+
# Outputs non-array value in the form of hash
|
237
|
+
# For object, use to_hash. Otherwise, just return the value
|
238
|
+
# @param [Object] value Any valid value
|
239
|
+
# @return [Hash] Returns the value in the form of hash
|
240
|
+
def _to_hash(value)
|
241
|
+
if value.is_a?(Array)
|
242
|
+
value.compact.map { |v| _to_hash(v) }
|
243
|
+
elsif value.is_a?(Hash)
|
244
|
+
{}.tap do |hash|
|
245
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
246
|
+
end
|
247
|
+
elsif value.respond_to? :to_hash
|
248
|
+
value.to_hash
|
249
|
+
else
|
250
|
+
value
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
@@ -18,7 +18,7 @@ module TrinsicApi
|
|
18
18
|
# The method by which the results of the Acceptance Session should be collected.
|
19
19
|
attr_accessor :method
|
20
20
|
|
21
|
-
#
|
21
|
+
# The `resultsAccessKey` for the Acceptance Session. This is an encrypted payload which contains the decryption key necessary to access the Session's Data Vault. Save this securely in your systems; it must be passed back with any API call which requires access to the Session's Data Vault. Trinsic cannot access a Session's Data Vault without this key.
|
22
22
|
attr_accessor :results_access_key
|
23
23
|
|
24
24
|
class EnumAttributeValidator
|
@@ -67,7 +67,6 @@ module TrinsicApi
|
|
67
67
|
# List of attributes with nullable: true
|
68
68
|
def self.openapi_nullable
|
69
69
|
Set.new([
|
70
|
-
:'results_access_key'
|
71
70
|
])
|
72
71
|
end
|
73
72
|
|
@@ -94,6 +93,8 @@ module TrinsicApi
|
|
94
93
|
|
95
94
|
if attributes.key?(:'results_access_key')
|
96
95
|
self.results_access_key = attributes[:'results_access_key']
|
96
|
+
else
|
97
|
+
self.results_access_key = nil
|
97
98
|
end
|
98
99
|
end
|
99
100
|
|
@@ -106,6 +107,10 @@ module TrinsicApi
|
|
106
107
|
invalid_properties.push('invalid value for "method", method cannot be nil.')
|
107
108
|
end
|
108
109
|
|
110
|
+
if @results_access_key.nil?
|
111
|
+
invalid_properties.push('invalid value for "results_access_key", results_access_key cannot be nil.')
|
112
|
+
end
|
113
|
+
|
109
114
|
invalid_properties
|
110
115
|
end
|
111
116
|
|
@@ -114,6 +119,7 @@ module TrinsicApi
|
|
114
119
|
def valid?
|
115
120
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
116
121
|
return false if @method.nil?
|
122
|
+
return false if @results_access_key.nil?
|
117
123
|
true
|
118
124
|
end
|
119
125
|
|
@@ -17,13 +17,13 @@ module TrinsicApi
|
|
17
17
|
class Session
|
18
18
|
attr_accessor :id
|
19
19
|
|
20
|
-
# Whether the Session is in a terminal / final state.
|
20
|
+
# Whether the Session is in a terminal / final state. If this is `true`, inspect the value of `Success` to determine whether the Session was successful.
|
21
21
|
attr_accessor :done
|
22
22
|
|
23
|
-
# Whether the Session has completed successfully.
|
23
|
+
# Whether the Session has completed successfully. If this is `false`, the Session is either not yet done, or has failed. Inspect `Done` and `ErrorCode` for more information. If this is `true`, the Session has completed successfully.
|
24
24
|
attr_accessor :success
|
25
25
|
|
26
|
-
# The reason for the Session's failure.
|
26
|
+
# The reason for the Session's failure. Only present if `Success` is `false`.
|
27
27
|
attr_accessor :error_code
|
28
28
|
|
29
29
|
# The unix timestamp, in seconds, when this session was created
|