Exemplo n.º 1
0
        public void CreateMailingTeste()
        {
            Mailing mailing = CreateMailing();

            var api             = new VoiqX("https://4c.voiqx.cloud", "MTk3NDMwYTczMDFiNmI4NWZhYzI3YzQ2OGU3NDkwNjU3N2Y0ZTFkNjI4ZDgzOGYwZjM4NzIwNjVjNGI3MzM2MA");
            var response        = api.CreateMailing(mailing);
            var ststusResposnse = api.StatusMailling(response.id);

            bool result = response != null;

            Assert.IsTrue(result, "OK");
        }
Exemplo n.º 2
0
        public void StartCampaignTeste()
        {
            var     mm              = "";
            var     api             = new VoiqX("https://4c.voiqx.cloud", "MTk3NDMwYTczMDFiNmI4NWZhYzI3YzQ2OGU3NDkwNjU3N2Y0ZTFkNjI4ZDgzOGYwZjM4NzIwNjVjNGI3MzM2MA");
            Mailing mailing         = CreateMailing();
            var     mailingResponse = api.CreateMailing(mailing);

            while (api.StatusMailling(mailingResponse.id).status != "finished")
            {
            }
            Campaign campaign         = CreateCampaign(mailingResponse.id, 4);
            var      campaignResponse = api.CreateCampaign(campaign);

            while (api.CampaignContactList(campaignResponse.id)?.phones?.Count() == 0)
            {
            }
            // Thread.Sleep(3000);
            //var sendResponse = api.StartCampaign(campaignResponse.id);
            // var response = api.StatusCampaign(campaignResponse.id);
            //bool result = sendResponse != null;
            //Assert.IsTrue(result, "OK");
        }