Package com.mailersend.sms.webhooks
Class SmsWebhooksBuilder
- java.lang.Object
-
- com.mailersend.sms.webhooks.SmsWebhooksBuilder
-
public class SmsWebhooksBuilder extends Object
SmsWebhooksBuilder class.
- Version:
- $Id: $Id
- Author:
- mailersend
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSmsWebhooksBuilder(MailerSend apiObjectRef)No instantiation from outside the sdk
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SmsWebhooksBuilderaddEvent(String event)Add an event for the webhookSmsWebhooksBuilderclearEvents()Clears the events of the webhook requestSmsWebhookcreateWebhook(String smsNumberId)Creates a webhookSmsWebhooksBuildername(String name)Set the webhook's nameSmsWebhookupdateWebhook(String webhookId)Updates the webhook with the given idSmsWebhooksBuilderurl(String url)Set the webhook's url
-
-
-
Constructor Detail
-
SmsWebhooksBuilder
protected SmsWebhooksBuilder(MailerSend apiObjectRef)
No instantiation from outside the sdk- Parameters:
apiObjectRef- aMailerSendobject.
-
-
Method Detail
-
url
public SmsWebhooksBuilder url(String url)
Set the webhook's url- Parameters:
url- aStringobject.- Returns:
- a
SmsWebhooksBuilderobject.
-
name
public SmsWebhooksBuilder name(String name)
Set the webhook's name- Parameters:
name- aStringobject.- Returns:
- a
SmsWebhooksBuilderobject.
-
addEvent
public SmsWebhooksBuilder addEvent(String event)
Add an event for the webhook- Parameters:
event- aStringobject.- Returns:
- a
SmsWebhooksBuilderobject.
-
clearEvents
public SmsWebhooksBuilder clearEvents()
Clears the events of the webhook request- Returns:
- a
SmsWebhooksBuilderobject.
-
createWebhook
public SmsWebhook createWebhook(String smsNumberId) throws MailerSendException
Creates a webhook- Parameters:
smsNumberId- aStringobject.- Returns:
- a
SmsWebhookobject. - Throws:
MailerSendException
-
updateWebhook
public SmsWebhook updateWebhook(String webhookId) throws MailerSendException
Updates the webhook with the given id- Parameters:
webhookId- aStringobject.- Returns:
- a
SmsWebhookobject. - Throws:
MailerSendException
-
-