public CurrencyTransaction ToCurrencyTransaction() { return (IsValid ? CurrencyTransaction.Create(Id, Amount, PaymentDetails.CurrencyCode, DateTime.Parse(TransactionDateLocalString).ToUniversalTime(), XmlStatus.ToCurrencyTransactionStatus()) : null); }
public static CurrencyTransactionStatus ToCurrencyTransactionStatus(this XmlStatus status) { switch (status) { case XmlStatus.Approved: return(CurrencyTransactionStatus.A); case XmlStatus.Rejected: return(CurrencyTransactionStatus.R); case XmlStatus.Done: return(CurrencyTransactionStatus.D); default: throw new InvalidOperationException($"Can not identify currency transaction status for xml status: {status}"); } }
/// <inheritdoc /> /// <summary> /// <c>:XML</c> directive. /// </summary> /// <param name="xs">The new XML status.</param> public virtual void Xml(XmlStatus xs) { }