예제 #1
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update Member parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Member </returns>
        public static MemberResource Update(UpdateMemberOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
예제 #2
0
        /// <summary>
        /// update
        /// </summary>
        ///
        /// <param name="options"> Update Member parameters </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(UpdateMemberOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
예제 #3
0
 private static Request BuildUpdateRequest(UpdateMemberOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.IpMessaging,
                "/v2/Services/" + options.PathServiceSid + "/Channels/" + options.PathChannelSid + "/Members/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }
예제 #4
0
        /// <summary>
        /// update
        /// </summary>
        ///
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="pathChannelSid"> The channel_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="roleSid"> The role_sid </param>
        /// <param name="lastConsumedMessageIndex"> The last_consumed_message_index </param>
        /// <param name="lastConsumptionTimestamp"> The last_consumption_timestamp </param>
        /// <param name="dateCreated"> The date_created </param>
        /// <param name="dateUpdated"> The date_updated </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, ITwilioRestClient client = null)
        {
            var options = new UpdateMemberOptions(pathServiceSid, pathChannelSid, pathSid)
            {
                RoleSid = roleSid, LastConsumedMessageIndex = lastConsumedMessageIndex, LastConsumptionTimestamp = lastConsumptionTimestamp, DateCreated = dateCreated, DateUpdated = dateUpdated
            };

            return(await UpdateAsync(options, client));
        }
예제 #5
0
        /// <summary>
        /// update
        /// </summary>
        ///
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="pathChannelSid"> The channel_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="roleSid"> The role_sid </param>
        /// <param name="lastConsumedMessageIndex"> The last_consumed_message_index </param>
        /// <param name="lastConsumptionTimestamp"> The last_consumption_timestamp </param>
        /// <param name="dateCreated"> The date_created </param>
        /// <param name="dateUpdated"> The date_updated </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Member </returns>
        public static MemberResource Update(string pathServiceSid, string pathChannelSid, string pathSid, string roleSid = null, int?lastConsumedMessageIndex = null, DateTime?lastConsumptionTimestamp = null, DateTime?dateCreated = null, DateTime?dateUpdated = null, ITwilioRestClient client = null)
        {
            var options = new UpdateMemberOptions(pathServiceSid, pathChannelSid, pathSid)
            {
                RoleSid = roleSid, LastConsumedMessageIndex = lastConsumedMessageIndex, LastConsumptionTimestamp = lastConsumptionTimestamp, DateCreated = dateCreated, DateUpdated = dateUpdated
            };

            return(Update(options, client));
        }