Class MessageDetails.Builder
- java.lang.Object
-
- com.courier.api.resources.messages.types.MessageDetails.Builder
-
- All Implemented Interfaces:
MessageDetails._FinalStage,MessageDetails.ClickedStage,MessageDetails.DeliveredStage,MessageDetails.EnqueuedStage,MessageDetails.EventStage,MessageDetails.IdStage,MessageDetails.NotificationStage,MessageDetails.OpenedStage,MessageDetails.RecipientStage,MessageDetails.SentStage,MessageDetails.StatusStage
- Enclosing class:
- MessageDetails
public static final class MessageDetails.Builder extends java.lang.Object implements MessageDetails.IdStage, MessageDetails.StatusStage, MessageDetails.EnqueuedStage, MessageDetails.SentStage, MessageDetails.DeliveredStage, MessageDetails.OpenedStage, MessageDetails.ClickedStage, MessageDetails.RecipientStage, MessageDetails.EventStage, MessageDetails.NotificationStage, MessageDetails._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageDetailsbuild()MessageDetails.RecipientStageclicked(int clicked)A UTC timestamp at which the recipient clicked on a tracked link for the first time.MessageDetails.OpenedStagedelivered(int delivered)A UTC timestamp at which the Integration provider delivered the message.MessageDetails.SentStageenqueued(int enqueued)A UTC timestamp at which Courier received the message request.MessageDetails._FinalStageerror(java.lang.String error)A message describing the error that occurred.MessageDetails._FinalStageerror(java.util.Optional<java.lang.String> error)MessageDetails.NotificationStageevent(java.lang.String event)A unique identifier associated with the event of the delivered message.MessageDetails.Builderfrom(MessageDetails other)MessageDetails.StatusStageid(java.lang.String id)A unique identifier associated with the message you wish to retrieve (results from a send).MessageDetails._FinalStagenotification(java.lang.String notification)A unique identifier associated with the notification of the delivered message.MessageDetails.ClickedStageopened(int opened)A UTC timestamp at which the recipient opened a message for the first time.MessageDetails._FinalStagereason(Reason reason)The reason for the current status of the message.MessageDetails._FinalStagereason(java.util.Optional<Reason> reason)MessageDetails.EventStagerecipient(java.lang.String recipient)A unique identifier associated with the recipient of the delivered message.MessageDetails.DeliveredStagesent(int sent)A UTC timestamp at which Courier passed the message to the Integration provider.MessageDetails.EnqueuedStagestatus(MessageStatus status)The current status of the message.
-
-
-
Method Detail
-
from
public MessageDetails.Builder from(MessageDetails other)
- Specified by:
fromin interfaceMessageDetails.IdStage
-
id
public MessageDetails.StatusStage id(java.lang.String id)
A unique identifier associated with the message you wish to retrieve (results from a send).
- Specified by:
idin interfaceMessageDetails.IdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
status
public MessageDetails.EnqueuedStage status(MessageStatus status)
The current status of the message.
- Specified by:
statusin interfaceMessageDetails.StatusStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
enqueued
public MessageDetails.SentStage enqueued(int enqueued)
A UTC timestamp at which Courier received the message request. Stored as a millisecond representation of the Unix epoch.
- Specified by:
enqueuedin interfaceMessageDetails.EnqueuedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
sent
public MessageDetails.DeliveredStage sent(int sent)
A UTC timestamp at which Courier passed the message to the Integration provider. Stored as a millisecond representation of the Unix epoch.
- Specified by:
sentin interfaceMessageDetails.SentStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
delivered
public MessageDetails.OpenedStage delivered(int delivered)
A UTC timestamp at which the Integration provider delivered the message. Stored as a millisecond representation of the Unix epoch.
- Specified by:
deliveredin interfaceMessageDetails.DeliveredStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
opened
public MessageDetails.ClickedStage opened(int opened)
A UTC timestamp at which the recipient opened a message for the first time. Stored as a millisecond representation of the Unix epoch.
- Specified by:
openedin interfaceMessageDetails.OpenedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
clicked
public MessageDetails.RecipientStage clicked(int clicked)
A UTC timestamp at which the recipient clicked on a tracked link for the first time. Stored as a millisecond representation of the Unix epoch.
- Specified by:
clickedin interfaceMessageDetails.ClickedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
recipient
public MessageDetails.EventStage recipient(java.lang.String recipient)
A unique identifier associated with the recipient of the delivered message.
- Specified by:
recipientin interfaceMessageDetails.RecipientStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
event
public MessageDetails.NotificationStage event(java.lang.String event)
A unique identifier associated with the event of the delivered message.
- Specified by:
eventin interfaceMessageDetails.EventStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
notification
public MessageDetails._FinalStage notification(java.lang.String notification)
A unique identifier associated with the notification of the delivered message.
- Specified by:
notificationin interfaceMessageDetails.NotificationStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
reason
public MessageDetails._FinalStage reason(Reason reason)
The reason for the current status of the message.
- Specified by:
reasonin interfaceMessageDetails._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
reason
public MessageDetails._FinalStage reason(java.util.Optional<Reason> reason)
- Specified by:
reasonin interfaceMessageDetails._FinalStage
-
error
public MessageDetails._FinalStage error(java.lang.String error)
A message describing the error that occurred.
- Specified by:
errorin interfaceMessageDetails._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
error
public MessageDetails._FinalStage error(java.util.Optional<java.lang.String> error)
- Specified by:
errorin interfaceMessageDetails._FinalStage
-
build
public MessageDetails build()
- Specified by:
buildin interfaceMessageDetails._FinalStage
-
-