Class Currency
Represents a specific country's currency. Managed in the currency admin page.
Inheritance
Namespace: DirectScale.Disco.Extension
Assembly: DirectScale.Disco.Extension.Abstractions.dll
Syntax
public class Currency : Object
Examples
{ CurrencyCode: USD, Symbol: $, ExchangeRate: 1, DecimalLength: 2, Description: United States Dollar }
{ CurrencyCode: JPY, Symbol: ¥, ExchangeRate: 105, DecimalLength: 0, Description: Yen }
{ CurrencyCode: CNY, Symbol: ¥, ExchangeRate: 7, DecimalLength: 2, Description: Chinese Yuan }
Constructors
Currency()
Declaration
public Currency()
Properties
CurrencyCode
Usually these follow the 3 digit ISO-4217 standard, but can be defined to any 3 digit string.
Declaration
public string CurrencyCode { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DecimalLength
Indicates how many significant digits are defined for this currency.
Declaration
public int DecimalLength { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
Defined in ISO-4217
Description
Description of the currency. For example, USD: United States Dollar or JPY: Yen.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ExchangeRate
The amount of this currency that can be purchased with $1 USD.
Declaration
public Decimal ExchangeRate { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal |
Remarks
This is manually set on the admin page so prices aren't automatically changing all the time, but can be updated when desired.
Symbol
The currency unicode symbol. Examples: "$", "¥", "€".
Declaration
public string Symbol { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Up to 5 characters allowed.