Ejemplo n.º 1
0
        public static GetOffers.Response GenerateOffers(GetOffers.GenerateRequest offerJson, Guid loanApplicationGuid)
        {
            var loanApplicationOffersClient = new LoanApplicationOffersClient();
            var result = loanApplicationOffersClient.GenerateOffers(offerJson, loanApplicationGuid.ToString());

            return(result.content);
        }
Ejemplo n.º 2
0
        // return a borrower that has registered and accepted the primary offer
        public static LoanApplicationAgentStateObject GetPrimaryOffer(RegisterBorrower.Request borrower, Guid applicationGuid, string borrowerGuid = null)
        {
            var loanApplicationOffersClient = new LoanApplicationOffersClient();
            var offerJson = new GetOffers.GenerateRequest();

            offerJson.LoanAmount = borrower.RequestedLoanAmount;

            var result = loanApplicationOffersClient.GenerateOffers(offerJson, applicationGuid.ToString());

            result = loanApplicationOffersClient.GetOffer(applicationGuid.ToString());

            var offerGuid    = result.content.LoanOfferGroup.LoanApplicationOffers[0].Guid.ToString();
            var offersClient = new OffersClient();
            var noResult     = offersClient.SelectOffer(offerGuid);
            var stateObject  = new LoanApplicationAgentStateObject();

            stateObject.Borrower = borrower;

            if (borrowerGuid != null)
            {
                stateObject.BorrowerGuid = new Guid(borrowerGuid);
            }

            stateObject.OfferGuid           = new Guid(offerGuid);
            stateObject.LoanApplicationGuid = applicationGuid;
            return(stateObject);
        }
Ejemplo n.º 3
0
        public static LoanApplicationAgentStateObject GetBorrowerToQuoting(RegisterBorrower.Request borrower, Guid applicationGuid)
        {
            var loanApplicationOffersClient = new LoanApplicationOffersClient();
            var offerJson = new GetOffers.GenerateRequest();

            offerJson.LoanAmount = borrower.RequestedLoanAmount;

            var result      = loanApplicationOffersClient.GenerateOffers(offerJson, applicationGuid.ToString());
            var stateObject = new LoanApplicationAgentStateObject();

            stateObject.Borrower            = borrower;
            stateObject.LoanApplicationGuid = applicationGuid;
            return(stateObject);
        }