Package com.whatsapp.api.domain.messages
Class InteractiveMessage
java.lang.Object
com.whatsapp.api.domain.messages.InteractiveMessage
- All Implemented Interfaces:
IInteractiveMessageBuilder.IInteractiveAction
,IInteractiveMessageBuilder.IInteractiveType
public class InteractiveMessage
extends Object
implements IInteractiveMessageBuilder.IInteractiveAction, IInteractiveMessageBuilder.IInteractiveType
Interactive messages give your users a simpler way to find and select what they want from your business on WhatsApp
- action: Required - Action you want the user to perform after reading the message
- body: Optional for type product. Required for other message types - An object with the body of the message
- footer: Optional - An object with the footer of the message
- header: Required for type product_list. Optional for other types - Header content displayed on top of a message. You cannot set a header if your interactive object is of product type
- type: Required - The type of interactive message you want to send
-
Field Details
-
action
The Action. -
type
The Type. -
header
The Header. -
body
The Body.
-
-
Method Details
-
build
Build interactive action.- Returns:
- the interactive action
-
getAction
Gets action.- Returns:
- the action
-
setAction
Description copied from interface:IInteractiveMessageBuilder.IInteractiveAction
Sets action.- Specified by:
setAction
in interfaceIInteractiveMessageBuilder.IInteractiveAction
- Parameters:
action
- the action- Returns:
- the action
-
getType
Gets type.- Returns:
- the type
-
setType
Description copied from interface:IInteractiveMessageBuilder.IInteractiveType
Sets type.- Specified by:
setType
in interfaceIInteractiveMessageBuilder.IInteractiveType
- Parameters:
type
- the type- Returns:
- the type
-
getHeader
Gets header.- Returns:
- the header
-
setHeader
Sets header.- Parameters:
header
- the header- Returns:
- the header
-
getBody
Gets body.- Returns:
- the body
-
setBody
Sets body.- Parameters:
body
- the body- Returns:
- the body
-