Method: PureCloud::PhoneStatus#valid?

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

#valid?Boolean

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

Returns:

  • (Boolean)

    true if the model is valid



143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/purecloudplatformclientv2/models/phone_status.rb', line 143

def valid?
  allowed_values = ["OPERATIONAL", "DEGRADED", "OFFLINE"]
  if @operational_status && !allowed_values.include?(@operational_status)
    return false
  end
  allowed_values = ["IN_SERVICE", "MIXED_SERVICE", "OUT_OF_SERVICE", "NO_EDGES"]
  if @edges_status && !allowed_values.include?(@edges_status)
    return false
  end
  allowed_values = ["PRIMARY", "SECONDARY"]
  if @phone_assignment_to_edge_type && !allowed_values.include?(@phone_assignment_to_edge_type)
    return false
  end
end