Exemple #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);
            }
        }
Exemple #2
0
 public LoanRateQuoteRecorded(
     string loanRateQuoteId,
     string taxId,
     BankLoanRateQuote bankLoanRateQuote)
 {
     this.LoanRateQuoteId   = loanRateQuoteId;
     this.TaxId             = taxId;
     this.BankLoanRateQuote = BankLoanRateQuote;
 }
Exemple #3
0
 public LoanRateBestQuoteFilled(
     string loanRateQuoteId,
     string taxId,
     int amount,
     int termInMonths,
     int creditScore,
     BankLoanRateQuote bestBankLoanRateQuote)
 {
     this.LoanRateQuoteId       = loanRateQuoteId;
     this.TaxId                 = taxId;
     this.Amount                = amount;
     this.TermInMonths          = termInMonths;
     this.CreditScore           = creditScore;
     this.BestBankLoanRateQuote = bestBankLoanRateQuote;
 }
 public LoanRateQuoteRecorded(
     string loanRateQuoteId,
     string taxId,
     BankLoanRateQuote bankLoanRateQuote)
 {
     this.LoanRateQuoteId = loanRateQuoteId;
     this.TaxId = taxId;
     this.BankLoanRateQuote = BankLoanRateQuote;
 }
        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);
            }
        }
 public LoanRateBestQuoteFilled(
     string loanRateQuoteId,
     string taxId,
     int amount,
     int termInMonths,
     int creditScore,
     BankLoanRateQuote bestBankLoanRateQuote)
 {
     this.LoanRateQuoteId = loanRateQuoteId;
     this.TaxId = taxId;
     this.Amount = amount;
     this.TermInMonths = termInMonths;
     this.CreditScore = creditScore;
     this.BestBankLoanRateQuote = bestBankLoanRateQuote;
 }