Inheritance: CallfireApiClient.Api.Common.Model.CallfireModel
        public void TestContactListCRUD()
        {
            // create from numbers
            CreateContactListRequest<string> request = new CreateContactListRequest<string>
            {
                Contacts = new List<string> { "12135543211", "12135678882" },
                Name = "listFromNumbers"
            };
            ResourceId numbersListId = Client.ContactListsApi.Create(request);

            ContactList contactList = Client.ContactListsApi.Get(numbersListId.Id);
            Assert.AreEqual(2, contactList.Size);
            Assert.AreEqual(contactList.Name, "listFromNumbers");

            // get items
            GetByIdRequest getItemsRequest = new GetByIdRequest	{ Id = contactList.Id };
            Page<Contact> contactListItems = Client.ContactListsApi.GetListItems(getItemsRequest);
            IList<Contact> items = contactListItems.Items;
            Assert.AreEqual(2, items.Count);

            // create from ids
            var request2 = new CreateContactListRequest<long>
            {
                Contacts = new List<long> { (long)items[0].Id, (long)items[1].Id },
                Name = "listFromExistingContacts"
            };
            ResourceId idsListId = Client.ContactListsApi.Create(request2);

            contactList = Client.ContactListsApi.Get(idsListId.Id);
            Assert.AreEqual(2, contactList.Size);
            Assert.AreEqual(contactList.Name, "listFromExistingContacts");

            // find by name
            FindContactListsRequest findRequest = new FindContactListsRequest { Name = "listFrom" };
            Page<ContactList> contactLists = Client.ContactListsApi.Find(findRequest);
            Assert.Greater(contactLists.TotalCount, 1);

            // update
            UpdateContactListRequest updateListRequest = new UpdateContactListRequest
            {
                Id = idsListId.Id,
                Name = "new_name"
            };
            Client.ContactListsApi.Update(updateListRequest);
            ContactList updatedList = Client.ContactListsApi.Get((long)updateListRequest.Id);
            Assert.AreEqual("new_name", updatedList.Name);

            // delete
            Client.ContactListsApi.Delete((long)numbersListId.Id);
            Client.ContactListsApi.Delete((long)idsListId.Id);
        }
        public void TestUpdateById()
        {
            string requestJson = GetJsonPayload("/contacts/contactsApi/request/updateContactList.json");
            var restRequest = MockRestResponse();

            UpdateContactListRequest request = new UpdateContactListRequest { Id = TEST_LONG, Name = TEST_STRING };

            Client.ContactListsApi.Update(request);

            Assert.That(restRequest.Value.Resource, Is.StringContaining("/" + TEST_LONG));
            Assert.AreEqual(Method.PUT, restRequest.Value.Method);
            var requestBodyParam = restRequest.Value.Parameters.FirstOrDefault(p => p.Type == ParameterType.RequestBody);
            Assert.That(requestBodyParam.Value, Is.EqualTo(requestJson));
        }