コード例 #1
0
 /// <summary>
 /// Construct a new CreateRoleOptions
 /// </summary>
 ///
 /// <param name="pathServiceSid"> The service_sid </param>
 /// <param name="friendlyName"> The friendly_name </param>
 /// <param name="type"> The type </param>
 /// <param name="permission"> The permission </param>
 public CreateRoleOptions(string pathServiceSid, string friendlyName, RoleResource.RoleTypeEnum type, List <string> permission)
 {
     PathServiceSid = pathServiceSid;
     FriendlyName   = friendlyName;
     Type           = type;
     Permission     = permission;
 }
コード例 #2
0
        /// <summary>
        /// create
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Service to create the resource under </param>
        /// <param name="friendlyName"> A string to describe the new resource </param>
        /// <param name="type"> The type of role </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> CreateAsync(string pathServiceSid,
                                                                                   string friendlyName,
                                                                                   RoleResource.RoleTypeEnum type,
                                                                                   List <string> permission,
                                                                                   ITwilioRestClient client = null)
        {
            var options = new CreateRoleOptions(pathServiceSid, friendlyName, type, permission);

            return(await CreateAsync(options, client));
        }
コード例 #3
0
        /// <summary>
        /// create
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Service to create the resource under </param>
        /// <param name="friendlyName"> A string to describe the new resource </param>
        /// <param name="type"> The type of role </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 Create(string pathServiceSid,
                                          string friendlyName,
                                          RoleResource.RoleTypeEnum type,
                                          List <string> permission,
                                          ITwilioRestClient client = null)
        {
            var options = new CreateRoleOptions(pathServiceSid, friendlyName, type, permission);

            return(Create(options, client));
        }