You are here

public function AbstractExchangerCalculator::getExchangeRates in Commerce Exchanger 8

Get all exchange rates.

Return value

array Return exchange rates which are used for calculations.

Overrides ExchangerCalculatorInterface::getExchangeRates

1 call to AbstractExchangerCalculator::getExchangeRates()
AbstractExchangerCalculator::priceConversion in src/AbstractExchangerCalculator.php
Preform currency conversion for prices.

File

src/AbstractExchangerCalculator.php, line 99

Class

AbstractExchangerCalculator
Class AbstractExchangerCalculator.

Namespace

Drupal\commerce_exchanger

Code

public function getExchangeRates() {
  return $this->configFactory
    ->get($this
    ->getExchangerId())
    ->get('rates') ?? [];
}