public static void IncomeVerification(string applicationGuid, string filePath, string fileName, UploadedDocumentCategory?uploadCategory) { var loanApplicationTasksClient = new LoanApplicationTasksClient(); var docClient = new LoanApplicationUploadedDocumentsClient(); var resp = loanApplicationTasksClient.GetTasksList(applicationGuid); List <LoanApplicationTask> taskList = resp.content; List <LoanApplicationTask> incomeVerification = taskList.Where(task => task.Title == "W-2" || task.Title == "Pay Stub") .ToList(); UploadedDocumentType type; foreach (LoanApplicationTask l in incomeVerification) { type = l.Title.ToLower().Contains("w-2") ? UploadedDocumentType.W2 : UploadedDocumentType.PayStub; fileName = type == UploadedDocumentType.W2 ? "W2.pdf" : "PayStub.pdf"; var docUploadResponse = UploadDocument(l, filePath, fileName, UploadedDocumentCategory.Borrower, type); var note = BuildNoteRequest(EntityType.UploadedDocument, docUploadResponse.content.Guid, type.ToString(), true, $"{type} Doc uploaded", AgentNoteCategory.DocumentUpload, AgentRole.LLO, $"{type.ToString()} Document uploaded."); var agents = GetAgentsByRole(note.CreatorRole.ToString()); note.CreatedBy = (Guid)agents[new Random().Next(0, agents.Count)].agentGuid; CompleteDocUpload(note, l.LoanApplicationGuid.ToString(), l.Guid.ToString()); } }
public static List <LoanApplicationTask> GetTasksList(string loanApplicationGuid) { var loanApplicationTasksClient = new LoanApplicationTasksClient(); var resp = loanApplicationTasksClient.GetTasksList(loanApplicationGuid); List <LoanApplicationTask> taskList = resp.content; return(taskList); }
public static void EmailVerification(string applicationGuid, string emailAddress) { var emailsClient = new EmailsClient(); var loanApplicationTasksClient = new LoanApplicationTasksClient(); Dictionary <string, string> emailVerificationDetails = GetEmailVerificationDetails(emailAddress); var verificationGuid = emailVerificationDetails["guid"]; var result = emailsClient.VerifyEmail(verificationGuid); var resp2 = loanApplicationTasksClient.GetTasksList(applicationGuid); var taskList2 = resp2.content; }
public static void DispositionOfUploadedFiles(string loanApplicationGuid, string disposition = null) { var dispo = new ResponseObject <EmptyResult>(); var uploadClient = new UploadedDocumentsClient(); var tasks = new LoanApplicationTasksClient().GetTasksList(loanApplicationGuid); var uploadedDocsList = GetFileUploadGuids(loanApplicationGuid); foreach (var g in uploadedDocsList) { dispo = uploadClient.DocumentDisposition(g, (String.IsNullOrEmpty(disposition) ? "Verified" : disposition)); } }
//Todo - Move this to the model constructor class public static void BankStatementVerification(string applicationGuid, string filePath, string fileName, UploadedDocumentCategory?uploadCategory) { var loanApplicationTasksClient = new LoanApplicationTasksClient(); var resp = loanApplicationTasksClient.GetTasksList(applicationGuid); List <LoanApplicationTask> taskList = resp.content; var bankStatementVerification = taskList.Where(task => task.Title == "Bank Statement").ToList()[0]; var resp2 = UploadDocument(bankStatementVerification, filePath, fileName, UploadedDocumentCategory.Borrower, UploadedDocumentType.BankStatement); var note = BuildNoteRequest(EntityType.UploadedDocument, resp2.content.Guid, UploadedDocumentType.BankStatement.ToString(), true, $"{UploadedDocumentType.PhotoId} Doc uploaded", AgentNoteCategory.DocumentUpload, AgentRole.LLO, $"{UploadedDocumentType.PhotoId.ToString()} Document uploaded."); var agents = GetAgentsByRole(note.CreatorRole.ToString()); note.CreatedBy = (Guid)agents[new Random().Next(0, agents.Count)].agentGuid; CompleteDocUpload(note, bankStatementVerification.LoanApplicationGuid.ToString(), bankStatementVerification.Guid.ToString()); }
public static void VerbalVerification(string applicationGuid) { var filePath = AppDomain.CurrentDomain.BaseDirectory.ToString() + "Resources\\"; var loanApplicationTasksClient = new LoanApplicationTasksClient(); var resp = loanApplicationTasksClient.GetTasksList(applicationGuid); var uploadClient = new LoanApplicationUploadedDocumentsClient(); var request = new CreateUploadedDocumentRequest(); request.Category = UploadedDocumentCategory.VerbalVerify; request.LoanApplicationGuid = (Guid?)new Guid(applicationGuid); request.Type = UploadedDocumentType.VerbalVerificationRecording; request.Description = "Verbal Verify Recording"; request.Name = UploadedDocumentType.VerbalVerificationRecording.ToString(); var uploadResponse = uploadClient.UploadDocument(request, "VerbalVerification.wav", filePath, "multipart/form-data"); var note = BuildNoteRequest(EntityType.UploadedDocument, uploadResponse.content.Guid, UploadedDocumentType.VerbalVerificationRecording.ToString(), true, $"{UploadedDocumentType.VerbalVerificationRecording} Doc uploaded", AgentNoteCategory.DocumentUpload, AgentRole.UW, $"{UploadedDocumentType.VerbalVerificationRecording.ToString()} Document uploaded."); var agents = GetAgentsByRole(note.CreatorRole.ToString()); note.CreatedBy = (Guid)agents[new Random().Next(0, agents.Count)].agentGuid; var noteCreated = new LoanApplicationNotesClient().PostNote(note, applicationGuid); var disposition = new UploadedDocumentsClient().DocumentDisposition(uploadResponse.content.Guid.ToString(), "Reviewed"); request.Type = UploadedDocumentType.VerbalVerification; request.Description = "Verbal Verification"; request.Name = UploadedDocumentType.VerbalVerification.ToString(); uploadResponse = uploadClient.UploadDocument(request, "DivorceDecree.pdf", filePath, "multipart/form-data"); note = BuildNoteRequest(EntityType.UploadedDocument, uploadResponse.content.Guid, UploadedDocumentType.VerbalVerification.ToString(), true, $"{UploadedDocumentType.VerbalVerification} Doc uploaded", AgentNoteCategory.DocumentUpload, AgentRole.UW, $"{UploadedDocumentType.VerbalVerification.ToString()} Document uploaded."); agents = GetAgentsByRole(note.CreatorRole.ToString()); note.CreatedBy = (Guid)agents[new Random().Next(0, agents.Count)].agentGuid; noteCreated = new LoanApplicationNotesClient().PostNote(note, applicationGuid); disposition = new UploadedDocumentsClient().DocumentDisposition(uploadResponse.content.Guid.ToString(), "Pass"); }