Method: PureCloud::Conversation#valid?

Defined in:
lib/purecloudplatformclientv2/models/conversation.rb

#valid?Boolean

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

Returns:

  • (Boolean)

    true if the model is valid



154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/purecloudplatformclientv2/models/conversation.rb', line 154

def valid?
  if @start_time.nil?
    return false
  end

  if @participants.nil?
    return false
  end

  allowed_values = ["ACTIVE", "PAUSED", "NONE"]
  if @recording_state && !allowed_values.include?(@recording_state)
    return false
  end
  allowed_values = ["alerting", "dialing", "contacting", "offering", "connected", "disconnected", "terminated", "converting", "uploading", "transmitting", "none"]
  if @state && !allowed_values.include?(@state)
    return false
  end
end