示例#1
0
 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}");
            }
        }
示例#3
0
 /// <inheritdoc />
 /// <summary>
 /// <c>:XML</c> directive.
 /// </summary>
 /// <param name="xs">The new XML status.</param>
 public virtual void Xml(XmlStatus xs)
 {
 }