net.optionfactory.whatsapp.dto.messages.Action Maven / Gradle / Ivy
package net.optionfactory.whatsapp.dto.messages;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.util.List;
/**
*
* -
button - Required for List Messages - It cannot be an empty string and must be unique within the message.
* Emojis are supported, markdown is not. Maximum length: 20 characters
*
* -
buttons - Required for Reply Buttons - A button object can contain the following parameters:
*
* type: only supported type is reply (for Reply Button)
* title: Button title. It cannot be an empty string and must be unique within the message. Emojis are supported, markdown is not. Maximum length: 20 characters.
* id: Unique identifier for your button. This ID is returned in the webhook when the button is clicked by the user. Maximum length: 256 characters.
*
* You can have up to 3 buttons. You cannot have leading or trailing spaces when setting the ID.
*
* - catalog_id - Required for Single Product Messages and Multi-Product Messages - Unique identifier of the
* Facebook catalog linked to your WhatsApp Business Account. This ID can be retrieved via the Meta Commerce Manager.
*
* - product_retailer_id - Required for Single Product Messages and Multi-Product Messages - Unique identifier of the product in a catalog.
*
To get this ID go to Meta Commerce Manager and select your Meta Business account. You will see a list of shops connected to your account.
* Click the shop you want to use. On the left-side panel, click Catalog > Items, and find the item you want to mention.
* The ID for that item is displayed under the item's name.
*
* - sections - Required for List Messages and Multi-Product Messages - Array of section objects. Minimum of 1, maximum of 10. See section object.
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Action {
@JsonProperty("catalog_id")
private String catalogId;
@JsonProperty("product_retailer_id")
private String productRetailerId;
@JsonProperty("button")
private String buttonText;
@JsonProperty("buttons")
private List