Class WebhookDelivery

java.lang.Object
africa.sendbyte.webhooks.WebhookDelivery

public final class WebhookDelivery extends Object
A single webhook delivery attempt, from Webhooks.deliveries(String) or the fresh attempt created by Webhooks.replay(String).

On a just-created replay, the outcome fields (statusCode, latencyMs, attemptedAt, succeeded) are null until the attempt runs.

  • Constructor Details

    • WebhookDelivery

      public WebhookDelivery()
  • Method Details

    • getId

      public String getId()
      Unique delivery identifier (prefixed del_); pass to Webhooks.replay(String).
    • setId

      public void setId(String id)
    • getEventType

      public String getEventType()
      The event type that triggered this delivery, e.g. email.bounced.
    • setEventType

      public void setEventType(String eventType)
    • getStatusCode

      public Integer getStatusCode()
      HTTP status your endpoint returned; 0 if the connection failed, null if not yet attempted.
    • setStatusCode

      public void setStatusCode(Integer statusCode)
    • getLatencyMs

      public Integer getLatencyMs()
      Round-trip latency in milliseconds, or null if not yet attempted.
    • setLatencyMs

      public void setLatencyMs(Integer latencyMs)
    • getAttemptedAt

      public String getAttemptedAt()
      ISO 8601 timestamp of the attempt, or null if not yet attempted.
    • setAttemptedAt

      public void setAttemptedAt(String attemptedAt)
    • getSucceeded

      public Boolean getSucceeded()
      true if your endpoint returned 2xx in time; null if not yet attempted.
    • setSucceeded

      public void setSucceeded(Boolean succeeded)
    • getReplayOf

      public String getReplayOf()
      For a replay, the id of the original delivery it was created from; null otherwise.
    • setReplayOf

      public void setReplayOf(String replayOf)