Access the countries

        :returns: twilio.rest.voice.v1.dialing_permissions.country.CountryList
        :rtype: twilio.rest.voice.v1.dialing_permissions.country.CountryList
358180
def countries(self):
        
        if self._countries is None:
            self._countries = CountryList(self._version, )
        return self._countries
566329
public function getAllowedAddressCountries()
    {
        $allowedShippingCountries    = $this->getAllowedShippingCountries();
        $allowedShippingCountriesMap = array_map(
            function ($country) {
                return $country['country'];
            },
            $allowedShippingCountries
        );

        $allowedAddressCountries = [];
        foreach ($this->mainShipHelper->getMageShippingCountries() as $addressCountry) {
            $state  = array_search($addressCountry, $allowedShippingCountriesMap, true);
            $states = $state !== false ? $allowedShippingCountries[$state]['state'] : ['All'];

            $allowedAddressCountries[] =
                [
                    'country' => $addressCountry,
                    'state'   => $states
                ];
        }

        return $allowedAddressCountries;
    }
37370
def country_can_dp?(country)
      Phonelib.phone_data[country] &&
        Phonelib.phone_data[country][Core::DOUBLE_COUNTRY_PREFIX_FLAG] &&
        !original_starts_with_plus?
    end
725233
def queryset(self, request, queryset):
        
        if self.value():
            return queryset.filter(country=self.value())
        else:
            return queryset
1205195
def get_country_by_name(self, country_name) -> 'Country':
        
        VALID_STR.validate(country_name, 'get_country_by_name', exc=ValueError)
        if country_name not in self._countries_by_name.keys():
            for country in self.countries:

                if country.country_name == country_name:
                    return country
            raise ValueError(country_name)
        else:
            return self._countries_by_name[country_name]
317701
def lookups(self):
        
        if self._lookups is None:
            from twilio.rest.lookups import Lookups
            self._lookups = Lookups(self)
        return self._lookups
160821
public function getCountries()
    {
        if (!isset($this->_issuerData))
            throw new Exception("Issuer must be selected first");
        $countries = array();
        foreach ($this->_issuerData["Countries"] as $country) {
            array_push($countries, $country["CountryCode"]);
        }
        return $countries;
    }
671079
def country(code, limit, params = {})
      paginating_collection(
        limit,
        PER_PAGE,
        {"ResponseGroup" => "Country", "CountryCode" => code.to_s.upcase},
        params,
        &top_sites_parser
      )
    end
320707
def get_country_by_id(self, country_id: int) -> typing.Optional['Country']:
        
        VALID_POSITIVE_INT.validate(country_id, 'get_country_by_id')
        if country_id not in self._countries_by_id.keys():
            for country in self.countries:

                if country.country_id == country_id:
                    self._countries_by_id[country_id] = country
                    return country
            raise ValueError(country_id)
        else:
            return self._countries_by_id[country_id]
1052719
def country_field(key='country'):
    """"""

    country_list = list(countries)
    title_map = []
    for item in country_list:
        title_map.append({'value': item.alpha_3, 'name': item.name})

    widget = {
        'key': key,
        'type': 'uiselect',
        'titleMap': title_map
    }

    return widget
162506
protected function getListCountry()
    {
        $code = $this->getParam(0);

        if (!isset($code)) {
            return $this->country->getList(array('limit' => $this->getLimit()));
        }

        $country = $this->country->get($code);

        if (empty($country)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($country);
    }
1174326
def getCountry(value):
        
        if not helpers.has_len(value):
            return False

        return COUNTRIES.get(str(value).lower(), False)
592265
def from_country(cls, country):
        """"""
        result = cls.list({'sort_by': 'id ASC'})
        dc_countries = {}
        for dc in result:
            if dc['country'] not in dc_countries:
                dc_countries[dc['country']] = dc['id']

        return dc_countries.get(country)
694418
public function getCountryFull()
    {
        $list = i18n::getData()->getCountries();
        $country = strtolower($this->Country);
        return (array_key_exists($country, $list)) ? $list[$country] : $country;
    }
861642
protected function actionListCountry()
    {
        list($selected, $action, $value) = $this->getPostedAction();

        $updated = $deleted = 0;

        foreach ($selected as $code) {

            if ($action === 'status' && $this->access('country_edit')) {
                $updated += (int) $this->country->update($code, array('status' => $value));
            }

            if ($action === 'delete' && $this->access('country_delete')) {
                $deleted += (int) $this->country->delete($code);
            }
        }

        if ($updated > 0) {
            $message = $this->text('Updated %num item(s)', array('%num' => $updated));
            $this->setMessage($message, 'success');
        }

        if ($deleted > 0) {
            $message = $this->text('Deleted %num item(s)', array('%num' => $deleted));
            $this->setMessage($message, 'success');
        }
    }
61196
def calls(self):
        
        if self._calls is None:
            self._calls = CallList(self._version, account_sid=self._solution['sid'], )
        return self._calls
582674
function getCountryByName(name, useAlias) {
  if (!_.isString(name)) return undefined;

  return _.find(countries, (country) => {
    if (useAlias) {
      return country.name.toUpperCase() === name.toUpperCase()
        ||  _.find(country.alias, (alias) => (alias.toUpperCase() === name.toUpperCase()));
    }
    return country.name.toUpperCase() === name.toUpperCase();
  });
}