Update a chatbot.

@param  int    $id
@param  array  $data
@return \Illuminate\Support\Collection
191228
public function update($id, array $data)
    {
        $chatbot = $this->client->put(
            sprintf('buckets/%d/chats/%d/integrations/%d.json', $this->bucket, $this->parent, $id),
            [
                'json' => $data
            ]
        );
        $chatbot = new Chatbot($this->response($chatbot));
        $chatbot->inContext($this->bucket, $this->parent);

        return $chatbot;
    }
742917
public function update($id, $data)
    {
        $document = $this->client->put(
            sprintf('buckets/%d/documents/%d.json', $this->bucket, $id),
            [
                'json' => $data,
            ]
        );

        return new Document($this->response($document));
    }
240666
public function update ($list_name, $ID, array $data) {
		// Add ID to item
		$data['ID'] = $ID;
		return $this->updateMultiple($list_name, array($data));
	}
810427
public function update($id, array $data)
    {
        $model = $this->model->find($id);
        $model->fill($data);
        $model->save();

        return $model;
    }
401304
public function updateById($table, $data, $id = "id")
    {
        // check for id
        if (!isset($data[$id]))
            Throw new \ErrorException("SQL Error: Can't update because of bad data.");

        $options = array('W' => '`' . $id . "`='" . $this->escape($data[$id]) . "'");

        try {
            $this->update($table, $data, $options);
            return $data[$id];
        } catch (\Exception $e) {
            throw $e;
        }
    }
80137
public function updateReferences($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Skill not found.']);
		}

		// pass update to internal logic
		try {
			$this->doUpdateReferences($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(SkillEvent::PRE_REFERENCES_UPDATE, $model, $data);
		$this->dispatch(SkillEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(SkillEvent::POST_REFERENCES_UPDATE, $model, $data);
		$this->dispatch(SkillEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
735998
public function update($id, $data)
    {
        $response = $this->restClient->put($this->endpoint . '/' . $id, $data);

        return $response['body'];
    }
593528
public function update($id, array $data)
    {
        return $this->model->where($this->model->getKeyName(), $id)->update($data);
    }
758326
public function updatePositions($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Sport not found.']);
		}

		// pass update to internal logic
		try {
			$this->doUpdatePositions($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(SportEvent::PRE_POSITIONS_UPDATE, $model, $data);
		$this->dispatch(SportEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(SportEvent::POST_POSITIONS_UPDATE, $model, $data);
		$this->dispatch(SportEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
338397
public function update($id, array $data)
    {
        $todolist = $this->client->put(
            sprintf('buckets/%d/todolists/%d.json', $this->bucket, $id),
            [
                'json' => $data,
            ]
        );

        return new TodoList($this->response($todolist));
    }
366646
public function update($parentId, $id, array $data)
    {
        $resource = $this->createPartialResourceUrlForView($parentId, $id);
        $data = $this->client->put($resource, [$this->getResourceName() => $data]);

        return $this->fromArray(reset($data));
    }
1094339
public function updateRating($id, $data)
    {
        $rating = static::find($id);
        $rating->update($data);

        return $rating;
    }
714722
public function update($id, array $data)
    {
        $obj = $this->find($id);
        Event::fire('repository.updating', [$obj, $data]);
        $obj->update($data);
        return $obj;
    }
1185502
public function update($id, array $data)
    {
        $this->validateId($id);

        $entity = $this->getById($id);
        $form   = $this->getEditForm();

        $form->bind($entity);
        $form->setData($data);

        if (!$valid = $form->isValid()) {
            return false;
        }

        $this->updateFromNode($entity);

        $this->getMapper()->save($entity);

        return $entity;
    }
986925
public function updateVideos($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Reference not found.']);
		}

		// pass update to internal logic
		try {
			$this->doUpdateVideos($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(ReferenceEvent::PRE_VIDEOS_UPDATE, $model, $data);
		$this->dispatch(ReferenceEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(ReferenceEvent::POST_VIDEOS_UPDATE, $model, $data);
		$this->dispatch(ReferenceEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
52038
public function updateComment($id, $data, Model $parent = null)
    {
        $commentableModel = $this->commentableModel();

        $comment = (new $commentableModel())->updateComment($id, $data);

        if (!empty($parent)) {
            $parent->appendNode($comment);
        }

        return $comment;
    }
159939
public function update($id, array $data)
    {
        $entry = $this->client->put(
            sprintf('buckets/%d/schedule_entries/%d.json', $this->bucket, $id),
            [
                'json' => $data,
            ]
        );

        return new ScheduleEntry($this->response($entry));
    }