public function setRates()
    {
        // Avoid instance issues
        $self = $this;

        // Cache the currencies
        return $this->rates = $this->cache->remember('currencies', $this->getExpires(), function () use ($self) {
            if (! $appId = $self->getAppId()) {
                throw new Exception('OpenExchangeRates.org requires an app key.');
            }

            $client = new Client([ 'base_url' => $self->getUrl() ]);

            $data = $client->get("latest.json?app_id={$appId}")->json();

            return $data['rates'];
        });
    }