lib/cs/end_point.rb
# Persist end point object to CS. It will create a new record on CS
# if it's a new object or it will update the object. It will throw an exception
# if it could not persist object to CS
#
# example for {Sensor} object:
#
#     sensor = client.sensors.build
#     sensor.name = "accelerometer"
#     sensor.display_name = "Accelerometer"
#     sensor.device_type = "BMA123"
#     sensor.pager_type = "email"
#     sensor.data_type = "json"
#     sensor.data_structure = {"x-axis" => "Float", "y-axis" => "Float", "z-axis" => "Float"}
#
#     sensor.save! # this will create new sensor on CS
#     sensor.id # should give you the id of the sensor
#
#     sensor.name = "accelerometer edit"
#     sensor.save! # this will update the sensor
Persist end point object to CS. It will create a new record on CS
if it's a new object or it will update the object. It will throw an exception
if it could not persist object to CS

example for {Sensor} object.






Persist end point object to CS . It will create a new record on CS if it ' s a new object or it will update the object . It will throw an exception if it could not persist object to CS example for { Sensor } object .
def save!(options={})
      check_session!
      if @id
        self.update!(options)
      else
        self.create!(options)
      end
    end
def save! ( options = { } ) check_session! if @id self . update! ( options ) else self . create! ( options ) end end
Persist end point object to CS.
Persist end point object to CS .
options
<not_specific>