trinsic_api 1.1.2 → 2.0.0.pre.alpha3

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 (183) hide show
  1. checksums.yaml +4 -4
  2. data/docs/AadhaarInput.md +20 -0
  3. data/docs/Address.md +3 -3
  4. data/docs/AttachmentAccessKeys.md +7 -5
  5. data/docs/BangladeshNationalIdInput.md +24 -0
  6. data/docs/BrazilCpfCheckInput.md +18 -0
  7. data/docs/BrazilDigitalCnhInput.md +24 -0
  8. data/docs/CreateAdvancedProviderSessionRequest.md +26 -0
  9. data/docs/CreateAdvancedProviderSessionResponse.md +22 -0
  10. data/docs/CreateHostedProviderSessionRequest.md +22 -0
  11. data/docs/CreateHostedProviderSessionResponse.md +20 -0
  12. data/docs/CreateWidgetSessionRequest.md +22 -0
  13. data/docs/{CreateSessionResponse.md → CreateWidgetSessionResponse.md} +5 -5
  14. data/docs/DocumentData.md +3 -3
  15. data/docs/DocumentScanAttachments.md +18 -0
  16. data/docs/{SessionState.md → DocumentType.md} +2 -2
  17. data/docs/HttpValidationProblemDetails.md +28 -0
  18. data/docs/IdentityData.md +4 -4
  19. data/docs/IndonesiaNikInput.md +22 -0
  20. data/docs/{FailureMessage.md → IntegrationCapability.md} +2 -5
  21. data/docs/IntegrationLaunchMethod.md +15 -0
  22. data/docs/IntegrationStep.md +22 -0
  23. data/docs/KenyaNidInput.md +28 -0
  24. data/docs/KnownAddress.md +32 -0
  25. data/docs/KnownIdentityData.md +18 -0
  26. data/docs/KnownPersonData.md +32 -0
  27. data/docs/MexicoCurpInput.md +18 -0
  28. data/docs/NetworkApi.md +37 -35
  29. data/docs/NigeriaNinInput.md +30 -0
  30. data/docs/PersonData.md +14 -12
  31. data/docs/PhilippineMatchInput.md +26 -0
  32. data/docs/PhilippineQRInput.md +20 -0
  33. data/docs/ProblemDetails.md +26 -0
  34. data/docs/ProviderAttachments.md +18 -0
  35. data/docs/ProviderInfo.md +3 -1
  36. data/docs/ProviderInformation.md +22 -0
  37. data/docs/ProviderInput.md +38 -0
  38. data/docs/RecommendRequest.md +26 -0
  39. data/docs/RecommendResponse.md +22 -0
  40. data/docs/RefreshStepContentRequest.md +18 -0
  41. data/docs/RefreshStepContentResponse.md +18 -0
  42. data/docs/ResultCollection.md +20 -0
  43. data/docs/ResultCollectionMethod.md +15 -0
  44. data/docs/Session.md +6 -8
  45. data/docs/{VerificationFailCode.md → SessionErrorCode.md} +2 -2
  46. data/docs/SessionsApi.md +236 -18
  47. data/docs/{SessionFailCode.md → Sex.md} +2 -2
  48. data/docs/SouthAfricaNidInput.md +24 -0
  49. data/docs/StepRefreshInfo.md +22 -0
  50. data/lib/trinsic_api/api/attachments_api.rb +1 -1
  51. data/lib/trinsic_api/api/network_api.rb +38 -37
  52. data/lib/trinsic_api/api/sessions_api.rb +217 -19
  53. data/lib/trinsic_api/api_client.rb +1 -1
  54. data/lib/trinsic_api/api_error.rb +1 -1
  55. data/lib/trinsic_api/configuration.rb +1 -1
  56. data/lib/trinsic_api/models/{validation_result.rb → aadhaar_input.rb} +21 -26
  57. data/lib/trinsic_api/models/address.rb +16 -10
  58. data/lib/trinsic_api/models/attachment_access_keys.rb +25 -10
  59. data/lib/trinsic_api/models/bangladesh_national_id_input.rb +249 -0
  60. data/lib/trinsic_api/models/brazil_cpf_check_input.rb +261 -0
  61. data/lib/trinsic_api/models/brazil_digital_cnh_input.rb +294 -0
  62. data/lib/trinsic_api/models/cancel_session_response.rb +1 -1
  63. data/lib/trinsic_api/models/create_advanced_provider_session_request.rb +312 -0
  64. data/lib/trinsic_api/models/create_advanced_provider_session_response.rb +256 -0
  65. data/lib/trinsic_api/models/create_hosted_provider_session_request.rb +288 -0
  66. data/lib/trinsic_api/models/create_hosted_provider_session_response.rb +233 -0
  67. data/lib/trinsic_api/models/create_widget_session_request.rb +240 -0
  68. data/lib/trinsic_api/models/{create_session_response.rb → create_widget_session_response.rb} +18 -17
  69. data/lib/trinsic_api/models/document_data.rb +32 -4
  70. data/lib/trinsic_api/models/{failure_message.rb → document_scan_attachments.rb} +12 -18
  71. data/lib/trinsic_api/models/{session_state.rb → document_type.rb} +9 -11
  72. data/lib/trinsic_api/models/get_attachment_request.rb +1 -1
  73. data/lib/trinsic_api/models/get_attachment_response.rb +1 -1
  74. data/lib/trinsic_api/models/get_session_response.rb +1 -1
  75. data/lib/trinsic_api/models/get_session_result_request.rb +1 -1
  76. data/lib/trinsic_api/models/get_session_result_response.rb +2 -1
  77. data/lib/trinsic_api/models/http_validation_problem_details.rb +273 -0
  78. data/lib/trinsic_api/models/identity_data.rb +5 -5
  79. data/lib/trinsic_api/models/{create_session_request.rb → indonesia_nik_input.rb} +105 -38
  80. data/lib/trinsic_api/models/integration_capability.rb +44 -0
  81. data/lib/trinsic_api/models/integration_launch_method.rb +42 -0
  82. data/lib/trinsic_api/models/integration_step.rb +275 -0
  83. data/lib/trinsic_api/models/kenya_nid_input.rb +397 -0
  84. data/lib/trinsic_api/models/known_address.rb +287 -0
  85. data/lib/trinsic_api/models/known_identity_data.rb +217 -0
  86. data/lib/trinsic_api/models/{disclosed_fields_request.rb → known_person_data.rb} +57 -77
  87. data/lib/trinsic_api/models/list_providers_response.rb +1 -1
  88. data/lib/trinsic_api/models/list_sessions_response.rb +1 -1
  89. data/lib/trinsic_api/models/mexico_curp_input.rb +250 -0
  90. data/lib/trinsic_api/models/nigeria_nin_input.rb +383 -0
  91. data/lib/trinsic_api/models/order_direction.rb +1 -1
  92. data/lib/trinsic_api/models/person_data.rb +50 -15
  93. data/lib/trinsic_api/models/philippine_match_input.rb +260 -0
  94. data/lib/trinsic_api/models/philippine_qr_input.rb +227 -0
  95. data/lib/trinsic_api/models/problem_details.rb +255 -0
  96. data/lib/trinsic_api/models/provider_attachments.rb +215 -0
  97. data/lib/trinsic_api/models/provider_info.rb +18 -5
  98. data/lib/trinsic_api/models/provider_information.rb +253 -0
  99. data/lib/trinsic_api/models/provider_input.rb +326 -0
  100. data/lib/trinsic_api/models/recommend_request.rb +266 -0
  101. data/lib/trinsic_api/models/recommend_response.rb +262 -0
  102. data/lib/trinsic_api/models/refresh_step_content_request.rb +216 -0
  103. data/lib/trinsic_api/models/{identity_lookup_response.rb → refresh_step_content_response.rb} +16 -16
  104. data/lib/trinsic_api/models/{verification.rb → result_collection.rb} +27 -20
  105. data/lib/trinsic_api/models/result_collection_method.rb +40 -0
  106. data/lib/trinsic_api/models/session.rb +32 -48
  107. data/lib/trinsic_api/models/session_error_code.rb +48 -0
  108. data/lib/trinsic_api/models/session_ordering.rb +1 -1
  109. data/lib/trinsic_api/models/sex.rb +42 -0
  110. data/lib/trinsic_api/models/{disclosed_fields.rb → south_africa_nid_input.rb} +107 -154
  111. data/lib/trinsic_api/models/step_refresh_info.rb +256 -0
  112. data/lib/trinsic_api/version.rb +2 -2
  113. data/lib/trinsic_api.rb +40 -12
  114. data/spec/api/attachments_api_spec.rb +1 -1
  115. data/spec/api/network_api_spec.rb +12 -12
  116. data/spec/api/sessions_api_spec.rb +44 -7
  117. data/spec/models/{verification_spec.rb → aadhaar_input_spec.rb} +9 -9
  118. data/spec/models/address_spec.rb +2 -2
  119. data/spec/models/attachment_access_keys_spec.rb +7 -1
  120. data/spec/models/bangladesh_national_id_input_spec.rb +54 -0
  121. data/spec/models/{identity_lookup_response_spec.rb → brazil_cpf_check_input_spec.rb} +8 -8
  122. data/spec/models/brazil_digital_cnh_input_spec.rb +54 -0
  123. data/spec/models/cancel_session_response_spec.rb +1 -1
  124. data/spec/models/create_advanced_provider_session_request_spec.rb +60 -0
  125. data/spec/models/create_advanced_provider_session_response_spec.rb +48 -0
  126. data/spec/models/create_hosted_provider_session_request_spec.rb +48 -0
  127. data/spec/models/create_hosted_provider_session_response_spec.rb +42 -0
  128. data/spec/models/create_widget_session_request_spec.rb +48 -0
  129. data/spec/models/{create_session_response_spec.rb → create_widget_session_response_spec.rb} +8 -8
  130. data/spec/models/document_data_spec.rb +1 -1
  131. data/spec/models/document_scan_attachments_spec.rb +36 -0
  132. data/spec/models/{session_state_spec.rb → document_type_spec.rb} +7 -7
  133. data/spec/models/get_attachment_request_spec.rb +1 -1
  134. data/spec/models/get_attachment_response_spec.rb +1 -1
  135. data/spec/models/get_session_response_spec.rb +1 -1
  136. data/spec/models/get_session_result_request_spec.rb +1 -1
  137. data/spec/models/get_session_result_response_spec.rb +1 -1
  138. data/spec/models/http_validation_problem_details_spec.rb +66 -0
  139. data/spec/models/identity_data_spec.rb +1 -1
  140. data/spec/models/indonesia_nik_input_spec.rb +48 -0
  141. data/spec/models/integration_capability_spec.rb +30 -0
  142. data/spec/models/integration_launch_method_spec.rb +30 -0
  143. data/spec/models/integration_step_spec.rb +48 -0
  144. data/spec/models/kenya_nid_input_spec.rb +66 -0
  145. data/spec/models/known_address_spec.rb +78 -0
  146. data/spec/models/known_identity_data_spec.rb +36 -0
  147. data/spec/models/{disclosed_fields_request_spec.rb → known_person_data_spec.rb} +13 -37
  148. data/spec/models/list_providers_response_spec.rb +1 -1
  149. data/spec/models/list_sessions_response_spec.rb +1 -1
  150. data/spec/models/{failure_message_spec.rb → mexico_curp_input_spec.rb} +8 -8
  151. data/spec/models/nigeria_nin_input_spec.rb +72 -0
  152. data/spec/models/order_direction_spec.rb +1 -1
  153. data/spec/models/person_data_spec.rb +8 -2
  154. data/spec/models/philippine_match_input_spec.rb +60 -0
  155. data/spec/models/philippine_qr_input_spec.rb +42 -0
  156. data/spec/models/problem_details_spec.rb +60 -0
  157. data/spec/models/provider_attachments_spec.rb +36 -0
  158. data/spec/models/provider_info_spec.rb +7 -1
  159. data/spec/models/provider_information_spec.rb +48 -0
  160. data/spec/models/{disclosed_fields_spec.rb → provider_input_spec.rb} +18 -24
  161. data/spec/models/recommend_request_spec.rb +60 -0
  162. data/spec/models/recommend_response_spec.rb +48 -0
  163. data/spec/models/refresh_step_content_request_spec.rb +36 -0
  164. data/spec/models/refresh_step_content_response_spec.rb +36 -0
  165. data/spec/models/result_collection_method_spec.rb +30 -0
  166. data/spec/models/{validation_result_spec.rb → result_collection_spec.rb} +9 -9
  167. data/spec/models/{verification_fail_code_spec.rb → session_error_code_spec.rb} +7 -7
  168. data/spec/models/session_ordering_spec.rb +1 -1
  169. data/spec/models/session_spec.rb +4 -10
  170. data/spec/models/{session_fail_code_spec.rb → sex_spec.rb} +7 -7
  171. data/spec/models/{create_session_request_spec.rb → south_africa_nid_input_spec.rb} +11 -11
  172. data/spec/models/step_refresh_info_spec.rb +48 -0
  173. data/spec/spec_helper.rb +1 -1
  174. data/trinsic_api.gemspec +1 -1
  175. metadata +173 -61
  176. data/docs/CreateSessionRequest.md +0 -24
  177. data/docs/DisclosedFields.md +0 -40
  178. data/docs/DisclosedFieldsRequest.md +0 -40
  179. data/docs/IdentityLookupResponse.md +0 -18
  180. data/docs/ValidationResult.md +0 -20
  181. data/docs/Verification.md +0 -20
  182. data/lib/trinsic_api/models/session_fail_code.rb +0 -45
  183. data/lib/trinsic_api/models/verification_fail_code.rb +0 -43
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #Connect API
2
+ #Trinsic API
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
@@ -14,26 +14,22 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module TrinsicApi
17
- class CreateSessionRequest
18
- # Whether to immediately launch the identity provider, without invoking the Trinsic Widget UI. Users will not be shown the Widget; therefore, reuse of credentials, selection of an identity provider, and saving a verification for future reuse are not available to the end user in this mode. Sessions created with this option enabled must be created with a `RedirectUrl` specified, and cannot be invoked using the frontend SDK at this time.
19
- attr_accessor :launch_provider_directly
17
+ class IndonesiaNikInput
18
+ # The user's full name
19
+ attr_accessor :full_name
20
20
 
21
- # Whether to enable Trinsic's \"Remember Me\" feature, which allows users to save their credentials for future use. This option is only relevant when `LaunchProviderDirectly` is unspecified or set to `false`. If `LaunchProviderDirectly` is `true`, this field must be unspecified or set to `false`. If this field is set to `true`, then: - The user will be prompted to authenticate with their phone number at the start of the flow - If the user has previously saved a verification for reuse with Trinsic, they will be offered the ability to reuse it - After the user has verified their identity (and if the identity provider in question supports it), they will be prompted to save their credentials for future use If this field is set to `false`, then: - The user will not be prompted to authenticate with their phone number at the start of the flow. - Instead, the user will be immediately shown the list of available providers - The user will not be offered the ability to reuse a previously-saved Trinsic credential - After the user has verified their identity, they will not be prompted to save their credentials for future use - Instead, they will immediately return to your product
22
- attr_accessor :enable_remember_me
21
+ # The user's date of birth, in `YYYY-MM-DD` format
22
+ attr_accessor :date_of_birth
23
23
 
24
- # The list of allowed identity providers. If not specified, all available providers will be allowed. If `LaunchMethodDirectly` is `true`, this field must be set, and must have only a single entry. If `LaunchMethodDirectly` is not specified or is `false`, this field may have any number of entries.
25
- attr_accessor :providers
26
-
27
- # Specific identity attributes to request. If not provided, all available attributes will be requested.
28
- attr_accessor :disclosed_fields
24
+ # The user's Indonesia NIK ID number
25
+ attr_accessor :nik_id_number
29
26
 
