@param string $fee

@return CurrencyInterface
485470
public function setExchangePctFee($fee)
    {
        if (!empty($fee) && ctype_print($fee)) {
            $this->exchangePercentageFee = trim($fee);
        }

        return $this;
    }
836727
public function set(CurrencyInterface $currency)
    {
        $this
            ->session
            ->set(
                $this->sessionFieldName,
                $currency->getIso()
            );

        return $this;
    }
330836
public function convert(Money $money, Currency $counterCurrency, $roundingMode = Money::ROUND_HALF_UP)
    {
        $baseCurrency = $money->getCurrency();
        $ratio = $this->exchange->quote($baseCurrency, $counterCurrency)->getConversionRatio();

        $baseCurrencySubunit = $this->currencies->subunitFor($baseCurrency);
        $counterCurrencySubunit = $this->currencies->subunitFor($counterCurrency);
        $subunitDifference = $baseCurrencySubunit - $counterCurrencySubunit;

        $ratio = (string) Number::fromFloat($ratio)->base10($subunitDifference);

        $counterValue = $money->multiply($ratio, $roundingMode);

        return new Money($counterValue->getAmount(), $counterCurrency);
    }
998798
public function getCurrency($iso)
    {
        if ($this->currencies === null && $this->config('include_currency', false)) {
            $this->currencies = include(__DIR__ . '/Support/Currencies.php');
        }

        return Arr::get($this->currencies, $iso);
    }
921614
public function setPrice(Money $price): self
    {
        $this->updateCurrency($price);
        $this->price = (int) $price->getAmount();
        $this->updateTotalPrice();

        return $this;
    }
1136544
public function add($amount)
    {
        if ($amount instanceof FeeContract) {
            $amount = $amount->get($this);
        }

        throw_unless($amount instanceof Amount, BadMethodCallException::class);

        return new static(
            $this->amount + $amount->convertTo($this->currency())->amount,
            $this->currency()
        );
    }
944450
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $services = $serviceLocator->getServiceLocator();
        $validator = new CurrencyCode();
        $validator->setCurrencyList($services->get(CurrencyListInterface::class));

        return $validator;
    }
345875
public static function createFromBill($bill, $scenario)
    {
        $attributes = $bill->getAttributes([
            'id', 'object_id', 'client_id', 'currency', 'type',
            'gtype', 'sum', 'time', 'quantity', 'unit', 'label', 'object', 'class',
        ]);

        $form = new self(['scenario' => $scenario]);
        $form->setAttributes($attributes, false);

        $form->charges = array_map(function ($model) use ($scenario) {
            $model->scenario = $scenario;

            return $model;
        }, $bill->charges);

        return $form;
    }
381739
private function setUserCurrency($currency, $request)
    {
        $currency = strtoupper($currency);

        // Set user selection globally
        currency()->setUserCurrency($currency);

        // Save it for later too!
        $request->getSession()->put(['currency' => $currency]);

        return $currency;
    }
63574
public static function parseByIntlLocalizedDecimal(
        $money,
        $forceCurrency,
        $locale = null,
        Currencies $currencies = null,
        $style = NumberFormatter::DECIMAL
    ) {
        $numberFormatter = new NumberFormatter($locale ?: static::getLocale(), $style);
        $parser = new IntlLocalizedDecimalParser($numberFormatter, $currencies ?: static::getCurrencies());

        return self::parseByParser($parser, $money, $forceCurrency);
    }
22732
public function formatMoney(Money $value)
    {
        $currencies = new ISOCurrencies();
        $moneyFormatter = new DecimalMoneyFormatter($currencies);

        return $moneyFormatter->format($value);
    }
1277464
protected function getCurrencyByCode(string $isoCode): CurrencyTransfer
    {
        if (!isset($this->currenciesHeap[$isoCode])) {
            try {
                $currencyTransfer = $this->currencyFacade->fromIsoCode($isoCode);

                $this->currenciesHeap[$isoCode] = $currencyTransfer;
            } catch (Throwable $throwable) {
                throw new EntityNotFoundException(sprintf('Currency not found: %s', $isoCode));
            }
        }

        return $this->currenciesHeap[$isoCode];
    }
339672
private function createCurrency($currencyCode)
    {
        /** @var CurrencyInterface $currency */
        $currency = $this->currencyFactory->createNew();
        $currency->setCode($currencyCode);

        return $currency;
    }
1268295
public function setCurrency(string $currency): self
    {
        $this->isValidCurrency($currency);

        $this->currency = $currency;

        return $this;
    }
834947
public function getCurrency() : ?string 
    {
        if ( ! $this->hasCurrency()) {
            $this->setCurrency($this->getDefaultCurrency());
        }
        return $this->currency;
    }
241795
public function setUnitPrice(Money $unitPrice): PriceInterface
    {
        // @todo change type from int to string
        $this->unitPrice = (int) $unitPrice->getAmount();

        return $this;
    }
1159919
public function getCurrency($currency = null): ?array
    {
        $currency = $currency ? mb_strtoupper($currency) : null;

        return $this->get("currency.{$currency}") ?: (current($this->get('currency', [])) ?: null);
    }