lib/onfido/models/workflow_run.rb in onfido-3.2.0 vs lib/onfido/models/workflow_run.rb in onfido-3.3.0
- old
+ new
@@ -22,10 +22,13 @@
attr_accessor :workflow_id
# 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.
attr_accessor :created_at
@@ -50,10 +53,13 @@
# The reasons the Workflow Run outcome was reached. Configurable when creating the Workflow version.
attr_accessor :reasons
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
def initialize(datatype, allowable_values)
@@ -78,20 +84,22 @@
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',
:'id' => :'id',
:'workflow_version_id' => :'workflow_version_id',
:'dashboard_url' => :'dashboard_url',
:'status' => :'status',
:'output' => :'output',
:'reasons' => :'reasons',
- :'error' => :'error'
+ :'error' => :'error',
+ :'sdk_token' => :'sdk_token'
}
end
# Returns all the JSON keys this model knows about
def self.acceptable_attributes
@@ -102,27 +110,30 @@
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',
:'id' => :'String',
:'workflow_version_id' => :'Integer',
:'dashboard_url' => :'String',
:'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
# List of class defined in allOf (OpenAPI v3)
def self.openapi_all_of
@@ -163,10 +174,14 @@
if (value = attributes[:'tags']).is_a?(Array)
self.tags = value
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
if attributes.key?(:'created_at')
@@ -206,10 +221,14 @@
end
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?
# @return Array for valid properties with the reasons
def list_invalid_properties
@@ -225,10 +244,14 @@
if !@tags.nil? && @tags.length > 30
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
invalid_properties
@@ -239,10 +262,11 @@
def valid?
warn '[DEPRECATED] the `valid?` method is obsolete'
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)
true
end
@@ -255,10 +279,24 @@
end
@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)
validator = EnumAttributeValidator.new('String', ["awaiting_input", "processing", "abandoned", "error", "approved", "review", "declined", "unknown_default_open_api"])
unless validator.valid?(status)
@@ -273,20 +311,22 @@
return true if self.equal?(o)
self.class == o.class &&
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 &&
id == o.id &&
workflow_version_id == o.workflow_version_id &&
dashboard_url == o.dashboard_url &&
status == o.status &&
output == o.output &&
reasons == o.reasons &&
- error == o.error
+ error == o.error &&
+ sdk_token == o.sdk_token
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -294,10 +334,10 @@
end
# 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
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself