Ejemplo n.º 1
0
        public void OnReceive(RecordLoanRateQuote message)
        {
            var bankLoanRateQuote =
                new BankLoanRateQuote(
                    message.BankId,
                    message.BankLoanRateQuoteId,
                    message.InterestRate);

            bankLoanRateQuotes.Add(bankLoanRateQuote);

            loanBroker.Tell(
                new LoanRateQuoteRecorded(
                    loanRateQuoteId,
                    taxId,
                    bankLoanRateQuote),
                Self);

            if (bankLoanRateQuotes.Count >= expectedLoanRateQuotes)
            {
                loanBroker.Tell(
                    new LoanRateBestQuoteFilled(
                        loanRateQuoteId,
                        taxId,
                        amount,
                        termInMonths,
                        creditRatingScore,
                        BestBankLoanRateQuote()),
                    Self);
            }
        }
Ejemplo n.º 2
0
        public void OnReceive(RecordLoanRateQuote message)
        {
            var bankLoanRateQuote =
                    new BankLoanRateQuote(
              		                message.BankId,
              		                message.BankLoanRateQuoteId,
              		                message.InterestRate);

            bankLoanRateQuotes.Add(bankLoanRateQuote);

            loanBroker.Tell(
                new LoanRateQuoteRecorded(
                    loanRateQuoteId,
                    taxId,
                    bankLoanRateQuote),
                Self);

            if (bankLoanRateQuotes.Count >= expectedLoanRateQuotes)
            {
                loanBroker.Tell(
                    new LoanRateBestQuoteFilled(
                        loanRateQuoteId,
                        taxId,
                        amount,
                        termInMonths,
                        creditRatingScore,
                        BestBankLoanRateQuote()),
                    Self);
            }
        }