public void UpdateWarranty(string[] currentEventPayload) { var warrantyId = currentEventPayload[1]; var warrantyIndex = Warranties.FindIndex(proposal => proposal.Id == warrantyId); Warranties[warrantyIndex] = new Warranty(currentEventPayload); }
// As garantias de imóvel dos estados PR, SC e RS não são aceitas public static bool IsProvinceAcceptable(Warranty warranty) { var invalidStates = new [] { "PR", "SC", "RS" }; return(!invalidStates.Contains(warranty.Province)); }