trinsic_api 1.0.0 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2dfa1673bc3c15db37e252b2ffcda469f8d87c2ab86e4a916ed7ba59df70609c
4
- data.tar.gz: 8157e0b1460965f9dfa48b8702783dc13dc7b81f2fd6368829ce1b883ba2d8ce
3
+ metadata.gz: 19ee776fbe38a47650e1e3bdee0884ed5de859308a269779b4ba27ca04d3e965
4
+ data.tar.gz: 24e3e576b85b62a9d3ff2d9d9f5dc879f80f3d4bdcffa9b7d7d3c4696630c7c6
5
5
  SHA512:
6
- metadata.gz: a0907f19f741a20b3d9c1012bd208c27c21fb1703e21ea7c054021fd93f057d238b7a141fa039fe79a0496932305c0b54fb7c6b9bfc1118733d30ec20673684f
7
- data.tar.gz: 76d776c45014e61b9ba34f713686cd52edae1df84c3abc10bf394accb7ecb5e37ca28bf89a9894baebce8b236d5e066f87fcd699616f57b80ef1967c28c4a849
6
+ metadata.gz: 53ec014f18bd5b36b451d0c3205857e1242a020b4a0eca6d156433cad78285b78e87e830c2b028e757fa24e2cc8b8cb6e3b64ba6ae4f8a883a6f66da3161d8e1
7
+ data.tar.gz: 9f8b6858c4307a06d28e836d1bffc1218652d26b61370a61d86ede011b38e070991c5d072a03894f5e4a0f369d3f7e3c4d3553b223b0717348b44e031171a114
data/README.md CHANGED
@@ -3,8 +3,7 @@
3
3
  ![Version](https://img.shields.io/gem/v/trinsic_api)
4
4
  [![Build Status](https://github.com/trinsic-id/sdk/actions/workflows/api-ruby-release.yml/badge.svg)](https://github.com/trinsic-id/sdk/actions?query=branch%main)
5
5
 
6
- The Trinsic API Ruby library provides convenient access to the Trinsic API from
7
- applications written in Ruby.
6
+ The Trinsic API Ruby library provides convenient access to the Trinsic API from applications written in Ruby.
8
7
 
9
8
  ## Documentation
10
9
 
@@ -26,30 +25,39 @@ gem 'trinsic_api'
26
25
 
27
26
  ## Usage
28
27
 
29
- The package needs to be configured with your app's access token, which is
30
- available in the [Trinsic Dashboard](https://dashboard.trinsic.id).
28
+ The package needs to be configured with your app's access token, which is available in the [Trinsic Dashboard](https://dashboard.trinsic.id).
31
29
 
32
30
  <!-- TODO: add simple usage here -->
33
31
 
34
32
  ```rb
33
+ TrinsicApi.configure do |config|
34
+ config.access_token = ENV['TRINSIC_ACCESS_TOKEN']
35
+ end
35
36
 
37
+ attachments = TrinsicApi::AttachmentsApi.new
38
+ network = TrinsicApi::NetworkApi.new
39
+ sessions = TrinsicApi::SessionsApi.new
40
+
41
+ sessions.create_session({})
36
42
  ```
37
43
 
38
44
  You can find a full Ruby server example in the [samples](https://github.com/trinsic-id/sdk/tree/main/api-ruby/samples) folder.
39
45
 
40
46
  ## SDK Versioning
41
47
 
42
- Trinsic follows a Semantic Versioning (SemVer) process where all releases will have a version X.Y.Z (like 1.0.0) pattern wherein Z would be a bug fix (e.g., 1.0.1), Y would be a minor release (1.1.0) and X would be a major release (2.0.0). We permit any breaking changes to only be released in major versions and strongly recommend reading changelogs before making any major version upgrades.
48
+ Our SDKs follow the [Semantic Versioning](https://semver.org) ("SemVer") scheme.
43
49
 
44
- ## Support
50
+ For example, the version number `1.13.0` has a major version of `1`, a minor version of `13`, and a patch version of `0`.
45
51
 
46
- New features and bug fixes are released on the latest major version of the package. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
52
+ Breaking changes are only introduced alongside a new major version.
53
+
54
+ ## Support
47
55
 
48
56
  Any issues, inquiries, and feature requests can be sent to [support@trinsic.id](mailto:support@trinsic.id), or feel free to open a GitHub issue [here](https://github.com/trinsic-id/sdk/issues).
49
57
 
50
58
  ## More Information
51
59
 
52
60
  - [API Reference](https://docs.trinsic.id/reference)
53
- - [Developer Guide](https://github.com/stripe/stripe-node/wiki/Passing-Options)
61
+ - [Developer Guide](https://docs.trinsic.id/docs/developer-tools)
54
62
  - [Our Blog](https://trinsic.id/blog/)
55
63
  - [Schedule a demo](https://trinsic.id/contact/)
@@ -1,4 +1,4 @@
1
- # TrinsicApi::Attachments
1
+ # TrinsicApi::AttachmentAccessKeys
2
2
 
3
3
  ## Properties
4
4
 
@@ -14,7 +14,7 @@
14
14
  ```ruby
15
15
  require 'trinsic_api'
16
16
 
17
- instance = TrinsicApi::Attachments.new(
17
+ instance = TrinsicApi::AttachmentAccessKeys.new(
18
18
  selfie: null,
19
19
  document_front: null,
20
20
  document_back: null,
@@ -9,11 +9,11 @@ All URIs are relative to *https://api.trinsic.id*
9
9
 
10
10
  ## get_attachment
11
11
 
12
- > get_attachment(opts)
12
+ > <GetAttachmentResponse> get_attachment(opts)
13
13
 
14
14
  Get Attachment
15
15
 
16
- 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.
16
+ 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 503 code, and you should try again later.
17
17
 
18
18
  ### Examples
19
19
 
@@ -33,7 +33,8 @@ opts = {
33
33
 
34
34
  begin
35
35
  # Get Attachment
36
- api_instance.get_attachment(opts)
36
+ result = api_instance.get_attachment(opts)
37
+ p result
37
38
  rescue TrinsicApi::ApiError => e
38
39
  puts "Error when calling AttachmentsApi->get_attachment: #{e}"
39
40
  end
@@ -41,9 +42,9 @@ end
41
42
 
42
43
  #### Using the get_attachment_with_http_info variant
43
44
 
44
- This returns an Array which contains the response data (`nil` in this case), status code and headers.
45
+ This returns an Array which contains the response data, status code and headers.
45
46
 
46
- > <Array(nil, Integer, Hash)> get_attachment_with_http_info(opts)
47
+ > <Array(<GetAttachmentResponse>, Integer, Hash)> get_attachment_with_http_info(opts)
47
48
 
48
49
  ```ruby
49
50
  begin
@@ -51,7 +52,7 @@ begin
51
52
  data, status_code, headers = api_instance.get_attachment_with_http_info(opts)
52
53
  p status_code # => 2xx
53
54
  p headers # => { ... }
54
- p data # => nil
55
+ p data # => <GetAttachmentResponse>
55
56
  rescue TrinsicApi::ApiError => e
56
57
  puts "Error when calling AttachmentsApi->get_attachment_with_http_info: #{e}"
57
58
  end
@@ -65,7 +66,7 @@ end
65
66
 
66
67
  ### Return type
67
68
 
68
- nil (empty response body)
69
+ [**GetAttachmentResponse**](GetAttachmentResponse.md)
69
70
 
70
71
  ### Authorization
71
72
 
@@ -74,5 +75,5 @@ nil (empty response body)
74
75
  ### HTTP request headers
75
76
 
76
77
  - **Content-Type**: application/json, text/json, application/*+json
77
- - **Accept**: application/json
78
+ - **Accept**: text/plain, application/json, text/json
78
79
 
@@ -0,0 +1,20 @@
1
+ # TrinsicApi::GetAttachmentResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **content** | **String** | The raw file contents of the Attachment | |
8
+ | **content_type** | **String** | The MIME type of the Attachment data | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'trinsic_api'
14
+
15
+ instance = TrinsicApi::GetAttachmentResponse.new(
16
+ content: null,
17
+ content_type: null
18
+ )
19
+ ```
20
+
data/docs/IdentityData.md CHANGED
@@ -7,7 +7,7 @@
7
7
  | **originating_provider_id** | **String** | The ID of the integration from which this data originated (eg \&quot;yoti\&quot;, \&quot;clear\&quot;) | [optional] |
8
8
  | **person** | [**PersonData**](PersonData.md) | Identity data of the individual who was verified | [optional] |
9
9
  | **document** | [**DocumentData**](DocumentData.md) | Identity data of the document involved in verification, if relevant | [optional] |
10
- | **attachments** | [**Attachments**](Attachments.md) | Access keys for attachments (eg document/selfie images) | [optional] |
10
+ | **attachment_access_keys** | [**AttachmentAccessKeys**](AttachmentAccessKeys.md) | Attachment Access Keys for attachments (eg document / selfie images) | [optional] |
11
11
 
12
12
  ## Example
13
13
 
@@ -18,7 +18,7 @@ instance = TrinsicApi::IdentityData.new(
18
18
  originating_provider_id: null,
19
19
  person: null,
20
20
  document: null,
21
- attachments: null
21
+ attachment_access_keys: null
22
22
  )
23
23
  ```
24
24
 
@@ -20,20 +20,20 @@ module TrinsicApi
20
20
  @api_client = api_client
21
21
  end
22
22
  # Get Attachment
23
- # 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
+ # 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 503 code, and you should try again later.
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @option opts [GetAttachmentRequest] :get_attachment_request
26
- # @return [nil]
26
+ # @return [GetAttachmentResponse]
27
27
  def get_attachment(opts = {})
28
- get_attachment_with_http_info(opts)
29
- nil
28
+ data, _status_code, _headers = get_attachment_with_http_info(opts)
29
+ data
30
30
  end
31
31
 
32
32
  # Get Attachment
33
- # Exchange an Attachment Access Key (from &#x60;IdentityData.Attachments&#x60;) 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.
33
+ # Exchange an Attachment Access Key (from &#x60;IdentityData.Attachments&#x60;) 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 503 code, and you should try again later.
34
34
  # @param [Hash] opts the optional parameters
35
35
  # @option opts [GetAttachmentRequest] :get_attachment_request
36
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
36
+ # @return [Array<(GetAttachmentResponse, Integer, Hash)>] GetAttachmentResponse data, response status code and response headers
37
37
  def get_attachment_with_http_info(opts = {})
38
38
  if @api_client.config.debugging
39
39
  @api_client.config.logger.debug 'Calling API: AttachmentsApi.get_attachment ...'
@@ -47,7 +47,7 @@ module TrinsicApi
47
47
  # header parameters
48
48
  header_params = opts[:header_params] || {}
49
49
  # HTTP header 'Accept' (if needed)
50
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
50
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) unless header_params['Accept']
51
51
  # HTTP header 'Content-Type'
52
52
  content_type = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
53
53
  if !content_type.nil?
@@ -61,7 +61,7 @@ module TrinsicApi
61
61
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'get_attachment_request'])
62
62
 
63
63
  # return_type
64
- return_type = opts[:debug_return_type]
64
+ return_type = opts[:debug_return_type] || 'GetAttachmentResponse'
65
65
 
66
66
  # auth_names
67
67
  auth_names = opts[:debug_auth_names] || ['Bearer']
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module TrinsicApi
17
17
  # Attachment Access Keys for attachments (eg document / selfie images)
18
- class Attachments
18
+ class AttachmentAccessKeys
19
19
  # Key to access the selfie image (if relevant) for this verification
20
20
  attr_accessor :selfie
21
21
 
@@ -63,13 +63,13 @@ module TrinsicApi
63
63
  # @param [Hash] attributes Model attributes in the form of hash
64
64
  def initialize(attributes = {})
65
65
  if (!attributes.is_a?(Hash))
66
- fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::Attachments` initialize method"
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::AttachmentAccessKeys` initialize method"
67
67
  end
68
68
 
69
69
  # check to see if the attribute exists and convert string to symbol for hash key
70
70
  attributes = attributes.each_with_object({}) { |(k, v), h|
71
71
  if (!self.class.attribute_map.key?(k.to_sym))
72
- fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::Attachments`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::AttachmentAccessKeys`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
73
  end
74
74
  h[k.to_sym] = v
75
75
  }
@@ -0,0 +1,239 @@
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.8.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TrinsicApi
17
+ class GetAttachmentResponse
18
+ # The raw file contents of the Attachment
19
+ attr_accessor :content
20
+
21
+ # The MIME type of the Attachment data
22
+ attr_accessor :content_type
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'content' => :'content',
28
+ :'content_type' => :'contentType'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'content' => :'String',
41
+ :'content_type' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::GetAttachmentResponse` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::GetAttachmentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'content')
67
+ self.content = attributes[:'content']
68
+ else
69
+ self.content = nil
70
+ end
71
+
72
+ if attributes.key?(:'content_type')
73
+ self.content_type = attributes[:'content_type']
74
+ else
75
+ self.content_type = nil
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
+ invalid_properties = Array.new
84
+ if @content.nil?
85
+ invalid_properties.push('invalid value for "content", content cannot be nil.')
86
+ end
87
+
88
+ if @content_type.nil?
89
+ invalid_properties.push('invalid value for "content_type", content_type cannot be nil.')
90
+ end
91
+
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ return false if @content.nil?
100
+ return false if @content_type.nil?
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ content == o.content &&
110
+ content_type == o.content_type
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [content, content_type].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
+ end
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
+ end
144
+ end
145
+ new(transformed_hash)
146
+ end
147
+
148
+ # Deserializes the data based on type
149
+ # @param string type Data type
150
+ # @param string value Value to be deserialized
151
+ # @return [Object] Deserialized data
152
+ def self._deserialize(type, value)
153
+ case type.to_sym
154
+ when :Time
155
+ Time.parse(value)
156
+ when :Date
157
+ Date.parse(value)
158
+ when :String
159
+ value.to_s
160
+ when :Integer
161
+ value.to_i
162
+ when :Float
163
+ value.to_f
164
+ when :Boolean
165
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
166
+ true
167
+ else
168
+ false
169
+ end
170
+ when :Object
171
+ # generic object (usually a Hash), return directly
172
+ value
173
+ when /\AArray<(?<inner_type>.+)>\z/
174
+ inner_type = Regexp.last_match[:inner_type]
175
+ value.map { |v| _deserialize(inner_type, v) }
176
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
177
+ k_type = Regexp.last_match[:k_type]
178
+ v_type = Regexp.last_match[:v_type]
179
+ {}.tap do |hash|
180
+ value.each do |k, v|
181
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
182
+ end
183
+ end
184
+ else # model
185
+ # models (e.g. Pet) or oneOf
186
+ klass = TrinsicApi.const_get(type)
187
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
188
+ end
189
+ end
190
+
191
+ # Returns the string representation of the object
192
+ # @return [String] String presentation of the object
193
+ def to_s
194
+ to_hash.to_s
195
+ end
196
+
197
+ # to_body is an alias to to_hash (backward compatibility)
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_body
200
+ to_hash
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = self.send(attr)
209
+ if value.nil?
210
+ is_nullable = self.class.openapi_nullable.include?(attr)
211
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
212
+ end
213
+
214
+ hash[param] = _to_hash(value)
215
+ end
216
+ hash
217
+ end
218
+
219
+ # Outputs non-array value in the form of hash
220
+ # For object, use to_hash. Otherwise, just return the value
221
+ # @param [Object] value Any valid value
222
+ # @return [Hash] Returns the value in the form of hash
223
+ def _to_hash(value)
224
+ if value.is_a?(Array)
225
+ value.compact.map { |v| _to_hash(v) }
226
+ elsif value.is_a?(Hash)
227
+ {}.tap do |hash|
228
+ value.each { |k, v| hash[k] = _to_hash(v) }
229
+ end
230
+ elsif value.respond_to? :to_hash
231
+ value.to_hash
232
+ else
233
+ value
234
+ end
235
+ end
236
+
237
+ end
238
+
239
+ end
@@ -24,8 +24,8 @@ module TrinsicApi
24
24
  # Identity data of the document involved in verification, if relevant
25
25
  attr_accessor :document
26
26
 
27
- # Access keys for attachments (eg document/selfie images)
28
- attr_accessor :attachments
27
+ # Attachment Access Keys for attachments (eg document / selfie images)
28
+ attr_accessor :attachment_access_keys
29
29
 
30
30
  # Attribute mapping from ruby-style variable name to JSON key.
31
31
  def self.attribute_map
@@ -33,7 +33,7 @@ module TrinsicApi
33
33
  :'originating_provider_id' => :'originatingProviderId',
34
34
  :'person' => :'person',
35
35
  :'document' => :'document',
36
- :'attachments' => :'attachments'
36
+ :'attachment_access_keys' => :'attachmentAccessKeys'
37
37
  }
38
38
  end
39
39
 
@@ -48,7 +48,7 @@ module TrinsicApi
48
48
  :'originating_provider_id' => :'String',
49
49
  :'person' => :'PersonData',
50
50
  :'document' => :'DocumentData',
51
- :'attachments' => :'Attachments'
51
+ :'attachment_access_keys' => :'AttachmentAccessKeys'
52
52
  }
53
53
  end
54
54
 
@@ -85,8 +85,8 @@ module TrinsicApi
85
85
  self.document = attributes[:'document']
86
86
  end
87
87
 
88
- if attributes.key?(:'attachments')
89
- self.attachments = attributes[:'attachments']
88
+ if attributes.key?(:'attachment_access_keys')
89
+ self.attachment_access_keys = attributes[:'attachment_access_keys']
90
90
  end
91
91
  end
92
92
 
@@ -113,7 +113,7 @@ module TrinsicApi
113
113
  originating_provider_id == o.originating_provider_id &&
114
114
  person == o.person &&
115
115
  document == o.document &&
116
- attachments == o.attachments
116
+ attachment_access_keys == o.attachment_access_keys
117
117
  end
118
118
 
119
119
  # @see the `==` method
@@ -125,7 +125,7 @@ module TrinsicApi
125
125
  # Calculates hash code according to all attributes.
126
126
  # @return [Integer] Hash code
127
127
  def hash
128
- [originating_provider_id, person, document, attachments].hash
128
+ [originating_provider_id, person, document, attachment_access_keys].hash
129
129
  end
130
130
 
131
131
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.8.0
11
11
  =end
12
12
 
13
13
  module TrinsicApi
14
- VERSION = '1.0.0'
14
+ VERSION = '1.1.0'
15
15
  end
data/lib/trinsic_api.rb CHANGED
@@ -18,7 +18,7 @@ require 'trinsic_api/configuration'
18
18
 
19
19
  # Models
20
20
  require 'trinsic_api/models/address'
21
- require 'trinsic_api/models/attachments'
21
+ require 'trinsic_api/models/attachment_access_keys'
22
22
  require 'trinsic_api/models/cancel_session_response'
23
23
  require 'trinsic_api/models/create_session_request'
24
24
  require 'trinsic_api/models/create_session_response'
@@ -27,6 +27,7 @@ require 'trinsic_api/models/disclosed_fields_request'
27
27
  require 'trinsic_api/models/document_data'
28
28
  require 'trinsic_api/models/failure_message'
29
29
  require 'trinsic_api/models/get_attachment_request'
30
+ require 'trinsic_api/models/get_attachment_response'
30
31
  require 'trinsic_api/models/get_session_response'
31
32
  require 'trinsic_api/models/get_session_result_request'
32
33
  require 'trinsic_api/models/get_session_result_response'
@@ -34,10 +34,10 @@ describe 'AttachmentsApi' do
34
34
 
35
35
  # unit tests for get_attachment
36
36
  # Get Attachment
37
- # Exchange an Attachment Access Key (from &#x60;IdentityData.Attachments&#x60;) 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.
37
+ # Exchange an Attachment Access Key (from &#x60;IdentityData.Attachments&#x60;) 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 503 code, and you should try again later.
38
38
  # @param [Hash] opts the optional parameters
39
39
  # @option opts [GetAttachmentRequest] :get_attachment_request
40
- # @return [nil]
40
+ # @return [GetAttachmentResponse]
41
41
  describe 'get_attachment test' do
42
42
  it 'should work' do
43
43
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -14,16 +14,16 @@ require 'spec_helper'
14
14
  require 'json'
15
15
  require 'date'
16
16
 
17
- # Unit tests for TrinsicApi::Attachments
17
+ # Unit tests for TrinsicApi::AttachmentAccessKeys
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
- describe TrinsicApi::Attachments do
21
- let(:instance) { TrinsicApi::Attachments.new }
20
+ describe TrinsicApi::AttachmentAccessKeys do
21
+ let(:instance) { TrinsicApi::AttachmentAccessKeys.new }
22
22
 
23
- describe 'test an instance of Attachments' do
24
- it 'should create an instance of Attachments' do
23
+ describe 'test an instance of AttachmentAccessKeys' do
24
+ it 'should create an instance of AttachmentAccessKeys' do
25
25
  # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(TrinsicApi::Attachments)
26
+ #expect(instance).to be_instance_of(TrinsicApi::AttachmentAccessKeys)
27
27
  end
28
28
  end
29
29
 
@@ -0,0 +1,42 @@
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.8.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TrinsicApi::GetAttachmentResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe TrinsicApi::GetAttachmentResponse do
21
+ let(:instance) { TrinsicApi::GetAttachmentResponse.new }
22
+
23
+ describe 'test an instance of GetAttachmentResponse' do
24
+ it 'should create an instance of GetAttachmentResponse' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(TrinsicApi::GetAttachmentResponse)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "content"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "content_type"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ end
@@ -45,7 +45,7 @@ describe TrinsicApi::IdentityData do
45
45
  end
46
46
  end
47
47
 
48
- describe 'test attribute "attachments"' do
48
+ describe 'test attribute "attachment_access_keys"' do
49
49
  it 'should work' do
50
50
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
51
51
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trinsic_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trinsic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-05 00:00:00.000000000 Z
11
+ date: 2024-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -62,7 +62,7 @@ files:
62
62
  - README.md
63
63
  - Rakefile
64
64
  - docs/Address.md
65
- - docs/Attachments.md
65
+ - docs/AttachmentAccessKeys.md
66
66
  - docs/AttachmentsApi.md
67
67
  - docs/CancelSessionResponse.md
68
68
  - docs/CreateSessionRequest.md
@@ -72,6 +72,7 @@ files:
72
72
  - docs/DocumentData.md
73
73
  - docs/FailureMessage.md
74
74
  - docs/GetAttachmentRequest.md
75
+ - docs/GetAttachmentResponse.md
75
76
  - docs/GetSessionResponse.md
76
77
  - docs/GetSessionResultRequest.md
77
78
  - docs/GetSessionResultResponse.md
@@ -100,7 +101,7 @@ files:
100
101
  - lib/trinsic_api/api_error.rb
101
102
  - lib/trinsic_api/configuration.rb
102
103
  - lib/trinsic_api/models/address.rb
103
- - lib/trinsic_api/models/attachments.rb
104
+ - lib/trinsic_api/models/attachment_access_keys.rb
104
105
  - lib/trinsic_api/models/cancel_session_response.rb
105
106
  - lib/trinsic_api/models/create_session_request.rb
106
107
  - lib/trinsic_api/models/create_session_response.rb
@@ -109,6 +110,7 @@ files:
109
110
  - lib/trinsic_api/models/document_data.rb
110
111
  - lib/trinsic_api/models/failure_message.rb
111
112
  - lib/trinsic_api/models/get_attachment_request.rb
113
+ - lib/trinsic_api/models/get_attachment_response.rb
112
114
  - lib/trinsic_api/models/get_session_response.rb
113
115
  - lib/trinsic_api/models/get_session_result_request.rb
114
116
  - lib/trinsic_api/models/get_session_result_response.rb
@@ -131,7 +133,7 @@ files:
131
133
  - spec/api/network_api_spec.rb
132
134
  - spec/api/sessions_api_spec.rb
133
135
  - spec/models/address_spec.rb
134
- - spec/models/attachments_spec.rb
136
+ - spec/models/attachment_access_keys_spec.rb
135
137
  - spec/models/cancel_session_response_spec.rb
136
138
  - spec/models/create_session_request_spec.rb
137
139
  - spec/models/create_session_response_spec.rb
@@ -140,6 +142,7 @@ files:
140
142
  - spec/models/document_data_spec.rb
141
143
  - spec/models/failure_message_spec.rb
142
144
  - spec/models/get_attachment_request_spec.rb
145
+ - spec/models/get_attachment_response_spec.rb
143
146
  - spec/models/get_session_response_spec.rb
144
147
  - spec/models/get_session_result_request_spec.rb
145
148
  - spec/models/get_session_result_response_spec.rb
@@ -178,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
181
  - !ruby/object:Gem::Version
179
182
  version: '0'
180
183
  requirements: []
181
- rubygems_version: 3.3.5
184
+ rubygems_version: 3.5.16
182
185
  signing_key:
183
186
  specification_version: 4
184
187
  summary: Trinsic API Ruby Library
@@ -186,9 +189,9 @@ test_files:
186
189
  - spec/api/attachments_api_spec.rb
187
190
  - spec/api/network_api_spec.rb
188
191
  - spec/api/sessions_api_spec.rb
192
+ - spec/models/attachment_access_keys_spec.rb
189
193
  - spec/models/get_session_response_spec.rb
190
194
  - spec/models/create_session_response_spec.rb
191
- - spec/models/attachments_spec.rb
192
195
  - spec/models/document_data_spec.rb
193
196
  - spec/models/identity_data_spec.rb
194
197
  - spec/models/disclosed_fields_spec.rb
@@ -209,6 +212,7 @@ test_files:
209
212
  - spec/models/cancel_session_response_spec.rb
210
213
  - spec/models/failure_message_spec.rb
211
214
  - spec/models/address_spec.rb
215
+ - spec/models/get_attachment_response_spec.rb
212
216
  - spec/models/session_fail_code_spec.rb
213
217
  - spec/models/disclosed_fields_request_spec.rb
214
218
  - spec/models/list_sessions_response_spec.rb