/**
  * update a target by his values
  * @param $id The target's id
  * @param array $values
  * @return null|Target
  */
 public function updateTargetFromValues($id, array $values)
 {
     list($this->last_result, $this->last_error) = $this->rest_client->put($this->path . '/' . $id, $values);
     $this->erreur = $this->getError($this->last_result, $this->last_error);
     if (isset($this->erreur)) {
         return null;
     }
     if (!Target::isJsonValid($this->last_result)) {
         $this->erreur = $this->jsonErrorMessage();
         return null;
     }
     return new Target($this->last_result);
 }