Package com.whatsapp.api.domain.webhook
Record Class Value
java.lang.Object
java.lang.Record
com.whatsapp.api.domain.webhook.Value
- Record Components:
metadata- The metadata about your phone number.messagingProduct- The messaging service used for Webhooks. For WhatsApp messages, this value needs to be set to “whatsapp”.messages- An array of message objects. Added to Webhooks for incoming message notifications.contacts- An array of contactsstatuses- An array of message status objects. Added to Webhooks for message status update.decision- Used if a decision about accounts or phone numbers has been made. (APPROVED or REJECTED)displayPhoneNumber- Includes the display phone number of the business account that triggered the notification.event- Used when an event happened in a specific WABA. SeeEventTypemessageTemplateId- The message template IDmessageTemplateLanguage- The message template languagemessageTemplateName- The message template namephoneNumber- the phone numberreason- reasonrejectionReason- If a request was rejected, this field displays the reason for that rejection.requestedVerifiedName- This field displays the name that was sent to be verified.
public record Value(Metadata metadata, String messagingProduct, List<Message> messages, List<Contact> contacts, List<Status> statuses, EventType event, String phoneNumber, String messageTemplateId, String messageTemplateName, String messageTemplateLanguage, String reason, String displayPhoneNumber, String decision, String requestedVerifiedName, Object rejectionReason, DisableInfo disableInfo, String currentLimit, BanInfo banInfo, List<RestrictionInfo> restrictionInfo)
extends Record
The type Value.
-
Constructor Summary
ConstructorsConstructorDescriptionValue(Metadata metadata, String messagingProduct, List<Message> messages, List<Contact> contacts, List<Status> statuses, EventType event, String phoneNumber, String messageTemplateId, String messageTemplateName, String messageTemplateLanguage, String reason, String displayPhoneNumber, String decision, String requestedVerifiedName, Object rejectionReason, DisableInfo disableInfo, String currentLimit, BanInfo banInfo, List<RestrictionInfo> restrictionInfo) Creates an instance of aValuerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbanInfo()Returns the value of thebanInforecord component.contacts()Returns the value of thecontactsrecord component.Returns the value of thecurrentLimitrecord component.decision()Returns the value of thedecisionrecord component.Returns the value of thedisableInforecord component.Returns the value of thedisplayPhoneNumberrecord component.final booleanIndicates whether some other object is "equal to" this one.event()Returns the value of theeventrecord component.final inthashCode()Returns a hash code value for this object.messages()Returns the value of themessagesrecord component.Returns the value of themessageTemplateIdrecord component.Returns the value of themessageTemplateLanguagerecord component.Returns the value of themessageTemplateNamerecord component.Returns the value of themessagingProductrecord component.metadata()Returns the value of themetadatarecord component.Returns the value of thephoneNumberrecord component.reason()Returns the value of thereasonrecord component.Returns the value of therejectionReasonrecord component.Returns the value of therequestedVerifiedNamerecord component.Returns the value of therestrictionInforecord component.statuses()Returns the value of thestatusesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Value
public Value(Metadata metadata, String messagingProduct, List<Message> messages, List<Contact> contacts, List<Status> statuses, EventType event, String phoneNumber, String messageTemplateId, String messageTemplateName, String messageTemplateLanguage, String reason, String displayPhoneNumber, String decision, String requestedVerifiedName, Object rejectionReason, DisableInfo disableInfo, String currentLimit, BanInfo banInfo, List<RestrictionInfo> restrictionInfo) Creates an instance of aValuerecord class.- Parameters:
metadata- the value for themetadatarecord componentmessagingProduct- the value for themessagingProductrecord componentmessages- the value for themessagesrecord componentcontacts- the value for thecontactsrecord componentstatuses- the value for thestatusesrecord componentevent- the value for theeventrecord componentphoneNumber- the value for thephoneNumberrecord componentmessageTemplateId- the value for themessageTemplateIdrecord componentmessageTemplateName- the value for themessageTemplateNamerecord componentmessageTemplateLanguage- the value for themessageTemplateLanguagerecord componentreason- the value for thereasonrecord componentdisplayPhoneNumber- the value for thedisplayPhoneNumberrecord componentdecision- the value for thedecisionrecord componentrequestedVerifiedName- the value for therequestedVerifiedNamerecord componentrejectionReason- the value for therejectionReasonrecord componentdisableInfo- the value for thedisableInforecord componentcurrentLimit- the value for thecurrentLimitrecord componentbanInfo- the value for thebanInforecord componentrestrictionInfo- the value for therestrictionInforecord 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). -
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-
messagingProduct
Returns the value of themessagingProductrecord component.- Returns:
- the value of the
messagingProductrecord component
-
messages
Returns the value of themessagesrecord component.- Returns:
- the value of the
messagesrecord component
-
contacts
Returns the value of thecontactsrecord component.- Returns:
- the value of the
contactsrecord component
-
statuses
Returns the value of thestatusesrecord component.- Returns:
- the value of the
statusesrecord component
-
event
Returns the value of theeventrecord component.- Returns:
- the value of the
eventrecord component
-
phoneNumber
Returns the value of thephoneNumberrecord component.- Returns:
- the value of the
phoneNumberrecord component
-
messageTemplateId
Returns the value of themessageTemplateIdrecord component.- Returns:
- the value of the
messageTemplateIdrecord component
-
messageTemplateName
Returns the value of themessageTemplateNamerecord component.- Returns:
- the value of the
messageTemplateNamerecord component
-
messageTemplateLanguage
Returns the value of themessageTemplateLanguagerecord component.- Returns:
- the value of the
messageTemplateLanguagerecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
displayPhoneNumber
Returns the value of thedisplayPhoneNumberrecord component.- Returns:
- the value of the
displayPhoneNumberrecord component
-
decision
Returns the value of thedecisionrecord component.- Returns:
- the value of the
decisionrecord component
-
requestedVerifiedName
Returns the value of therequestedVerifiedNamerecord component.- Returns:
- the value of the
requestedVerifiedNamerecord component
-
rejectionReason
Returns the value of therejectionReasonrecord component.- Returns:
- the value of the
rejectionReasonrecord component
-
disableInfo
Returns the value of thedisableInforecord component.- Returns:
- the value of the
disableInforecord component
-
currentLimit
Returns the value of thecurrentLimitrecord component.- Returns:
- the value of the
currentLimitrecord component
-
banInfo
Returns the value of thebanInforecord component.- Returns:
- the value of the
banInforecord component
-
restrictionInfo
Returns the value of therestrictionInforecord component.- Returns:
- the value of the
restrictionInforecord component
-