interface ExchangerCalculatorInterface in Commerce Exchanger 8
Provides default price calculator with exchange rates.
@package Drupal\commerce_exchanger
Hierarchy
- interface \Drupal\commerce_exchanger\ExchangerCalculatorInterface
Expanded class hierarchy of ExchangerCalculatorInterface
All classes that implement ExchangerCalculatorInterface
File
- src/
ExchangerCalculatorInterface.php, line 12
Namespace
Drupal\commerce_exchangerView source
interface ExchangerCalculatorInterface {
/**
* Preform currency conversion for prices.
*
* @param \Drupal\commerce_price\Price $price
* Price object.
* @param string $target_currency
* Target currency.
*
* @return \Drupal\commerce_price\Price
* Return updated price object with new currency.
*/
public function priceConversion(Price $price, string $target_currency);
/**
* Get all exchange rates.
*
* @return array
* Return exchange rates which are used for calculations.
*/
public function getExchangeRates();
/**
* Return configuration file of active provider or NULL.
*
* @return string|null
* Return provider.
*/
public function getExchangerId();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ExchangerCalculatorInterface:: |
public | function | Get all exchange rates. | 1 |
ExchangerCalculatorInterface:: |
public | function | Return configuration file of active provider or NULL. | 1 |
ExchangerCalculatorInterface:: |
public | function | Preform currency conversion for prices. | 1 |