diff --git a/.release.json b/.release.json index 611db3a..3bfaa40 100644 --- a/.release.json +++ b/.release.json @@ -1,9 +1,9 @@ { "source": { "repo_url": "https://github.com/onfido/onfido-openapi-spec", - "short_sha": "40b86a1", - "long_sha": "40b86a1c8ec8687c15514470f60428b3e7633968", - "version": "v3.2.0" + "short_sha": "f941ec8", + "long_sha": "f941ec84c3aeb0d3fcceea537991ba7e1ac96414", + "version": "v3.3.0" }, - "release": "v3.2.0" + "release": "v3.3.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index e1b0802..31f31ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,13 +3,13 @@ ## v3.2.0 18th July 2024 - Release based on Onfido OpenAPI spec version [v3.2.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v3.2.0): - - [CAT-1289] Document report's properties: Add middle name - - chore(qes): add documents endpoint - - [CAT-1297] Webhook Event: remove uuid format from object.id - - fix(qes): fix download document http method - - Add started_at_iso8601 field in webhook event - - add jpeg file type for documents -- Fix error handling documentation in README file + - [CAT-1289] Document report's properties: Add middle name + - chore(qes): add documents endpoint + - [CAT-1297] Webhook Event: remove uuid format from object.id + - fix(qes): fix download document http method + - Add started_at_iso8601 field in webhook event + - add jpeg file type for documents +- Fix error handling documentation in README file ## v3.1.0 5th July 2024 diff --git a/README.md b/README.md index bea2379..0663204 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ This version uses Onfido API v3.6. Refer to our [API versioning guide](https://d ### Installation ```ruby -gem onfido, '~> 3.2.0' +gem onfido, '~> 3.3.0' ``` Configure with your API token, region and optional timeout (default value is 30): diff --git a/lib/onfido/api_client.rb b/lib/onfido/api_client.rb index cbb99c3..554ebb2 100644 --- a/lib/onfido/api_client.rb +++ b/lib/onfido/api_client.rb @@ -34,7 +34,7 @@ class ApiClient # @option config [Configuration] Configuration for initializing the object, default to Configuration.default def initialize(config = Configuration.default) @config = config - @user_agent = "onfido-ruby/3.2.0" + @user_agent = "onfido-ruby/3.3.0" @default_headers = { 'Content-Type' => 'application/json', 'User-Agent' => @user_agent diff --git a/lib/onfido/models/workflow_run.rb b/lib/onfido/models/workflow_run.rb index aa4cf35..871b850 100644 --- a/lib/onfido/models/workflow_run.rb +++ b/lib/onfido/models/workflow_run.rb @@ -24,6 +24,9 @@ class WorkflowRun # Tags or labels assigned to the workflow run. attr_accessor :tags + # Customer-provided user identifier. + attr_accessor :customer_user_id + attr_accessor :link # The date and time when the Workflow Run was created. @@ -52,6 +55,9 @@ class WorkflowRun attr_accessor :error + # Client token to use when loading this workflow run in the Onfido SDK. + attr_accessor :sdk_token + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -80,6 +86,7 @@ def self.attribute_map :'applicant_id' => :'applicant_id', :'workflow_id' => :'workflow_id', :'tags' => :'tags', + :'customer_user_id' => :'customer_user_id', :'link' => :'link', :'created_at' => :'created_at', :'updated_at' => :'updated_at', @@ -89,7 +96,8 @@ def self.attribute_map :'status' => :'status', :'output' => :'output', :'reasons' => :'reasons', - :'error' => :'error' + :'error' => :'error', + :'sdk_token' => :'sdk_token' } end @@ -104,6 +112,7 @@ def self.openapi_types :'applicant_id' => :'String', :'workflow_id' => :'String', :'tags' => :'Array', + :'customer_user_id' => :'String', :'link' => :'WorkflowRunSharedLink', :'created_at' => :'Time', :'updated_at' => :'Time', @@ -113,7 +122,8 @@ def self.openapi_types :'status' => :'String', :'output' => :'Object', :'reasons' => :'Array', - :'error' => :'WorkflowRunResponseError' + :'error' => :'WorkflowRunResponseError', + :'sdk_token' => :'String' } end @@ -121,6 +131,7 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'tags', + :'sdk_token' ]) end @@ -165,6 +176,10 @@ def initialize(attributes = {}) end end + if attributes.key?(:'customer_user_id') + self.customer_user_id = attributes[:'customer_user_id'] + end + if attributes.key?(:'link') self.link = attributes[:'link'] end @@ -208,6 +223,10 @@ def initialize(attributes = {}) if attributes.key?(:'error') self.error = attributes[:'error'] end + + if attributes.key?(:'sdk_token') + self.sdk_token = attributes[:'sdk_token'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -227,6 +246,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "tags", number of items must be less than or equal to 30.') end + if !@customer_user_id.nil? && @customer_user_id.to_s.length > 256 + invalid_properties.push('invalid value for "customer_user_id", the character length must be smaller than or equal to 256.') + end + if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end @@ -241,6 +264,7 @@ def valid? return false if @applicant_id.nil? return false if @workflow_id.nil? return false if !@tags.nil? && @tags.length > 30 + return false if !@customer_user_id.nil? && @customer_user_id.to_s.length > 256 return false if @id.nil? status_validator = EnumAttributeValidator.new('String', ["awaiting_input", "processing", "abandoned", "error", "approved", "review", "declined", "unknown_default_open_api"]) return false unless status_validator.valid?(@status) @@ -257,6 +281,20 @@ def tags=(tags) @tags = tags end + # Custom attribute writer method with validation + # @param [Object] customer_user_id Value to be assigned + def customer_user_id=(customer_user_id) + if customer_user_id.nil? + fail ArgumentError, 'customer_user_id cannot be nil' + end + + if customer_user_id.to_s.length > 256 + fail ArgumentError, 'invalid value for "customer_user_id", the character length must be smaller than or equal to 256.' + end + + @customer_user_id = customer_user_id + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] status Object to be assigned def status=(status) @@ -275,6 +313,7 @@ def ==(o) applicant_id == o.applicant_id && workflow_id == o.workflow_id && tags == o.tags && + customer_user_id == o.customer_user_id && link == o.link && created_at == o.created_at && updated_at == o.updated_at && @@ -284,7 +323,8 @@ def ==(o) status == o.status && output == o.output && reasons == o.reasons && - error == o.error + error == o.error && + sdk_token == o.sdk_token end # @see the `==` method @@ -296,7 +336,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [applicant_id, workflow_id, tags, link, created_at, updated_at, id, workflow_version_id, dashboard_url, status, output, reasons, error].hash + [applicant_id, workflow_id, tags, customer_user_id, link, created_at, updated_at, id, workflow_version_id, dashboard_url, status, output, reasons, error, sdk_token].hash end # Builds the object from hash diff --git a/lib/onfido/models/workflow_run_builder.rb b/lib/onfido/models/workflow_run_builder.rb index 4899e8a..568ca5d 100644 --- a/lib/onfido/models/workflow_run_builder.rb +++ b/lib/onfido/models/workflow_run_builder.rb @@ -24,6 +24,9 @@ class WorkflowRunBuilder # Tags or labels assigned to the workflow run. attr_accessor :tags + # Customer-provided user identifier. + attr_accessor :customer_user_id + attr_accessor :link # The date and time when the Workflow Run was created. @@ -41,6 +44,7 @@ def self.attribute_map :'applicant_id' => :'applicant_id', :'workflow_id' => :'workflow_id', :'tags' => :'tags', + :'customer_user_id' => :'customer_user_id', :'link' => :'link', :'created_at' => :'created_at', :'updated_at' => :'updated_at', @@ -59,6 +63,7 @@ def self.openapi_types :'applicant_id' => :'String', :'workflow_id' => :'String', :'tags' => :'Array', + :'customer_user_id' => :'String', :'link' => :'WorkflowRunSharedLink', :'created_at' => :'Time', :'updated_at' => :'Time', @@ -114,6 +119,10 @@ def initialize(attributes = {}) end end + if attributes.key?(:'customer_user_id') + self.customer_user_id = attributes[:'customer_user_id'] + end + if attributes.key?(:'link') self.link = attributes[:'link'] end @@ -150,6 +159,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "tags", number of items must be less than or equal to 30.') end + if !@customer_user_id.nil? && @customer_user_id.to_s.length > 256 + invalid_properties.push('invalid value for "customer_user_id", the character length must be smaller than or equal to 256.') + end + invalid_properties end @@ -160,6 +173,7 @@ def valid? return false if @applicant_id.nil? return false if @workflow_id.nil? return false if !@tags.nil? && @tags.length > 30 + return false if !@customer_user_id.nil? && @customer_user_id.to_s.length > 256 true end @@ -173,6 +187,20 @@ def tags=(tags) @tags = tags end + # Custom attribute writer method with validation + # @param [Object] customer_user_id Value to be assigned + def customer_user_id=(customer_user_id) + if customer_user_id.nil? + fail ArgumentError, 'customer_user_id cannot be nil' + end + + if customer_user_id.to_s.length > 256 + fail ArgumentError, 'invalid value for "customer_user_id", the character length must be smaller than or equal to 256.' + end + + @customer_user_id = customer_user_id + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -181,6 +209,7 @@ def ==(o) applicant_id == o.applicant_id && workflow_id == o.workflow_id && tags == o.tags && + customer_user_id == o.customer_user_id && link == o.link && created_at == o.created_at && updated_at == o.updated_at && @@ -196,7 +225,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [applicant_id, workflow_id, tags, link, created_at, updated_at, custom_data].hash + [applicant_id, workflow_id, tags, customer_user_id, link, created_at, updated_at, custom_data].hash end # Builds the object from hash diff --git a/lib/onfido/models/workflow_run_response.rb b/lib/onfido/models/workflow_run_response.rb index da56c3d..ab41bf3 100644 --- a/lib/onfido/models/workflow_run_response.rb +++ b/lib/onfido/models/workflow_run_response.rb @@ -35,6 +35,9 @@ class WorkflowRunResponse attr_accessor :error + # Client token to use when loading this workflow run in the Onfido SDK. + attr_accessor :sdk_token + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -66,7 +69,8 @@ def self.attribute_map :'status' => :'status', :'output' => :'output', :'reasons' => :'reasons', - :'error' => :'error' + :'error' => :'error', + :'sdk_token' => :'sdk_token' } end @@ -84,13 +88,15 @@ def self.openapi_types :'status' => :'String', :'output' => :'Object', :'reasons' => :'Array', - :'error' => :'WorkflowRunResponseError' + :'error' => :'WorkflowRunResponseError', + :'sdk_token' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'sdk_token' ]) end @@ -140,6 +146,10 @@ def initialize(attributes = {}) if attributes.key?(:'error') self.error = attributes[:'error'] end + + if attributes.key?(:'sdk_token') + self.sdk_token = attributes[:'sdk_token'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -185,7 +195,8 @@ def ==(o) status == o.status && output == o.output && reasons == o.reasons && - error == o.error + error == o.error && + sdk_token == o.sdk_token end # @see the `==` method @@ -197,7 +208,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, workflow_version_id, dashboard_url, status, output, reasons, error].hash + [id, workflow_version_id, dashboard_url, status, output, reasons, error, sdk_token].hash end # Builds the object from hash diff --git a/lib/onfido/models/workflow_run_shared.rb b/lib/onfido/models/workflow_run_shared.rb index 39ffbfd..dbd9fe7 100644 --- a/lib/onfido/models/workflow_run_shared.rb +++ b/lib/onfido/models/workflow_run_shared.rb @@ -24,6 +24,9 @@ class WorkflowRunShared # Tags or labels assigned to the workflow run. attr_accessor :tags + # Customer-provided user identifier. + attr_accessor :customer_user_id + attr_accessor :link # The date and time when the Workflow Run was created. @@ -38,6 +41,7 @@ def self.attribute_map :'applicant_id' => :'applicant_id', :'workflow_id' => :'workflow_id', :'tags' => :'tags', + :'customer_user_id' => :'customer_user_id', :'link' => :'link', :'created_at' => :'created_at', :'updated_at' => :'updated_at' @@ -55,6 +59,7 @@ def self.openapi_types :'applicant_id' => :'String', :'workflow_id' => :'String', :'tags' => :'Array', + :'customer_user_id' => :'String', :'link' => :'WorkflowRunSharedLink', :'created_at' => :'Time', :'updated_at' => :'Time' @@ -101,6 +106,10 @@ def initialize(attributes = {}) end end + if attributes.key?(:'customer_user_id') + self.customer_user_id = attributes[:'customer_user_id'] + end + if attributes.key?(:'link') self.link = attributes[:'link'] end @@ -131,6 +140,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "tags", number of items must be less than or equal to 30.') end + if !@customer_user_id.nil? && @customer_user_id.to_s.length > 256 + invalid_properties.push('invalid value for "customer_user_id", the character length must be smaller than or equal to 256.') + end + invalid_properties end @@ -141,6 +154,7 @@ def valid? return false if @applicant_id.nil? return false if @workflow_id.nil? return false if !@tags.nil? && @tags.length > 30 + return false if !@customer_user_id.nil? && @customer_user_id.to_s.length > 256 true end @@ -154,6 +168,20 @@ def tags=(tags) @tags = tags end + # Custom attribute writer method with validation + # @param [Object] customer_user_id Value to be assigned + def customer_user_id=(customer_user_id) + if customer_user_id.nil? + fail ArgumentError, 'customer_user_id cannot be nil' + end + + if customer_user_id.to_s.length > 256 + fail ArgumentError, 'invalid value for "customer_user_id", the character length must be smaller than or equal to 256.' + end + + @customer_user_id = customer_user_id + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -162,6 +190,7 @@ def ==(o) applicant_id == o.applicant_id && workflow_id == o.workflow_id && tags == o.tags && + customer_user_id == o.customer_user_id && link == o.link && created_at == o.created_at && updated_at == o.updated_at @@ -176,7 +205,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [applicant_id, workflow_id, tags, link, created_at, updated_at].hash + [applicant_id, workflow_id, tags, customer_user_id, link, created_at, updated_at].hash end # Builds the object from hash diff --git a/lib/onfido/version.rb b/lib/onfido/version.rb index b56dfab..1f80f39 100644 --- a/lib/onfido/version.rb +++ b/lib/onfido/version.rb @@ -11,5 +11,5 @@ =end module Onfido - VERSION = '3.2.0' + VERSION = '3.3.0' end