Class MessageTemplate

java.lang.Object
com.whatsapp.api.domain.templates.MessageTemplate

public class MessageTemplate extends Object
Wrapper to Message Temaplate. A message template is required for any business-initiated messages sent using the WhatsApp Business Platform. These templates can be created using the Business Management API or the WhatsApp Business Manager. See more
  • Constructor Details

    • MessageTemplate

      public MessageTemplate()
  • Method Details

    • addComponent

      public MessageTemplate addComponent(Component<?> component)
      Add component message template.
      Parameters:
      component - the component
      Returns:
      the message template
    • addComponents

      public MessageTemplate addComponents(Component<?>... components)
      Add components message template.
      Parameters:
      components - the components
      Returns:
      the message template
    • getName

      public String getName()
      Gets name.
      Returns:
      the name
    • setName

      public MessageTemplate setName(String name)
      Sets name.
      Parameters:
      name - the name
      Returns:
      the name
    • getLanguage

      public LanguageType getLanguage()
      Gets language.
      Returns:
      the language
    • setLanguage

      public MessageTemplate setLanguage(LanguageType languageType)
      Sets language.
      Parameters:
      languageType - the language
      Returns:
      the language
    • getCategory

      public Category getCategory()
      Gets category.
      Returns:
      the category
    • setCategory

      public MessageTemplate setCategory(Category category)
      Sets category.
      Parameters:
      category - the category
      Returns:
      the category
    • getComponents

      public List<Component<?>> getComponents()
      Gets components.
      Returns:
      the components
    • setComponents

      public MessageTemplate setComponents(List<Component<?>> components)
      Sets components.
      Parameters:
      components - the components
      Returns:
      the components