@classmethod
def from_api_data(cls, data):
    """Creates a new User object from API data from ticketswitch.

        Args:
            data (dict): the part of the response from a ticketswitch API call
                that concerns a user.

        Returns:
            :class:`User <pyticketswitch.user.User>`: a new
            :class:`User <pyticketswitch.user.User>` object
            populated with the data from the api.

        """
    return cls(data.get('user_id'), name=data.get('real_name'), country=
        data.get('default_country_code'), sub_user=data.get('sub_user'),
        is_b2b=data.get('is_b2b'), statement_descriptor=data.get(
        'statement_descriptor'), backend_group=data.get('backend_group'),
        content_group=data.get('content_group'))
