onfido 4.4.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -0
- data/README.md +1 -1
- data/lib/onfido/api/default_api.rb +63 -0
- data/lib/onfido/api_client.rb +1 -1
- data/lib/onfido/version.rb +1 -1
- data/spec/integrations/workflow_run_spec.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 845613bbd6b1c405918b78dfb34fafc8830394f9bba7cb0814baedcdb8fdabf2
|
4
|
+
data.tar.gz: 0c08e45e9909662f8ac95d9c2e5f89edaae9d8857353f700c6cc72b52969def5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e591ea9e0f915f4e9b9b57edec45d6cfb7aeb245b56f2a639bf580978c832390f0b0c199ca43f7d52e8daa6ad753647086237c657b5cc2ea24b1489cabb8d67
|
7
|
+
data.tar.gz: cb8f330edba0390745729eb7dd9f9acb583669e7e896d9fe9bab7d650d5f0dc0888fae33d35a450e3bc995cc9d407a0594a82aa9b828b7248473a306e3a552f3
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v4.4.0 20th December 2024
|
4
|
+
|
5
|
+
- Release based on Onfido OpenAPI spec version [v4.4.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v4.4.0):
|
6
|
+
- [CAT-1593] Fix missing webhook type and evidence folder webhook
|
7
|
+
- [CAT-1590] Allow any type for the workflow task output
|
8
|
+
|
3
9
|
## v4.3.0 27th November 2024
|
4
10
|
|
5
11
|
- Release based on Onfido OpenAPI spec version [v4.3.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v4.3.0):
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -14,7 +14,7 @@ This version uses Onfido API v3.6. Refer to our [API versioning guide](https://d
|
|
14
14
|
### Installation
|
15
15
|
|
16
16
|
```ruby
|
17
|
-
gem onfido, '~> 4.
|
17
|
+
gem onfido, '~> 4.5.0'
|
18
18
|
```
|
19
19
|
|
20
20
|
Configure with your API token, region and optional timeout (default value is 30):
|
@@ -943,6 +943,69 @@ module Onfido
|
|
943
943
|
return data, status_code, headers
|
944
944
|
end
|
945
945
|
|
946
|
+
# Retrieve Workflow Run Evidence Folder
|
947
|
+
# Retrieves the evidence folder for the designated Workflow Run
|
948
|
+
# @param workflow_run_id [String] Workflow Run ID
|
949
|
+
# @param [Hash] opts the optional parameters
|
950
|
+
# @return [File]
|
951
|
+
def download_evidence_folder(workflow_run_id, opts = {})
|
952
|
+
data, _status_code, _headers = download_evidence_folder_with_http_info(workflow_run_id, opts)
|
953
|
+
data
|
954
|
+
end
|
955
|
+
|
956
|
+
# Retrieve Workflow Run Evidence Folder
|
957
|
+
# Retrieves the evidence folder for the designated Workflow Run
|
958
|
+
# @param workflow_run_id [String] Workflow Run ID
|
959
|
+
# @param [Hash] opts the optional parameters
|
960
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
961
|
+
def download_evidence_folder_with_http_info(workflow_run_id, opts = {})
|
962
|
+
if @api_client.config.debugging
|
963
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.download_evidence_folder ...'
|
964
|
+
end
|
965
|
+
# verify the required parameter 'workflow_run_id' is set
|
966
|
+
if @api_client.config.client_side_validation && workflow_run_id.nil?
|
967
|
+
fail ArgumentError, "Missing the required parameter 'workflow_run_id' when calling DefaultApi.download_evidence_folder"
|
968
|
+
end
|
969
|
+
# resource path
|
970
|
+
local_var_path = '/workflow_runs/{workflow_run_id}/evidence_folder'.sub('{' + 'workflow_run_id' + '}', CGI.escape(workflow_run_id.to_s))
|
971
|
+
|
972
|
+
# query parameters
|
973
|
+
query_params = opts[:query_params] || {}
|
974
|
+
|
975
|
+
# header parameters
|
976
|
+
header_params = opts[:header_params] || {}
|
977
|
+
# HTTP header 'Accept' (if needed)
|
978
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/zip', 'application/json']) unless header_params['Accept']
|
979
|
+
|
980
|
+
# form parameters
|
981
|
+
form_params = opts[:form_params] || {}
|
982
|
+
|
983
|
+
# http body (model)
|
984
|
+
post_body = opts[:debug_body]
|
985
|
+
|
986
|
+
# return_type
|
987
|
+
return_type = opts[:debug_return_type] || 'File'
|
988
|
+
|
989
|
+
# auth_names
|
990
|
+
auth_names = opts[:debug_auth_names] || ['Token']
|
991
|
+
|
992
|
+
new_options = opts.merge(
|
993
|
+
:operation => :"DefaultApi.download_evidence_folder",
|
994
|
+
:header_params => header_params,
|
995
|
+
:query_params => query_params,
|
996
|
+
:form_params => form_params,
|
997
|
+
:body => post_body,
|
998
|
+
:auth_names => auth_names,
|
999
|
+
:return_type => return_type
|
1000
|
+
)
|
1001
|
+
|
1002
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1003
|
+
if @api_client.config.debugging
|
1004
|
+
@api_client.config.logger.debug "API called: DefaultApi#download_evidence_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1005
|
+
end
|
1006
|
+
return data, status_code, headers
|
1007
|
+
end
|
1008
|
+
|
946
1009
|
# Download ID photo
|
947
1010
|
# ID photos are downloaded using this endpoint.
|
948
1011
|
# @param id_photo_id [String] The ID photo's unique identifier.
|
data/lib/onfido/api_client.rb
CHANGED
@@ -34,7 +34,7 @@ module Onfido
|
|
34
34
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
35
35
|
def initialize(config = Configuration.default)
|
36
36
|
@config = config
|
37
|
-
@user_agent = "onfido-ruby/4.
|
37
|
+
@user_agent = "onfido-ruby/4.5.0"
|
38
38
|
@default_headers = {
|
39
39
|
'Content-Type' => 'application/json',
|
40
40
|
'User-Agent' => @user_agent
|
data/lib/onfido/version.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative '../shared_contexts/with_workflow_run'
|
4
|
+
require 'zip'
|
4
5
|
|
5
6
|
describe Onfido::WorkflowRun do
|
6
7
|
describe 'Workflow run' do
|
@@ -79,6 +80,14 @@ describe Onfido::WorkflowRun do
|
|
79
80
|
|
80
81
|
expect(file.size).to be > 0
|
81
82
|
end
|
83
|
+
|
84
|
+
it 'downloads an evidence folder' do
|
85
|
+
file = onfido_api.download_evidence_folder(workflow_run_id)
|
86
|
+
|
87
|
+
Zip::File.open(file.path) do |zip|
|
88
|
+
expect(zip.entries.size).to be > 0
|
89
|
+
end
|
90
|
+
end
|
82
91
|
end
|
83
92
|
end
|
84
93
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onfido
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenAPI-Generator
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|