예제 #1
0
 /// <summary>
 /// Constructor for any transaction
 /// </summary>
 /// <param name="date"></param>
 /// <param name="description"></param>
 /// <param name="from"></param>
 /// <param name="to"></param>
 /// <param name="code"></param>
 /// <param name="amount"></param>
 /// <param name="notes"></param>
 public Transaction(Date date, Time time, TimeZoneInfo zone, String description, Contact.PaymentAccount from, Contact.PaymentAccount to, 
     Transaction.Code code, Decimal amount, String currency, String transactionId, String notes)
     : base()
 {
     this.Date = date;
     this.Time = time;
     this.TimeZone = zone;
     this.Description = description;
     this.From = from;
     this.To = to;
     this.Type = code;
     this.Amount = amount;
     this.Currency = currency;
     this.TransactionId = transactionId ?? String.Empty;
     this.Note = notes ?? String.Empty;
 }
예제 #2
0
 /// <summary>
 /// Constructor for Paypal transactions
 /// </summary>
 /// <param name="datetime"></param>
 /// <param name="description"></param>
 /// <param name="from"></param>
 /// <param name="to"></param>
 /// <param name="code"></param>
 /// <param name="amount"></param>
 /// <param name="notes"></param>
 /// <returns></returns>
 public static Transaction Generate(Date date, Time time, TimeZoneInfo zone, String description, Transaction.Code code, 
     String currency, Decimal amount, String from, String to, String transactionId, String notes = null)
 {
     return new Transaction(date, time, zone, description, Contact.PaymentAccount.FromEmail(from), Contact.PaymentAccount.FromEmail(to),
         code, amount, currency, transactionId, notes);
 }
예제 #3
0
 /// <summary>
 /// Constructor for ING/Rabobank transactions
 /// </summary>
 /// <param name="datetime"></param>
 /// <param name="description"></param>
 /// <param name="from"></param>
 /// <param name="to"></param>
 /// <param name="code"></param>
 /// <param name="amount"></param>
 /// <param name="notes"></param>
 /// <returns></returns>
 public static Transaction Generate(DateTime datetime, String description, String from, String to, Transaction.Code code,
     Decimal amount, String notes = null, String currency = "EUR")
 {
     return new Transaction(new Date(datetime), new Time(datetime), TimeZoneInfo.Local, description,
         Contact.PaymentAccount.Parse(from), Contact.PaymentAccount.Parse(to), code, amount, currency, String.Empty, notes);
 }