/// <summary>
        /// update
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Service to update the resource from </param>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="permission"> A permission the role should have </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Role </returns>
        public static RoleResource Update(string pathServiceSid,
                                          string pathSid,
                                          List <string> permission,
                                          ITwilioRestClient client = null)
        {
            var options = new UpdateRoleOptions(pathServiceSid, pathSid, permission);

            return(Update(options, client));
        }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Service to update the resource from </param>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="permission"> A permission the role should have </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Role </returns>
        public static async System.Threading.Tasks.Task <RoleResource> UpdateAsync(string pathServiceSid,
                                                                                   string pathSid,
                                                                                   List <string> permission,
                                                                                   ITwilioRestClient client = null)
        {
            var options = new UpdateRoleOptions(pathServiceSid, pathSid, permission);

            return(await UpdateAsync(options, client));
        }
 private static Request BuildUpdateRequest(UpdateRoleOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.IpMessaging,
                "/v1/Services/" + options.PathServiceSid + "/Roles/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }