Class Button

java.lang.Object
com.vonage.client.JsonableBaseObject
com.vonage.client.messages.Button
All Implemented Interfaces:
Jsonable

public final class Button extends JsonableBaseObject
Used for inbound Button messages.
Since:
8.11.0
  • Method Details

    • getPayload

      public Object getPayload()
      Payload for the button. Contents can be varied depending on the type of button. For WhatsApp messages, this will be a Map. For RCS, this will be a String.
      Returns:
      The button payload, or null if absent.
    • getText

      public String getText()
      Additional context for the button.
      Returns:
      The button text, or null if absent.
    • getSubtype

      public String getSubtype()
      Subtype of button being received. This only applies to WhatsApp messages.
      Returns:
      The button subtype, or null if absent / not applicable.