/// <summary> /// Gets the currency description. /// </summary> /// <param name="currencyType">Type of the currency.</param> /// <returns>System.String.</returns> private static string GetDescription(CurrencyTypeFilter currencyType) { var type = currencyType.GetType(); var name = Enum.GetName(type, currencyType); if (name != null) { var field = type.GetField(name); if (field != null) { var attr = Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute)) as DescriptionAttribute; if (attr != null) { return(attr.Description); } } } return(null); }
/// <summary> /// The type of the change currency. /// </summary> /// <param name="changeCurrencyType">Type of the change currency.</param> /// <returns>PaymentBuilder.</returns> public PaymentBuilder ChangeCurrencyType(CurrencyTypeFilter changeCurrencyType) { _changeCurrencyType = changeCurrencyType; return(this); }
/// <summary> /// The currency type. /// </summary> /// <param name="currencyType">Type of the currency.</param> /// <returns>PaymentBuilder.</returns> public PaymentBuilder CurrencyType(CurrencyTypeFilter currencyType) { _currencyType = currencyType; return(this); }