Interface WhatsAppTemplateMessageBuilder
-
- All Known Implementing Classes:
WhatsAppTemplateMessageBuilderImpl
public interface WhatsAppTemplateMessageBuilder- Author:
- Filip Hrisafov, Anatolii Balakiriev
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceWhatsAppTemplateMessageBuilder.ButtonComponentBuilderstatic interfaceWhatsAppTemplateMessageBuilder.ComponentBuilder
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WhatsAppTemplateMessageBuilderaddTemplateTextParameter(String parameter)Add a positional text parameter to the body.WhatsAppTemplateMessageBuilderaddTemplateTextParameters(Collection<String> parameters)Add positional text parameters to the body.WhatsAppTemplateMessageBuilder.ComponentBuilderbody()Initiates creation of the body.WhatsAppTemplateMessageBuilderbusinessAccountId(String businessAccountId)The id of the business account that should be used when sending out the message.WhatsAppTemplateMessageBuilder.ButtonComponentBuilderbutton()Initiates creation of the button.WhatsAppTemplateMessageBuilderexternalUserId(String externalUserId)The id of the recipient of the message.WhatsAppTemplateMessageBuilder.ComponentBuilderfooter()Initiates creation of the footer.WhatsAppTemplateMessageBuilder.ComponentBuilderheader()Initiates creation of the header.WhatsAppTemplateMessageBuilderlanguage(String language)The language of the template that should be used.WhatsAppTemplateMessageBuildermediaHeader(String mediaId)The content item ID for the media header.WhatsAppTemplateMessageBuildermessageId(String messageId)The id of the reference message within the Engage system.voidsend()Perform the send of the template message.WhatsAppTemplateMessageBuildertemplateId(String templateId)The id of the template that is registered on the WhatsApp sideWhatsAppTemplateMessageBuildertimeToLive(Duration timeToLive)Time To Live (TTL) duration.
-
-
-
Method Detail
-
timeToLive
WhatsAppTemplateMessageBuilder timeToLive(Duration timeToLive)
Time To Live (TTL) duration.
-
templateId
WhatsAppTemplateMessageBuilder templateId(String templateId)
The id of the template that is registered on the WhatsApp side
-
language
WhatsAppTemplateMessageBuilder language(String language)
The language of the template that should be used.
-
addTemplateTextParameter
WhatsAppTemplateMessageBuilder addTemplateTextParameter(String parameter)
Add a positional text parameter to the body.Short circuit for calling
body(), thenWhatsAppTemplateMessageBuilder.ComponentBuilder.addTextParameter(String)and thenWhatsAppTemplateMessageBuilder.ComponentBuilder.buildComponent()Note: The parameter must be added in the correct order according to the template message.
-
addTemplateTextParameters
WhatsAppTemplateMessageBuilder addTemplateTextParameters(Collection<String> parameters)
Add positional text parameters to the body.Short circuit for calling
body(), thenWhatsAppTemplateMessageBuilder.ComponentBuilder.addTextParameter(String)and thenWhatsAppTemplateMessageBuilder.ComponentBuilder.buildComponent()Note: The parameters must be added in the correct order according to the template message.
-
externalUserId
WhatsAppTemplateMessageBuilder externalUserId(String externalUserId)
The id of the recipient of the message. This is the id of the user within the WhatsApp system.
-
businessAccountId
WhatsAppTemplateMessageBuilder businessAccountId(String businessAccountId)
The id of the business account that should be used when sending out the message.
-
messageId
WhatsAppTemplateMessageBuilder messageId(String messageId)
The id of the reference message within the Engage system. It is used in order to correlate the WhatsApp message and the Engage message.
-
send
void send()
Perform the send of the template message.
-
header
WhatsAppTemplateMessageBuilder.ComponentBuilder header()
Initiates creation of the header. After you are done building this component - callWhatsAppTemplateMessageBuilder.ComponentBuilder.buildComponent()method to build and add it to the parent builder.- Returns:
- header-specific builder.
-
mediaHeader
WhatsAppTemplateMessageBuilder mediaHeader(String mediaId)
The content item ID for the media header.- Parameters:
mediaId- the media header
-
body
WhatsAppTemplateMessageBuilder.ComponentBuilder body()
Initiates creation of the body. After you are done building this component - callWhatsAppTemplateMessageBuilder.ComponentBuilder.buildComponent()method to build and add it to the parent builder.- Returns:
- body-specific builder.
-
footer
WhatsAppTemplateMessageBuilder.ComponentBuilder footer()
Initiates creation of the footer. After you are done building this component - callWhatsAppTemplateMessageBuilder.ComponentBuilder.buildComponent()method to build and add it to the parent builder.- Returns:
- footer-specific builder.
-
button
WhatsAppTemplateMessageBuilder.ButtonComponentBuilder button()
Initiates creation of the button. After you are done building this component - callWhatsAppTemplateMessageBuilder.ComponentBuilder.buildComponent()method to build and add it to the parent builder.- Returns:
- button-specific builder.
-
-