public string Apply(Claim claim) { var result = new StringBuilder(); if (claim.Contigency) result.AppendLine("Contigency Amount"); if (claim.Unliquidated) result.AppendLine("Unliquidated Amount"); if (claim.Undetermined && claim.TotalAmount !=0) result.AppendLine("Undeterminated Amount"); return result.ToString(); }
private string ApplyRemarks(Claim claim) { var message = new StringBuilder(); foreach (var remark in remarks) { var result = remark.Apply(claim); if (!string.IsNullOrEmpty(result)) message.AppendLine(result); } return message.ToString().IsNullOrEmpty() ? "No rules Applied" : message.ToString(); }
public IHttpActionResult Post(Claim claim) { var result = ApplyRemarks(claim); return Ok(result); }