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/NetworkApi.md
ADDED
@@ -0,0 +1,140 @@
|
|
1
|
+
# TrinsicApi::NetworkApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.trinsic.id*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**identity_lookup**](NetworkApi.md#identity_lookup) | **GET** /api/v1/network/identities/{phoneNumber} | Query the availability of an identity in the Trinsic Network by phone number |
|
8
|
+
| [**list_providers**](NetworkApi.md#list_providers) | **GET** /api/v1/network/providers | List all identity providers available for use |
|
9
|
+
|
10
|
+
|
11
|
+
## identity_lookup
|
12
|
+
|
13
|
+
> <IdentityLookupResponse> identity_lookup(phone_number)
|
14
|
+
|
15
|
+
Query the availability of an identity in the Trinsic Network by phone number
|
16
|
+
|
17
|
+
### Examples
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'time'
|
21
|
+
require 'trinsic_api'
|
22
|
+
# setup authorization
|
23
|
+
TrinsicApi.configure do |config|
|
24
|
+
# Configure Bearer authorization: Bearer
|
25
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
26
|
+
end
|
27
|
+
|
28
|
+
api_instance = TrinsicApi::NetworkApi.new
|
29
|
+
phone_number = 'phone_number_example' # String |
|
30
|
+
|
31
|
+
begin
|
32
|
+
# Query the availability of an identity in the Trinsic Network by phone number
|
33
|
+
result = api_instance.identity_lookup(phone_number)
|
34
|
+
p result
|
35
|
+
rescue TrinsicApi::ApiError => e
|
36
|
+
puts "Error when calling NetworkApi->identity_lookup: #{e}"
|
37
|
+
end
|
38
|
+
```
|
39
|
+
|
40
|
+
#### Using the identity_lookup_with_http_info variant
|
41
|
+
|
42
|
+
This returns an Array which contains the response data, status code and headers.
|
43
|
+
|
44
|
+
> <Array(<IdentityLookupResponse>, Integer, Hash)> identity_lookup_with_http_info(phone_number)
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
begin
|
48
|
+
# Query the availability of an identity in the Trinsic Network by phone number
|
49
|
+
data, status_code, headers = api_instance.identity_lookup_with_http_info(phone_number)
|
50
|
+
p status_code # => 2xx
|
51
|
+
p headers # => { ... }
|
52
|
+
p data # => <IdentityLookupResponse>
|
53
|
+
rescue TrinsicApi::ApiError => e
|
54
|
+
puts "Error when calling NetworkApi->identity_lookup_with_http_info: #{e}"
|
55
|
+
end
|
56
|
+
```
|
57
|
+
|
58
|
+
### Parameters
|
59
|
+
|
60
|
+
| Name | Type | Description | Notes |
|
61
|
+
| ---- | ---- | ----------- | ----- |
|
62
|
+
| **phone_number** | **String** | | |
|
63
|
+
|
64
|
+
### Return type
|
65
|
+
|
66
|
+
[**IdentityLookupResponse**](IdentityLookupResponse.md)
|
67
|
+
|
68
|
+
### Authorization
|
69
|
+
|
70
|
+
[Bearer](../README.md#Bearer)
|
71
|
+
|
72
|
+
### HTTP request headers
|
73
|
+
|
74
|
+
- **Content-Type**: Not defined
|
75
|
+
- **Accept**: text/plain, application/json, text/json
|
76
|
+
|
77
|
+
|
78
|
+
## list_providers
|
79
|
+
|
80
|
+
> <ListProvidersResponse> list_providers
|
81
|
+
|
82
|
+
List all identity providers available for use
|
83
|
+
|
84
|
+
### Examples
|
85
|
+
|
86
|
+
```ruby
|
87
|
+
require 'time'
|
88
|
+
require 'trinsic_api'
|
89
|
+
# setup authorization
|
90
|
+
TrinsicApi.configure do |config|
|
91
|
+
# Configure Bearer authorization: Bearer
|
92
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
93
|
+
end
|
94
|
+
|
95
|
+
api_instance = TrinsicApi::NetworkApi.new
|
96
|
+
|
97
|
+
begin
|
98
|
+
# List all identity providers available for use
|
99
|
+
result = api_instance.list_providers
|
100
|
+
p result
|
101
|
+
rescue TrinsicApi::ApiError => e
|
102
|
+
puts "Error when calling NetworkApi->list_providers: #{e}"
|
103
|
+
end
|
104
|
+
```
|
105
|
+
|
106
|
+
#### Using the list_providers_with_http_info variant
|
107
|
+
|
108
|
+
This returns an Array which contains the response data, status code and headers.
|
109
|
+
|
110
|
+
> <Array(<ListProvidersResponse>, Integer, Hash)> list_providers_with_http_info
|
111
|
+
|
112
|
+
```ruby
|
113
|
+
begin
|
114
|
+
# List all identity providers available for use
|
115
|
+
data, status_code, headers = api_instance.list_providers_with_http_info
|
116
|
+
p status_code # => 2xx
|
117
|
+
p headers # => { ... }
|
118
|
+
p data # => <ListProvidersResponse>
|
119
|
+
rescue TrinsicApi::ApiError => e
|
120
|
+
puts "Error when calling NetworkApi->list_providers_with_http_info: #{e}"
|
121
|
+
end
|
122
|
+
```
|
123
|
+
|
124
|
+
### Parameters
|
125
|
+
|
126
|
+
This endpoint does not need any parameter.
|
127
|
+
|
128
|
+
### Return type
|
129
|
+
|
130
|
+
[**ListProvidersResponse**](ListProvidersResponse.md)
|
131
|
+
|
132
|
+
### Authorization
|
133
|
+
|
134
|
+
[Bearer](../README.md#Bearer)
|
135
|
+
|
136
|
+
### HTTP request headers
|
137
|
+
|
138
|
+
- **Content-Type**: Not defined
|
139
|
+
- **Accept**: text/plain, application/json, text/json
|
140
|
+
|
data/docs/PersonData.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# TrinsicApi::PersonData
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **given_name** | **String** | Given (first) name of the individual | [optional] |
|
8
|
+
| **family_name** | **String** | Family (last) name of the individual | [optional] |
|
9
|
+
| **middle_name** | **String** | Middle name of the individual | [optional] |
|
10
|
+
| **full_name** | **String** | The individual's full name as a single string. Useful for names which do not fit into a \"first middle last\" structure. | [optional] |
|
11
|
+
| **nationality** | **String** | | [optional] |
|
12
|
+
| **gender** | **String** | | [optional] |
|
13
|
+
| **phone_number** | **String** | | [optional] |
|
14
|
+
| **address** | [**Address**](Address.md) | Address information for an individual | [optional] |
|
15
|
+
| **date_of_birth** | **String** | | [optional] |
|
16
|
+
|
17
|
+
## Example
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'trinsic_api'
|
21
|
+
|
22
|
+
instance = TrinsicApi::PersonData.new(
|
23
|
+
given_name: John,
|
24
|
+
family_name: Doe,
|
25
|
+
middle_name: Jacob,
|
26
|
+
full_name: John Jacob de Doe,
|
27
|
+
nationality: null,
|
28
|
+
gender: null,
|
29
|
+
phone_number: null,
|
30
|
+
address: null,
|
31
|
+
date_of_birth: null
|
32
|
+
)
|
33
|
+
```
|
34
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# TrinsicApi::ProviderInfo
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | The ID of the provider | |
|
8
|
+
| **name** | **String** | The friendly, human-readable name of the provider | |
|
9
|
+
| **logo_url** | **String** | A URL pointing to the provider's logo | |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'trinsic_api'
|
15
|
+
|
16
|
+
instance = TrinsicApi::ProviderInfo.new(
|
17
|
+
id: yoti | clear | ...,
|
18
|
+
name: Yoti | CLEAR | ...,
|
19
|
+
logo_url: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/docs/Session.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# TrinsicApi::Session
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | | |
|
8
|
+
| **state** | [**SessionState**](SessionState.md) | The state of the session | |
|
9
|
+
| **fail_code** | [**SessionFailCode**](SessionFailCode.md) | If the session is in state `IdvFailed`, this field contains the reason for failure. | [optional] |
|
10
|
+
| **verification** | [**Verification**](Verification.md) | The underlying verification for this Session | |
|
11
|
+
| **disclosed_fields** | [**DisclosedFields**](DisclosedFields.md) | The fields that were requested to be disclosed when the Session was created | |
|
12
|
+
| **created** | **Integer** | The unix timestamp, in seconds, when this session was created | |
|
13
|
+
| **updated** | **Integer** | The unix timestamp, in seconds, when this session's state last changed | |
|
14
|
+
|
15
|
+
## Example
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'trinsic_api'
|
19
|
+
|
20
|
+
instance = TrinsicApi::Session.new(
|
21
|
+
id: 678c1ff6-2178-49e7-81d2-548afb6f85ec,
|
22
|
+
state: null,
|
23
|
+
fail_code: null,
|
24
|
+
verification: null,
|
25
|
+
disclosed_fields: null,
|
26
|
+
created: 1722526411,
|
27
|
+
updated: 1722526722
|
28
|
+
)
|
29
|
+
```
|
30
|
+
|