Package com.mailersend.sdk.webhooks
Class WebhooksBuilder
- java.lang.Object
-
- com.mailersend.sdk.webhooks.WebhooksBuilder
-
public class WebhooksBuilder extends Object
WebhooksBuilder class.
- Version:
- $Id: $Id
- Author:
- mailersend
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedWebhooksBuilder(MailerSend apiObjectRef)No instantiation from outside the sdk
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebhooksBuilderaddEvent(String event)Add an event for the webhookWebhooksBuilderclearEvents()Clears the events of the webhook requestWebhookcreateWebhook(String domainId)Creates a webhookWebhooksBuildername(String name)Set the webhook's nameWebhookupdateWebhook(String webhookId)Updates the webhook with the given idWebhooksBuilderurl(String url)Set the webhook's url
-
-
-
Constructor Detail
-
WebhooksBuilder
protected WebhooksBuilder(MailerSend apiObjectRef)
No instantiation from outside the sdk- Parameters:
apiObjectRef- aMailerSendobject.
-
-
Method Detail
-
url
public WebhooksBuilder url(String url)
Set the webhook's url- Parameters:
url- aStringobject.- Returns:
- a
WebhooksBuilderobject.
-
name
public WebhooksBuilder name(String name)
Set the webhook's name- Parameters:
name- aStringobject.- Returns:
- a
WebhooksBuilderobject.
-
addEvent
public WebhooksBuilder addEvent(String event)
Add an event for the webhook- Parameters:
event- aStringobject.- Returns:
- a
WebhooksBuilderobject.
-
clearEvents
public WebhooksBuilder clearEvents()
Clears the events of the webhook request- Returns:
- a
WebhooksBuilderobject.
-
createWebhook
public Webhook createWebhook(String domainId) throws MailerSendException
Creates a webhook- Parameters:
domainId- aStringobject.- Returns:
- a
Webhookobject. - Throws:
MailerSendException
-
updateWebhook
public Webhook updateWebhook(String webhookId) throws MailerSendException
Updates the webhook with the given id- Parameters:
webhookId- aStringobject.- Returns:
- a
Webhookobject. - Throws:
MailerSendException
-
-