Method: UltracartClient::ItemOption#valid?

Defined in:
lib/ultracart_api/models/item_option.rb

#valid?Boolean

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

Returns:

  • (Boolean)

    true if the model is valid



224
225
226
227
228
229
230
# File 'lib/ultracart_api/models/item_option.rb', line 224

def valid?
  return false if !@label.nil? && @label.to_s.length > 50
  return false if !@name.nil? && @name.to_s.length > 50
  type_validator = EnumAttributeValidator.new('String', ["dropdown", "file attachment", "fixed", "hidden", "multiline", "radio", "single"])
  return false unless type_validator.valid?(@type)
  true
end