Exemplo n.º 1
0
        public LoanPayment
        (
            EconomicEvent economicEvent,
            LoanAgreement loanAgreement,
            PaymentNumber paymentNumber,
            PaymentDueDate paymentDueDate,
            LoanPrincipalAmount principalAmount,
            LoanInterestAmount interestAmount,
            LoanPrincipalRemaining remainPrincipal,
            UserId userID
        )
        {
            EconomicEvent          = economicEvent ?? throw new ArgumentNullException("The economic event is required.");
            Id                     = economicEvent.Id;
            LoanAgreement          = loanAgreement ?? throw new ArgumentNullException("The loan agreement is required.");
            LoanId                 = loanAgreement.Id;
            PaymentNumber          = paymentNumber ?? throw new ArgumentNullException("The payment number is required.");
            PaymentDueDate         = paymentDueDate ?? throw new ArgumentNullException("The payment due date is required.");
            LoanPrincipalAmount    = principalAmount ?? throw new ArgumentNullException("The principal amount is required.");
            LoanInterestAmount     = interestAmount ?? throw new ArgumentNullException("The interest amount is required.");
            LoanPrincipalRemaining = remainPrincipal ?? throw new ArgumentNullException("The balance remaining is required.");
            UserId                 = userID ?? throw new ArgumentNullException("The user id is required.");

            CheckValidity();
        }
Exemplo n.º 2
0
 public void UpdatePaymentDueDate(PaymentDueDate value)
 {
     PaymentDueDate = value ?? throw new ArgumentNullException("The payment due date is required.");
     UpdateLastModifiedDate();
     CheckValidity();
 }