Package zendesk.core

Class User

    • Constructor Summary

      Constructors 
      Constructor and Description
      User()
      Initialises a user with default values.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Long getId()
      Get the id of the user.
      java.lang.String getName()
      Get the name of the user.
      java.lang.String getPhoto()
      Get the URL for the avatar of the user.
      java.util.List<java.lang.String> getTags()
      Gets the list of tags associated with the user
      java.util.Map<java.lang.String,java.lang.String> getUserFields()
      Get a map of user fields, associated with the user.
      boolean isAgent()
      Is the user an agent.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • User

        public User()
        Initialises a user with default values.
    • Method Detail

      • getId

        public java.lang.Long getId()
        Get the id of the user.
        Returns:
        the user's Id
      • getName

        public java.lang.String getName()
        Get the name of the user.
        Returns:
        the user's name
      • getPhoto

        public java.lang.String getPhoto()
        Get the URL for the avatar of the user.
        Returns:
        the URL for the user's avatar, or null if none is present
      • isAgent

        public boolean isAgent()
        Is the user an agent.
        Returns:
        true if the user is an agent
      • getTags

        public java.util.List<java.lang.String> getTags()
        Gets the list of tags associated with the user
        Returns:
        the list of tags associated with the user
      • getUserFields

        public java.util.Map<java.lang.String,java.lang.String> getUserFields()
        Get a map of user fields, associated with the user.

        The map returned by this method is a map of the field's key to the field's value. For example, if you have a user field with the key 'custom_field_1' and the value 'some value', then the map would be 'custom_field_1' -> 'some value'

        Returns:
        A map containing user fields.