Inheritance: CallfireApiClient.Api.Common.Model.Request.FindRequest
        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 Find()
        {
            string expectedJson = GetJsonPayload("/contacts/contactsApi/response/findContactLists.json");
            var restRequest = MockRestResponse(expectedJson);

            FindContactListsRequest request = new FindContactListsRequest
            {
                Limit = 1,
                Offset = 5,
                Fields = FIELDS,
                Name = TEST_STRING
            };

            Page<ContactList> contactLists = Client.ContactListsApi.Find(request);

            Assert.NotNull(contactLists);
            Assert.That(Serializer.Serialize(contactLists), Is.EqualTo(expectedJson));
            Assert.AreEqual(Method.GET, restRequest.Value.Method);
            Assert.That(restRequest.Value.Parameters, Has.Some.Matches<Parameter>(p => p.Name.Equals("limit") && p.Value.Equals("1")));
            Assert.That(restRequest.Value.Parameters, Has.Some.Matches<Parameter>(p => p.Name.Equals("offset") && p.Value.Equals("5")));
            Assert.That(restRequest.Value.Parameters, Has.Some.Matches<Parameter>(p => p.Name.Equals("fields") && p.Value.Equals(FIELDS)));
            Assert.That(restRequest.Value.Parameters, Has.Some.Matches<Parameter>(p => p.Name.Equals("name") && p.Value.Equals(TEST_STRING)));
        }
 public void TestFindContactLists()
 {
     FindContactListsRequest request = new FindContactListsRequest();
     Page<ContactList> contactLists = Client.ContactListsApi.Find(request);
     Console.WriteLine("Page of ContactList:" + contactLists);
     Assert.NotNull(contactLists);
 }