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 Details

    • Status

      public Status(String id, Conversation conversation, Pricing pricing, String recipientId, MessageStatus status, String timestamp, List<Error> errors)
      Creates an instance of a Status record class.
      Parameters:
      id - the value for the id record component
      conversation - the value for the conversation record component
      pricing - the value for the pricing record component
      recipientId - the value for the recipientId record component
      status - the value for the status record component
      timestamp - the value for the timestamp record component
      errors - the value for the errors record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • conversation

      public Conversation conversation()
      Returns the value of the conversation record component.
      Returns:
      the value of the conversation record component
    • pricing

      public Pricing pricing()
      Returns the value of the pricing record component.
      Returns:
      the value of the pricing record component
    • recipientId

      public String recipientId()
      Returns the value of the recipientId record component.
      Returns:
      the value of the recipientId record component
    • status

      public MessageStatus status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • timestamp

      public String timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • errors

      public List<Error> errors()
      Returns the value of the errors record component.
      Returns:
      the value of the errors record component