/// <summary> /// update /// </summary> /// <param name="options"> Update Participant parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Participant </returns> public static ParticipantResource Update(UpdateParticipantOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateParticipantOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Conversations, "/v1/Conversations/" + options.PathConversationSid + "/Participants/" + options.PathSid + "", postParams: options.GetParams() )); }
/// <summary> /// update /// </summary> /// <param name="pathConversationSid"> The unique id of the Conversation for this participant. </param> /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param> /// <param name="dateCreated"> The date that this resource was created. </param> /// <param name="dateUpdated"> The date that this resource was last updated. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Participant </returns> public static async System.Threading.Tasks.Task <ParticipantResource> UpdateAsync(string pathConversationSid, string pathSid, DateTime?dateCreated = null, DateTime?dateUpdated = null, ITwilioRestClient client = null) { var options = new UpdateParticipantOptions(pathConversationSid, pathSid) { DateCreated = dateCreated, DateUpdated = dateUpdated }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="pathConversationSid"> The unique id of the Conversation for this participant. </param> /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param> /// <param name="dateCreated"> The date that this resource was created. </param> /// <param name="dateUpdated"> The date that this resource was last updated. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Participant </returns> public static ParticipantResource Update(string pathConversationSid, string pathSid, DateTime?dateCreated = null, DateTime?dateUpdated = null, ITwilioRestClient client = null) { var options = new UpdateParticipantOptions(pathConversationSid, pathSid) { DateCreated = dateCreated, DateUpdated = dateUpdated }; return(Update(options, client)); }
/// <summary> /// update /// </summary> /// <param name="pathConversationSid"> The unique id of the Conversation for this participant. </param> /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param> /// <param name="dateCreated"> The date that this resource was created. </param> /// <param name="dateUpdated"> The date that this resource was last updated. </param> /// <param name="attributes"> An optional string metadata field you can use to store any data you wish. </param> /// <param name="roleSid"> The SID of the Role to assign to the participant </param> /// <param name="messagingBindingProxyAddress"> The address of the Twilio phone number that the participant is in /// contact with. </param> /// <param name="messagingBindingProjectedAddress"> The address of the Twilio phone number that is used in Group MMS. /// </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Participant </returns> public static async System.Threading.Tasks.Task <ParticipantResource> UpdateAsync(string pathConversationSid, string pathSid, DateTime?dateCreated = null, DateTime?dateUpdated = null, string attributes = null, string roleSid = null, string messagingBindingProxyAddress = null, string messagingBindingProjectedAddress = null, ITwilioRestClient client = null) { var options = new UpdateParticipantOptions(pathConversationSid, pathSid) { DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, RoleSid = roleSid, MessagingBindingProxyAddress = messagingBindingProxyAddress, MessagingBindingProjectedAddress = messagingBindingProjectedAddress }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="pathConversationSid"> The unique id of the Conversation for this participant. </param> /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param> /// <param name="dateCreated"> The date that this resource was created. </param> /// <param name="dateUpdated"> The date that this resource was last updated. </param> /// <param name="attributes"> An optional string metadata field you can use to store any data you wish. </param> /// <param name="roleSid"> The SID of the Role to assign to the participant </param> /// <param name="messagingBindingProxyAddress"> The address of the Twilio phone number that the participant is in /// contact with. </param> /// <param name="messagingBindingProjectedAddress"> The address of the Twilio phone number that is used in Group MMS. /// </param> /// <param name="identity"> A unique string identifier for the conversation participant as Chat User. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Participant </returns> public static ParticipantResource Update(string pathConversationSid, string pathSid, DateTime?dateCreated = null, DateTime?dateUpdated = null, string attributes = null, string roleSid = null, string messagingBindingProxyAddress = null, string messagingBindingProjectedAddress = null, string identity = null, ITwilioRestClient client = null) { var options = new UpdateParticipantOptions(pathConversationSid, pathSid) { DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, RoleSid = roleSid, MessagingBindingProxyAddress = messagingBindingProxyAddress, MessagingBindingProjectedAddress = messagingBindingProjectedAddress, Identity = identity }; return(Update(options, client)); }
/// <summary> /// Update an existing participant in the conversation /// </summary> /// <param name="pathConversationSid"> The unique ID of the Conversation for this participant. </param> /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param> /// <param name="dateCreated"> The date that this resource was created. </param> /// <param name="dateUpdated"> The date that this resource was last updated. </param> /// <param name="attributes"> An optional string metadata field you can use to store any data you wish. </param> /// <param name="roleSid"> The SID of a conversation-level Role to assign to the participant </param> /// <param name="messagingBindingProxyAddress"> The address of the Twilio phone number that the participant is in /// contact with. </param> /// <param name="messagingBindingProjectedAddress"> The address of the Twilio phone number that is used in Group MMS. /// </param> /// <param name="identity"> A unique string identifier for the conversation participant as Conversation User. </param> /// <param name="lastReadMessageIndex"> Index of last “read” message in the Conversation for the Participant. </param> /// <param name="lastReadTimestamp"> Timestamp of last “read” message in the Conversation for the Participant. </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 Participant </returns> public static async System.Threading.Tasks.Task <ParticipantResource> UpdateAsync(string pathConversationSid, string pathSid, DateTime?dateCreated = null, DateTime?dateUpdated = null, string attributes = null, string roleSid = null, string messagingBindingProxyAddress = null, string messagingBindingProjectedAddress = null, string identity = null, int?lastReadMessageIndex = null, string lastReadTimestamp = null, ParticipantResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null, ITwilioRestClient client = null) { var options = new UpdateParticipantOptions(pathConversationSid, pathSid) { DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, RoleSid = roleSid, MessagingBindingProxyAddress = messagingBindingProxyAddress, MessagingBindingProjectedAddress = messagingBindingProjectedAddress, Identity = identity, LastReadMessageIndex = lastReadMessageIndex, LastReadTimestamp = lastReadTimestamp, XTwilioWebhookEnabled = xTwilioWebhookEnabled }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="options"> Update Participant parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Participant </returns> public static async System.Threading.Tasks.Task <ParticipantResource> UpdateAsync(UpdateParticipantOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }