public static ResponseObject <EmptyResult> UpdateHomePayment(int monthlyPayment, OccupancyStatus status, string borrowerGuid)
        {
            var borrowersClient = new BorrowersClient();
            var request         = new UpdateBorrowerHomePaymentRequest();

            request.HomeMonthlyPayment = monthlyPayment;
            request.OccupancyStatus    = status;
            return(borrowersClient.UpdateHomePayment(borrowerGuid.ToString(), request));
        }
        public static bool?ValidateEmailAvailability(string emailAddress)
        {
            var borrowersClient = new BorrowersClient();
            var result          = borrowersClient.IsEmailAvailable(emailAddress);

            if (result.content == null)
            {
                throw new NullReferenceException($"response content for email availability request against email {emailAddress} was null.");
            }
            else
            {
                return(result.content.IsAvailable);
            }
        }
Esempio n. 3
0
        public static LoanApplicationAgentStateObject RegisteredBorrower(RegisterBorrower.Request borrower)
        {
            // check email availability
            var Client           = new BorrowersClient();
            var registerResponse = Client.RegisterBorrower(borrower);
            var result           = new LoanApplicationAgentStateObject();

            if (registerResponse.statusCode != HttpStatusCode.Created || registerResponse.content == null)
            {
                log.Info($"Borrower Registration Failed.");
                return(null);
            }

            result.Borrower            = borrower;
            result.BorrowerGuid        = (Guid)registerResponse.content.BorrowerGuid;
            result.LoanApplicationGuid = (Guid)registerResponse.content.LoanApplicationGuid;

            return(result);
        }
        public static LoanApplicationCoreStateObject RegisterBorrower(RegisterBorrowerRequest borrower = null)
        {
            if (borrower == null)
            {
                borrower = CoreModelConstructors.CreateRegisterBorrowerRequest();
            }

            var  borrowersClient = new BorrowersClient();
            var  result          = borrowersClient.BorrowerRegistration(borrower);
            var  borrowerGuid    = (Guid)result.content.BorrowerGuid;
            Guid?applicationGuid = result.content.LoanApplicationGuid;
            var  returnObject    = new LoanApplicationCoreStateObject();

            returnObject.Borrower            = borrower;
            returnObject.BorrowerGuid        = borrowerGuid;
            returnObject.LoanApplicationGuid = applicationGuid;
            returnObject.ApplicaiontStatus   = LoanApplicationStatus.OfferSelectPending;
            returnObject.ApplicationState    = LoanApplicationState.Quoting;
            return(returnObject);
        }
Esempio n. 5
0
        public void AgentSearchRegistering()
        {
            List <AgentIdObject> agents = GetActiveAgents();
            AgentIdObject        agent  = agents[0];
            //Let's make this agent an MLO
            var agentRequest = new SetAgentRolesRequest();

            agentRequest.Roles = new List <string> {
                "MLO"
            };
            var agentUpdate = coreAgentClient.SetAgentRoles(agentRequest, agent.agentGuid);

            //Partially Register a Borrower
            var request = CreateRegisterBorrowerRequest();

            emailAddress = request.Borrower.EmailAddress;
            var partialBorrowerResult = new BorrowersClient().PartialRegistration(request);

            if (partialBorrowerResult == null)
            {
                Assert.Fail($"Could not create a partially registered borrower for email {emailAddress}.  Failing Test.");
            }
        }
 public PipelineLoanStatusTests(string environment) : base(environment)
 {
     borrowersClient = new BorrowersClient();
     testEnvironment = environment;
 }
        public static ResponseObject <EmptyResult> EmploymentInformation(UpdateBorrowerEmploymentRequest request, Guid borrowerGuid)
        {
            var borrowersClient = new BorrowersClient();

            return(borrowersClient.UpdateEmployment(borrowerGuid.ToString(), request));
        }