lib/onfido/models/workflow_run_shared.rb in onfido-3.2.0 vs lib/onfido/models/workflow_run_shared.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 @@ -36,10 +39,11 @@ 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' } end @@ -53,10 +57,11 @@ 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' } end @@ -99,10 +104,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') @@ -129,20 +138,25 @@ 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 + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid 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 true end # Custom attribute writer method with validation # @param [Object] tags Value to be assigned @@ -152,18 +166,33 @@ 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 + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) 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 end @@ -174,10 +203,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].hash + [applicant_id, workflow_id, tags, customer_user_id, link, created_at, updated_at].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself