コード例 #1
0
        /// <summary>
        /// Create a feedback entry for a call
        /// </summary>
        /// <param name="options"> Create Feedback parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Feedback </returns>
        public static FeedbackResource Create(CreateFeedbackOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildCreateRequest(options, client));

            return(FromJson(response.Content));
        }
コード例 #2
0
        /// <summary>
        /// create
        /// </summary>
        ///
        /// <param name="pathCallSid"> The call_sid </param>
        /// <param name="qualityScore"> The quality_score </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="issue"> The issue </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> CreateAsync(string pathCallSid, int?qualityScore, string pathAccountSid = null, List <FeedbackResource.IssuesEnum> issue = null, ITwilioRestClient client = null)
        {
            var options = new CreateFeedbackOptions(pathCallSid, qualityScore)
            {
                PathAccountSid = pathAccountSid, Issue = issue
            };

            return(await CreateAsync(options, client));
        }
コード例 #3
0
        /// <summary>
        /// create
        /// </summary>
        ///
        /// <param name="pathCallSid"> The call_sid </param>
        /// <param name="qualityScore"> The quality_score </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="issue"> The issue </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Feedback </returns>
        public static FeedbackResource Create(string pathCallSid, int?qualityScore, string pathAccountSid = null, List <FeedbackResource.IssuesEnum> issue = null, ITwilioRestClient client = null)
        {
            var options = new CreateFeedbackOptions(pathCallSid, qualityScore)
            {
                PathAccountSid = pathAccountSid, Issue = issue
            };

            return(Create(options, client));
        }
コード例 #4
0
 private static Request BuildCreateRequest(CreateFeedbackOptions 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>
        /// Create a feedback entry for a call
        /// </summary>
        /// <param name="options"> Create 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> CreateAsync(CreateFeedbackOptions options,
                                                                                       ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildCreateRequest(options, client));

            return(FromJson(response.Content));
        }