def update(element)
      elementHash = element.to_hash
      parameter = { basic_auth: @auth,
                    body: elementHash.to_json,
                    headers: { 'Content-Type' => 'application/json; charset=utf-8 ' } }
      save_response = self.class.put("/elements/#{element.key}", parameter)
      if save_response.success?
        Element.new(save_response.parsed_response)
      else
        puts "Could not save element: #{save_response.headers['x-errordescription']}"
      end
    end
def update(element)
      elementHash = element.to_hash
      parameter = { basic_auth: @auth,
                    body: elementHash.to_json,
                    headers: { 'Content-Type' => 'application/json; charset=utf-8 ' } }
      save_response = self.class.put("/elements/#{element.key}", parameter)
      if save_response.success?
        Element.new(save_response.parsed_response)
      else
        puts "Could not save element: #{save_response.headers['x-errordescription']}"
      end
    end
Saves a element to keytech web api and returns the saved element.
 If anything goes wrong - a http response is returned