lib/cs/end_point.rb
# Retrieve Data from CS of the current object based on the id of the object.
# It will return an exception if there is an error
#
# example for {Sensor} object:
#
#     sensor = client.sensors.build
#     sensor.id = "1"
#     sensor.retrieve!
Retrieve Data from CS of the current object based on the id of the object.
It will return an exception if there is an error

example for {Sensor} object.


Retrieve Data from CS of the current object based on the id of the object . It will return an exception if there is an error example for { Sensor } object .
def retrieve!
      check_session!
      raise Error::ResourceIdError unless @id
      res = session.get(get_url)
      if session.response_code != 200
        errors = session.errors rescue nil
        raise Error::ResponseError, errors
      end
      from_hash(res[resource.to_s]) if res
      true
    end
def retrieve! check_session! raise Error :: ResourceIdError unless @id res = session . get ( get_url ) if session . response_code != 200 errors = session . errors rescue nil raise Error :: ResponseError , errors end from_hash ( res [ resource . to_s ] ) if res true end
Retrieve Data from CS of the current object based on the id of the object.
Retrieve Data from CS of the current object based on the id of the object .