Class WebhooksImpl

java.lang.Object
io.mailtrap.api.apiresource.ApiResource
io.mailtrap.api.webhooks.WebhooksImpl
All Implemented Interfaces:
Webhooks

public class WebhooksImpl extends ApiResource implements Webhooks
  • Constructor Details

  • Method Details

    • createWebhook

      public CreateWebhookResponse createWebhook(long accountId, CreateWebhookRequest request)
      Description copied from interface: Webhooks
      Create a new webhook for the account. The response includes the signing_secret used to verify webhook signatures (only returned on creation).
      Specified by:
      createWebhook in interface Webhooks
      Parameters:
      accountId - unique account ID
      request - webhook configuration
      Returns:
      created webhook including the signing secret
    • getAllWebhooks

      public ListWebhooksResponse getAllWebhooks(long accountId)
      Description copied from interface: Webhooks
      List all webhooks for the account.
      Specified by:
      getAllWebhooks in interface Webhooks
      Parameters:
      accountId - unique account ID
      Returns:
      webhooks
    • getWebhook

      public WebhookResponse getWebhook(long accountId, long webhookId)
      Description copied from interface: Webhooks
      Get a single webhook by ID.
      Specified by:
      getWebhook in interface Webhooks
      Parameters:
      accountId - unique account ID
      webhookId - webhook ID
      Returns:
      webhook details
    • updateWebhook

      public WebhookResponse updateWebhook(long accountId, long webhookId, UpdateWebhookRequest request)
      Description copied from interface: Webhooks
      Update an existing webhook.
      Specified by:
      updateWebhook in interface Webhooks
      Parameters:
      accountId - unique account ID
      webhookId - webhook ID
      request - fields to update
      Returns:
      updated webhook
    • deleteWebhook

      public WebhookResponse deleteWebhook(long accountId, long webhookId)
      Description copied from interface: Webhooks
      Permanently delete a webhook.
      Specified by:
      deleteWebhook in interface Webhooks
      Parameters:
      accountId - unique account ID
      webhookId - webhook ID
      Returns:
      the deleted webhook