public function rates(string $currency, string $date) : Rates
    {
        $rates = $this->getBaseRates($currency, $date);
        if (empty($rates)) {
            $rates = $this->convert($this->download($date));
            if ($currency !== 'EUR') {
                //Set USD base rate
                $this->setBaseRates($rates->convertBaseRatesToUSD());

                if ($currency !== 'USD') {
                    $rates = $rates->convertBaseRateToCurrency($currency);
                    $this->setBaseRates($rates);
                }
            }
            else {
                $this->setBaseRates($rates);
            }
        }

        return $rates;
    }
public function rates(string $currency, string $date) : Rates
    {
        $rates = $this->getBaseRates($currency, $date);
        if (empty($rates)) {
            $rates = $this->convert($this->download($date));
            if ($currency !== 'EUR') {
                //Set USD base rate
                $this->setBaseRates($rates->convertBaseRatesToUSD());

                if ($currency !== 'USD') {
                    $rates = $rates->convertBaseRateToCurrency($currency);
                    $this->setBaseRates($rates);
                }
            }
            else {
                $this->setBaseRates($rates);
            }
        }

        return $rates;
    }
public function rates ( string $ currency , string $ date ) : Rates { $ rates = $ this -> getBaseRates ( $ currency , $ date ) ; if ( empty ( $ rates ) ) { $ rates = $ this -> convert ( $ this -> download ( $ date ) ) ; if ( $ currency !== 'EUR' ) { //Set USD base rate $ this -> setBaseRates ( $ rates -> convertBaseRatesToUSD ( ) ) ; if ( $ currency !== 'USD' ) { $ rates = $ rates -> convertBaseRateToCurrency ( $ currency ) ; $ this -> setBaseRates ( $ rates ) ; } } else { $ this -> setBaseRates ( $ rates ) ; } } return $ rates ; }
Get the rates from this provider.

@param string $currency
@param string $date

@return Rates
Get the rates from this provider .