Get Region

@return Models\Region

@link https://tech.yandex.ru/market/partner/doc/dg/reference/get-campaigns-id-region-docpage/
168620
public function getRegion()
    {
        $resource = 'campaigns/' . $this->campaignId . '/region.json';

        $response = $this->sendRequest('GET', $this->getServiceUrl($resource));

        $decodedResponseBody = $this->getDecodedBody($response->getBody());
        $getRegionResponse = new Models\GetRegionResponse($decodedResponseBody);
        return $getRegionResponse->getRegion();
    }
1251080
public function getCountry()
    {
        if (! $this->country) {
            $this->country = $this->filterValidCountry($this->countries);
        }

        return $this->country;
    }
1316490
def regions(self):
        
        json = self.request('/regions', method='GET')
        status = json.get('status')
        if status == 'OK':
            regions_json = json.get('regions', [])
            regions = [Region.from_json(region) for region in regions_json]
            return regions
        else:
            message = json.get('message')
            raise DOPException('[%s]: %s' % (status, message))
642938
protected function getCountryInformation()
    {
        // Get the country for the lookup.
        $country = null;

        if (('get' === $this->get('countrymode')) && $this->get('country_get')) {
            $getValue = Input::get($this->get('country_get')) ?: Input::post($this->get('country_get'));
            $getValue = \trim($getValue);
            if (!empty($getValue)) {
                $country = $getValue;
            }
        } elseif ('preset' === $this->get('countrymode')) {
            $country = $this->get('country_preset');
        }

        return $country;
    }
1103688
public function getSection()
    {
        if (null === $this->_section) {
            $this->setSection(new Section($this->getUid(), array('page' => $this)));
        }

        return $this->_section;
    }
694937
public function getUsedLocales()
    {
        $queryBuilder = $this->createQueryBuilder('blog')
            ->select('DISTINCT(b_translation.locale) AS locale')
            ->join('blog.translations', 'b_translation');

        $locales = [];
        foreach ($queryBuilder->getQuery()->getResult() as $locale) {
            $locales[] = $locale['locale'];
        }

        return $locales;
    }
205345
public function getLongDesc()
    {
        /** @var \OxidEsales\Eshop\Core\UtilsView $oUtilsView */
        $oUtilsView = \OxidEsales\Eshop\Core\Registry::getUtilsView();
        return $oUtilsView->parseThroughSmarty($this->oxnews__oxlongdesc->getRawValue(), $this->getId() . $this->getLanguage(), null, true);
    }
614202
private function get_target_section() {

        if (!$this->fixeddataset) {
            $key = rand(1, self::$paramsections[$this->size]);
        } else {
            // Using section 1.
            $key = 1;
        }

        return $key;
    }
576109
@Override
    public String getRegion() {
        DynamicStringProperty defaultEurekaRegion = configInstance.getStringProperty(CLIENT_REGION_FALLBACK_KEY, Values.DEFAULT_CLIENT_REGION);
        return configInstance.getStringProperty(namespace + CLIENT_REGION_KEY, defaultEurekaRegion.get()).get();
    }
1336211
public function getCountry()
    {
        $countryCode = $this->getAsString('static_info_country');
        if ($countryCode === '') {
            return null;
        }

        try {
            /** @var \Tx_Oelib_Mapper_Country $countryMapper */
            $countryMapper = \Tx_Oelib_MapperRegistry::get(\Tx_Oelib_Mapper_Country::class);
            /** @var \Tx_Oelib_Model_Country $country */
            $country = $countryMapper->findByIsoAlpha3Code($countryCode);
        } catch (\Tx_Oelib_Exception_NotFound $exception) {
            $country = null;
        }

        return $country;
    }
684572
public function query()
    {
        $locale = app()->getLocale();
        $query = app($this->model)->query()->orderBy('sort_order', 'ASC')->orderBy("title->\${$locale}", 'ASC');

        return $this->applyScopes($query);
    }
465719
public function getAllDomainsByLocale()
    {
        return TransUnitQuery::create()
            ->joinWith('Translation')
            ->withColumn('Translation.Locale', 'locale')
            ->withColumn('Domain', 'domain')
            ->select(array('locale', 'domain'))
            ->groupBy('locale')
            ->groupBy('domain')
            ->find($this->getConnection())
            ->getArrayCopy()
        ;
    }
1374900
public function getRegionName(): ?string
    {
        return $this->region ? (static::regions()[$this->region] ?? $this->region) : null;
    }
65445
public function getCountries()
    {
        if ($this->_aCountries === null) {
            $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
            $this->_aCountries = [];
            $sSelect = 'select oxobjectid from oxobject2payment where oxpaymentid=' . $oDb->quote($this->getId()) . ' and oxtype = "oxcountry" ';
            $rs = $oDb->getCol($sSelect);
            $this->_aCountries = $rs;
        }

        return $this->_aCountries;
    }
385487
public java.util.List<Region> getRegions() {
        if (regions == null) {
            regions = new com.amazonaws.internal.SdkInternalList<Region>();
        }
        return regions;
    }
478799
protected function getPulledRegionIDs()
    {
        if (!$this->request) {
            return array();
        }
        $header = $this->request->getHeader(self::PULL_HEADER);
        if (!empty($header)) {
            return explode(',', $header);
        }
        $param  = $this->request->requestVar(self::PULL_PARAM);
        if (!empty($param)) {
            return explode(',', $param);
        }
        return array();
    }
743947
public function getCountryMapper()
    {
        if (null === $this->countryMapper) {
            $this->countryMapper = $this->getServiceManager()->get('delcountriesflags_mapper');
        }
        return $this->countryMapper;
    }