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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ad8d065a1432b0a9784b7e7abbc4232330b7473fc93295cee357f67472dc19d
4
- data.tar.gz: '044988fa7351554b18584f22603922cf2b1f2f0fc35b48c7b398fa8f2e5bb26e'
3
+ metadata.gz: 845613bbd6b1c405918b78dfb34fafc8830394f9bba7cb0814baedcdb8fdabf2
4
+ data.tar.gz: 0c08e45e9909662f8ac95d9c2e5f89edaae9d8857353f700c6cc72b52969def5
5
5
  SHA512:
6
- metadata.gz: 035d43c3d89ef350ba28be90e9c395edcddc88cf06a063ee49eef0c2eb0d3e5e0c7e6d3da9eccfcc9db76cb580c9b1cd164f8e5e2418021797ebe22f217aabcb
7
- data.tar.gz: 53cbebd670af14ba05ba595ce0af26fd7b973c6042dd072cd9a291163ba4d0e31ac3a9c32de82b902c8b950c4ea07cb5de0c3d734b628f7a48cc71b1702bea7b
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
@@ -6,6 +6,7 @@ group :development, :test do
6
6
  gem 'rake', '~> 13.0.1'
7
7
  gem 'pry-byebug'
8
8
  gem 'rubocop', '~> 0.66.0'
9
+ gem 'rubyzip', '~> 2.3.2'
9
10
  end
10
11
 
11
12
  gem "faraday-follow_redirects", "~> 0.3.0"
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.4.0'
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&#39;s unique identifier.
@@ -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.4.0"
37
+ @user_agent = "onfido-ruby/4.5.0"
38
38
  @default_headers = {
39
39
  'Content-Type' => 'application/json',
40
40
  'User-Agent' => @user_agent
@@ -11,5 +11,5 @@ Generator version: 7.9.0
11
11
  =end
12
12
 
13
13
  module Onfido
14
- VERSION = '4.4.0'
14
+ VERSION = '4.5.0'
15
15
  end
@@ -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.0
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: 2024-12-20 00:00:00.000000000 Z
11
+ date: 2025-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday