@param string $referenceCurrencyCode
@param string $currencyCode

@return CurrencyPair
347381
private function getCurrencyPair($referenceCurrencyCode, $currencyCode)
    {
        $this->ensureValidCurrency($referenceCurrencyCode);
        $this->ensureValidCurrency($currencyCode);

        return new CurrencyPair($referenceCurrencyCode, $currencyCode);
    }
1138879
func (s *DescribeReservationOutput) SetCurrencyCode(v string) *DescribeReservationOutput {
	s.CurrencyCode = &v
	return s
}
1334339
public function setupRecurringPayments(string $currencyCode, string $paymentProviderId, float $replenishAmount, float $recurringAmount): BalanceInterface
    {
        $response = $this->client->post(
            $this->getBaseEndpointUri()->withPath("{$this->getBaseEndpointUri()->getPath()}/recurring-setup")->withQuery(http_build_query(['supportedCurrencyId' => $currencyCode])),
            (string) json_encode((object) [
                'providerId' => $paymentProviderId,
                'isRecurring' => 'true',
                'replenishAmount' => $replenishAmount,
                'recurringAmount' => $recurringAmount,
            ])
        );

        return $this->entitySerializer->deserialize(
            (string) $response->getBody(),
            $this->getEntityClass(),
            'json'
        );
    }
751903
protected static function countryCurrencyFormatter($countryCode)
    {
        $localeCode = Locale::countryLocaleCode($countryCode);

        return new \NumberFormatter($localeCode, \NumberFormatter::CURRENCY);
    }
1051621
public function convertTo(Currency $currency)
    {
        if ($this->currency->getCode() === $currency->getCode()) {
            return $this;
        }

        $baseAmount = $this->amount;

        if ($this->currency->getCode() !== static::baseCurrency()->getCode()) {
            $baseAmount = static::localAmountToDefault($this->amount, $this->currency);
        }

        return new static(
            static::baseAmountToLocal($baseAmount, $currency), $currency
        );
    }
80708
public function setExchangeRate(string $sourceCurrencyCode, string $targetCurrencyCode, $exchangeRate) : self
    {
        $this->exchangeRates[$sourceCurrencyCode][$targetCurrencyCode] = $exchangeRate;

        return $this;
    }
966886
protected function getEndpoint(Currency $referenceCurrency, Currency $currency)
    {
        $q = sprintf(
            'select * from yahoo.finance.xchange where pair in ("%s%s")',
            $referenceCurrency->getCode(),
            $currency->getCode()
        );

        $queryString = http_build_query(array(
            'q'      => $q,
            'format' => 'json',
            'env'    => 'store://datatables.org/alltableswithkeys',
        ));

        return 'https://query.yahooapis.com/v1/public/yql?'.$queryString;
    }
1071608
public static function useCurrency($currency, $symbol = null)
    {
        static::$currency = $currency;

        static::useCurrencySymbol($symbol ?: static::guessCurrencySymbol($currency));
    }
1022974
public static function createFromCurrencies(Currency $baseCurrency, Currency $counterCurrency)
    {
        $message = sprintf(
            'Cannot resolve a currency pair for currencies: %s/%s',
            $baseCurrency->getCode(),
            $counterCurrency->getCode()
        );

        return new self($message);
    }
956487
public function setCurrencyFromIsoAlpha3Code($isoAlpha3Code)
    {
        try {
            /** @var \Tx_Oelib_Mapper_Currency $mapper */
            $mapper = \Tx_Oelib_MapperRegistry::get(\Tx_Oelib_Mapper_Currency::class);
            $this->currency = $mapper->findByIsoAlpha3Code($isoAlpha3Code);
        } catch (Exception $exception) {
            $this->currency = null;
        }
    }
505783
func (s *ReservedElasticsearchInstance) SetCurrencyCode(v string) *ReservedElasticsearchInstance {
	s.CurrencyCode = &v
	return s
}
442429
public static function currencySymbol($code = null)
    {
        $localeCode = \Locale::getDefault();
        if ($code !== null) {
            $localeCode .= '@currency=' . $code;
        }
        $formatter = new \NumberFormatter($localeCode, \NumberFormatter::CURRENCY);
        $symbol = $formatter->getSymbol(\NumberFormatter::CURRENCY_SYMBOL);
        return $symbol != $code
            ? $symbol
            : (static::countryCurrencySymbol(substr($code, 0, 2))
                ?: $symbol);
    }
626639
public static function getSubUnit($currencyCode)
    {
        $subunits = static::getCurrencyData($currencyCode)['sub_unit'];
        if (!is_int($subunits)) {
            throw new UnexpectedValueException(sprintf(
                'The currency sub-units value must be an integer; "%s" given',
                is_object($subunits) ? get_class($subunits) : gettype($subunits)
            ));
        }
        if ($subunits < 1) {
            throw new UnexpectedValueException(sprintf(
                'The currency sub-units value must be greater than 1; "%s" given',
                $subunits
            ));
        }
        return $subunits;
    }
1266278
func (s *ReservationPurchaseRecommendationDetail) SetCurrencyCode(v string) *ReservationPurchaseRecommendationDetail {
	s.CurrencyCode = &v
	return s
}
1344468
public static String adaptCurrencyPair(CurrencyPair currencyPair) {
    return currencyPair.base.getCurrencyCode().toLowerCase()
        + currencyPair.counter.getCurrencyCode().toLowerCase();
  }
1301994
public function getCurrency($currencyCode) : Currency
    {
        if (isset($this->currencies[$currencyCode])) {
            return $this->currencies[$currencyCode];
        }

        if (! isset($this->currencyData[$currencyCode])) {
            if ($this->numericToCurrency === null) {
                $this->numericToCurrency = require __DIR__ . '/../data/numeric-to-currency.php';
            }

            if (isset($this->numericToCurrency[$currencyCode])) {
                return $this->getCurrency($this->numericToCurrency[$currencyCode]);
            }

            throw UnknownCurrencyException::unknownCurrency($currencyCode);
        }

        $currency = new Currency(... $this->currencyData[$currencyCode]);

        return $this->currencies[$currencyCode] = $currency;
    }
312220
public function getCurrencyIdByCode($code) {
        $this->sError = FALSE;

        if ($this->_currencyCode2Id === FALSE) {
            $this->_loadCurrencyCodes();
        }

        if (!isset($this->_currencyCode2Id[$code])) {
            $this->sError = 'Incorect currency code: ' . $code;
            return FALSE;
        }

        return $this->_currencyCode2Id[$code];
    }