Update counter operation

@see http://api.yandex.ru/metrika/doc/beta/management/operations/editoperation.xml

@param int $id
@param int $counterId
@param Models\Operation $operation
@return Models\Operation
973738
public function updateOperation($id, $counterId, Models\Operation $operation)
    {
        $resource = 'counter/' . $counterId . '/operation/' . $id;
        $response = $this->sendPutRequest($resource, ["operation" => $operation->toArray()]);
        $operationsResponse = new Models\UpdateOperationResponse($response);
        return $operationsResponse->getOperation();
    }
740987
public function update(TeamUpdateRequest $request, $id)
    {
        try {
            $result = $this->service->update($id, $request->except('_token'));

            if ($result) {
                return back()->with('message', 'Successfully updated');
            }

            return back()->with('message', 'Failed to update');
        } catch (Exception $e) {
            return back()->withErrors($e->getMessage());
        }
    }
665632
public function update($id)
    {
        $parameters = $this->validateRequest(true);
        $model = $this->repository->update($id, $parameters);
        return $this->modelResponse($model);
    }
296038
public function removeOperation(OperationInterface $operation)
    {
        if ($this->operations->contains($operation)) {
            $this->operations->removeElement($operation);
        }

        return $this;
    }
188646
public function update($id)
    {
        $obj = new \CIBlock();
        if (!$obj->Update($id, $this->fields)) {
            throw new \Exception($obj->LAST_ERROR);
        }

        Logger::log("Обновлен инфоблок {$id}", Logger::COLOR_GREEN);
    }
328243
public function getFilter($id, $counterId, $params = [])
    {
        $resource = 'counter/' . $counterId . '/filter/' . $id;
        $response = $this->sendGetRequest($resource, $params);
        $filterResponse = new Models\GetFilterResponse($response);
        return $filterResponse->getFilter();
    }
553
public function updateAction(Request $request, $id)
    {
        $this->checkCsrf();

        $transUnit = $this->get('lexik_translation.data_grid.request_handler')->updateFromRequest($id, $request);

        return $this->get('lexik_translation.data_grid.formatter')->createSingleResponse($transUnit);
    }
1045053
public function addOperation(Operation $operation)
    {
        $this->operations[$operation->name] = $operation;
        ksort($this->operations);
    }
685465
public Operation getOperation(String id) {
        for (Iterator<Operation> it = operations.iterator(); it.hasNext();) {
            Operation oper = it.next();
            if (oper.getId().compareTo(id) == 0) {
                return oper;
            }
        }
        return null;
    }
1210143
public function update($id)
    {
        $content = $this->repository->getById($id);
        if (!empty($content)) {
            $this->authorize('update', $content);
            $input   = $this->validator->validate('update');
            $content = $this->repository->update($content, $input, auth()->user());
            return $this->respondWithSuccess($content, new ContentTransformer);
        }
        return $this->respondNotFound();
    }
250183
public function updateCountersAsync($counters)
    {
        Yii::$app->queue->push(new UpdateActiveRecordCountersJob([
            'modelClass' => get_called_class(),
            'condition' => $this->getPrimaryKey(true),
            'counters' => $counters,
        ]));
    }
45296
public function getOperation($id, $counterId, $params = [])
    {
        $resource = 'counter/' . $counterId . '/operation/' . $id;
        $response = $this->sendGetRequest($resource, $params);
        $operationResponse = new Models\GetOperationResponse($response);
        return $operationResponse->getOperation();
    }
714722
public function update($id, array $data)
    {
        $obj = $this->find($id);
        Event::fire('repository.updating', [$obj, $data]);
        $obj->update($data);
        return $obj;
    }
11597
public function updateGrant($counterId, $userLogin, Models\Grant $grant)
    {
        $resource = 'counter/' . $counterId . '/grant/' . $userLogin;
        $response = $this->sendPutRequest($resource, ["grant" => $grant->toArray()]);
        $grantResponse = new Models\UpdateGrantResponse($response);
        return $grantResponse->getGrant();
    }
1178736
protected function addChange($calendarId, $objectUri, $operation)
    {
        $stmt = $this->pdo->prepare('INSERT INTO '.$this->calendarChangesTableName.' (uri, synctoken, calendarid, operation) SELECT ?, synctoken, ?, ? FROM '.$this->calendarTableName.' WHERE id = ?');
        $stmt->execute([
            $objectUri,
            $calendarId,
            $operation,
            $calendarId,
        ]);
        $stmt = $this->pdo->prepare('UPDATE '.$this->calendarTableName.' SET synctoken = synctoken + 1 WHERE id = ?');
        $stmt->execute([
            $calendarId,
        ]);
    }
191026
public function remove($id) {
		try {
			return $this->getBackend()->delete($this->prepareId($id));
		}
		catch (PhalconCacheException $exception) {
			if ($this->operationsExceptions) {
				throw new OperationFailed('Removing of the data from the cache failed due to the backend exception occurred: "' . $exception->getMessage() . '"', 0, $exception);
			} else {
				return false;
			}
		}
	}
809734
public function addCounter(Models\Counter $counter)
    {
        $resource = 'counters';
        $response = $this->sendPostRequest($resource, ["counter" => $counter->toArray()]);
        $counter = new Models\AddCounterResponse($response);
        return $counter->getCounter();
    }