Class Header

java.lang.Object
com.whatsapp.api.domain.messages.Header

public class Header extends Object

Header content displayed on top of a message. You cannot set a header if your interactive object is of product type

  • Constructor Details

    • Header

      public Header(HeaderType type)
      Instantiates a new Header.
      Parameters:
      type - Allways Required. The header type you would like to use
    • Header

      public Header()
      Instantiates a new Header.
  • Method Details

    • getType

      public HeaderType getType()
      Gets type.
      Returns:
      the Header
    • setType

      public Header setType(HeaderType type)
      Sets type.
      Parameters:
      type - Required. The header type you would like to us
      Returns:
      the Header
    • getText

      public String getText()
      Gets text.
      Returns:
      the Header
    • setText

      public Header setText(String text)
      Sets text.
      Parameters:
      text - Required if type is set to text. Text for the header.
      Formatting allows emojis, but not markdown.
      Maximum length is 60 characters.
      Returns:
      the Header
    • getDocument

      public Document getDocument()
      Gets document.
      Returns:
      the Header
    • setDocument

      public Header setDocument(Document document)
      Sets document.
      Parameters:
      document - Required if type is set to document.
      Contains the media object for this document.
      Returns:
      the Header
    • getImage

      public Image getImage()
      Gets image.
      Returns:
      the Header
    • setImage

      public Header setImage(Image image)
      Sets image.
      Parameters:
      image - Required if type is set to image.
      Contains the media object for this image.
      Returns:
      the Header
    • getVideo

      public Video getVideo()
      Gets video.
      Returns:
      the Header
    • setVideo

      public Header setVideo(Video video)
      Sets video.
      Parameters:
      video - Required if type is set to video.
      Contains the media object for this video.
      Returns:
      the Header