* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ namespace PrestaShop\PrestaShop\Core\Domain\Currency\Query; use PrestaShop\PrestaShop\Core\Domain\Currency\Exception\CurrencyException; use PrestaShop\PrestaShop\Core\Domain\Currency\ValueObject\AlphaIsoCode; /** * Retrieves the exchange rate for a currency compared to the shop's default */ class GetCurrencyExchangeRate { /** * @var AlphaIsoCode */ private $isoCode; /** * @param string $isoCode Currency ISO code * * @throws CurrencyException */ public function __construct(string $isoCode) { $this->isoCode = new AlphaIsoCode($isoCode); } /** * @return AlphaIsoCode */ public function getIsoCode(): AlphaIsoCode { return $this->isoCode; } }