Updates an country
@param string $code
482282
protected function updateCountry($code)
    {
        if (!$this->isError() && !$this->country->update($code, $this->getSubmitted())) {
            $this->errorAndExit($this->text('Unexpected result'));
        }
    }
11439
public function setCode( $code = null)
	{
		// Require that the response be unlocked before changing it
		$this->requireUnlocked();
		$this->status = new Status($code);
		return $this;
	}
1149587
public function country($code, $locale = null)
    {
        $name = Intl::getRegionBundle()->getCountryName($code, $locale ?: $this->localeDetector->getLocale());

        return $name ? $this->fixCharset($name) : '';
    }
1246697
public function setCode($code) {
        $this->code = trim($code);
        $this->codeLength = strlen($this->code);
        return $this;
    }
985060
public function setStatus(int $code): Response
    {
        # `Status::getText` will throw an exception for invalid status codes
        $this->statusText = Status::getText($code);
        $this->statusCode = $code;
        return $this;
    }
901235
public function setStatus($code, $reasonPhrase = null)
    {
        $this->statusCode   = $code;
        $this->reasonPhrase = $reasonPhrase;
    }
149986
public function formatCountry($country_code)
    {
        $this->setCountry($country_code);
        $this->setTitleFormatCountry();
        $this->setBreadcrumbFormatCountry();

        $this->setData('format', $this->data_country['format']);

        $this->submitFormatCountry();
        $this->outputFormatCountry();
    }
480563
public function switchCountry($sCountryCode)
    {
        if (empty($sCountryCode) || !PluginManager::instance()->hasPlugin('RainLab.Location')) {
            return;
        }

        $this->obActiveCountry = \RainLab\Location\Models\Country::whereCode($sCountryCode)->first();
    }
500560
protected function setCountryCity($country_code)
    {
        $this->data_country = $this->country->get($country_code);

        if (empty($this->data_country)) {
            $this->outputHttpStatus(404);
        }
    }
597863
public function setCode(string $code)
    {
        if ($code) {
            $this->selectLocale = strtolower($code);
            $this->ready = true;    // set ready for use locale
            $this->checkLocale();
        }
//        \Tracy\Debugger::fireLog('setCode: ' . $code);
    }
1085083
public function setDefaultVersion(string $code)
    {
        if (! array_key_exists($code, $this->supportedVersions)) {
            throw new InvalidArgumentException("Unable to set [{$code}] as default version!");
        }

        $this->defaultVersion = $code;

        return $this;
    }
1078428
public void addCountryCode(final String countryCode) {
        if (null == countryCodes) {
            countryCodes = new ArrayList<String>();
        }
        countryCodes.add(countryCode);
    }
1037979
public function setUninstalled($code)
    {
        $history = Parameter::get('system::theme.history', []);
        if (array_key_exists($code, $history)) {
            unset($history[$code]);
        }

        Parameter::set('system::theme.history', $history);
    }
1217658
public function update($code, array $data)
    {
        $result = null;
        $this->hook->attach('currency.update.before', $code, $data, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        $existing = $this->getList();

        if (empty($existing[$code])) {
            return false;
        }

        unset($data['code']);

        $data['modified'] = GC_TIME;

        if (!empty($data['default'])) {
            $data['status'] = 1;
            $this->config->set('currency', $code);
        }

        $saved = $this->config->select('currencies', array());

        if (empty($saved[$code])) {
            $data += $existing[$code];
        } else {
            $data += $saved[$code];
        }

        $default = $this->getDefaultData();

        $saved[$code] = array_intersect_key($data, $default);
        $result = $this->config->set('currencies', $saved);

        $this->hook->attach('currency.update.after', $code, $data, $result, $this);
        return (bool) $result;
    }
851821
public function setStateCodeAttribute($code)
    {
        if (!$state = State::whereCode($code)->first()) {
            return;
        }

        $this->model->state = $state;
    }
324234
public final function setStatusCode($code)
    {
        if (! is_numeric($code)) {

            throw new ehough_shortstop_api_exception_InvalidArgumentException(
                'Status code must be an integer (' . $code . ')'
            );
        }

        $code = intval($code);

        if ($code < 100 || $code > 599) {

            throw new ehough_shortstop_api_exception_InvalidArgumentException(
                'Status code must be in the range of 100 - 599'
            );
        }

        $this->_statusCode = $code;
    }
542389
public function update(string $code, string $newCode, string $cardId = '')
    {
        $params = [
            'code' => $code,
            'new_code' => $newCode,
            'card_id' => $cardId,
        ];

        return $this->httpPostJson('card/code/update', $params);
    }