public ReceivedTextListResponse GetReceivedTexts(String olderThanId = "")
        {
            String finalUrl = String.Format(
                "{0}{1}",
                GET_RECEIVED_TEXTS_URL,
                String.IsNullOrWhiteSpace(olderThanId) ? "" : "?older_than=" + olderThanId
                );

            String response = this.GET(finalUrl);

            ReceivedTextListResponse receivedTexts = JsonConvert.DeserializeObject <ReceivedTextListResponse>(response);

            return(receivedTexts);
        }
        public async Task GetReceivedTexts()
        {
            NotificationClient       client_inbound           = new NotificationClient(NOTIFY_API_URL, INBOUND_SMS_QUERY_KEY);
            ReceivedTextListResponse receivedTextListResponse = await client_inbound.GetReceivedTextsAsync();

            Assert.IsNotNull(receivedTextListResponse);
            Assert.IsNotNull(receivedTextListResponse.receivedTexts);
            Assert.AreNotEqual(receivedTextListResponse.receivedTexts.Count, 0);

            List <ReceivedTextResponse> receivedTexts = receivedTextListResponse.receivedTexts;

            foreach (ReceivedTextResponse receivedText in receivedTexts)
            {
                NotifyAssertions.AssertReceivedTextResponse(receivedText);
            }
        }
        public void GetReceivedTexts()
        {
            NotificationClient       client_inbound           = new NotificationClient(NOTIFY_API_URL, INBOUND_SMS_QUERY_KEY);
            ReceivedTextListResponse receivedTextListResponse = client_inbound.GetReceivedTexts();

            Assert.IsNotNull(receivedTextListResponse);
            Assert.IsNotNull(receivedTextListResponse.receivedTexts);
            Assert.IsTrue(receivedTextListResponse.receivedTexts.Count > 0);

            List <ReceivedTextResponse> receivedTexts = receivedTextListResponse.receivedTexts;

            foreach (ReceivedTextResponse receivedText in receivedTexts)
            {
                NotifyAssertions.AssertReceivedTextResponse(receivedText);
            }
        }
        public void GetAllReceivedTextsReceivesExpectedResponse()
        {
            MockRequest(Constants.fakeReceivedTextListResponseJson,
                        client.GET_RECEIVED_TEXTS_URL, AssertValidRequest);

            ReceivedTextListResponse expectedResponse =
                JsonConvert.DeserializeObject <ReceivedTextListResponse>(Constants.fakeReceivedTextListResponseJson);

            MockRequest(Constants.fakeReceivedTextListResponseJson,
                        client.GET_RECEIVED_TEXTS_URL, AssertValidRequest);

            ReceivedTextListResponse receivedTextList = client.GetReceivedTexts();

            List <ReceivedTextResponse> receivedTexts = receivedTextList.receivedTexts;

            Assert.AreEqual(receivedTexts.Count, expectedResponse.receivedTexts.Count);
            for (int i = 0; i < receivedTexts.Count; i++)
            {
                Assert.IsTrue(expectedResponse.receivedTexts[i].Equals(receivedTexts[i]));
            }
        }