Package com.whatsapp.api.domain.webhook
Record Class WebHookEvent
java.lang.Object
java.lang.Record
com.whatsapp.api.domain.webhook.WebHookEvent
This class is a representation of the json object sent by the WhatsApp webhook.
Whenever a trigger event occurs, the WhatsApp Business Platform sees the event and sends a notification to a Webhook URL you have previously specified.
You can get two types of notifications:
- Received messages: This alert lets you know when you have received a message. These can also be called "inbound notifications" throughout the documentation.
- Message status and pricing notifications: This alert lets you know when the status of a message has changed —for example, the message has been read or delivered. These can also be called "outbound notifications" throughout the documentation.
- Received messages: This alert lets you know when you have received a message. These can also be called "inbound notifications" throughout the documentation.
- Message status and pricing notifications: This alert lets you know when the status of a message has changed —for example, the message has been read or delivered. These can also be called "outbound notifications" throughout the documentation.
- See Also:
-
- Webhooks Setup Guide to more details.
-
Constructor Summary
ConstructorDescriptionWebHookEvent
(List<Entry> entry, String object) Creates an instance of aWebHookEvent
record class. -
Method Summary
Modifier and TypeMethodDescriptionentry()
Returns the value of theentry
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.object()
Returns the value of theobject
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
WebHookEvent
Creates an instance of aWebHookEvent
record class.- Parameters:
entry
- the value for theentry
record componentobject
- the value for theobject
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
entry
Returns the value of theentry
record component.- Returns:
- the value of the
entry
record component
-
object
Returns the value of theobject
record component.- Returns:
- the value of the
object
record component
-