/// <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 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> /// update /// </summary> /// <param name="pathServiceSid"> The SID of the Service to update the resource from </param> /// <param name="pathChannelSid"> The SID of the Channel the message belongs to </param> /// <param name="pathSid"> The SID of the Message resource to update </param> /// <param name="body"> The message to send to the channel </param> /// <param name="attributes"> A valid JSON string that contains application-specific data </param> /// <param name="dateCreated"> The ISO 8601 date and time in GMT when the resource was created </param> /// <param name="dateUpdated"> The ISO 8601 date and time in GMT when the resource was updated </param> /// <param name="lastUpdatedBy"> The Identity of the User who last updated the Message, if applicable </param> /// <param name="from"> The Identity of the message's author </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 MessageResource Update(string pathServiceSid, string pathChannelSid, string pathSid, string body = null, string attributes = null, DateTime?dateCreated = null, DateTime?dateUpdated = null, string lastUpdatedBy = null, string from = null, MessageResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { var options = new UpdateMessageOptions(pathServiceSid, pathChannelSid, pathSid) { Body = body, Attributes = attributes, DateCreated = dateCreated, DateUpdated = dateUpdated, LastUpdatedBy = lastUpdatedBy, From = from, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return(Update(options, client)); }
/// <summary> /// create /// </summary> /// <param name="pathServiceSid"> The SID of the Service to create the resource under </param> /// <param name="pathChannelSid"> The SID of the Channel the new resource belongs to </param> /// <param name="from"> The Identity of the new message's author </param> /// <param name="attributes"> A valid JSON string that contains application-specific data </param> /// <param name="dateCreated"> The ISO 8601 date and time in GMT when the resource was created </param> /// <param name="dateUpdated"> The ISO 8601 date and time in GMT when the resource was updated </param> /// <param name="lastUpdatedBy"> The Identity of the User who last updated the Message </param> /// <param name="body"> The message to send to the channel </param> /// <param name="mediaSid"> The Media Sid to be attached to the new Message </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 <MessageResource> CreateAsync(string pathServiceSid, string pathChannelSid, string from = null, string attributes = null, DateTime?dateCreated = null, DateTime?dateUpdated = null, string lastUpdatedBy = null, string body = null, string mediaSid = null, MessageResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { var options = new CreateMessageOptions(pathServiceSid, pathChannelSid) { From = from, Attributes = attributes, DateCreated = dateCreated, DateUpdated = dateUpdated, LastUpdatedBy = lastUpdatedBy, Body = body, MediaSid = mediaSid, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return(await CreateAsync(options, client)); }