Beispiel #1
0
 private bool ExecuteLead(LeadRoot value)
 {
     if (string.IsNullOrEmpty(value.GetId()))
     {
         OnGetIdLead(value);
     }
     return(OnExecuteLead(value, value.MappingFields));
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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));
        }
Beispiel #4
0
 public bool GetId(LeadRoot value)
 {
     return(SendRequestSearch(value, GetEntityName(), FIELD_SELECT, FIELD_SEARCH, value.GetId(), GetResponseSearch));
 }