Method: Kickflow::GradeCreateBody#valid?

Defined in:
lib/kickflow/models/grade_create_body.rb

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



123
124
125
126
127
128
129
130
131
132
# File 'lib/kickflow/models/grade_create_body.rb', line 123

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @name.nil?
  return false if @name.to_s.length > 255
  return false if @level.nil?
  return false if @level > 255
  return false if @level < 0
  return false if !@code.nil? && @code.to_s.length > 255
  true
end