30
27
  # Attribute mapping from ruby-style variable name to JSON key.
31
28
  def self.attribute_map
32
29
  {
33
- :'launch_provider_directly' => :'launchProviderDirectly',
34
- :'enable_remember_me' => :'enableRememberMe',
35
- :'providers' => :'providers',
36
- :'disclosed_fields' => :'disclosedFields'
30
+ :'full_name' => :'fullName',
31
+ :'date_of_birth' => :'dateOfBirth',
32
+ :'nik_id_number' => :'nikIdNumber'
37
33
  }
38
34
  end
39
35
 
@@ -45,10 +41,9 @@ module TrinsicApi
45
41
  # Attribute type mapping.
46
42
  def self.openapi_types
47
43
  {
48
- :'launch_provider_directly' => :'Boolean',
49
- :'enable_remember_me' => :'Boolean',
50
- :'providers' => :'Array<String>',
51
- :'disclosed_fields' => :'DisclosedFieldsRequest'
44
+ :'full_name' => :'String',
45
+ :'date_of_birth' => :'Date',
46
+ :'nik_id_number' => :'String'
52
47
  }
53
48
  end
54
49
 
@@ -62,33 +57,33 @@ module TrinsicApi
62
57
  # @param [Hash] attributes Model attributes in the form of hash
