Class NewsItem.Builder

    • Method Detail

      • id

        public NewsItem.WorkspaceIdStage id​(@NotNull
                                            java.lang.String id)

        The unique identifier for the news item which is given by Intercom.

        The unique identifier for the news item which is given by Intercom.

        Specified by:
        id in interface NewsItem.IdStage
        Returns:
        Reference to this so that method calls can be chained together.
      • workspaceId

        public NewsItem.TitleStage workspaceId​(@NotNull
                                               java.lang.String workspaceId)

        The id of the workspace which the news item belongs to.

        The id of the workspace which the news item belongs to.

        Specified by:
        workspaceId in interface NewsItem.WorkspaceIdStage
        Returns:
        Reference to this so that method calls can be chained together.
      • title

        public NewsItem.StateStage title​(@NotNull
                                         java.lang.String title)

        The title of the news item.

        The title of the news item.

        Specified by:
        title in interface NewsItem.TitleStage
        Returns:
        Reference to this so that method calls can be chained together.
      • state

        public NewsItem.CreatedAtStage state​(@NotNull
                                             NewsItem.State state)

        News items will not be visible to your users in the assigned newsfeeds until they are set live.

        News items will not be visible to your users in the assigned newsfeeds until they are set live.

        Specified by:
        state in interface NewsItem.StateStage
        Returns:
        Reference to this so that method calls can be chained together.
      • createdAt

        public NewsItem.UpdatedAtStage createdAt​(int createdAt)

        Timestamp for when the news item was created.

        Timestamp for when the news item was created.

        Specified by:
        createdAt in interface NewsItem.CreatedAtStage
        Returns:
        Reference to this so that method calls can be chained together.
      • updatedAt

        public NewsItem._FinalStage updatedAt​(int updatedAt)

        Timestamp for when the news item was last updated.

        Timestamp for when the news item was last updated.

        Specified by:
        updatedAt in interface NewsItem.UpdatedAtStage
        Returns:
        Reference to this so that method calls can be chained together.
      • deliverSilently

        public NewsItem._FinalStage deliverSilently​(java.lang.Boolean deliverSilently)

        When set to true, the news item will appear in the messenger newsfeed without showing a notification badge.

        Specified by:
        deliverSilently in interface NewsItem._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • deliverSilently

        public NewsItem._FinalStage deliverSilently​(java.util.Optional<java.lang.Boolean> deliverSilently)

        When set to true, the news item will appear in the messenger newsfeed without showing a notification badge.

        Specified by:
        deliverSilently in interface NewsItem._FinalStage
      • reactions

        public NewsItem._FinalStage reactions​(java.util.List<java.util.Optional<java.lang.String>> reactions)

        Ordered list of emoji reactions to the news item. When empty, reactions are disabled.

        Specified by:
        reactions in interface NewsItem._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • reactions

        public NewsItem._FinalStage reactions​(java.util.Optional<java.util.List<java.util.Optional<java.lang.String>>> reactions)

        Ordered list of emoji reactions to the news item. When empty, reactions are disabled.

        Specified by:
        reactions in interface NewsItem._FinalStage
      • coverImageUrl

        public NewsItem._FinalStage coverImageUrl​(java.lang.String coverImageUrl)

        URL of the image used as cover. Must have .jpg or .png extension.

        Specified by:
        coverImageUrl in interface NewsItem._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • labels

        public NewsItem._FinalStage labels​(java.util.List<java.util.Optional<java.lang.String>> labels)

        Label names displayed to users to categorize the news item.

        Specified by:
        labels in interface NewsItem._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • labels

        public NewsItem._FinalStage labels​(java.util.Optional<java.util.List<java.util.Optional<java.lang.String>>> labels)

        Label names displayed to users to categorize the news item.

        Specified by:
        labels in interface NewsItem._FinalStage
      • senderId

        public NewsItem._FinalStage senderId​(java.lang.Integer senderId)

        The id of the sender of the news item. Must be a teammate on the workspace.

        Specified by:
        senderId in interface NewsItem._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • body

        public NewsItem._FinalStage body​(java.lang.String body)

        The news item body, which may contain HTML.

        Specified by:
        body in interface NewsItem._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.