public void ServiceInvoicesDeleteTest()
        {
            var companyId = "59444568f933f61ea009dad2";

            var invoiceRequest = ServiceInvoiceIssueMessageFactory.GetObj();

            var invoiceResponse = instance.ServiceInvoicesPost(companyId, invoiceRequest);

            string id = invoiceResponse.Id;

            #region Gambiarra maligna pra alterar o status do invoice de created pra issued

            bool flag = false;
            do
            {
                var getResponse = instance.ServiceInvoicesGet_0(companyId, id);
                flag = getResponse.Status.Value.Equals(StatusEnum.Issued);
                Thread.Sleep(500);
            } while (flag == false);

            #endregion

            var jsonResponse = instance.ServiceInvoicesDelete(companyId, id);

            Assert.IsNotNull(jsonResponse);

            var responseObj = JsonConvert.DeserializeObject <ServiceInvoiceResource>(jsonResponse);

            Assert.AreEqual(FlowStatusEnum.WaitingSendCancel, responseObj.FlowStatus.Value);
        }
        public void ServiceInvoicesPostTest()
        {
            var companyId = "59444568f933f61ea009dad2";

            var invoiceRequest = ServiceInvoiceIssueMessageFactory.GetObj();

            var invoiceResponse = instance.ServiceInvoicesPost(companyId, invoiceRequest);

            Assert.IsNotNull(invoiceResponse);
            Assert.IsTrue(invoiceResponse.Status == ServiceInvoiceResource.StatusEnum.Created);
        }