63
58
  def initialize(attributes = {})
64
59
  if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::CreateSessionRequest` initialize method"
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::IndonesiaNikInput` initialize method"
66
61
  end
67
62
 
68
63
  # check to see if the attribute exists and convert string to symbol for hash key
69
64
  attributes = attributes.each_with_object({}) { |(k, v), h|
70
65
  if (!self.class.attribute_map.key?(k.to_sym))
71
- fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::CreateSessionRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::IndonesiaNikInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
67
  end
73
68
  h[k.to_sym] = v
74
69
  }
75
70
 
76
- if attributes.key?(:'launch_provider_directly')
77
- self.launch_provider_directly = attributes[:'launch_provider_directly']
78
- end
79
-
80
- if attributes.key?(:'enable_remember_me')
81
- self.enable_remember_me = attributes[:'enable_remember_me']
71
+ if attributes.key?(:'full_name')
72
+ self.full_name = attributes[:'full_name']
73
+ else
74
+ self.full_name = nil
82
75
  end
83
76
 
84
- if attributes.key?(:'providers')
85
- if (value = attributes[:'providers']).is_a?(Array)
86
- self.providers = value
87
- end
77
+ if attributes.key?(:'date_of_birth')
78
+ self.date_of_birth = attributes[:'date_of_birth']
79
+ else
80
+ self.date_of_birth = nil
88
81
  end
