2020-01-10 14:50:39 +01:00
|
|
|
namespace BTCPayServer.Rating
|
|
|
|
{
|
2020-01-13 14:20:45 +01:00
|
|
|
public enum RateSource
|
|
|
|
{
|
|
|
|
Coingecko,
|
|
|
|
Direct
|
|
|
|
}
|
2020-01-10 14:50:39 +01:00
|
|
|
public class AvailableRateProvider
|
|
|
|
{
|
2020-01-13 14:20:45 +01:00
|
|
|
public string Name { get; }
|
|
|
|
public string Url { get; }
|
|
|
|
public string Id { get; }
|
2020-01-17 06:16:12 +01:00
|
|
|
public string SourceId { get; }
|
2020-01-13 14:20:45 +01:00
|
|
|
public RateSource Source { get; }
|
2020-01-10 14:50:39 +01:00
|
|
|
|
2020-01-17 06:16:12 +01:00
|
|
|
public AvailableRateProvider(string id, string name, string url) : this(id, id, name, url, RateSource.Direct)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
public AvailableRateProvider(string id, string sourceId, string name, string url, RateSource source)
|
2020-01-10 14:50:39 +01:00
|
|
|
{
|
|
|
|
Id = id;
|
2020-01-17 06:16:12 +01:00
|
|
|
SourceId = sourceId;
|
2020-01-10 14:50:39 +01:00
|
|
|
Name = name;
|
|
|
|
Url = url;
|
2020-01-13 14:20:45 +01:00
|
|
|
Source = source;
|
2020-01-10 14:50:39 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|