public function edit($id, $name, $permission = '')
	{
		// Build the request path.
		$path = '/teams/' . (int) $id;

		$data = array(
			'name' => $name,
		);

		if ($permission)
		{
			if (\in_array($permission, array('pull', 'push', 'admin')) == false)
			{
				throw new \UnexpectedValueException('Permissions must be either "pull", "push", or "admin".');
			}

			$data['permission'] = $permission;
		}

		return $this->processResponse(
			$this->client->patch($this->fetchUrl($path), $data)
		);
	}