Package io.mailtrap.api.webhooks
Class WebhooksImpl
java.lang.Object
io.mailtrap.api.apiresource.ApiResource
io.mailtrap.api.webhooks.WebhooksImpl
- All Implemented Interfaces:
Webhooks
-
Field Summary
Fields inherited from class io.mailtrap.api.apiresource.ApiResource
apiHost, httpClient, token -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateWebhook(long accountId, CreateWebhookRequest request) Create a new webhook for the account.deleteWebhook(long accountId, long webhookId) Permanently delete a webhook.getAllWebhooks(long accountId) List all webhooks for the account.getWebhook(long accountId, long webhookId) Get a single webhook by ID.updateWebhook(long accountId, long webhookId, UpdateWebhookRequest request) Update an existing webhook.
-
Constructor Details
-
WebhooksImpl
-
-
Method Details
-
createWebhook
Description copied from interface:WebhooksCreate a new webhook for the account. The response includes thesigning_secretused to verify webhook signatures (only returned on creation).- Specified by:
createWebhookin interfaceWebhooks- Parameters:
accountId- unique account IDrequest- webhook configuration- Returns:
- created webhook including the signing secret
-
getAllWebhooks
Description copied from interface:WebhooksList all webhooks for the account.- Specified by:
getAllWebhooksin interfaceWebhooks- Parameters:
accountId- unique account ID- Returns:
- webhooks
-
getWebhook
Description copied from interface:WebhooksGet a single webhook by ID.- Specified by:
getWebhookin interfaceWebhooks- Parameters:
accountId- unique account IDwebhookId- webhook ID- Returns:
- webhook details
-
updateWebhook
Description copied from interface:WebhooksUpdate an existing webhook.- Specified by:
updateWebhookin interfaceWebhooks- Parameters:
accountId- unique account IDwebhookId- webhook IDrequest- fields to update- Returns:
- updated webhook
-
deleteWebhook
Description copied from interface:WebhooksPermanently delete a webhook.- Specified by:
deleteWebhookin interfaceWebhooks- Parameters:
accountId- unique account IDwebhookId- webhook ID- Returns:
- the deleted webhook
-