Class NewsItem.Builder

  • Enclosing class:
    NewsItem

    public static final class NewsItem.Builder
    extends java.lang.Object
    • Method Detail

      • type

        public NewsItem.Builder type​(java.util.Optional<java.lang.String> type)

        The type of object.

      • id

        public NewsItem.Builder id​(java.util.Optional<java.lang.String> id)

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

      • workspaceId

        public NewsItem.Builder workspaceId​(java.util.Optional<java.lang.String> workspaceId)

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

      • workspaceId

        public NewsItem.Builder workspaceId​(java.lang.String workspaceId)
      • title

        public NewsItem.Builder title​(java.util.Optional<java.lang.String> title)

        The title of the news item.

      • body

        public NewsItem.Builder body​(java.util.Optional<java.lang.String> body)

        The news item body, which may contain HTML.

      • senderId

        public NewsItem.Builder senderId​(java.util.Optional<java.lang.Integer> senderId)

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

      • state

        public NewsItem.Builder state​(java.util.Optional<NewsItem.State> state)

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

      • newsfeedAssignments

        public NewsItem.Builder newsfeedAssignments​(java.util.Optional<java.util.List<NewsfeedAssignment>> newsfeedAssignments)

        A list of newsfeed_assignments to assign to the specified newsfeed.

      • labels

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

        Label names displayed to users to categorize the news item.

      • labels

        public NewsItem.Builder labels​(java.util.List<java.util.Optional<java.lang.String>> labels)
      • coverImageUrl

        public NewsItem.Builder coverImageUrl​(java.util.Optional<java.lang.String> coverImageUrl)

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

      • coverImageUrl

        public NewsItem.Builder coverImageUrl​(java.lang.String coverImageUrl)
      • reactions

        public NewsItem.Builder 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.

      • reactions

        public NewsItem.Builder reactions​(java.util.List<java.util.Optional<java.lang.String>> reactions)
      • deliverSilently

        public NewsItem.Builder 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.

      • deliverSilently

        public NewsItem.Builder deliverSilently​(java.lang.Boolean deliverSilently)
      • createdAt

        public NewsItem.Builder createdAt​(java.util.Optional<java.lang.Integer> createdAt)

        Timestamp for when the news item was created.

      • createdAt

        public NewsItem.Builder createdAt​(java.lang.Integer createdAt)
      • updatedAt

        public NewsItem.Builder updatedAt​(java.util.Optional<java.lang.Integer> updatedAt)

        Timestamp for when the news item was last updated.

      • updatedAt

        public NewsItem.Builder updatedAt​(java.lang.Integer updatedAt)