Method: GongAPI::ExternalPartyObject#valid?

Defined in:
lib/gong_api/models/external_party_object.rb

#valid?Boolean

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

Returns:

  • true if the model is valid



120
121
122
123
124
125
126
# File 'lib/gong_api/models/external_party_object.rb', line 120

def valid?
  object_type_validator = EnumAttributeValidator.new('Object', ['Contact', 'Lead', 'User'])
  return false unless object_type_validator.valid?(@object_type)
  timing_validator = EnumAttributeValidator.new('Object', ['Now', 'TimeOfCall'])
  return false unless timing_validator.valid?(@timing)
  true
end