Skip to content

Commit

Permalink
Merge pull request #51 from onfido/release-upgrade
Browse files Browse the repository at this point in the history
Refresh onfido-ruby after onfido-openapi-spec update (40e7a67)
  • Loading branch information
dvacca-onfido authored May 23, 2024
2 parents 199ab0c + 184d641 commit 1ef520f
Show file tree
Hide file tree
Showing 6 changed files with 337 additions and 7 deletions.
3 changes: 2 additions & 1 deletion lib/onfido.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
require 'onfido/models/check_shared'
require 'onfido/models/checks_list'
require 'onfido/models/complete_task_builder'
require 'onfido/models/complete_task_builder_data'
require 'onfido/models/complete_task_data_builder'
require 'onfido/models/consent_item'
require 'onfido/models/consents_builder'
require 'onfido/models/country_codes'
Expand Down Expand Up @@ -231,6 +231,7 @@
require 'onfido/models/sdk_token_request'
require 'onfido/models/sdk_token_response'
require 'onfido/models/task'
require 'onfido/models/task_item'
require 'onfido/models/us_driving_licence_breakdown'
require 'onfido/models/us_driving_licence_breakdown_address'
require 'onfido/models/us_driving_licence_breakdown_address_breakdown'
Expand Down
6 changes: 3 additions & 3 deletions lib/onfido/api/default_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2927,7 +2927,7 @@ def list_reports_with_http_info(check_id, opts = {})
# The tasks of a Workflow can be retrieved by calling this endpoint with the unique identifier of the Workflow Run.
# @param workflow_run_id [String] The unique identifier of the Workflow Run to which the Tasks belong.
# @param [Hash] opts the optional parameters
# @return [Array<Task>]
# @return [Array<TaskItem>]
def list_tasks(workflow_run_id, opts = {})
data, _status_code, _headers = list_tasks_with_http_info(workflow_run_id, opts)
data
Expand All @@ -2937,7 +2937,7 @@ def list_tasks(workflow_run_id, opts = {})
# The tasks of a Workflow can be retrieved by calling this endpoint with the unique identifier of the Workflow Run.
# @param workflow_run_id [String] The unique identifier of the Workflow Run to which the Tasks belong.
# @param [Hash] opts the optional parameters
# @return [Array<(Array<Task>, Integer, Hash)>] Array<Task> data, response status code and response headers
# @return [Array<(Array<TaskItem>, Integer, Hash)>] Array<TaskItem> data, response status code and response headers
def list_tasks_with_http_info(workflow_run_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.list_tasks ...'
Expand All @@ -2964,7 +2964,7 @@ def list_tasks_with_http_info(workflow_run_id, opts = {})
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'Array<Task>'
return_type = opts[:debug_return_type] || 'Array<TaskItem>'

# auth_names
auth_names = opts[:debug_auth_names] || ['Token']
Expand Down
2 changes: 1 addition & 1 deletion lib/onfido/models/complete_task_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def self.acceptable_attributes
# Attribute type mapping.
def self.openapi_types
{
:'data' => :'CompleteTaskBuilderData'
:'data' => :'CompleteTaskDataBuilder'
}
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

module Onfido
# The Task completion payload.
module CompleteTaskBuilderData
module CompleteTaskDataBuilder
class << self
# List of class defined in oneOf (OpenAPI v3)
def openapi_one_of
Expand Down
44 changes: 43 additions & 1 deletion lib/onfido/models/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,21 @@ class Task
# The identifier for the Task.
attr_accessor :id

# The workflow run id the task belongs to.
attr_accessor :workflow_run_id

# The identifier for the Task Definition.
attr_accessor :task_def_id

# The task definition version.
attr_accessor :task_def_version

# Input object with the fields used by the Task to execute.
attr_accessor :input

# Output object with the fields produced by the Task execution.
attr_accessor :output

# The date and time when the Task was created.
attr_accessor :created_at

Expand All @@ -31,7 +43,11 @@ class Task
def self.attribute_map
{
:'id' => :'id',
:'workflow_run_id' => :'workflow_run_id',
:'task_def_id' => :'task_def_id',
:'task_def_version' => :'task_def_version',
:'input' => :'input',
:'output' => :'output',
:'created_at' => :'created_at',
:'updated_at' => :'updated_at'
}
Expand All @@ -46,7 +62,11 @@ def self.acceptable_attributes
def self.openapi_types
{
:'id' => :'String',
:'workflow_run_id' => :'String',
:'task_def_id' => :'String',
:'task_def_version' => :'String',
:'input' => :'Object',
:'output' => :'Object',
:'created_at' => :'Time',
:'updated_at' => :'Time'
}
Expand All @@ -55,6 +75,8 @@ def self.openapi_types
# List of attributes with nullable: true
def self.openapi_nullable
Set.new([
:'task_def_version',
:'output',
])
end

Expand All @@ -77,10 +99,26 @@ def initialize(attributes = {})
self.id = attributes[:'id']
end

if attributes.key?(:'workflow_run_id')
self.workflow_run_id = attributes[:'workflow_run_id']
end

if attributes.key?(:'task_def_id')
self.task_def_id = attributes[:'task_def_id']
end

if attributes.key?(:'task_def_version')
self.task_def_version = attributes[:'task_def_version']
end

if attributes.key?(:'input')
self.input = attributes[:'input']
end

if attributes.key?(:'output')
self.output = attributes[:'output']
end

if attributes.key?(:'created_at')
self.created_at = attributes[:'created_at']
end
Expand Down Expand Up @@ -153,7 +191,11 @@ def ==(o)
return true if self.equal?(o)
self.class == o.class &&
id == o.id &&
workflow_run_id == o.workflow_run_id &&
task_def_id == o.task_def_id &&
task_def_version == o.task_def_version &&
input == o.input &&
output == o.output &&
created_at == o.created_at &&
updated_at == o.updated_at
end
Expand All @@ -167,7 +209,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[id, task_def_id, created_at, updated_at].hash
[id, workflow_run_id, task_def_id, task_def_version, input, output, created_at, updated_at].hash
end

# Builds the object from hash
Expand Down
Loading

0 comments on commit 1ef520f

Please sign in to comment.