trinsic_api 0.2.3
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 +7 -0
- data/Gemfile +9 -0
- data/README.md +137 -0
- data/Rakefile +10 -0
- data/docs/Address.md +32 -0
- data/docs/Attachments.md +24 -0
- data/docs/AttachmentsApi.md +76 -0
- data/docs/CancelSessionResponse.md +18 -0
- data/docs/CreateSessionRequest.md +22 -0
- data/docs/CreateSessionResponse.md +20 -0
- data/docs/DisclosedFields.md +40 -0
- data/docs/DisclosedFieldsRequest.md +40 -0
- data/docs/DocumentData.md +28 -0
- data/docs/ExchangeAttachmentAccessKeyRequest.md +18 -0
- data/docs/ExchangeResultsKeyRequest.md +18 -0
- data/docs/ExchangeResultsKeyResponse.md +20 -0
- data/docs/FailureMessage.md +18 -0
- data/docs/GetSessionResponse.md +18 -0
- data/docs/IdentityData.md +24 -0
- data/docs/IdentityLookupResponse.md +18 -0
- data/docs/ListProvidersResponse.md +18 -0
- data/docs/ListSessionsResponse.md +22 -0
- data/docs/NetworkApi.md +140 -0
- data/docs/OrderDirection.md +15 -0
- data/docs/PersonData.md +34 -0
- data/docs/ProviderInfo.md +22 -0
- data/docs/Session.md +30 -0
- data/docs/SessionFailCode.md +15 -0
- data/docs/SessionOrdering.md +15 -0
- data/docs/SessionState.md +15 -0
- data/docs/SessionsApi.md +428 -0
- data/docs/ValidationResult.md +20 -0
- data/docs/Verification.md +20 -0
- data/docs/VerificationFailCode.md +15 -0
- data/git_push.sh +57 -0
- data/lib/trinsic_api/api/attachments_api.rb +84 -0
- data/lib/trinsic_api/api/network_api.rb +138 -0
- data/lib/trinsic_api/api/sessions_api.rb +418 -0
- data/lib/trinsic_api/api_client.rb +394 -0
- data/lib/trinsic_api/api_error.rb +58 -0
- data/lib/trinsic_api/configuration.rb +308 -0
- data/lib/trinsic_api/models/address.rb +279 -0
- data/lib/trinsic_api/models/attachments.rb +246 -0
- data/lib/trinsic_api/models/cancel_session_response.rb +221 -0
- data/lib/trinsic_api/models/create_session_request.rb +237 -0
- data/lib/trinsic_api/models/create_session_response.rb +232 -0
- data/lib/trinsic_api/models/disclosed_fields.rb +397 -0
- data/lib/trinsic_api/models/disclosed_fields_request.rb +313 -0
- data/lib/trinsic_api/models/document_data.rb +259 -0
- data/lib/trinsic_api/models/exchange_attachment_access_key_request.rb +241 -0
- data/lib/trinsic_api/models/exchange_results_key_request.rb +222 -0
- data/lib/trinsic_api/models/exchange_results_key_response.rb +230 -0
- data/lib/trinsic_api/models/failure_message.rb +221 -0
- data/lib/trinsic_api/models/get_session_response.rb +221 -0
- data/lib/trinsic_api/models/identity_data.rb +245 -0
- data/lib/trinsic_api/models/identity_lookup_response.rb +222 -0
- data/lib/trinsic_api/models/list_providers_response.rb +224 -0
- data/lib/trinsic_api/models/list_sessions_response.rb +257 -0
- data/lib/trinsic_api/models/order_direction.rb +40 -0
- data/lib/trinsic_api/models/person_data.rb +292 -0
- data/lib/trinsic_api/models/provider_info.rb +257 -0
- data/lib/trinsic_api/models/session.rb +338 -0
- data/lib/trinsic_api/models/session_fail_code.rb +45 -0
- data/lib/trinsic_api/models/session_ordering.rb +41 -0
- data/lib/trinsic_api/models/session_state.rb +44 -0
- data/lib/trinsic_api/models/validation_result.rb +232 -0
- data/lib/trinsic_api/models/verification.rb +248 -0
- data/lib/trinsic_api/models/verification_fail_code.rb +43 -0
- data/lib/trinsic_api/version.rb +15 -0
- data/lib/trinsic_api.rb +69 -0
- data/spec/api/attachments_api_spec.rb +46 -0
- data/spec/api/network_api_spec.rb +56 -0
- data/spec/api/sessions_api_spec.rb +105 -0
- data/spec/models/address_spec.rb +78 -0
- data/spec/models/attachments_spec.rb +54 -0
- data/spec/models/cancel_session_response_spec.rb +36 -0
- data/spec/models/create_session_request_spec.rb +48 -0
- data/spec/models/create_session_response_spec.rb +42 -0
- data/spec/models/disclosed_fields_request_spec.rb +102 -0
- data/spec/models/disclosed_fields_spec.rb +102 -0
- data/spec/models/document_data_spec.rb +66 -0
- data/spec/models/exchange_attachment_access_key_request_spec.rb +36 -0
- data/spec/models/exchange_results_key_request_spec.rb +36 -0
- data/spec/models/exchange_results_key_response_spec.rb +42 -0
- data/spec/models/failure_message_spec.rb +36 -0
- data/spec/models/get_session_response_spec.rb +36 -0
- data/spec/models/identity_data_spec.rb +54 -0
- data/spec/models/identity_lookup_response_spec.rb +36 -0
- data/spec/models/list_providers_response_spec.rb +36 -0
- data/spec/models/list_sessions_response_spec.rb +48 -0
- data/spec/models/order_direction_spec.rb +30 -0
- data/spec/models/person_data_spec.rb +84 -0
- data/spec/models/provider_info_spec.rb +48 -0
- data/spec/models/session_fail_code_spec.rb +30 -0
- data/spec/models/session_ordering_spec.rb +30 -0
- data/spec/models/session_spec.rb +72 -0
- data/spec/models/session_state_spec.rb +30 -0
- data/spec/models/validation_result_spec.rb +42 -0
- data/spec/models/verification_fail_code_spec.rb +30 -0
- data/spec/models/verification_spec.rb +42 -0
- data/spec/spec_helper.rb +111 -0
- data/trinsic_api.gemspec +39 -0
- metadata +215 -0
data/docs/SessionsApi.md
ADDED
@@ -0,0 +1,428 @@
|
|
1
|
+
# TrinsicApi::SessionsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.trinsic.id*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**cancel_session**](SessionsApi.md#cancel_session) | **POST** /api/v1/sessions/{sessionId}/cancel | Cancel a Session by its ID |
|
8
|
+
| [**create_session**](SessionsApi.md#create_session) | **POST** /api/v1/sessions | Create a Session to verify a user's identity |
|
9
|
+
| [**exchange_results_key**](SessionsApi.md#exchange_results_key) | **POST** /api/v1/sessions/{sessionId}/results/exchange | Exchange a Results Access Key for Identity Data |
|
10
|
+
| [**get_session**](SessionsApi.md#get_session) | **GET** /api/v1/sessions/{sessionId} | Get a Session by its ID |
|
11
|
+
| [**list_sessions**](SessionsApi.md#list_sessions) | **GET** /api/v1/sessions | List Sessions created by your account |
|
12
|
+
| [**redact_session**](SessionsApi.md#redact_session) | **POST** /api/v1/sessions/{sessionId}/redact | Redact a Session, removing all identity data from Trinsic's servers. Identity data that a user has chosen to save in their passkey-protected wallet will not be deleted. |
|
13
|
+
|
14
|
+
|
15
|
+
## cancel_session
|
16
|
+
|
17
|
+
> <CancelSessionResponse> cancel_session(session_id)
|
18
|
+
|
19
|
+
Cancel a Session by its ID
|
20
|
+
|
21
|
+
### Examples
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'time'
|
25
|
+
require 'trinsic_api'
|
26
|
+
# setup authorization
|
27
|
+
TrinsicApi.configure do |config|
|
28
|
+
# Configure Bearer authorization: Bearer
|
29
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
30
|
+
end
|
31
|
+
|
32
|
+
api_instance = TrinsicApi::SessionsApi.new
|
33
|
+
session_id = 'session_id_example' # String |
|
34
|
+
|
35
|
+
begin
|
36
|
+
# Cancel a Session by its ID
|
37
|
+
result = api_instance.cancel_session(session_id)
|
38
|
+
p result
|
39
|
+
rescue TrinsicApi::ApiError => e
|
40
|
+
puts "Error when calling SessionsApi->cancel_session: #{e}"
|
41
|
+
end
|
42
|
+
```
|
43
|
+
|
44
|
+
#### Using the cancel_session_with_http_info variant
|
45
|
+
|
46
|
+
This returns an Array which contains the response data, status code and headers.
|
47
|
+
|
48
|
+
> <Array(<CancelSessionResponse>, Integer, Hash)> cancel_session_with_http_info(session_id)
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
begin
|
52
|
+
# Cancel a Session by its ID
|
53
|
+
data, status_code, headers = api_instance.cancel_session_with_http_info(session_id)
|
54
|
+
p status_code # => 2xx
|
55
|
+
p headers # => { ... }
|
56
|
+
p data # => <CancelSessionResponse>
|
57
|
+
rescue TrinsicApi::ApiError => e
|
58
|
+
puts "Error when calling SessionsApi->cancel_session_with_http_info: #{e}"
|
59
|
+
end
|
60
|
+
```
|
61
|
+
|
62
|
+
### Parameters
|
63
|
+
|
64
|
+
| Name | Type | Description | Notes |
|
65
|
+
| ---- | ---- | ----------- | ----- |
|
66
|
+
| **session_id** | **String** | | |
|
67
|
+
|
68
|
+
### Return type
|
69
|
+
|
70
|
+
[**CancelSessionResponse**](CancelSessionResponse.md)
|
71
|
+
|
72
|
+
### Authorization
|
73
|
+
|
74
|
+
[Bearer](../README.md#Bearer)
|
75
|
+
|
76
|
+
### HTTP request headers
|
77
|
+
|
78
|
+
- **Content-Type**: Not defined
|
79
|
+
- **Accept**: text/plain, application/json, text/json
|
80
|
+
|
81
|
+
|
82
|
+
## create_session
|
83
|
+
|
84
|
+
> <CreateSessionResponse> create_session(opts)
|
85
|
+
|
86
|
+
Create a Session to verify a user's identity
|
87
|
+
|
88
|
+
### Examples
|
89
|
+
|
90
|
+
```ruby
|
91
|
+
require 'time'
|
92
|
+
require 'trinsic_api'
|
93
|
+
# setup authorization
|
94
|
+
TrinsicApi.configure do |config|
|
95
|
+
# Configure Bearer authorization: Bearer
|
96
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
97
|
+
end
|
98
|
+
|
99
|
+
api_instance = TrinsicApi::SessionsApi.new
|
100
|
+
opts = {
|
101
|
+
create_session_request: TrinsicApi::CreateSessionRequest.new # CreateSessionRequest |
|
102
|
+
}
|
103
|
+
|
104
|
+
begin
|
105
|
+
# Create a Session to verify a user's identity
|
106
|
+
result = api_instance.create_session(opts)
|
107
|
+
p result
|
108
|
+
rescue TrinsicApi::ApiError => e
|
109
|
+
puts "Error when calling SessionsApi->create_session: #{e}"
|
110
|
+
end
|
111
|
+
```
|
112
|
+
|
113
|
+
#### Using the create_session_with_http_info variant
|
114
|
+
|
115
|
+
This returns an Array which contains the response data, status code and headers.
|
116
|
+
|
117
|
+
> <Array(<CreateSessionResponse>, Integer, Hash)> create_session_with_http_info(opts)
|
118
|
+
|
119
|
+
```ruby
|
120
|
+
begin
|
121
|
+
# Create a Session to verify a user's identity
|
122
|
+
data, status_code, headers = api_instance.create_session_with_http_info(opts)
|
123
|
+
p status_code # => 2xx
|
124
|
+
p headers # => { ... }
|
125
|
+
p data # => <CreateSessionResponse>
|
126
|
+
rescue TrinsicApi::ApiError => e
|
127
|
+
puts "Error when calling SessionsApi->create_session_with_http_info: #{e}"
|
128
|
+
end
|
129
|
+
```
|
130
|
+
|
131
|
+
### Parameters
|
132
|
+
|
133
|
+
| Name | Type | Description | Notes |
|
134
|
+
| ---- | ---- | ----------- | ----- |
|
135
|
+
| **create_session_request** | [**CreateSessionRequest**](CreateSessionRequest.md) | | [optional] |
|
136
|
+
|
137
|
+
### Return type
|
138
|
+
|
139
|
+
[**CreateSessionResponse**](CreateSessionResponse.md)
|
140
|
+
|
141
|
+
### Authorization
|
142
|
+
|
143
|
+
[Bearer](../README.md#Bearer)
|
144
|
+
|
145
|
+
### HTTP request headers
|
146
|
+
|
147
|
+
- **Content-Type**: application/json, text/json, application/*+json
|
148
|
+
- **Accept**: text/plain, application/json, text/json
|
149
|
+
|
150
|
+
|
151
|
+
## exchange_results_key
|
152
|
+
|
153
|
+
> <ExchangeResultsKeyResponse> exchange_results_key(session_id, opts)
|
154
|
+
|
155
|
+
Exchange a Results Access Key for Identity Data
|
156
|
+
|
157
|
+
### Examples
|
158
|
+
|
159
|
+
```ruby
|
160
|
+
require 'time'
|
161
|
+
require 'trinsic_api'
|
162
|
+
# setup authorization
|
163
|
+
TrinsicApi.configure do |config|
|
164
|
+
# Configure Bearer authorization: Bearer
|
165
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
166
|
+
end
|
167
|
+
|
168
|
+
api_instance = TrinsicApi::SessionsApi.new
|
169
|
+
session_id = 'session_id_example' # String |
|
170
|
+
opts = {
|
171
|
+
exchange_results_key_request: TrinsicApi::ExchangeResultsKeyRequest.new({results_access_key: 'results_access_key_example'}) # ExchangeResultsKeyRequest |
|
172
|
+
}
|
173
|
+
|
174
|
+
begin
|
175
|
+
# Exchange a Results Access Key for Identity Data
|
176
|
+
result = api_instance.exchange_results_key(session_id, opts)
|
177
|
+
p result
|
178
|
+
rescue TrinsicApi::ApiError => e
|
179
|
+
puts "Error when calling SessionsApi->exchange_results_key: #{e}"
|
180
|
+
end
|
181
|
+
```
|
182
|
+
|
183
|
+
#### Using the exchange_results_key_with_http_info variant
|
184
|
+
|
185
|
+
This returns an Array which contains the response data, status code and headers.
|
186
|
+
|
187
|
+
> <Array(<ExchangeResultsKeyResponse>, Integer, Hash)> exchange_results_key_with_http_info(session_id, opts)
|
188
|
+
|
189
|
+
```ruby
|
190
|
+
begin
|
191
|
+
# Exchange a Results Access Key for Identity Data
|
192
|
+
data, status_code, headers = api_instance.exchange_results_key_with_http_info(session_id, opts)
|
193
|
+
p status_code # => 2xx
|
194
|
+
p headers # => { ... }
|
195
|
+
p data # => <ExchangeResultsKeyResponse>
|
196
|
+
rescue TrinsicApi::ApiError => e
|
197
|
+
puts "Error when calling SessionsApi->exchange_results_key_with_http_info: #{e}"
|
198
|
+
end
|
199
|
+
```
|
200
|
+
|
201
|
+
### Parameters
|
202
|
+
|
203
|
+
| Name | Type | Description | Notes |
|
204
|
+
| ---- | ---- | ----------- | ----- |
|
205
|
+
| **session_id** | **String** | | |
|
206
|
+
| **exchange_results_key_request** | [**ExchangeResultsKeyRequest**](ExchangeResultsKeyRequest.md) | | [optional] |
|
207
|
+
|
208
|
+
### Return type
|
209
|
+
|
210
|
+
[**ExchangeResultsKeyResponse**](ExchangeResultsKeyResponse.md)
|
211
|
+
|
212
|
+
### Authorization
|
213
|
+
|
214
|
+
[Bearer](../README.md#Bearer)
|
215
|
+
|
216
|
+
### HTTP request headers
|
217
|
+
|
218
|
+
- **Content-Type**: application/json, text/json, application/*+json
|
219
|
+
- **Accept**: text/plain, application/json, text/json
|
220
|
+
|
221
|
+
|
222
|
+
## get_session
|
223
|
+
|
224
|
+
> <GetSessionResponse> get_session(session_id)
|
225
|
+
|
226
|
+
Get a Session by its ID
|
227
|
+
|
228
|
+
### Examples
|
229
|
+
|
230
|
+
```ruby
|
231
|
+
require 'time'
|
232
|
+
require 'trinsic_api'
|
233
|
+
# setup authorization
|
234
|
+
TrinsicApi.configure do |config|
|
235
|
+
# Configure Bearer authorization: Bearer
|
236
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
237
|
+
end
|
238
|
+
|
239
|
+
api_instance = TrinsicApi::SessionsApi.new
|
240
|
+
session_id = 'session_id_example' # String |
|
241
|
+
|
242
|
+
begin
|
243
|
+
# Get a Session by its ID
|
244
|
+
result = api_instance.get_session(session_id)
|
245
|
+
p result
|
246
|
+
rescue TrinsicApi::ApiError => e
|
247
|
+
puts "Error when calling SessionsApi->get_session: #{e}"
|
248
|
+
end
|
249
|
+
```
|
250
|
+
|
251
|
+
#### Using the get_session_with_http_info variant
|
252
|
+
|
253
|
+
This returns an Array which contains the response data, status code and headers.
|
254
|
+
|
255
|
+
> <Array(<GetSessionResponse>, Integer, Hash)> get_session_with_http_info(session_id)
|
256
|
+
|
257
|
+
```ruby
|
258
|
+
begin
|
259
|
+
# Get a Session by its ID
|
260
|
+
data, status_code, headers = api_instance.get_session_with_http_info(session_id)
|
261
|
+
p status_code # => 2xx
|
262
|
+
p headers # => { ... }
|
263
|
+
p data # => <GetSessionResponse>
|
264
|
+
rescue TrinsicApi::ApiError => e
|
265
|
+
puts "Error when calling SessionsApi->get_session_with_http_info: #{e}"
|
266
|
+
end
|
267
|
+
```
|
268
|
+
|
269
|
+
### Parameters
|
270
|
+
|
271
|
+
| Name | Type | Description | Notes |
|
272
|
+
| ---- | ---- | ----------- | ----- |
|
273
|
+
| **session_id** | **String** | | |
|
274
|
+
|
275
|
+
### Return type
|
276
|
+
|
277
|
+
[**GetSessionResponse**](GetSessionResponse.md)
|
278
|
+
|
279
|
+
### Authorization
|
280
|
+
|
281
|
+
[Bearer](../README.md#Bearer)
|
282
|
+
|
283
|
+
### HTTP request headers
|
284
|
+
|
285
|
+
- **Content-Type**: Not defined
|
286
|
+
- **Accept**: text/plain, application/json, text/json
|
287
|
+
|
288
|
+
|
289
|
+
## list_sessions
|
290
|
+
|
291
|
+
> <ListSessionsResponse> list_sessions(opts)
|
292
|
+
|
293
|
+
List Sessions created by your account
|
294
|
+
|
295
|
+
### Examples
|
296
|
+
|
297
|
+
```ruby
|
298
|
+
require 'time'
|
299
|
+
require 'trinsic_api'
|
300
|
+
# setup authorization
|
301
|
+
TrinsicApi.configure do |config|
|
302
|
+
# Configure Bearer authorization: Bearer
|
303
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
304
|
+
end
|
305
|
+
|
306
|
+
api_instance = TrinsicApi::SessionsApi.new
|
307
|
+
opts = {
|
308
|
+
order_by: TrinsicApi::SessionOrdering::CREATED, # SessionOrdering | The field by which sessions should be ordered
|
309
|
+
order_direction: TrinsicApi::OrderDirection::ASCENDING, # OrderDirection |
|
310
|
+
page_size: 50, # Integer | The number of items to return per page -- must be between `1` and `50`
|
311
|
+
page: 1 # Integer | The page number to return -- starts at `1`
|
312
|
+
}
|
313
|
+
|
314
|
+
begin
|
315
|
+
# List Sessions created by your account
|
316
|
+
result = api_instance.list_sessions(opts)
|
317
|
+
p result
|
318
|
+
rescue TrinsicApi::ApiError => e
|
319
|
+
puts "Error when calling SessionsApi->list_sessions: #{e}"
|
320
|
+
end
|
321
|
+
```
|
322
|
+
|
323
|
+
#### Using the list_sessions_with_http_info variant
|
324
|
+
|
325
|
+
This returns an Array which contains the response data, status code and headers.
|
326
|
+
|
327
|
+
> <Array(<ListSessionsResponse>, Integer, Hash)> list_sessions_with_http_info(opts)
|
328
|
+
|
329
|
+
```ruby
|
330
|
+
begin
|
331
|
+
# List Sessions created by your account
|
332
|
+
data, status_code, headers = api_instance.list_sessions_with_http_info(opts)
|
333
|
+
p status_code # => 2xx
|
334
|
+
p headers # => { ... }
|
335
|
+
p data # => <ListSessionsResponse>
|
336
|
+
rescue TrinsicApi::ApiError => e
|
337
|
+
puts "Error when calling SessionsApi->list_sessions_with_http_info: #{e}"
|
338
|
+
end
|
339
|
+
```
|
340
|
+
|
341
|
+
### Parameters
|
342
|
+
|
343
|
+
| Name | Type | Description | Notes |
|
344
|
+
| ---- | ---- | ----------- | ----- |
|
345
|
+
| **order_by** | [**SessionOrdering**](.md) | The field by which sessions should be ordered | [optional] |
|
346
|
+
| **order_direction** | [**OrderDirection**](.md) | | [optional] |
|
347
|
+
| **page_size** | **Integer** | The number of items to return per page -- must be between `1` and `50` | [optional] |
|
348
|
+
| **page** | **Integer** | The page number to return -- starts at `1` | [optional] |
|
349
|
+
|
350
|
+
### Return type
|
351
|
+
|
352
|
+
[**ListSessionsResponse**](ListSessionsResponse.md)
|
353
|
+
|
354
|
+
### Authorization
|
355
|
+
|
356
|
+
[Bearer](../README.md#Bearer)
|
357
|
+
|
358
|
+
### HTTP request headers
|
359
|
+
|
360
|
+
- **Content-Type**: Not defined
|
361
|
+
- **Accept**: text/plain, application/json, text/json
|
362
|
+
|
363
|
+
|
364
|
+
## redact_session
|
365
|
+
|
366
|
+
> redact_session(session_id)
|
367
|
+
|
368
|
+
Redact a Session, removing all identity data from Trinsic's servers. Identity data that a user has chosen to save in their passkey-protected wallet will not be deleted.
|
369
|
+
|
370
|
+
### Examples
|
371
|
+
|
372
|
+
```ruby
|
373
|
+
require 'time'
|
374
|
+
require 'trinsic_api'
|
375
|
+
# setup authorization
|
376
|
+
TrinsicApi.configure do |config|
|
377
|
+
# Configure Bearer authorization: Bearer
|
378
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
379
|
+
end
|
380
|
+
|
381
|
+
api_instance = TrinsicApi::SessionsApi.new
|
382
|
+
session_id = 'session_id_example' # String |
|
383
|
+
|
384
|
+
begin
|
385
|
+
# Redact a Session, removing all identity data from Trinsic's servers. Identity data that a user has chosen to save in their passkey-protected wallet will not be deleted.
|
386
|
+
api_instance.redact_session(session_id)
|
387
|
+
rescue TrinsicApi::ApiError => e
|
388
|
+
puts "Error when calling SessionsApi->redact_session: #{e}"
|
389
|
+
end
|
390
|
+
```
|
391
|
+
|
392
|
+
#### Using the redact_session_with_http_info variant
|
393
|
+
|
394
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
395
|
+
|
396
|
+
> <Array(nil, Integer, Hash)> redact_session_with_http_info(session_id)
|
397
|
+
|
398
|
+
```ruby
|
399
|
+
begin
|
400
|
+
# Redact a Session, removing all identity data from Trinsic's servers. Identity data that a user has chosen to save in their passkey-protected wallet will not be deleted.
|
401
|
+
data, status_code, headers = api_instance.redact_session_with_http_info(session_id)
|
402
|
+
p status_code # => 2xx
|
403
|
+
p headers # => { ... }
|
404
|
+
p data # => nil
|
405
|
+
rescue TrinsicApi::ApiError => e
|
406
|
+
puts "Error when calling SessionsApi->redact_session_with_http_info: #{e}"
|
407
|
+
end
|
408
|
+
```
|
409
|
+
|
410
|
+
### Parameters
|
411
|
+
|
412
|
+
| Name | Type | Description | Notes |
|
413
|
+
| ---- | ---- | ----------- | ----- |
|
414
|
+
| **session_id** | **String** | | |
|
415
|
+
|
416
|
+
### Return type
|
417
|
+
|
418
|
+
nil (empty response body)
|
419
|
+
|
420
|
+
### Authorization
|
421
|
+
|
422
|
+
[Bearer](../README.md#Bearer)
|
423
|
+
|
424
|
+
### HTTP request headers
|
425
|
+
|
426
|
+
- **Content-Type**: Not defined
|
427
|
+
- **Accept**: application/json
|
428
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TrinsicApi::ValidationResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **member_names** | **Array<String>** | | [readonly] |
|
8
|
+
| **error_message** | **String** | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'trinsic_api'
|
14
|
+
|
15
|
+
instance = TrinsicApi::ValidationResult.new(
|
16
|
+
member_names: null,
|
17
|
+
error_message: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TrinsicApi::Verification
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **provider** | **String** | The identity provider that was used to perform the Verification, if any | [optional] |
|
8
|
+
| **fail_code** | [**VerificationFailCode**](VerificationFailCode.md) | If the Verification is in state `VerificationFailed`, this field contains the reason for failure | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'trinsic_api'
|
14
|
+
|
15
|
+
instance = TrinsicApi::Verification.new(
|
16
|
+
provider: null,
|
17
|
+
fail_code: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# TrinsicApi::VerificationFailCode
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
|
8
|
+
## Example
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'trinsic_api'
|
12
|
+
|
13
|
+
instance = TrinsicApi::VerificationFailCode.new()
|
14
|
+
```
|
15
|
+
|
data/git_push.sh
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
3
|
+
#
|
4
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
5
|
+
|
6
|
+
git_user_id=$1
|
7
|
+
git_repo_id=$2
|
8
|
+
release_note=$3
|
9
|
+
git_host=$4
|
10
|
+
|
11
|
+
if [ "$git_host" = "" ]; then
|
12
|
+
git_host="github.com"
|
13
|
+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
14
|
+
fi
|
15
|
+
|
16
|
+
if [ "$git_user_id" = "" ]; then
|
17
|
+
git_user_id="GIT_USER_ID"
|
18
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
19
|
+
fi
|
20
|
+
|
21
|
+
if [ "$git_repo_id" = "" ]; then
|
22
|
+
git_repo_id="GIT_REPO_ID"
|
23
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
24
|
+
fi
|
25
|
+
|
26
|
+
if [ "$release_note" = "" ]; then
|
27
|
+
release_note="Minor update"
|
28
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
29
|
+
fi
|
30
|
+
|
31
|
+
# Initialize the local directory as a Git repository
|
32
|
+
git init
|
33
|
+
|
34
|
+
# Adds the files in the local repository and stages them for commit.
|
35
|
+
git add .
|
36
|
+
|
37
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
38
|
+
git commit -m "$release_note"
|
39
|
+
|
40
|
+
# Sets the new remote
|
41
|
+
git_remote=$(git remote)
|
42
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
43
|
+
|
44
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
45
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
46
|
+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
47
|
+
else
|
48
|
+
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
49
|
+
fi
|
50
|
+
|
51
|
+
fi
|
52
|
+
|
53
|
+
git pull origin master
|
54
|
+
|
55
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
56
|
+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
57
|
+
git push origin master 2>&1 | grep -v 'To https'
|
@@ -0,0 +1,84 @@
|
|
1
|
+
=begin
|
2
|
+
#Connect 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.7.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module TrinsicApi
|
16
|
+
class AttachmentsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the attachment. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant. In some cases, attachments may not be immediately available after a verification is completed. If so, this endpoint will return an HTTP 202 code, and you should try again later.
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @option opts [ExchangeAttachmentAccessKeyRequest] :exchange_attachment_access_key_request
|
25
|
+
# @return [nil]
|
26
|
+
def exchange_attachment_access_key(opts = {})
|
27
|
+
exchange_attachment_access_key_with_http_info(opts)
|
28
|
+
nil
|
29
|
+
end
|
30
|
+
|
31
|
+
# Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the attachment. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant. In some cases, attachments may not be immediately available after a verification is completed. If so, this endpoint will return an HTTP 202 code, and you should try again later.
|
32
|
+
# @param [Hash] opts the optional parameters
|
33
|
+
# @option opts [ExchangeAttachmentAccessKeyRequest] :exchange_attachment_access_key_request
|
34
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
35
|
+
def exchange_attachment_access_key_with_http_info(opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: AttachmentsApi.exchange_attachment_access_key ...'
|
38
|
+
end
|
39
|
+
# resource path
|
40
|
+
local_var_path = '/api/v1/attachments/exchange'
|
41
|
+
|
42
|
+
# query parameters
|
43
|
+
query_params = opts[:query_params] || {}
|
44
|
+
|
45
|
+
# header parameters
|
46
|
+
header_params = opts[:header_params] || {}
|
47
|
+
# HTTP header 'Accept' (if needed)
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
49
|
+
# HTTP header 'Content-Type'
|
50
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
|
51
|
+
if !content_type.nil?
|
52
|
+
header_params['Content-Type'] = content_type
|
53
|
+
end
|
54
|
+
|
55
|
+
# form parameters
|
56
|
+
form_params = opts[:form_params] || {}
|
57
|
+
|
58
|
+
# http body (model)
|
59
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'exchange_attachment_access_key_request'])
|
60
|
+
|
61
|
+
# return_type
|
62
|
+
return_type = opts[:debug_return_type]
|
63
|
+
|
64
|
+
# auth_names
|
65
|
+
auth_names = opts[:debug_auth_names] || ['Bearer']
|
66
|
+
|
67
|
+
new_options = opts.merge(
|
68
|
+
:operation => :"AttachmentsApi.exchange_attachment_access_key",
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => return_type
|
75
|
+
)
|
76
|
+
|
77
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: AttachmentsApi#exchange_attachment_access_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|