Class UserCreator

    • Constructor Detail

      • UserCreator

        public UserCreator​(String pathServiceSid,
                           String identity)
        Construct a new UserCreator.
        Parameters:
        pathServiceSid - The SID of the Service to create the new resource under
        identity - The `identity` value that identifies the new resource's User
    • Method Detail

      • setRoleSid

        public UserCreator setRoleSid​(String roleSid)
        The SID of the [Role](https://www.twilio.com/docs/chat/rest/roles) assigned to the new User..
        Parameters:
        roleSid - The SID of the Role assigned to this user
        Returns:
        this
      • setAttributes

        public UserCreator setAttributes​(String attributes)
        A valid JSON string that contains application-specific data..
        Parameters:
        attributes - A valid JSON string that contains application-specific data
        Returns:
        this
      • setFriendlyName

        public UserCreator setFriendlyName​(String friendlyName)
        A descriptive string that you create to describe the new resource. This value is often used for display purposes..
        Parameters:
        friendlyName - A string to describe the new resource
        Returns:
        this
      • create

        public User create​(TwilioRestClient client)
        Make the request to the Twilio API to perform the create.
        Specified by:
        create in class Creator<User>
        Parameters:
        client - TwilioRestClient with which to make the request
        Returns:
        Created User