/// <summary> /// Remove a conversation user from your service /// </summary> /// <param name="pathChatServiceSid"> The SID of the Conversation Service to delete the resource from </param> /// <param name="pathSid"> The SID of the User 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 User </returns> public static bool Delete(string pathChatServiceSid, string pathSid, UserResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { var options = new DeleteUserOptions(pathChatServiceSid, pathSid) { XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return(Delete(options, client)); }
/// <summary> /// Remove a conversation user from your service /// </summary> /// <param name="pathChatServiceSid"> The SID of the Conversation Service to delete the resource from </param> /// <param name="pathSid"> The SID of the User 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 User </returns> public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathChatServiceSid, string pathSid, UserResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { var options = new DeleteUserOptions(pathChatServiceSid, pathSid) { XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return(await DeleteAsync(options, client)); }
/// <summary> /// Add a new conversation user to your service /// </summary> /// <param name="pathChatServiceSid"> The SID of the Conversation Service that the resource is associated with </param> /// <param name="identity"> The string that identifies the resource's User </param> /// <param name="friendlyName"> The string that you assigned to describe the resource </param> /// <param name="attributes"> The JSON Object string that stores application-specific data </param> /// <param name="roleSid"> The SID of a service-level Role to assign to the user </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 User </returns> public static UserResource Create(string pathChatServiceSid, string identity, string friendlyName = null, string attributes = null, string roleSid = null, UserResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { var options = new CreateUserOptions(pathChatServiceSid, identity) { FriendlyName = friendlyName, Attributes = attributes, RoleSid = roleSid, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return(Create(options, client)); }
/// <summary> /// Update an existing conversation user in your service /// </summary> /// <param name="pathChatServiceSid"> The SID of the Conversation Service that the resource is associated with </param> /// <param name="pathSid"> The SID of the User resource to update </param> /// <param name="friendlyName"> The string that you assigned to describe the resource </param> /// <param name="attributes"> The JSON Object string that stores application-specific data </param> /// <param name="roleSid"> The SID of a service-level Role to assign to the user </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 User </returns> public static async System.Threading.Tasks.Task <UserResource> UpdateAsync(string pathChatServiceSid, string pathSid, string friendlyName = null, string attributes = null, string roleSid = null, UserResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { var options = new UpdateUserOptions(pathChatServiceSid, pathSid) { FriendlyName = friendlyName, Attributes = attributes, RoleSid = roleSid, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return(await UpdateAsync(options, client)); }