Method: Kickflow::GradeCreateBody#list_invalid_properties

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

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/kickflow/models/grade_create_body.rb', line 91

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @name.nil?
    invalid_properties.push('invalid value for "name", name cannot be nil.')
  end

  if @name.to_s.length > 255
    invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
  end

  if @level.nil?
    invalid_properties.push('invalid value for "level", level cannot be nil.')
  end

  if @level > 255
    invalid_properties.push('invalid value for "level", must be smaller than or equal to 255.')
  end

  if @level < 0
    invalid_properties.push('invalid value for "level", must be greater than or equal to 0.')
  end

  if !@code.nil? && @code.to_s.length > 255
    invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 255.')
  end

  invalid_properties
end