Ejemplo n.º 1
0
        /// <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 Member resource to delete belongs to </param>
        /// <param name="pathSid"> The SID of the Member 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 Member </returns>
        public static bool Delete(string pathServiceSid,
                                  string pathChannelSid,
                                  string pathSid,
                                  MemberResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null,
                                  ITwilioRestClient client = null)
        {
            var options = new DeleteMemberOptions(pathServiceSid, pathChannelSid, pathSid)
            {
                XTwilioWebhookEnabled = xTwilioWebhookEnabled
            };

            return(Delete(options, client));
        }
Ejemplo n.º 2
0
        /// <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 Member resource to delete belongs to </param>
        /// <param name="pathSid"> The SID of the Member 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 Member </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathServiceSid,
                                                                           string pathChannelSid,
                                                                           string pathSid,
                                                                           MemberResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null,
                                                                           ITwilioRestClient client = null)
        {
            var options = new DeleteMemberOptions(pathServiceSid, pathChannelSid, pathSid)
            {
                XTwilioWebhookEnabled = xTwilioWebhookEnabled
            };

            return(await DeleteAsync(options, client));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Service to create the resource under </param>
        /// <param name="pathChannelSid"> The SID of the channel the member to update belongs to </param>
        /// <param name="pathSid"> The SID of the Member resource to update </param>
        /// <param name="roleSid"> The SID of the Role to assign to the member </param>
        /// <param name="lastConsumedMessageIndex"> The index of the last consumed Message for the Channel for the Member
        ///                                </param>
        /// <param name="lastConsumptionTimestamp"> The ISO 8601 based timestamp string representing the datetime of the last
        ///                                Message read event for the Member within the Channel </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="attributes"> A valid JSON string that contains application-specific data </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 Member </returns>
        public static async System.Threading.Tasks.Task <MemberResource> UpdateAsync(string pathServiceSid,
                                                                                     string pathChannelSid,
                                                                                     string pathSid,
                                                                                     string roleSid = null,
                                                                                     int?lastConsumedMessageIndex      = null,
                                                                                     DateTime?lastConsumptionTimestamp = null,
                                                                                     DateTime?dateCreated = null,
                                                                                     DateTime?dateUpdated = null,
                                                                                     string attributes    = null,
                                                                                     MemberResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null,
                                                                                     ITwilioRestClient client = null)
        {
            var options = new UpdateMemberOptions(pathServiceSid, pathChannelSid, pathSid)
            {
                RoleSid = roleSid, LastConsumedMessageIndex = lastConsumedMessageIndex, LastConsumptionTimestamp = lastConsumptionTimestamp, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, XTwilioWebhookEnabled = xTwilioWebhookEnabled
            };

            return(await UpdateAsync(options, client));
        }
Ejemplo n.º 4
0
        /// <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 member belongs to </param>
        /// <param name="identity"> The `identity` value that identifies the new resource's User </param>
        /// <param name="roleSid"> The SID of the Role to assign to the member </param>
        /// <param name="lastConsumedMessageIndex"> The index of the last Message in the Channel the Member has read </param>
        /// <param name="lastConsumptionTimestamp"> The ISO 8601 based timestamp string representing the datetime of the last
        ///                                Message read event for the member within the Channel </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="attributes"> A valid JSON string that contains application-specific data </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 Member </returns>
        public static MemberResource Create(string pathServiceSid,
                                            string pathChannelSid,
                                            string identity,
                                            string roleSid = null,
                                            int?lastConsumedMessageIndex      = null,
                                            DateTime?lastConsumptionTimestamp = null,
                                            DateTime?dateCreated = null,
                                            DateTime?dateUpdated = null,
                                            string attributes    = null,
                                            MemberResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null,
                                            ITwilioRestClient client = null)
        {
            var options = new CreateMemberOptions(pathServiceSid, pathChannelSid, identity)
            {
                RoleSid = roleSid, LastConsumedMessageIndex = lastConsumedMessageIndex, LastConsumptionTimestamp = lastConsumptionTimestamp, DateCreated = dateCreated, DateUpdated = dateUpdated, Attributes = attributes, XTwilioWebhookEnabled = xTwilioWebhookEnabled
            };

            return(Create(options, client));
        }