Esempio n. 1
0
 public CurrencyTransaction ToCurrencyTransaction()
 {
     return
         (IsValid
             ? CurrencyTransaction.Create(Id,
                                          Amount,
                                          PaymentDetails.CurrencyCode,
                                          DateTime.Parse(TransactionDateLocalString).ToUniversalTime(),
                                          XmlStatus.ToCurrencyTransactionStatus())
             : null);
 }
Esempio n. 2
0
        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}");
            }
        }
Esempio n. 3
0
 /// <inheritdoc />
 /// <summary>
 /// <c>:XML</c> directive.
 /// </summary>
 /// <param name="xs">The new XML status.</param>
 public virtual void Xml(XmlStatus xs)
 {
 }