89
82
 
90
- if attributes.key?(:'disclosed_fields')
91
- self.disclosed_fields = attributes[:'disclosed_fields']
83
+ if attributes.key?(:'nik_id_number')
84
+ self.nik_id_number = attributes[:'nik_id_number']
85
+ else
86
+ self.nik_id_number = nil
92
87
  end
93
88
  end
94
89
 
@@ -97,6 +92,35 @@ module TrinsicApi
97
92
  def list_invalid_properties
98
93
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
94
  invalid_properties = Array.new
95
+ if @full_name.nil?
96
+ invalid_properties.push('invalid value for "full_name", full_name cannot be nil.')
97
+ end
98
+
99
+ if @full_name.to_s.length < 1
100
+ invalid_properties.push('invalid value for "full_name", the character length must be great than or equal to 1.')
101
+ end
102
+
103
+ if @date_of_birth.nil?
104
+ invalid_properties.push('invalid value for "date_of_birth", date_of_birth cannot be nil.')
105
+ end
106
+
107
+ if @nik_id_number.nil?
108
+ invalid_properties.push('invalid value for "nik_id_number", nik_id_number cannot be nil.')
109
+ end
110
+
111
+ if @nik_id_number.to_s.length > 16
112
+ invalid_properties.push('invalid value for "nik_id_number", the character length must be smaller than or equal to 16.')
113
+ end
114
+
115
+ if @nik_id_number.to_s.length < 16
116
+ invalid_properties.push('invalid value for "nik_id_number", the character length must be great than or equal to 16.')
117
+ end
118
+
119
+ pattern = Regexp.new(/^\d*$/)
120
+ if @nik_id_number !~ pattern
121
+ invalid_properties.push("invalid value for \"nik_id_number\", must conform to the pattern #{pattern}.")
122
+ end
123
+
100
124
  invalid_properties
101
125
  end
102
126
 
@@ -104,18 +128,61 @@ module TrinsicApi
104
128
  # @return true if the model is valid
105
129
  def valid?
106
130
  warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ return false if @full_name.nil?
