2017-09-13 15:47:34 +09:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2017-09-15 16:06:57 +09:00
|
|
|
|
namespace BTCPayServer.Services.Rates
|
2017-09-13 15:47:34 +09:00
|
|
|
|
{
|
2017-10-27 17:53:04 +09:00
|
|
|
|
public class Rate
|
|
|
|
|
{
|
|
|
|
|
public Rate()
|
|
|
|
|
{
|
2017-09-13 15:47:34 +09:00
|
|
|
|
|
2017-10-27 17:53:04 +09:00
|
|
|
|
}
|
|
|
|
|
public Rate(string currency, decimal value)
|
|
|
|
|
{
|
|
|
|
|
Value = value;
|
|
|
|
|
Currency = currency;
|
|
|
|
|
}
|
|
|
|
|
public string Currency
|
|
|
|
|
{
|
|
|
|
|
get; set;
|
|
|
|
|
}
|
|
|
|
|
public decimal Value
|
|
|
|
|
{
|
|
|
|
|
get; set;
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-09-13 15:47:34 +09:00
|
|
|
|
public interface IRateProvider
|
|
|
|
|
{
|
2017-10-27 17:53:04 +09:00
|
|
|
|
Task<decimal> GetRateAsync(string currency);
|
|
|
|
|
Task<ICollection<Rate>> GetRatesAsync();
|
|
|
|
|
}
|
2017-09-13 15:47:34 +09:00
|
|
|
|
}
|