Interface IExchangeRate
The system entity for exchange rates
See https://help.lemonedge.com/help/financial-services-engine/trade/exchange-rates/intro.html for more information
Inherited Members
Namespace: LemonEdge.API.Entities.FinancialServices.Products.FX
Assembly: LemonEdge.API.Entities.FinancialServices.dll
Syntax
[EntityDefinition(EntityID.ExchangeRate, "dbo.LT_ExchangeRates", "ExchangeRate", IsStandingDataEntity = false, HelpURL = "help/financial-services-engine/trade/exchange-rates/intro.html")]
[DefaultEntityIcon(ImageType.ExchangeRates)]
[MultipleUnique(new string[] { "EffectiveDate", "FromCurrencyID", "ToCurrencyID", "CategoryID" }, AllowNullOrEmpty = true)]
public interface IExchangeRate : IBaseEntity, IEquatable<IBaseEntity>, INotifyPropertyChanged, INotifyPropertyChanging, ICloneableAsync, ICanTrackProperties
Properties
CategoryID
[Key] Links to IExchangeRateCategory. The optional category this exchange rate is under. Empty indicates the default category.
Declaration
[EntityProperty(SQLType.UniqueIdentifier, true)]
[EntityRelationship(EntityID.ExchangeRateCategory, "ID", SingleJoinType.ZeroToOne, "Category", "Exchange Rates", DeleteWithRelationship = true, PartOfParentSet = false, LinkToItemInSet = false, InheritPermissions = false)]
[EntityKeyProperty]
[EntityDescription("The optional category this exchange rate is under. Empty indicates the default category.")]
Guid? CategoryID { get; set; }
Property Value
Type | Description |
---|---|
Guid? |
EffectiveDate
[Key] The date the exchange rate is effective from
Declaration
[EntityProperty(SQLType.DateTimeOffset, false, IsDate = true)]
[EntityDescription("The effective date of the rate for this from currency to currency.")]
[Required]
[EntityKeyProperty]
DateTimeOffset EffectiveDate { get; set; }
Property Value
Type | Description |
---|---|
DateTimeOffset |
FromCurrencyID
[Key] Links to ICurrency. The Currency this exchange rate is exchanging from
Declaration
[EntityProperty(SQLType.UniqueIdentifier, false)]
[EntityRelationship(EntityID.Currency, "ID", SingleJoinType.One, "From Currency", "Exchange Rates From", DeleteWithRelationship = true, PartOfParentSet = false, LinkToItemInSet = false, InheritPermissions = true)]
[RequiredNoDefaultIDValidation]
[EntityKeyProperty]
[EntityDescription("The from currency for the rate on this effective date.")]
[PropertyValidation("true", "MyItem.FromCurrencyID != MyItem.ToCurrencyID", "From currency and to currency can't be the same.")]
Guid FromCurrencyID { get; set; }
Property Value
Type | Description |
---|---|
Guid |
Rate
The exchange rate value to exchange from the From Currency to the To Currency
Declaration
[EntityProperty(SQLType.Decimal, 18, 12, false)]
[EntityDescription("The rate from currency to currency for this effective date.")]
[Required]
decimal Rate { get; set; }
Property Value
Type | Description |
---|---|
decimal |
ToCurrencyID
[Key] Links to ICurrency. The Currency this exchange rate is exchanging to
Declaration
[EntityProperty(SQLType.UniqueIdentifier, false)]
[EntityRelationship(EntityID.Currency, "ID", SingleJoinType.One, "To Currency", "Exchange Rates To", DeleteWithRelationship = true, PartOfParentSet = false, LinkToItemInSet = false)]
[RequiredNoDefaultIDValidation]
[EntityKeyProperty]
[EntityDescription("The to currency for the rate on this effective date.")]
[PropertyValidation("true", "MyItem.FromCurrencyID != MyItem.ToCurrencyID", "From currency and to currency can't be the same.")]
Guid ToCurrencyID { get; set; }
Property Value
Type | Description |
---|---|
Guid |