PostmarkDotNet.PostmarkClient.GetInboundMessagesImpl C# (CSharp) Method

GetInboundMessagesImpl() private method

Implementation to get Inbound messages for the public search APIs
private GetInboundMessagesImpl ( string recipient, string fromemail, string subject, string mailboxhash, int count, int offset ) : PostmarkInboundMessageList
recipient string
fromemail string
subject string
mailboxhash string
count int
offset int
return PostmarkInboundMessageList
        private PostmarkInboundMessageList GetInboundMessagesImpl(string recipient, string fromemail, string subject, string mailboxhash, int count, int offset)
        {
            if (count > 500)
            {
                throw new ValidationException("You can only receive up to 500 messages per call.");
            }

            var request = NewMessagesRequest();
            request.Path = "messages/inbound";

            if (!string.IsNullOrEmpty(recipient)) request.AddParameter("recipient", recipient);
            if (!string.IsNullOrEmpty(fromemail)) request.AddParameter("fromemail", fromemail);
            if (!string.IsNullOrEmpty(subject)) request.AddParameter("subject", subject);
            if (!string.IsNullOrEmpty(subject)) request.AddParameter("mailboxhash", mailboxhash);

            request.AddParameter("count", count.ToString());
            request.AddParameter("offset", offset.ToString());

            var response = _client.Request(request);
            return JsonConvert.DeserializeObject<PostmarkInboundMessageList>(response.Content, _settings);
        }