PostmarkDotNet.PostmarkClient.GetOutboundMessagesImpl C# (CSharp) Méthode

GetOutboundMessagesImpl() private méthode

Implementation called to do the actual messages call and return a PostmarkOutboundMessageList
private GetOutboundMessagesImpl ( string recipient, string fromemail, string tag, string subject, int count, int offset ) : PostmarkOutboundMessageList
recipient string
fromemail string
tag string
subject string
count int
offset int
Résultat PostmarkOutboundMessageList
        private PostmarkOutboundMessageList GetOutboundMessagesImpl(string recipient, string fromemail, string tag, string subject, 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/outbound";

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

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

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