/** * * @param \Google\Spreadsheet\Batch\BatchRequest $batchRequest * * @return \Google\Spreadsheet\Batch\BatchResponse */ public function insertBatch(BatchRequest $batchRequest) { $xml = $batchRequest->createRequestXml($this); $response = ServiceRequestFactory::getInstance()->addHeader("If-Match", "*")->post($this->getBatchUrl(), $xml); ServiceRequestFactory::getInstance()->removeHeader("If-Match"); return new BatchResponse(new SimpleXMLElement($response)); }
/** * * @param \Google\Spreadsheet\Batch\BatchRequest $batchRequest * * @return \Google\Spreadsheet\Batch\BatchResponse */ public function updateBatch(BatchRequest $batchRequest) { $xml = $batchRequest->createRequestXml($this); $response = ServiceRequestFactory::getInstance()->post($this->getBatchUrl(), $xml); return new BatchResponse(new SimpleXMLElement($response)); }