lib/phrase/models/distribution_create_parameters.rb in phrase-2.26.0 vs lib/phrase/models/distribution_create_parameters.rb in phrase-3.0.0

- old
+ new

@@ -125,15 +125,25 @@ # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @project_id.nil? + invalid_properties.push('invalid value for "project_id", project_id cannot be nil.') + 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? + return false if @name.nil? + return false if @project_id.nil? true end # Checks equality by comparing each attribute. # @param [Object] Object to be compared