/// <summary> /// create /// </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)); }
/// <summary> /// create /// </summary> /// /// <param name="pathMessageSid"> The message_sid </param> /// <param name="pathAccountSid"> The account_sid </param> /// <param name="outcome"> The outcome </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Feedback </returns> public static FeedbackResource Create(string pathMessageSid, string pathAccountSid = null, FeedbackResource.OutcomeEnum outcome = null, ITwilioRestClient client = null) { var options = new CreateFeedbackOptions(pathMessageSid) { PathAccountSid = pathAccountSid, Outcome = outcome }; return(Create(options, client)); }
private static Request BuildCreateRequest(CreateFeedbackOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Api, "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/Messages/" + options.PathMessageSid + "/Feedback.json", postParams: options.GetParams() )); }
/// <summary> /// create /// </summary> /// /// <param name="pathMessageSid"> The message_sid </param> /// <param name="pathAccountSid"> The account_sid </param> /// <param name="outcome"> The outcome </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 pathMessageSid, string pathAccountSid = null, FeedbackResource.OutcomeEnum outcome = null, ITwilioRestClient client = null) { var options = new CreateFeedbackOptions(pathMessageSid) { PathAccountSid = pathAccountSid, Outcome = outcome }; return(await CreateAsync(options, client)); }
/// <summary> /// create /// </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)); }