Package com.vonage.client.messages.viber
Class ViberRequest.Builder<M extends ViberRequest,B extends ViberRequest.Builder<? extends M,? extends B>>
java.lang.Object
com.vonage.client.messages.MessageRequest.Builder<M,B>
com.vonage.client.messages.viber.ViberRequest.Builder<M,B>
- Direct Known Subclasses:
ViberFileRequest.Builder,ViberImageRequest.Builder,ViberTextRequest.Builder,ViberVideoRequest.Builder
- Enclosing class:
ViberRequest
protected abstract static class ViberRequest.Builder<M extends ViberRequest,B extends ViberRequest.Builder<? extends M,? extends B>>
extends MessageRequest.Builder<M,B>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BactionText(String actionText) (OPTIONAL) Text which is rendered on the action button.protected B(OPTIONAL) A URL which is requested when the action button is clicked.(OPTIONAL) Sets the category tag of the message.ttl(int ttl) (OPTIONAL) Sets the time-to-live of message to be delivered in seconds.(OPTIONAL) Viber-specific type definition.Methods inherited from class com.vonage.client.messages.MessageRequest.Builder
build, caption, clientRef, custom, from, name, text, to, url, webhookUrl, webhookVersion
-
Field Details
-
category
-
duration
-
fileSize
-
ttl
-
viberType
-
actionUrl
-
actionText
-
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
category
(OPTIONAL) Sets the category tag of the message.- Parameters:
category- The Viber message category.- Returns:
- This builder.
-
ttl
(OPTIONAL) Sets the time-to-live of message to be delivered in seconds. If the message is not delivered within this time, it will be deleted. The TTL must be between 30 and 259200 seconds (i.e. 3 days), inclusive.- Overrides:
ttlin classMessageRequest.Builder<M extends ViberRequest,B extends ViberRequest.Builder<? extends M, ? extends B>> - Parameters:
ttl- The number of seconds the message can live undelivered before being discarded.- Returns:
- This builder.
-
viberType
(OPTIONAL) Viber-specific type definition. To use "template", please contact your Vonage Account Manager to set up your templates. To find out more please visit the product page.- Parameters:
type- The Viber type.- Returns:
- This builder.
-
actionUrl
(OPTIONAL) A URL which is requested when the action button is clicked.- Parameters:
actionUrl- The URL as a string.- Returns:
- This builder.
- Since:
- 7.2.0
-
actionText
(OPTIONAL) Text which is rendered on the action button.- Parameters:
actionText- The action button description.- Returns:
- This builder.
- Since:
- 7.2.0
-