// 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); }
public static GetOffers.Response GenerateOffers(GetOffers.GenerateRequest offerJson, Guid loanApplicationGuid) { var loanApplicationOffersClient = new LoanApplicationOffersClient(); var result = loanApplicationOffersClient.GenerateOffers(offerJson, loanApplicationGuid.ToString()); return(result.content); }
public static Guid?GetPrimaryOffer(Guid loanApplicationGuid) { var loanApplicationOffersClient = new LoanApplicationOffersClient(); var result = loanApplicationOffersClient.GetOffer(loanApplicationGuid.ToString()); return(result.content.LoanOfferGroup.LoanApplicationOffers[0].Guid); }
public static Guid?GetAlternativeOffer(Guid loanApplicationGuid, int offerIndex) { var loanApplicationOffersClient = new LoanApplicationOffersClient(); var result = loanApplicationOffersClient.GetOffer(loanApplicationGuid.ToString()); return(result.content.LoanOfferGroup.LoanApplicationOffers[offerIndex + 1].Guid); }
public static Guid?GetAlternativeOffer(Guid loanApplicationGuid, int offerIndex) { var loanApplicationOffersClient = new LoanApplicationOffersClient(); var result = loanApplicationOffersClient.GetOffer(loanApplicationGuid.ToString()); var offers = result.content.LoanOfferGroup.LoanApplicationOffers; return(offers.GetRange(1, offers.Count)[offerIndex].Guid); }
public static LoanApplicationCoreStateObject GetBorrowerToQuoting(RegisterBorrowerRequest borrower, Guid applicationGuid) { var loanApplicationOffersClient = new LoanApplicationOffersClient(); var offerJson = new GenerateOffersRequest(); offerJson.LoanAmount = borrower.LoanApplication.RequestedLoanAmount; var result = loanApplicationOffersClient.GenerateOffers(offerJson, applicationGuid.ToString()); var stateObject = new LoanApplicationCoreStateObject(); stateObject.Borrower = borrower; stateObject.LoanApplicationGuid = applicationGuid; return(stateObject); }
public static ResponseObject <GetOffersResponse> UpdateLoanApplicationPassStips(string loanApplicationGuid) { var loanAppClient = new LoanApplicationClient(); var loanApp = loanAppClient.GetLoanApplication(loanApplicationGuid); var saveLoanAppRequest = new UpdateLoanApplicationRequest(); saveLoanAppRequest.LoanApplication = loanApp.content; saveLoanAppRequest.LoanApplicationVerificationFlags = new LoanApplicationVerificationFlags(); saveLoanAppRequest.LoanApplicationVerificationFlags.AccountHolderVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.AccountNumberVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.AddressVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.DobVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.EmailVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.EmployerNameVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.EmploymentStatusVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.NameVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.OtherContactNumberVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.OwnRentVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.PrimaryPhoneNumberVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.SsnVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.WorkAddressVerified = true; saveLoanAppRequest.LoanApplicationVerificationFlags.WorkPhoneNumberVerified = true; saveLoanAppRequest.VerifiedBorrowerIncome = loanApp.content.LoanFile.Borrowers[0].AnnualIncome; saveLoanAppRequest.VerifiedBorrowerDebt = loanApp.content.LoanFile.Debt[0].Amount; //saveLoanAppRequest.VerifiedBorrowerIncome //Dispositions for uploaded files var docGuids = GetFileUploadGuids(loanApplicationGuid); foreach (string dg in docGuids) { ResponseObject <EmptyResult> disposition = new UploadedDocumentsClient().DocumentDisposition(dg, "Pass"); } var findAlertsRequest = new SearchAlertFlagsRequest(); findAlertsRequest.LoanApplicationGuid = new Guid(loanApplicationGuid); var alertsClient = new AlertFlagClient(); var alerts = alertsClient.AlertFlagSearch(findAlertsRequest); var agentGuid = (Guid)GetAgentByUserName("uw").agentGuid; var agent = GetAgentByUserName("uw"); if (ClearAlerts(alerts.content, agent) == false) { Assert.Fail("Cannot continue because alerts could not be cleared."); } var findDataObjectsRequest = new SearchDataObjectRequest(); findDataObjectsRequest.LoanApplicationGuid = new Guid(loanApplicationGuid); var dataObjectClient = new DataObjectClient(); var dataObjects = dataObjectClient.DataObjectSearch(findDataObjectsRequest); if (DispositionDataObjects(dataObjects.content, agent, Disposition.FalsePositive) == false) { Assert.Fail("Cannot continue because data object could not be dispositioned."); } var response = loanAppClient.SaveLoanApplicationUW(saveLoanAppRequest); var hardPullResponse = new LoanApplicationThirdPartyClient().RunHardPull(loanApplicationGuid); var reprice = new LoanApplicationOffersClient().Reprice(loanApplicationGuid); return(reprice); }