public static interface WhatsAppTemplateMessageBuilder.ComponentBuilder
Modifier and Type | Method and Description |
---|---|
WhatsAppTemplateMessageBuilder.ComponentBuilder |
addCurrencyParameter(String fallbackValue,
String code,
BigDecimal amount)
Add currency parameter.
|
WhatsAppTemplateMessageBuilder.ComponentBuilder |
addDateTimeParameter(String fallbackValue,
LocalDateTime dateTime,
String calendar)
Add date time parameter.
|
WhatsAppTemplateMessageBuilder.ComponentBuilder |
addImageLinkParameter(String link)
Add image link parameter
|
WhatsAppTemplateMessageBuilder.ComponentBuilder |
addTextParameter(String value)
Add simple text parameter
|
WhatsAppTemplateMessageBuilder |
buildComponent()
Builds current component (header, body, footer or button) and adds it to the list of components of the parent builder.
|
WhatsAppTemplateMessageBuilder.ComponentBuilder addTextParameter(String value)
Note: The parameter must be added in the correct order according to the template message.
value
- text valueWhatsAppTemplateMessageBuilder.ComponentBuilder addImageLinkParameter(String link)
Note: The parameter must be added in the correct order according to the template message.
link
- to the imageWhatsAppTemplateMessageBuilder.ComponentBuilder addCurrencyParameter(String fallbackValue, String code, BigDecimal amount)
Note: The parameter must be added in the correct order according to the template message.
fallbackValue
- default value, if the device is unsuccessful in localizing a parameter, it should fall back to using the fallbackValue
(e.g. $100.99)code
- currency code as defined in ISO 4217 (e.g. USD)amount
- amount multiplied by 1000 (e.g. 100990 is 100.99)WhatsAppTemplateMessageBuilder.ComponentBuilder addDateTimeParameter(String fallbackValue, LocalDateTime dateTime, String calendar)
Note: The parameter must be added in the correct order according to the template message.
fallbackValue
- default value, if the device is unsuccessful in localizing a parameter, it should fall back to using the fallbackValue
dateTime
- time as LocalDateTime
calendar
- type of calendar. Optional.WhatsAppTemplateMessageBuilder buildComponent()