Example #1
0
        /// <summary>
        /// Remove a participant from the conversation
        /// </summary>
        /// <param name="pathChatServiceSid"> The SID of the Conversation Service that the resource is associated with. </param>
        /// <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="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 <bool> DeleteAsync(string pathChatServiceSid,
                                                                           string pathConversationSid,
                                                                           string pathSid,
                                                                           ParticipantResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null,
                                                                           ITwilioRestClient client = null)
        {
            var options = new DeleteParticipantOptions(pathChatServiceSid, pathConversationSid, pathSid)
            {
                XTwilioWebhookEnabled = xTwilioWebhookEnabled
            };

            return(await DeleteAsync(options, client));
        }
Example #2
0
        /// <summary>
        /// Remove a participant from the conversation
        /// </summary>
        /// <param name="pathChatServiceSid"> The SID of the Conversation Service that the resource is associated with. </param>
        /// <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="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 Participant </returns>
        public static bool Delete(string pathChatServiceSid,
                                  string pathConversationSid,
                                  string pathSid,
                                  ParticipantResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null,
                                  ITwilioRestClient client = null)
        {
            var options = new DeleteParticipantOptions(pathChatServiceSid, pathConversationSid, pathSid)
            {
                XTwilioWebhookEnabled = xTwilioWebhookEnabled
            };

            return(Delete(options, client));
        }
Example #3
0
        /// <summary>
        /// Update an existing participant in the conversation
        /// </summary>
        /// <param name="pathChatServiceSid"> The SID of the Conversation Service that the resource is associated with. </param>
        /// <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="identity"> A unique string identifier for the conversation participant as Conversation User. </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="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 Participant </returns>
        public static ParticipantResource Update(string pathChatServiceSid,
                                                 string pathConversationSid,
                                                 string pathSid,
                                                 DateTime?dateCreated = null,
                                                 DateTime?dateUpdated = null,
                                                 string identity      = null,
                                                 string attributes    = null,
                                                 string roleSid       = null,
                                                 string messagingBindingProxyAddress     = null,
                                                 string messagingBindingProjectedAddress = null,
                                                 ParticipantResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null,
                                                 ITwilioRestClient client = null)
        {
            var options = new UpdateParticipantOptions(pathChatServiceSid, pathConversationSid, pathSid)
            {
                DateCreated = dateCreated, DateUpdated = dateUpdated, Identity = identity, Attributes = attributes, RoleSid = roleSid, MessagingBindingProxyAddress = messagingBindingProxyAddress, MessagingBindingProjectedAddress = messagingBindingProjectedAddress, XTwilioWebhookEnabled = xTwilioWebhookEnabled
            };

            return(Update(options, client));
        }
Example #4
0
        /// <summary>
        /// Add a new participant to the conversation in a specific service
        /// </summary>
        /// <param name="pathChatServiceSid"> The SID of the Conversation Service that the resource is associated with. </param>
        /// <param name="pathConversationSid"> The unique ID of the Conversation for this participant. </param>
        /// <param name="identity"> A unique string identifier for the conversation participant as Conversation User. </param>
        /// <param name="messagingBindingAddress"> The address of the participant's device. </param>
        /// <param name="messagingBindingProxyAddress"> The address of the Twilio phone number that the participant is in
        ///                                    contact with. </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="messagingBindingProjectedAddress"> The address of the Twilio phone number that is used in Group MMS.
        ///                                        </param>
        /// <param name="roleSid"> The SID of a conversation-level Role to assign to 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> CreateAsync(string pathChatServiceSid,
                                                                                          string pathConversationSid,
                                                                                          string identity = null,
                                                                                          string messagingBindingAddress      = null,
                                                                                          string messagingBindingProxyAddress = null,
                                                                                          DateTime?dateCreated = null,
                                                                                          DateTime?dateUpdated = null,
                                                                                          string attributes    = null,
                                                                                          string messagingBindingProjectedAddress = null,
                                                                                          string roleSid = null,
                                                                                          ParticipantResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null,
                                                                                          ITwilioRestClient client = null)
        {
            var options = new CreateParticipantOptions(pathChatServiceSid, pathConversationSid)
            {
                Identity = identity, MessagingBindingAddress = messagingBindingAddress, MessagingBindingProxyAddress = messagingBindingProxyAddress, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, MessagingBindingProjectedAddress = messagingBindingProjectedAddress, RoleSid = roleSid, XTwilioWebhookEnabled = xTwilioWebhookEnabled
            };

            return(await CreateAsync(options, client));
        }