Interface IExchangeRate
The system entity for exchange rates
See https://web.lemonedge.com/help/exchange-rates/ for more information
Inherited Members
System.IEquatable<LemonEdge.API.Core.IBaseEntity>.Equals(LemonEdge.API.Core.IBaseEntity)
System.ComponentModel.INotifyPropertyChanged.PropertyChanged
System.ComponentModel.INotifyPropertyChanging.PropertyChanging
Namespace: LemonEdge.API.Entities
Assembly: API.dll
Syntax
[EntityDefinition(EntityID.ExchangeRate, "dbo.LT_ExchangeRates", "ExchangeRate", IsStandingDataEntity = false, HelpURL = "exchange-rates")]
[DefaultEntityIcon(ImageType.ExchangeRates)]
[MultipleUnique(new string[]{"EffectiveDate", "FromCurrencyID", "ToCurrencyID"}, AllowNullOrEmpty = false)]
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", "Rates", DeleteWithRelationship = true, PartOfParentSet = false, LinkToItemInSet = false, InheritPermissions = false)]
[EntityDescription("The optional category this exchange rate is under. Empty indicates the default category.")]
Guid? CategoryID { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.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]
DateTimeOffset EffectiveDate { get; set; }
Property Value
Type | Description |
---|---|
System.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, "ExchangeRate", "Currency", DeleteWithRelationship = true, PartOfParentSet = false, LinkToItemInSet = false, InheritPermissions = true)]
[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 |
---|---|
System.Guid |
Rate
The exchange rate value to exchange from the From Currency to the To Currency
Declaration
[EntityProperty(SQLType.Decimal, (short)18, (short)12, false)]
[EntityDescription("The rate from currency to currency for this effective date.")]
[Required]
decimal Rate { get; set; }
Property Value
Type | Description |
---|---|
System.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, "ExchangeRate", "Currency", DeleteWithRelationship = true, PartOfParentSet = false, LinkToItemInSet = false)]
[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 |
---|---|
System.Guid |