private static Request BuildDeleteRequest(DeleteMessageOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Delete, Rest.Domain.Conversations, "/v1/Conversations/" + options.PathConversationSid + "/Messages/" + options.PathSid + "", client.Region, queryParams: options.GetParams() )); }
/// <summary> /// Remove a message from the conversation /// </summary> /// <param name="pathConversationSid"> The unique ID of the Conversation for this message. </param> /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param> /// <param name="xTwilioWebhookEnabled"> The X-Twilio-Webhook-Enabled HTTP request header </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Message </returns> public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathConversationSid, string pathSid, MessageResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { var options = new DeleteMessageOptions(pathConversationSid, pathSid) { XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return(await DeleteAsync(options, client)); }
/// <summary> /// Remove a message from the conversation /// </summary> /// <param name="pathConversationSid"> The unique ID of the Conversation for this message. </param> /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param> /// <param name="xTwilioWebhookEnabled"> The X-Twilio-Webhook-Enabled HTTP request header </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Message </returns> public static bool Delete(string pathConversationSid, string pathSid, MessageResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { var options = new DeleteMessageOptions(pathConversationSid, pathSid) { XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return(Delete(options, client)); }
/// <summary> /// delete /// </summary> /// <param name="pathConversationSid"> The unique id of the Conversation for this message. </param> /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Message </returns> public static bool Delete(string pathConversationSid, string pathSid, ITwilioRestClient client = null) { var options = new DeleteMessageOptions(pathConversationSid, pathSid); return(Delete(options, client)); }