Class EventBuilder


  • public class EventBuilder
    extends Object
    • Constructor Detail

      • EventBuilder

        public EventBuilder()
        Default constructor to initialize the instance
    • Method Detail

      • response

        public EventBuilder response​(EventResponseModel response)
        API response Object
        Parameters:
        response - the field to set
        Returns:
        itself
      • sessionToken

        public EventBuilder sessionToken​(String sessionToken)
        End user's auth/session token
        Parameters:
        sessionToken - the field to set
        Returns:
        itself
      • tags

        public EventBuilder tags​(String tags)
        comma separated list of tags, see documentation
        Parameters:
        tags - the field to set
        Returns:
        itself
      • userId

        public EventBuilder userId​(String userId)
        End user's user_id string from your app
        Parameters:
        userId - the field to set
        Returns:
        itself
      • companyId

        public EventBuilder companyId​(String companyId)
        User's company_id string
        Parameters:
        companyId - the field to set
        Returns:
        itself
      • metadata

        public EventBuilder metadata​(Object metadata)
        Custom event metadata as a JSON object
        Parameters:
        metadata - the field to set
        Returns:
        itself
      • direction

        public EventBuilder direction​(String direction)
        API direction string
        Parameters:
        direction - the field to set
        Returns:
        itself
      • weight

        public EventBuilder weight​(int weight)
        Weight of an API call
        Parameters:
        weight - the field to set
        Returns:
        itself
      • build

        public EventModel build()
        Build the instance with the given values
        Returns:
        the built EventModel