webexteamssdk/api/people.py
def create(self, emails, displayName=None, firstName=None, lastName=None,
               avatar=None, orgId=None, roles=None, licenses=None,
               **request_parameters):
        """Create a new user account for a given organization

        Only an admin can create a new user account.

        Args:
            emails(`list`): Email address(es) of the person (list of strings).
            displayName(basestring): Full name of the person.
            firstName(basestring): First name of the person.
            lastName(basestring): Last name of the person.
            avatar(basestring): URL to the person's avatar in PNG format.
            orgId(basestring): ID of the organization to which this
                person belongs.
            roles(`list`): Roles of the person (list of strings containing
                the role IDs to be assigned to the person).
            licenses(`list`): Licenses allocated to the person (list of
                strings - containing the license IDs to be allocated to the
                person).
            **request_parameters: Additional request parameters (provides
                support for parameters that may be added in the future).

        Returns:
            Person: A Person object with the details of the created person.

        Raises:
            TypeError: If the parameter types are incorrect.
            ApiError: If the Webex Teams cloud returns an error.

        """
        check_type(emails, list, may_be_none=False)
        check_type(displayName, basestring)
        check_type(firstName, basestring)
        check_type(lastName, basestring)
        check_type(avatar, basestring)
        check_type(orgId, basestring)
        check_type(roles, list)
        check_type(licenses, list)

        post_data = dict_from_items_with_values(
            request_parameters,
            emails=emails,
            displayName=displayName,
            firstName=firstName,
            lastName=lastName,
            avatar=avatar,
            orgId=orgId,
            roles=roles,
            licenses=licenses,
        )

        # API request
        json_data = self._session.post(API_ENDPOINT, json=post_data)

        # Return a person object created from the returned JSON object
        return self._object_factory(OBJECT_TYPE, json_data)
def create(self, emails, displayName=None, firstName=None, lastName=None,
               avatar=None, orgId=None, roles=None, licenses=None,
               **request_parameters):
        check_type(emails, list, may_be_none=False)
        check_type(displayName, basestring)
        check_type(firstName, basestring)
        check_type(lastName, basestring)
        check_type(avatar, basestring)
        check_type(orgId, basestring)
        check_type(roles, list)
        check_type(licenses, list)

        post_data = dict_from_items_with_values(
            request_parameters,
            emails=emails,
            displayName=displayName,
            firstName=firstName,
            lastName=lastName,
            avatar=avatar,
            orgId=orgId,
            roles=roles,
            licenses=licenses,
        )

        # API request
        json_data = self._session.post(API_ENDPOINT, json=post_data)

        # Return a person object created from the returned JSON object
        return self._object_factory(OBJECT_TYPE, json_data)
def create ( self , emails , displayName = None , firstName = None , lastName = None , avatar = None , orgId = None , roles = None , licenses = None , * * request_parameters ) : check_type ( emails , list , may_be_none = False ) check_type ( displayName , basestring ) check_type ( firstName , basestring ) check_type ( lastName , basestring ) check_type ( avatar , basestring ) check_type ( orgId , basestring ) check_type ( roles , list ) check_type ( licenses , list ) post_data = dict_from_items_with_values ( request_parameters , emails = emails , displayName = displayName , firstName = firstName , lastName = lastName , avatar = avatar , orgId = orgId , roles = roles , licenses = licenses , ) # API request json_data = self . _session . post ( API_ENDPOINT , json = post_data ) # Return a person object created from the returned JSON object return self . _object_factory ( OBJECT_TYPE , json_data )
Create a new user account for a given organization

        Only an admin can create a new user account.

        Args:
            emails(`list`): Email address(es) of the person (list of strings).
            displayName(basestring): Full name of the person.
            firstName(basestring): First name of the person.
            lastName(basestring): Last name of the person.
            avatar(basestring): URL to the person's avatar in PNG format.
            orgId(basestring): ID of the organization to which this
                person belongs.
            roles(`list`): Roles of the person (list of strings containing
                the role IDs to be assigned to the person).
            licenses(`list`): Licenses allocated to the person (list of
                strings - containing the license IDs to be allocated to the
                person).
            **request_parameters: Additional request parameters (provides
                support for parameters that may be added in the future).

        Returns:
            Person: A Person object with the details of the created person.

        Raises:
            TypeError: If the parameter types are incorrect.
            ApiError: If the Webex Teams cloud returns an error.
Create a new user account for a given organization