132
+ return false if @full_name.to_s.length < 1
133
+ return false if @date_of_birth.nil?
134
+ return false if @nik_id_number.nil?
135
+ return false if @nik_id_number.to_s.length > 16
136
+ return false if @nik_id_number.to_s.length < 16
137
+ return false if @nik_id_number !~ Regexp.new(/^\d*$/)
107
138
  true
108
139
  end
109
140
 
141
+ # Custom attribute writer method with validation
142
+ # @param [Object] full_name Value to be assigned
143
+ def full_name=(full_name)
144
+ if full_name.nil?
145
+ fail ArgumentError, 'full_name cannot be nil'
146
+ end
147
+
148
+ if full_name.to_s.length < 1
149
+ fail ArgumentError, 'invalid value for "full_name", the character length must be great than or equal to 1.'
150
+ end
151
+
152
+ @full_name = full_name
153
+ end
154
+
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] nik_id_number Value to be assigned
157
+ def nik_id_number=(nik_id_number)
158
+ if nik_id_number.nil?
159
+ fail ArgumentError, 'nik_id_number cannot be nil'
160
+ end
161
+
162
+ if nik_id_number.to_s.length > 16
163
+ fail ArgumentError, 'invalid value for "nik_id_number", the character length must be smaller than or equal to 16.'
164
+ end
165
+
166
+ if nik_id_number.to_s.length < 16
167
+ fail ArgumentError, 'invalid value for "nik_id_number", the character length must be great than or equal to 16.'
168
+ end
169
+
170
+ pattern = Regexp.new(/^\d*$/)
171
+ if nik_id_number !~ pattern
172
+ fail ArgumentError, "invalid value for \"nik_id_number\", must conform to the pattern #{pattern}."
173
+ end
174
+
175
+ @nik_id_number = nik_id_number
176
+ end
177
+
110
178
  # Checks equality by comparing each attribute.
111
179
  # @param [Object] Object to be compared
112
180
  def ==(o)
113
181
  return true if self.equal?(o)
114
182
  self.class == o.class &&
115
- launch_provider_directly == o.launch_provider_directly &&
116
- enable_remember_me == o.enable_remember_me &&
117
- providers == o.providers &&
118
- disclosed_fields == o.disclosed_fields
183
+ full_name == o.full_name &&
184
+ date_of_birth == o.date_of_birth &&
185
+ nik_id_number == o.nik_id_number
119
186
  end
120
187
 
121
188
  # @see the `==` method
@@ -127,7 +194,7 @@ module TrinsicApi
127
194
  # Calculates hash code according to all attributes.
128
195
  # @return [Integer] Hash code
129
196
  def hash
130
- [launch_provider_directly, enable_remember_me, providers, disclosed_fields].hash
197
+ [full_name, date_of_birth, nik_id_number].hash
131
198
  end
132
199
 
133
200
  # Builds the object from hash
