Class Referral
java.lang.Object
com.vonage.client.JsonableBaseObject
com.vonage.client.messages.whatsapp.Referral
- All Implemented Interfaces:
Jsonable
This is only present for situations where a user has clicked on a 'WhatsApp' button embedded in an advertisement
or post on Facebook. Clicking on the button directs the user to the WhatsApp app from where they can send a message.
The inbound message will contain this object which includes details of the Facebook advertisement or post which
contained the embedded button. This is used in
InboundMessage.getWhatsappReferral().- Since:
- 8.1.0
-
Method Summary
Modifier and TypeMethodDescriptiongetBody()Body text of the referring advertisement or post.The click ID of the advertisement or post.Headline text of the referring advertisement or post.URL of the image shown in the advertisement or post.The type of media shown in the advertisement or post.Meta/WhatsApp ID of the referring advertisement or post.The type of the referring advertisement or post.A URL referencing the content of the media shown in the advertisement when the user clicked to send a message.URL of the thumbnail image shown in the advertisement or post.URL of the video shown in the advertisement or post.Methods inherited from class com.vonage.client.JsonableBaseObject
createJsonObjectMapper, equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.vonage.client.Jsonable
toJson, updateFromJson
-
Method Details
-
getBody
Body text of the referring advertisement or post.- Returns:
- The referral body.
-
getHeadline
Headline text of the referring advertisement or post.- Returns:
- The referral headline.
-
getClickId
The click ID of the advertisement or post.- Returns:
- The
ctwa_clid, ornullif absent / unknown / not applicable. - Since:
- 8.11.0
-
getSourceId
Meta/WhatsApp ID of the referring advertisement or post.- Returns:
- The source referral ID as a String.
-
getSourceType
The type of the referring advertisement or post.- Returns:
- The source referral type as a String.
-
getMediaType
The type of media shown in the advertisement or post. Either MessageType.IMAGE or MessageType.VIDEO.- Returns:
- The media type as an enum, or
nullif absent / not applicable. - Since:
- 8.11.0
-
getSourceUrl
A URL referencing the content of the media shown in the advertisement when the user clicked to send a message.- Returns:
- Link to the advertised content.
-
getImageUrl
URL of the image shown in the advertisement or post.- Returns:
- The image URL, or
nullif absent / not applicable. - Since:
- 8.11.0
-
getVideoUrl
URL of the video shown in the advertisement or post.- Returns:
- The video URL, or
nullif absent / not applicable. - Since:
- 8.11.0
-
getThumbnailUrl
URL of the thumbnail image shown in the advertisement or post.- Returns:
- The thumbnail URL, or
nullif absent / not applicable. - Since:
- 8.11.0
-