public Bill(string billID, string description, decimal amount, DateTime issueDate, DateTime dueDate, PaymentMethod paymentMethod) { this.billID = billID; this.description = description; this.amount = amount; this.issueDate = issueDate; this.dueDate = dueDate.Date; this.paymentResult = (int)BillPaymentResult.ToCollect; this.assignedPaymentMethod = paymentMethod; this.paymentAgreements = new Dictionary<DateTime, PaymentAgreement>(); }
private void SetBillAsUnpaid() { paymentResult = BillPaymentResult.Unpaid; CancellAnyAgreementsActiveForBill(); }
private void SetBillAsToCollect() { paymentResult = BillPaymentResult.ToCollect; }
public void RenegotiateBill(PaymentAgreement renegotiationAgreement) { paymentResult = BillPaymentResult.Renegotiated; this.renegotiationAgreement = renegotiationAgreement; }
public void PayBill(Payment payment) { if (this.amount != payment.PaymentAmount) throw new System.ArgumentException("Only payments for the bill total amount are accepted", "payment"); this.payment = payment; paymentResult = BillPaymentResult.Paid; }
public void CancelBill() { paymentResult = BillPaymentResult.CancelledOut; }