code: public static function replace($id, $document, $connection)
      {
          $connection->query = self::singleDocument($document);
          $connection->method = 'PUT';
          $connection->action = '['.urlencode($id).']';
          return self::sendQuery($connection);
      }
docs: Set query parametrs to execute - Replace by "_id".
  
  @param  string  $id
  @param  array|object  $document
  @param  \stdClass $connection
  @return \Clusterpoint\Response\Single