iso_code; } /** * @param string $iso_code * * @return Currency */ public function setIsoCode(?string $iso_code): self { $this->iso_code = $iso_code; return $this; } /** * Returns the inverse exchange rate (how many of the current currency the base unit is worth). */ public function getInverseExchangeRate(): ?string { $tmp = $this->getExchangeRate(); if (null === $tmp || '0' === $tmp) { return null; } return bcdiv('1', $tmp, static::PRICE_SCALE); } /** * Returns The exchange rate between this currency and the base currency * (how many base units the current currency is worth). */ public function getExchangeRate(): ?string { return $this->exchange_rate; } /** * Sets the exchange rate of the currency. * * @param string|null $exchange_rate The new exchange rate of the currency. * Set to null, if the exchange rate is unknown. * * @return Currency */ public function setExchangeRate(?string $exchange_rate): self { $this->exchange_rate = $exchange_rate; return $this; } /** * Returns the ID as an string, defined by the element class. * This should have a form like P000014, for a part with ID 14. * * @return string The ID as a string; */ public function getIDString(): string { return 'C'.$this->getID(); } }