Implement currency exchange rate API.

This commit is contained in:
James Cole
2018-06-28 07:32:58 +02:00
parent cfd98a33fe
commit f55d4e32c0
12 changed files with 255 additions and 17 deletions

View File

@@ -154,13 +154,15 @@ interface CurrencyRepositoryInterface
public function getCurrencyByPreference(Preference $preference): TransactionCurrency;
/**
* Get currency exchange rate.
*
* @param TransactionCurrency $fromCurrency
* @param TransactionCurrency $toCurrency
* @param Carbon $date
*
* @return CurrencyExchangeRate
* @return CurrencyExchangeRate|null
*/
public function getExchangeRate(TransactionCurrency $fromCurrency, TransactionCurrency $toCurrency, Carbon $date): CurrencyExchangeRate;
public function getExchangeRate(TransactionCurrency $fromCurrency, TransactionCurrency $toCurrency, Carbon $date): ?CurrencyExchangeRate;
/**
* @param User $user