private bool ExecuteLead(LeadRoot value) { if (string.IsNullOrEmpty(value.GetId())) { OnGetIdLead(value); } return(OnExecuteLead(value, value.MappingFields)); }
public string GetIdPotential(Authentication value, string id) { LeadRoot lead = new LeadRoot { Authentication = value, Lead = new Lead() }; if (SendRequestGetRecord(lead, id, LoadResponsePotential)) { return(lead.GetId()); } return(string.Empty); }
public bool Execute(LeadRoot lead, List <MappingFields> mapping) { mapping.Add(new MappingFields { Entity = "Potential", Field = "Closing Date", Value = DateTime.Now.AddMonths(1).ToString("yyy-MM-dd hh:mm:ss") }); if (string.IsNullOrEmpty(lead.GetId())) { mapping.Add(new MappingFields { Entity = "Potential", Field = "Stage", Value = "Qualificação" }); } return(SendRequestSave(lead, mapping.Where(w => FilterEntity(w.Entity)).ToList(), GetResponse)); }
public bool GetId(LeadRoot value) { return(SendRequestSearch(value, GetEntityName(), FIELD_SELECT, FIELD_SEARCH, value.GetId(), GetResponseSearch)); }