Skip to content

Commit

Permalink
Merge pull request #62 from onfido/release-upgrade
Browse files Browse the repository at this point in the history
Refresh onfido-ruby after onfido-openapi-spec update (f941ec8)
  • Loading branch information
dvacca-onfido authored Jul 24, 2024
2 parents aea9d78 + 45c6b11 commit 568dd8b
Show file tree
Hide file tree
Showing 9 changed files with 133 additions and 24 deletions.
8 changes: 4 additions & 4 deletions .release.json
Original file line number Diff line number Diff line change
@@ -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"
}
14 changes: 7 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion lib/onfido/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
48 changes: 44 additions & 4 deletions lib/onfido/models/workflow_run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand All @@ -89,7 +96,8 @@ def self.attribute_map
:'status' => :'status',
:'output' => :'output',
:'reasons' => :'reasons',
:'error' => :'error'
:'error' => :'error',
:'sdk_token' => :'sdk_token'
}
end

Expand All @@ -104,6 +112,7 @@ def self.openapi_types
:'applicant_id' => :'String',
:'workflow_id' => :'String',
:'tags' => :'Array<String>',
:'customer_user_id' => :'String',
:'link' => :'WorkflowRunSharedLink',
:'created_at' => :'Time',
:'updated_at' => :'Time',
Expand All @@ -113,14 +122,16 @@ def self.openapi_types
:'status' => :'String',
:'output' => :'Object',
:'reasons' => :'Array<String>',
:'error' => :'WorkflowRunResponseError'
:'error' => :'WorkflowRunResponseError',
:'sdk_token' => :'String'
}
end

# List of attributes with nullable: true
def self.openapi_nullable
Set.new([
:'tags',
:'sdk_token'
])
end

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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?
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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 &&
Expand All @@ -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
Expand All @@ -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
Expand Down
31 changes: 30 additions & 1 deletion lib/onfido/models/workflow_run_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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',
Expand All @@ -59,6 +63,7 @@ def self.openapi_types
:'applicant_id' => :'String',
:'workflow_id' => :'String',
:'tags' => :'Array<String>',
:'customer_user_id' => :'String',
:'link' => :'WorkflowRunSharedLink',
:'created_at' => :'Time',
:'updated_at' => :'Time',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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)
Expand All @@ -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 &&
Expand All @@ -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
Expand Down
19 changes: 15 additions & 4 deletions lib/onfido/models/workflow_run_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -66,7 +69,8 @@ def self.attribute_map
:'status' => :'status',
:'output' => :'output',
:'reasons' => :'reasons',
:'error' => :'error'
:'error' => :'error',
:'sdk_token' => :'sdk_token'
}
end

Expand All @@ -84,13 +88,15 @@ def self.openapi_types
:'status' => :'String',
:'output' => :'Object',
:'reasons' => :'Array<String>',
:'error' => :'WorkflowRunResponseError'
:'error' => :'WorkflowRunResponseError',
:'sdk_token' => :'String'
}
end

# List of attributes with nullable: true
def self.openapi_nullable
Set.new([
:'sdk_token'
])
end

Expand Down Expand Up @@ -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?
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading

0 comments on commit 568dd8b

Please sign in to comment.