Пример #1
0
        /// <summary>
        /// Update a feedback entry for a call
        /// </summary>
        /// <param name="options"> Update Feedback parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Feedback </returns>
        public static FeedbackResource Update(UpdateFeedbackOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Пример #2
0
        /// <summary>
        /// Create or update a feedback entry for a call
        /// </summary>
        ///
        /// <param name="pathCallSid"> The call_sid </param>
        /// <param name="qualityScore"> An integer from 1 to 5 </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="issue"> Issues experienced during the call </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Feedback </returns>
        public static FeedbackResource Update(string pathCallSid, int?qualityScore, string pathAccountSid = null, List <FeedbackResource.IssuesEnum> issue = null, ITwilioRestClient client = null)
        {
            var options = new UpdateFeedbackOptions(pathCallSid, qualityScore)
            {
                PathAccountSid = pathAccountSid, Issue = issue
            };

            return(Update(options, client));
        }
Пример #3
0
        /// <summary>
        /// Create or update a feedback entry for a call
        /// </summary>
        ///
        /// <param name="pathCallSid"> The call_sid </param>
        /// <param name="qualityScore"> An integer from 1 to 5 </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="issue"> Issues experienced during the call </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Feedback </returns>
        public static async System.Threading.Tasks.Task <FeedbackResource> UpdateAsync(string pathCallSid, int?qualityScore, string pathAccountSid = null, List <FeedbackResource.IssuesEnum> issue = null, ITwilioRestClient client = null)
        {
            var options = new UpdateFeedbackOptions(pathCallSid, qualityScore)
            {
                PathAccountSid = pathAccountSid, Issue = issue
            };

            return(await UpdateAsync(options, client));
        }
Пример #4
0
 private static Request BuildUpdateRequest(UpdateFeedbackOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Api,
                "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/Calls/" + options.PathCallSid + "/Feedback.json",
                postParams: options.GetParams()
                ));
 }
Пример #5
0
        /// <summary>
        /// Update a feedback entry for a call
        /// </summary>
        /// <param name="options"> Update Feedback parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Feedback </returns>
        public static async System.Threading.Tasks.Task <FeedbackResource> UpdateAsync(UpdateFeedbackOptions options,
                                                                                       ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }