using System; using System.Collections.Generic; using LCU.API.Collections.RepoApi.Domain.Processing; using LCU.Shared.Collections.RepoApiLib.Models; namespace LCU.API.Collections.RepoApi.Domain.AlertChecker { public class SkipPaidChecker : IAlertChecker { public const string RepoSubStatusPaidSkip = "PSKP"; public List CheckForAlert(RepoAccountProcessingSlip slip) { if (slip.UpdatedRepoAccount != null && !string.IsNullOrWhiteSpace(slip.UpdatedRepoAccount.SubStatus) && slip.UpdatedRepoAccount.SubStatus.Trim().ToUpper() == RepoSubStatusPaidSkip && slip.UpdatedRepoAccount.Status.ToUpper().Trim() != RepoSubStatusPaidSkip) { slip.UpdatedRepoAccount.Status = RepoSubStatusPaidSkip; // TODO Does this get saved? Is it ok to do? (NO) return new List { new EventAlert() { RepoId = slip.UpdatedRepoAccount.RepoId, AccountNo = slip.UpdatedRepoAccount.AccountNo, Message = "Skip Claim Paid", CreatedBy = "Batch", DateAdded = DateTime.Now } }; } return null; } } }