public T ProcessActionResult(string responseJson, Enum theAction)
        {
            var dm = new DirectMessageEvents
            {
                Value = JsonConvert.DeserializeObject <DirectMessageEventsValue>(responseJson ?? "")
            };

            return(dm.ItemCast(default(T)));
        }
        /// <summary>
        /// Sends a new direct message to specified user.
        /// </summary>
        /// <param name="recipientID">ID of user to send to.</param>
        /// <param name="text">Direct message contents.</param>
        /// <param name="attachment">Optional attachment from overloads that support it.</param>
        /// <param name="quickReply">Quick reply from overloads that support it.</param>
        /// <param name="callToActions">List of Call to Action, which creates buttons in the message.</param>
        /// <param name="cancelToken">Async cancellation token.</param>
        /// <returns>Direct message events data.</returns>
        async Task <DirectMessageEvents> NewDirectMessageEventAsync(ulong recipientID, string text, Attachment attachment = null, QuickReply quickReply = null, IEnumerable <CallToAction> callToActions = null, CancellationToken cancelToken = default(CancellationToken))
        {
            if (recipientID == default(ulong))
            {
                throw new ArgumentException($"{nameof(recipientID)} must be set.", nameof(recipientID));
            }
            if (string.IsNullOrWhiteSpace(text))
            {
                throw new ArgumentException($"{nameof(text)} is a required parameter.", nameof(text));
            }

            var newUrl = BaseUrl + "direct_messages/events/new.json";

            var dmEventParams = new DirectMessageEventsValue
            {
                DMEvent = new DMEvent
                {
                    MessageCreate = new DirectMessageCreate
                    {
                        MessageData = new DirectMessageData
                        {
                            Text          = text,
                            Attachment    = attachment,
                            QuickReply    = quickReply,
                            CallToActions = callToActions
                        },
                        Target = new DirectMessageTarget
                        {
                            RecipientID = recipientID.ToString()
                        }
                    },
                    Type = "message_create"
                }
            };

            RawResult =
                await TwitterExecutor.SendJsonToTwitterAsync(
                    HttpMethod.Post.ToString(),
                    newUrl,
                    new Dictionary <string, string>(),
                    dmEventParams,
                    cancelToken)
                .ConfigureAwait(false);

            var reqProc = new DirectMessageEventsRequestProcessor <DirectMessageEvents>();
            DirectMessageEvents dmEvents = reqProc.ProcessActionResult(RawResult, DirectMessageEventsType.Show);

            return(dmEvents);
        }