interface CurrencyRepositoryInterface in Price 2.0.x
Same name and namespace in other branches
- 2.x src/Repository/CurrencyRepositoryInterface.php \Drupal\price\Repository\CurrencyRepositoryInterface
Defines the currency repository interface.
Hierarchy
- interface \Drupal\price\Repository\CurrencyRepositoryInterface extends \CommerceGuys\Intl\Currency\CurrencyRepositoryInterface
Expanded class hierarchy of CurrencyRepositoryInterface
All classes that implement CurrencyRepositoryInterface
File
- src/
Repository/ CurrencyRepositoryInterface.php, line 10
Namespace
Drupal\price\RepositoryView source
interface CurrencyRepositoryInterface extends ExternalRepositoryInterface {
/**
* Gets the default number of fraction digits for the given currency code.
*
* Merchants are allowed to override the fraction digits through the UI,
* which can have an unexpected effect on payment gateways, which use that
* information when converting amounts to minor units.
*
* @param string $currency_code
* The currency code.
*
* @return int
* The number of fraction digits.
*
* @throws \CommerceGuys\Intl\Exception\UnknownCurrencyException
* Thrown if the given currency code is unknown.
*/
public function getDefaultFractionDigits(string $currency_code) : int;
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CurrencyRepositoryInterface:: |
public | function | Gets the default number of fraction digits for the given currency code. | 1 |