private static Request BuildDeleteRequest(DeleteMessageOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Delete, Rest.Domain.IpMessaging, "/v2/Services/" + options.PathServiceSid + "/Channels/" + options.PathChannelSid + "/Messages/" + options.PathSid + "", client.Region, queryParams: options.GetParams() )); }
/// <summary> /// delete /// </summary> /// <param name="pathServiceSid"> The SID of the Service to delete the resource from </param> /// <param name="pathChannelSid"> The SID of the Channel the message to delete belongs to </param> /// <param name="pathSid"> The SID of the Message resource to delete </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 pathServiceSid, string pathChannelSid, string pathSid, MessageResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { var options = new DeleteMessageOptions(pathServiceSid, pathChannelSid, pathSid) { XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return(await DeleteAsync(options, client)); }
/// <summary> /// delete /// </summary> /// <param name="pathServiceSid"> The SID of the Service to delete the resource from </param> /// <param name="pathChannelSid"> The SID of the Channel the message to delete belongs to </param> /// <param name="pathSid"> The SID of the Message resource to delete </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 pathServiceSid, string pathChannelSid, string pathSid, MessageResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { var options = new DeleteMessageOptions(pathServiceSid, pathChannelSid, pathSid) { XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return(Delete(options, client)); }
/// <summary> /// delete /// </summary> /// /// <param name="pathServiceSid"> The service_sid </param> /// <param name="pathChannelSid"> The channel_sid </param> /// <param name="pathSid"> The sid </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 pathServiceSid, string pathChannelSid, string pathSid, ITwilioRestClient client = null) { var options = new DeleteMessageOptions(pathServiceSid, pathChannelSid, pathSid); return(await DeleteAsync(options, client)); }
/// <summary> /// delete /// </summary> /// /// <param name="pathServiceSid"> The service_sid </param> /// <param name="pathChannelSid"> The channel_sid </param> /// <param name="pathSid"> The sid </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Message </returns> public static bool Delete(string pathServiceSid, string pathChannelSid, string pathSid, ITwilioRestClient client = null) { var options = new DeleteMessageOptions(pathServiceSid, pathChannelSid, pathSid); return(Delete(options, client)); }