lib/cs/end_point.rb
# Delete the current end point object from CS. It will throw an exception if there is an error
#
# example for {Sensor} object:
#
#     sensor = client.sensors.find(1)
#     sensor.name = "new name"
#     sensor.delete!
Delete the current end point object from CS. It will throw an exception if there is an error
example for {Sensor} object.


Delete the current end point object from CS . It will throw an exception if there is an error example for { Sensor } object .
def delete!
      check_session!
      raise Error::ResourceIdError unless @id
      res = session.delete(delete_url)
      if session.response_code != 200
        errors = session.errors rescue nil
        raise Error::ResponseError, errors
      end
      self.id = nil
      true
    end
def delete! check_session! raise Error :: ResourceIdError unless @id res = session . delete ( delete_url ) if session . response_code != 200 errors = session . errors rescue nil raise Error :: ResponseError , errors end self . id = nil true end
Delete the current end point object from CS.
Delete the current end point object from CS .