All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.optionfactory.whatsapp.dto.messages.InteractiveMessage Maven / Gradle / Ivy

package net.optionfactory.whatsapp.dto.messages;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import net.optionfactory.whatsapp.dto.messages.type.InteractiveMessageType;
import net.optionfactory.whatsapp.dto.messages.builder.IInteractiveMessageBuilder;

/**
 * 

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
  • *
*/ @JsonInclude(JsonInclude.Include.NON_NULL) public class InteractiveMessage implements IInteractiveMessageBuilder.IInteractiveAction, IInteractiveMessageBuilder.IInteractiveType { /** * The Action. */ @JsonProperty("action") public Action action; /** * The Type. */ @JsonProperty("type") public InteractiveMessageType type; /** * The Header. */ @JsonProperty("header") public Header header; /** * The Body. */ @JsonProperty("body") public Body body; /** * The Footer. */ @JsonProperty("footer") public Footer footer; private InteractiveMessage() { } /** * Build interactive action. * * @return the interactive action */ public static InteractiveMessage build() { return new InteractiveMessage(); } /** * Gets action. * * @return the action */ public Action getAction() { return action; } public InteractiveMessage setAction(Action action) { this.action = action; return this; } /** * Gets type. * * @return the type */ public InteractiveMessageType getType() { return type; } public InteractiveMessage setType(InteractiveMessageType type) { this.type = type; return this; } /** * Gets header. * * @return the header */ public Header getHeader() { return header; } /** * Sets header. * * @param header the header * @return the header */ public InteractiveMessage setHeader(Header header) { this.header = header; return this; } /** * Gets body. * * @return the body */ public Body getBody() { return body; } /** * Sets body. * * @param body the body * @return the body */ public InteractiveMessage setBody(Body body) { this.body = body; return this; } /** * Gets footer. * * @return the footer */ public Footer getFooter() { return footer; } /** * Sets footer. * * @param footer the footer * @return the footer */ public InteractiveMessage setFooter(Footer footer) { this.footer = footer; return this; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy