mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
38 lines
942 B
PHP
38 lines
942 B
PHP
|
<?php
|
||
|
/**
|
||
|
* ExchangeRateInterface.php
|
||
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||
|
* This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License.
|
||
|
*
|
||
|
* See the LICENSE file for details.
|
||
|
*/
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace FireflyIII\Services\Currency;
|
||
|
|
||
|
|
||
|
use Carbon\Carbon;
|
||
|
use FireflyIII\Models\CurrencyExchangeRate;
|
||
|
use FireflyIII\Models\TransactionCurrency;
|
||
|
use FireflyIII\User;
|
||
|
|
||
|
interface ExchangeRateInterface
|
||
|
{
|
||
|
/**
|
||
|
* @param TransactionCurrency $fromCurrency
|
||
|
* @param TransactionCurrency $toCurrency
|
||
|
* @param Carbon $date
|
||
|
*
|
||
|
* @return CurrencyExchangeRate
|
||
|
*/
|
||
|
public function getRate(TransactionCurrency $fromCurrency, TransactionCurrency $toCurrency, Carbon $date): CurrencyExchangeRate;
|
||
|
|
||
|
/**
|
||
|
* @param User $user
|
||
|
*
|
||
|
* @return mixed
|
||
|
*/
|
||
|
public function setUser(User $user);
|
||
|
|
||
|
}
|