Class WhatsappMultiProductRequest.Builder
java.lang.Object
com.vonage.client.messages.MessageRequest.Builder<WhatsappMultiProductRequest,WhatsappMultiProductRequest.Builder>
com.vonage.client.messages.whatsapp.WhatsappRequest.Builder<WhatsappMultiProductRequest,WhatsappMultiProductRequest.Builder>
com.vonage.client.messages.whatsapp.WhatsappMultiProductRequest.Builder
- Enclosing class:
WhatsappMultiProductRequest
public static final class WhatsappMultiProductRequest.Builder
extends WhatsappRequest.Builder<WhatsappMultiProductRequest,WhatsappMultiProductRequest.Builder>
-
Method Summary
Modifier and TypeMethodDescriptionaddProductsSection(String title, String... skus) (REQUIRED) Adds a grouping of products using their unique retail identifiers.addProductsSection(String title, List<String> skus) (REQUIRED) Adds a grouping of products using their unique retail identifiers.(REQUIRED) The main message text.build()Builds the MessageRequest.(REQUIRED) ID for the catalog you want to use for this message.footerText(String footerText) (OPTIONAL) The text which appears at the end of the message.headerText(String headerText) (OPTIONAL) Sets the message header's text field.Methods inherited from class com.vonage.client.messages.whatsapp.WhatsappRequest.Builder
contextMessageIdMethods inherited from class com.vonage.client.messages.MessageRequest.Builder
caption, clientRef, custom, from, name, text, to, ttl, url, webhookUrl, webhookVersion
-
Method Details
-
catalogId
(REQUIRED) ID for the catalog you want to use for this message. Retrieve this ID via Commerce Manager.- Parameters:
catalogId- The catalog ID.- Returns:
- This builder.
-
addProductsSection
(REQUIRED) Adds a grouping of products using their unique retail identifiers. You must specify at least one section and at least one product per section.- Parameters:
title- The section title.skus- The list of product IDs in the catalog to include in the section.- Returns:
- This builder.
-
addProductsSection
(REQUIRED) Adds a grouping of products using their unique retail identifiers. You must specify at least one section and at least one product per section.- Parameters:
title- The section title.skus- The list of product IDs in the catalog to include in the section.- Returns:
- This builder.
-
headerText
(OPTIONAL) Sets the message header's text field.- Parameters:
headerText- The header text.- Returns:
- This builder.
-
bodyText
(REQUIRED) The main message text.- Parameters:
bodyText- The body text.- Returns:
- This builder.
-
build
Description copied from class:MessageRequest.BuilderBuilds the MessageRequest.- Specified by:
buildin classMessageRequest.Builder<WhatsappMultiProductRequest,WhatsappMultiProductRequest.Builder> - Returns:
- A MessageRequest, populated with all fields from this builder.
-