protected Payment(DateTime paidDate, DateTime expiredDate, decimal total, decimal totalPaid, string payer, Document document, Address address, Email email) { Number = Guid.NewGuid().ToString().Replace("-", "").Substring(0, 10).ToUpper(); PaidDate = paidDate; ExpiredDate = expiredDate; Total = total; TotalPaid = totalPaid; Payer = payer; Document = document; Address = address; Email = email; AddNotifications(new Contract() .Requires() .IsGreaterThan(0, Total, "Payment.Total", "O total não pode ser zero") .IsGreaterOrEqualsThan(Total, TotalPaid, "Payment.TotalPaid", "O valor pago é menor que o valor do pagamento")); }
public BoletoPayment(string barCode, string boletoNumber, DateTime paidDate, DateTime expiredDate, decimal total, decimal totalPaid, string payer, Document document, Address address, Email email) : base(paidDate, expiredDate, total, totalPaid, payer, document, address, email) { BarCode = barCode; BoletoNumber = boletoNumber; }
public PayPalPayment(string transactionCode, DateTime paidDate, DateTime expireDate, decimal total, decimal totalPaid, string payer, Document document, Address address, Email email) : base(paidDate, expireDate, total, totalPaid, payer, document, address, email) { TransactionCode = transactionCode; }
protected Payment(DateTime paidDate, DateTime expireDate, decimal total, decimal totalPaid, string payer, EDocumentType document, Address address, Email email) { Number = Guid.NewGuid().ToString().Replace("-", "").Substring(0, 10).ToUpper(); PaidDate = paidDate; ExpireDate = expireDate; Total = total; TotalPaid = totalPaid; Payer = payer; Document = document; Address = address; Email = email; }
public PaypalPayment(string tansactionCode, DateTime paidDate, DateTime expireDate, decimal total, decimal totalPaid, Document document, string payer, Address adress, Email email) : base(paidDate, expireDate, total, totalPaid, document, payer, adress, email) { TansactionCode = tansactionCode; if (string.IsNullOrEmpty(TansactionCode)) { AddNotification("PaypalPayment.TansactionCode", "Numero de transação vazio"); } }
public CreditCardPayment(string cardHolderName, string cardNumber, string lastTransactionNumber, DateTime paidDate, DateTime expireDate, decimal total, decimal totalPaid, Document document, string payer, Address address, Email email) : base(paidDate, expireDate, total, totalPaid, document, payer, address, email) { CardHolderName = cardHolderName; CardNumber = cardNumber; LastTransactionNumber = lastTransactionNumber; }