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 interface
WhatsAppTemplateMessageBuilder.ButtonComponentBuilder
static interface
WhatsAppTemplateMessageBuilder.ComponentBuilder
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WhatsAppTemplateMessageBuilder
addTemplateTextParameter(String parameter)
Add a positional text parameter to the body.WhatsAppTemplateMessageBuilder
addTemplateTextParameters(Collection<String> parameters)
Add positional text parameters to the body.WhatsAppTemplateMessageBuilder.ComponentBuilder
body()
Initiates creation of the body.WhatsAppTemplateMessageBuilder
businessAccountId(String businessAccountId)
The id of the business account that should be used when sending out the message.WhatsAppTemplateMessageBuilder.ButtonComponentBuilder
button()
Initiates creation of the button.WhatsAppTemplateMessageBuilder
externalUserId(String externalUserId)
The id of the recipient of the message.WhatsAppTemplateMessageBuilder.ComponentBuilder
footer()
Initiates creation of the footer.WhatsAppTemplateMessageBuilder.ComponentBuilder
header()
Initiates creation of the header.WhatsAppTemplateMessageBuilder
language(String language)
The language of the template that should be used.WhatsAppTemplateMessageBuilder
mediaHeader(String mediaId)
The content item ID for the media header.WhatsAppTemplateMessageBuilder
messageId(String messageId)
The id of the reference message within the Engage system.void
send()
Perform the send of the template message.WhatsAppTemplateMessageBuilder
templateId(String templateId)
The id of the template that is registered on the WhatsApp sideWhatsAppTemplateMessageBuilder
timeToLive(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.
-
-