@@ -0,0 +1,44 @@
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
+ class IntegrationCapability
18
+ LAUNCH_BROWSER = "LaunchBrowser".freeze
19
+ DEEPLINK_TO_MOBILE = "DeeplinkToMobile".freeze
20
+ SHOW_CONTENT = "ShowContent".freeze
21
+ REFRESH_STEP_CONTENT = "RefreshStepContent".freeze
22
+ CAPTURE_REDIRECT = "CaptureRedirect".freeze
23
+ POLL_RESULT = "PollResult".freeze
24
+
25
+ def self.all_vars
26
+ @all_vars ||= [LAUNCH_BROWSER, DEEPLINK_TO_MOBILE, SHOW_CONTENT, REFRESH_STEP_CONTENT, CAPTURE_REDIRECT, POLL_RESULT].freeze
27
+ end
28
+
29
+ # Builds the enum from string
30
+ # @param [String] The enum value in the form of the string
31
+ # @return [String] The enum value
32
+ def self.build_from_hash(value)
33
+ new.build_from_hash(value)
34
+ end
35
+
36
+ # Builds the enum from string
37
+ # @param [String] The enum value in the form of the string
38
+ # @return [String] The enum value
39
+ def build_from_hash(value)
40
+ return value if IntegrationCapability.all_vars.include?(value)
41
+ raise "Invalid ENUM value #{value} for class #IntegrationCapability"
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,42 @@
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
+ class IntegrationLaunchMethod
18
+ LAUNCH_BROWSER = "LaunchBrowser".freeze
19
+ POLL_RESULT = "PollResult".freeze
20
+ DEEPLINK_TO_MOBILE = "DeeplinkToMobile".freeze
21
+ SHOW_CONTENT = "ShowContent".freeze
22
+
23
+ def self.all_vars
24
+ @all_vars ||= [LAUNCH_BROWSER, POLL_RESULT, DEEPLINK_TO_MOBILE, SHOW_CONTENT].freeze
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def self.build_from_hash(value)
31
+ new.build_from_hash(value)
32
+ end
33
+
34
+ # Builds the enum from string
35
+ # @param [String] The enum value in the form of the string
36
+ # @return [String] The enum value
37
+ def build_from_hash(value)
38
+ return value if IntegrationLaunchMethod.all_vars.include?(value)
39
+ raise "Invalid ENUM value #{value} for class #IntegrationLaunchMethod"
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,275 @@
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
+ # A step to perform in the process of executing an Advanced Provider Session
18
+ class IntegrationStep
19
+ # The launch method to perform
20
+ attr_accessor :method
21
+
22
+ # Step type-specific content related to the step: a URL for `LaunchBrowser`, a deeplink for `DeeplinkToMobile` or a string to show to the user for `ShowContent`.
23
+ attr_accessor :content
24
+
25
+ # If non-null, contains metadata about how to refresh the value of `content`.
26
+ attr_accessor :refresh
27
+
28
+ class EnumAttributeValidator
29
+ attr_reader :datatype
30
+ attr_reader :allowable_values
31
+
32
+ def initialize(datatype, allowable_values)
33
+ @allowable_values = allowable_values.map do |value|
34
+ case datatype.to_s
35
+ when /Integer/i
36
+ value.to_i
37
+ when /Float/i
38
+ value.to_f
39
+ else
40
+ value
41
+ end
42
+ end
43
+ end
44
+
45
+ def valid?(value)
46
+ !value || allowable_values.include?(value)
47
+ end
48
+ end
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ def self.attribute_map
52
+ {
53
+ :'method' => :'method',
54
+ :'content' => :'content',
55
+ :'refresh' => :'refresh'
56
+ }
57
+ end
58
+
59
+ # Returns all the JSON keys this model knows about
60
+ def self.acceptable_attributes
61
+ attribute_map.values
62
+ end
63
+
64
+ # Attribute type mapping.
65
+ def self.openapi_types
66
+ {
67
+ :'method' => :'IntegrationLaunchMethod',
68
+ :'content' => :'String',
69
+ :'refresh' => :'StepRefreshInfo'
70
+ }
71
+ end
72
+
73
+ # List of attributes with nullable: true
74
+ def self.openapi_nullable
75
+ Set.new([
76
+ :'refresh'
77
+ ])
78
+ end
79
+
80
+ # Initializes the object
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ def initialize(attributes = {})
83
+ if (!attributes.is_a?(Hash))
84
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::IntegrationStep` initialize method"
85
+ end
86
+
87
+ # check to see if the attribute exists and convert string to symbol for hash key
88
+ attributes = attributes.each_with_object({}) { |(k, v), h|
89
+ if (!self.class.attribute_map.key?(k.to_sym))
90
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::IntegrationStep`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
91
+ end
92
+ h[k.to_sym] = v
93
+ }
94
+
95
+ if attributes.key?(:'method')
96
+ self.method = attributes[:'method']
97
+ else
98
+ self.method = nil
99
+ end
100
+
101
+ if attributes.key?(:'content')
102
+ self.content = attributes[:'content']
103
+ else
104
+ self.content = nil
105
+ end
106
+
107
+ if attributes.key?(:'refresh')
108
+ self.refresh = attributes[:'refresh']
109
+ else
110
+ self.refresh = nil
111
+ end
112
+ end
113
+
114
+ # Show invalid properties with the reasons. Usually used together with valid?
115
+ # @return Array for valid properties with the reasons
116
+ def list_invalid_properties
117
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
118
+ invalid_properties = Array.new
119
+ if @method.nil?
120
+ invalid_properties.push('invalid value for "method", method cannot be nil.')
121
+ end
122
+
123
+ if @content.nil?
124
+ invalid_properties.push('invalid value for "content", content cannot be nil.')
125
+ end
126
+
127
+ invalid_properties
128
+ end
129
+
130
+ # Check to see if the all the properties in the model are valid
131
+ # @return true if the model is valid
132
+ def valid?
133
+ warn '[DEPRECATED] the `valid?` method is obsolete'
134
+ return false if @method.nil?
135
+ return false if @content.nil?
136
+ true
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ method == o.method &&
145
+ content == o.content &&
146
+ refresh == o.refresh
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] Object to be compared
151
+ def eql?(o)
152
+ self == o
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Integer] Hash code
157
+ def hash
158
+ [method, content, refresh].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def self.build_from_hash(attributes)
165
+ return nil unless attributes.is_a?(Hash)
166
+ attributes = attributes.transform_keys(&:to_sym)
167
+ transformed_hash = {}
168
+ openapi_types.each_pair do |key, type|
169
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
170
+ transformed_hash["#{key}"] = nil
171
+ elsif type =~ /\AArray<(.*)>/i
172
+ # check to ensure the input is an array given that the attribute
173
+ # is documented as an array but the input is not
174
+ if attributes[attribute_map[key]].is_a?(Array)
175
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
176
+ end
177
+ elsif !attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
179
+ end
180
+ end
181
+ new(transformed_hash)
182
+ end
183
+
184
+ # Deserializes the data based on type
185
+ # @param string type Data type
186
+ # @param string value Value to be deserialized
187
+ # @return [Object] Deserialized data
188
+ def self._deserialize(type, value)
189
+ case type.to_sym
190
+ when :Time
191
+ Time.parse(value)
192
+ when :Date
193
+ Date.parse(value)
194
+ when :String
195
+ value.to_s
196
+ when :Integer
197
+ value.to_i
198
+ when :Float
199
+ value.to_f
200
+ when :Boolean
201
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
202
+ true
203
+ else
204
+ false
205
+ end
206
+ when :Object
207
+ # generic object (usually a Hash), return directly
208
+ value
209
+ when /\AArray<(?<inner_type>.+)>\z/
210
+ inner_type = Regexp.last_match[:inner_type]
211
+ value.map { |v| _deserialize(inner_type, v) }
212
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
213
+ k_type = Regexp.last_match[:k_type]
214
+ v_type = Regexp.last_match[:v_type]
215
+ {}.tap do |hash|
216
+ value.each do |k, v|
217
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
218
+ end
219
+ end
220
+ else # model
221
+ # models (e.g. Pet) or oneOf
222
+ klass = TrinsicApi.const_get(type)
223
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
224
+ end
225
+ end
226
+
227
+ # Returns the string representation of the object
228
+ # @return [String] String presentation of the object
229
+ def to_s
230
+ to_hash.to_s
231
+ end
232
+
233
+ # to_body is an alias to to_hash (backward compatibility)
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_body
236
+ to_hash
237
+ end
238
+
239
+ # Returns the object in the form of hash
240
+ # @return [Hash] Returns the object in the form of hash
241
+ def to_hash
242
+ hash = {}
243
+ self.class.attribute_map.each_pair do |attr, param|
244
+ value = self.send(attr)
245
+ if value.nil?
246
+ is_nullable = self.class.openapi_nullable.include?(attr)
247
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
248
+ end
249
+
250
+ hash[param] = _to_hash(value)
251
+ end
252
+ hash
253
+ end
254
+
255
+ # Outputs non-array value in the form of hash
256
+ # For object, use to_hash. Otherwise, just return the value
257
+ # @param [Object] value Any valid value
258
+ # @return [Hash] Returns the value in the form of hash
259
+ def _to_hash(value)
260
+ if value.is_a?(Array)
261
+ value.compact.map { |v| _to_hash(v) }
262
+ elsif value.is_a?(Hash)
263
+ {}.tap do |hash|
264
+ value.each { |k, v| hash[k] = _to_hash(v) }
265
+ end
266
+ elsif value.respond_to? :to_hash
267
+ value.to_hash
268
+ else
269
+ value
270
+ end
271
+ end
272
+
273
+ end
274
+
275
+ end