示例#1
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Service to update the resource from </param>
        /// <param name="pathSid"> The SID of the User resource to update </param>
        /// <param name="roleSid"> The SID id of the Role assigned to this user </param>
        /// <param name="attributes"> A valid JSON string that contains application-specific data </param>
        /// <param name="friendlyName"> A string to describe the 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 User </returns>
        public static async System.Threading.Tasks.Task <UserResource> UpdateAsync(string pathServiceSid,
                                                                                   string pathSid,
                                                                                   string roleSid      = null,
                                                                                   string attributes   = null,
                                                                                   string friendlyName = null,
                                                                                   UserResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null,
                                                                                   ITwilioRestClient client = null)
        {
            var options = new UpdateUserOptions(pathServiceSid, pathSid)
            {
                RoleSid = roleSid, Attributes = attributes, FriendlyName = friendlyName, XTwilioWebhookEnabled = xTwilioWebhookEnabled
            };

            return(await UpdateAsync(options, client));
        }
示例#2
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Service to update the resource from </param>
        /// <param name="pathSid"> The SID of the User resource to update </param>
        /// <param name="roleSid"> The SID id of the Role assigned to this user </param>
        /// <param name="attributes"> A valid JSON string that contains application-specific data </param>
        /// <param name="friendlyName"> A string to describe the 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 User </returns>
        public static UserResource Update(string pathServiceSid,
                                          string pathSid,
                                          string roleSid      = null,
                                          string attributes   = null,
                                          string friendlyName = null,
                                          UserResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null,
                                          ITwilioRestClient client = null)
        {
            var options = new UpdateUserOptions(pathServiceSid, pathSid)
            {
                RoleSid = roleSid, Attributes = attributes, FriendlyName = friendlyName, XTwilioWebhookEnabled = xTwilioWebhookEnabled
            };

            return(Update(options, client));
        }