Interface IExchangeRateRetriever
Namespace: LemonEdge.API.Entities.FinancialServices.Processors
Assembly: LemonEdge.API.Entities.FinancialServices.dll
Syntax
public interface IExchangeRateRetriever
Methods
GetExchangeRate(Guid, Guid, DateTime, Guid?)
Provides the exchange rate to use when converting from a currency to another one for the specified date
Takes care of reciprocal rates automatically, always providing the rate fromCurrency ->
toCurrency
Declaration
Task<decimal> GetExchangeRate(Guid fromCurrency, Guid toCurrency, DateTime forDate, Guid? exchangeRateCategoryID)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | fromCurrency | The currency to retrieve the closest exchange rate from |
| Guid | toCurrency | The currency to find the closest exchange rate to |
| DateTime | forDate | The date that the exchange rate must be closest to, and less than or equal to |
| Guid? | exchangeRateCategoryID | The exchange rate category these exchange rates should be retrieved from. NUll indicates the default exchange rates with no category. |
Returns
| Type | Description |
|---|---|
| Task<decimal> | The rate to apply to convert from |