Package com.whatsapp.api.domain.webhook
Record Class Status
java.lang.Object
java.lang.Record
com.whatsapp.api.domain.webhook.Status
- Record Components:
id- The message ID.conversation- This object will be provided by default when Conversation-Based Pricing launches in a future update. Object containing conversation attributes, including id. See conversation object for more information.WhatsApp defines a conversation as a 24-hour session of messaging between a person and a business. There is no limit on the number of messages that can be exchanged in the fixed 24-hour window. The 24-hour conversation session begins when:
- A business-initiated message is delivered to a user
- A business’ reply to a user message is delivered
The 24-hour conversation session is different from the 24-hour customer support window. The customer support window is a rolling window that is refreshed when a user-initiated message is delivered to a business. Within the customer support window businesses can send free-form messages. Any business-initiated message sent more than 24 hours after the last customer message must be a template message.
pricing- This object will be provided by default when Conversation-Based Pricing launches in a future update.recipientId- The WhatsApp ID of the recipient.status- The status of the message. Valid values are: read, delivered, sent, failed, or deleted.timestamp- The timestamp of the status message.errors- The errors object in webhooks triggered by v16.0+ request errors now include message and error_data.details properties, and title values have changed for multiple error codes.
public record Status(String id, Conversation conversation, Pricing pricing, String recipientId, MessageStatus status, String timestamp, List<Error> errors)
extends Record
The type Status.
-
Constructor Summary
ConstructorsConstructorDescriptionStatus(String id, Conversation conversation, Pricing pricing, String recipientId, MessageStatus status, String timestamp, List<Error> errors) Creates an instance of aStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconversationrecord component.final booleanIndicates whether some other object is "equal to" this one.errors()Returns the value of theerrorsrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.pricing()Returns the value of thepricingrecord component.Returns the value of therecipientIdrecord component.status()Returns the value of thestatusrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Status
public Status(String id, Conversation conversation, Pricing pricing, String recipientId, MessageStatus status, String timestamp, List<Error> errors) Creates an instance of aStatusrecord class.- Parameters:
id- the value for theidrecord componentconversation- the value for theconversationrecord componentpricing- the value for thepricingrecord componentrecipientId- the value for therecipientIdrecord componentstatus- the value for thestatusrecord componenttimestamp- the value for thetimestamprecord componenterrors- the value for theerrorsrecord 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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
conversation
Returns the value of theconversationrecord component.- Returns:
- the value of the
conversationrecord component
-
pricing
Returns the value of thepricingrecord component.- Returns:
- the value of the
pricingrecord component
-
recipientId
Returns the value of therecipientIdrecord component.- Returns:
- the value of the
recipientIdrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
errors
Returns the value of theerrorsrecord component.- Returns:
- the value of the
errorsrecord component
-