Beispiel #1
0
        /// <summary>
        /// Create a reply to a ticket.
        ///
        /// c.f. https://developers.freshdesk.com/api/#reply_ticket
        /// </summary>
        ///
        /// <param name="ticketId">
        /// The ticket to add the reply to.
        /// </param>
        ///
        /// <param name="request">
        /// Defines the set of properties to set on the reply.
        /// </param>
        ///
        /// <param name="cancellationToken"></param>
        ///
        /// <returns>The full conversation entry</returns>
        public async Task <ConversationEntry> CreateReplyAsync(
            long ticketId,
            CreateReplyRequest request,
            CancellationToken cancellationToken = default)
        {
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request), "Request must not be null");
            }

            return(await _client
                   .ApiOperationAsync <ConversationEntry>(HttpMethod.Post, $"/api/v2/tickets/{ticketId}/reply", request, cancellationToken)
                   .ConfigureAwait(false));
        }
Beispiel #2
0
 /// <summary>
 /// Create Reply
 /// </summary>
 /// <param name="request">Request</param>
 public void CreateReply(CreateReplyRequest request)
 {
     Channel.CreateReply(request);
 }
Beispiel #3
0
 /// <summary>
 /// Create Reply
 /// </summary>
 /// <param name="request">Request</param>
 public void CreateReply(CreateReplyRequest request)
 {
     _messenger.CreateReply(request.TopicId, request.Message, request.From, request.To, request.Attachments);
 }