public function editTournamentCode( string $tournament_code, TournamentCodeUpdateParameters $parameters )
	{
		if ($this->getSetting(self::SET_INTERIM, false))
			throw new RequestException('This endpoint is not available in interim mode.');

		if (in_array($parameters->pickType, self::TOURNAMENT_ALLOWED_PICK_TYPES, true) == false)
			throw new RequestParameterException('Value of pick type (pickType) is invalid. Allowed values: ' . implode(', ', self::TOURNAMENT_ALLOWED_PICK_TYPES));

		if (in_array($parameters->mapType, self::TOURNAMENT_ALLOWED_MAPS, true) == false)
			throw new RequestParameterException('Value of map type (mapType) is invalid. Allowed values: ' . implode(', ', self::TOURNAMENT_ALLOWED_MAPS));

		if (in_array($parameters->spectatorType, self::TOURNAMENT_ALLOWED_SPECTATOR_TYPES, true) == false)
			throw new RequestParameterException('Value of spectator type (spectatorType) is invalid. Allowed values: ' . implode(', ', self::TOURNAMENT_ALLOWED_SPECTATOR_TYPES));

		$data = json_encode($parameters);

		$resultPromise = $this->setEndpoint("/lol/tournament/" . self::RESOURCE_TOURNAMENT_VERSION . "/codes/{$tournament_code}")
			->setResource(self::RESOURCE_TOURNAMENT, "/codes/%s")
			->setData($data)
			->useKey(self::SET_TOURNAMENT_KEY)
			->makeCall(Region::AMERICAS, self::METHOD_PUT);

		$this->resolveOrEnqueuePromise($resultPromise);
	}
public function editTournamentCode( string $tournament_code, TournamentCodeUpdateParameters $parameters )
	{
		if ($this->getSetting(self::SET_INTERIM, false))
			throw new RequestException('This endpoint is not available in interim mode.');

		if (in_array($parameters->pickType, self::TOURNAMENT_ALLOWED_PICK_TYPES, true) == false)
			throw new RequestParameterException('Value of pick type (pickType) is invalid. Allowed values: ' . implode(', ', self::TOURNAMENT_ALLOWED_PICK_TYPES));

		if (in_array($parameters->mapType, self::TOURNAMENT_ALLOWED_MAPS, true) == false)
			throw new RequestParameterException('Value of map type (mapType) is invalid. Allowed values: ' . implode(', ', self::TOURNAMENT_ALLOWED_MAPS));

		if (in_array($parameters->spectatorType, self::TOURNAMENT_ALLOWED_SPECTATOR_TYPES, true) == false)
			throw new RequestParameterException('Value of spectator type (spectatorType) is invalid. Allowed values: ' . implode(', ', self::TOURNAMENT_ALLOWED_SPECTATOR_TYPES));

		$data = json_encode($parameters);

		$resultPromise = $this->setEndpoint("/lol/tournament/" . self::RESOURCE_TOURNAMENT_VERSION . "/codes/{$tournament_code}")
			->setResource(self::RESOURCE_TOURNAMENT, "/codes/%s")
			->setData($data)
			->useKey(self::SET_TOURNAMENT_KEY)
			->makeCall(Region::AMERICAS, self::METHOD_PUT);

		$this->resolveOrEnqueuePromise($resultPromise);
	}
public function editTournamentCode ( string $ tournament_code , TournamentCodeUpdateParameters $ parameters ) { if ( $ this -> getSetting ( self :: SET_INTERIM , false ) ) throw new RequestException ( 'This endpoint is not available in interim mode.' ) ; if ( in_array ( $ parameters -> pickType , self :: TOURNAMENT_ALLOWED_PICK_TYPES , true ) == false ) throw new RequestParameterException ( 'Value of pick type (pickType) is invalid. Allowed values: ' . implode ( ', ' , self :: TOURNAMENT_ALLOWED_PICK_TYPES ) ) ; if ( in_array ( $ parameters -> mapType , self :: TOURNAMENT_ALLOWED_MAPS , true ) == false ) throw new RequestParameterException ( 'Value of map type (mapType) is invalid. Allowed values: ' . implode ( ', ' , self :: TOURNAMENT_ALLOWED_MAPS ) ) ; if ( in_array ( $ parameters -> spectatorType , self :: TOURNAMENT_ALLOWED_SPECTATOR_TYPES , true ) == false ) throw new RequestParameterException ( 'Value of spectator type (spectatorType) is invalid. Allowed values: ' . implode ( ', ' , self :: TOURNAMENT_ALLOWED_SPECTATOR_TYPES ) ) ; $ data = json_encode ( $ parameters ) ; $ resultPromise = $ this -> setEndpoint ( "/lol/tournament/" . self :: RESOURCE_TOURNAMENT_VERSION . "/codes/{$tournament_code}" ) -> setResource ( self :: RESOURCE_TOURNAMENT , "/codes/%s" ) -> setData ( $ data ) -> useKey ( self :: SET_TOURNAMENT_KEY ) -> makeCall ( Region :: AMERICAS , self :: METHOD_PUT ) ; $ this -> resolveOrEnqueuePromise ( $ resultPromise ) ; }
Updates tournament code's settings.

@param string $tournament_code
@param Objects\TournamentCodeUpdateParameters $parameters

@throws SettingsException
@throws RequestException
@throws RequestParameterException
@throws ServerException
@throws ServerLimitException
@throws GeneralException

@link https://developer.riotgames.com/api-methods/#tournament-v4/PUT_updateCode
Updates tournament code s settings .