static void Main(string[] args) { Bitrix24Client portalClient1 = new Bitrix24Client(BX_Portal, BX_ClientID, BX_ClientSecret, username, password); //1 //List<LeadDto> leads = portalClient1.GetLeads(); //leads.ForEach(l => Console.WriteLine(l.TITLE)); //2 //portalClient1.GetContactById(2); //3 portalClient1.AddLead(); Console.ReadKey(); }
public async Task CreateLead_Ok_Test() { var client = new Bitrix24Client(_email, _password, _b24Address); var lead = new BitrixLead { Comments = "Комментарий к лиду", EmailWork = "*****@*****.**", LastName = "Пупсиков", Name = "Пупсик", PhoneMobile = "+79999999999", SecondName = "Пупсикович", Title = "Пупсик хочет, чтобы ему перезвонили!", AssignedById = 1, StatusId = "1" }; var leadId = await client.CreateLead(lead); Assert.IsFalse(String.IsNullOrEmpty(leadId)); }