Class InboundBulkTemplateMessage.Builder
- java.lang.Object
-
- com.courier.api.resources.bulk.types.InboundBulkTemplateMessage.Builder
-
- All Implemented Interfaces:
InboundBulkTemplateMessage._FinalStage,InboundBulkTemplateMessage.TemplateStage
- Enclosing class:
- InboundBulkTemplateMessage
public static final class InboundBulkTemplateMessage.Builder extends java.lang.Object implements InboundBulkTemplateMessage.TemplateStage, InboundBulkTemplateMessage._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InboundBulkTemplateMessage._FinalStagebrandId(java.lang.String brandId)InboundBulkTemplateMessage._FinalStagebrandId(java.util.Optional<java.lang.String> brandId)InboundBulkTemplateMessagebuild()InboundBulkTemplateMessage._FinalStagechannels(java.util.Map<java.lang.String,Channel> channels)"Define run-time configuration for one or more channels.InboundBulkTemplateMessage._FinalStagechannels(java.util.Optional<java.util.Map<java.lang.String,Channel>> channels)InboundBulkTemplateMessage._FinalStagecontext(MessageContext context)Context to load with this recipient.InboundBulkTemplateMessage._FinalStagecontext(java.util.Optional<MessageContext> context)InboundBulkTemplateMessage._FinalStagedata(java.util.Map<java.lang.String,java.lang.Object> data)An arbitrary object that includes any data you want to pass to the message.InboundBulkTemplateMessage._FinalStagedata(java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> data)InboundBulkTemplateMessage._FinalStagedelay(Delay delay)Defines the time to wait before delivering the message.InboundBulkTemplateMessage._FinalStagedelay(java.util.Optional<Delay> delay)InboundBulkTemplateMessage._FinalStageexpiry(Expiry expiry)"Expiry allows you to set an absolute or relative time in which a message expires.InboundBulkTemplateMessage._FinalStageexpiry(java.util.Optional<Expiry> expiry)InboundBulkTemplateMessage.Builderfrom(InboundBulkTemplateMessage other)InboundBulkTemplateMessage._FinalStagemetadata(MessageMetadata metadata)Metadata such as utm tracking attached with the notification through this channel.InboundBulkTemplateMessage._FinalStagemetadata(java.util.Optional<MessageMetadata> metadata)InboundBulkTemplateMessage._FinalStagepreferences(MessagePreferences preferences)InboundBulkTemplateMessage._FinalStagepreferences(java.util.Optional<MessagePreferences> preferences)InboundBulkTemplateMessage._FinalStageproviders(java.util.Map<java.lang.String,MessageProvidersType> providers)An object whose keys are valid provider identifiers which map to an object.InboundBulkTemplateMessage._FinalStageproviders(java.util.Optional<java.util.Map<java.lang.String,MessageProvidersType>> providers)InboundBulkTemplateMessage._FinalStagerouting(Routing routing)InboundBulkTemplateMessage._FinalStagerouting(java.util.Optional<Routing> routing)InboundBulkTemplateMessage._FinalStagetemplate(java.lang.String template)The id of the notification template to be rendered and sent to the recipient(s).InboundBulkTemplateMessage._FinalStagetimeout(Timeout timeout)Time in ms to attempt the channel before failing over to the next available channel.InboundBulkTemplateMessage._FinalStagetimeout(java.util.Optional<Timeout> timeout)
-
-
-
Method Detail
-
from
public InboundBulkTemplateMessage.Builder from(InboundBulkTemplateMessage other)
- Specified by:
fromin interfaceInboundBulkTemplateMessage.TemplateStage
-
template
public InboundBulkTemplateMessage._FinalStage template(java.lang.String template)
The id of the notification template to be rendered and sent to the recipient(s). This field or the content field must be supplied.
- Specified by:
templatein interfaceInboundBulkTemplateMessage.TemplateStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
expiry
public InboundBulkTemplateMessage._FinalStage expiry(Expiry expiry)
"Expiry allows you to set an absolute or relative time in which a message expires. Note: This is only valid for the Courier Inbox channel as of 12-08-2022."
- Specified by:
expiryin interfaceInboundBulkTemplateMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
expiry
public InboundBulkTemplateMessage._FinalStage expiry(java.util.Optional<Expiry> expiry)
- Specified by:
expiryin interfaceInboundBulkTemplateMessage._FinalStage
-
delay
public InboundBulkTemplateMessage._FinalStage delay(Delay delay)
Defines the time to wait before delivering the message. You can specify one of the following options. Duration with the number of milliseconds to delay. Until with an ISO 8601 timestamp that specifies when it should be delivered. Until with an OpenStreetMap opening_hours-like format that specifies the Delivery Window (e.g., 'Mo-Fr 08:00-18:00pm')
- Specified by:
delayin interfaceInboundBulkTemplateMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
delay
public InboundBulkTemplateMessage._FinalStage delay(java.util.Optional<Delay> delay)
- Specified by:
delayin interfaceInboundBulkTemplateMessage._FinalStage
-
timeout
public InboundBulkTemplateMessage._FinalStage timeout(Timeout timeout)
Time in ms to attempt the channel before failing over to the next available channel.
- Specified by:
timeoutin interfaceInboundBulkTemplateMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
timeout
public InboundBulkTemplateMessage._FinalStage timeout(java.util.Optional<Timeout> timeout)
- Specified by:
timeoutin interfaceInboundBulkTemplateMessage._FinalStage
-
routing
public InboundBulkTemplateMessage._FinalStage routing(Routing routing)
- Specified by:
routingin interfaceInboundBulkTemplateMessage._FinalStage
-
routing
public InboundBulkTemplateMessage._FinalStage routing(java.util.Optional<Routing> routing)
- Specified by:
routingin interfaceInboundBulkTemplateMessage._FinalStage
-
providers
public InboundBulkTemplateMessage._FinalStage providers(java.util.Map<java.lang.String,MessageProvidersType> providers)
An object whose keys are valid provider identifiers which map to an object.
- Specified by:
providersin interfaceInboundBulkTemplateMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
providers
public InboundBulkTemplateMessage._FinalStage providers(java.util.Optional<java.util.Map<java.lang.String,MessageProvidersType>> providers)
- Specified by:
providersin interfaceInboundBulkTemplateMessage._FinalStage
-
preferences
public InboundBulkTemplateMessage._FinalStage preferences(MessagePreferences preferences)
- Specified by:
preferencesin interfaceInboundBulkTemplateMessage._FinalStage
-
preferences
public InboundBulkTemplateMessage._FinalStage preferences(java.util.Optional<MessagePreferences> preferences)
- Specified by:
preferencesin interfaceInboundBulkTemplateMessage._FinalStage
-
metadata
public InboundBulkTemplateMessage._FinalStage metadata(MessageMetadata metadata)
Metadata such as utm tracking attached with the notification through this channel.
- Specified by:
metadatain interfaceInboundBulkTemplateMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
metadata
public InboundBulkTemplateMessage._FinalStage metadata(java.util.Optional<MessageMetadata> metadata)
- Specified by:
metadatain interfaceInboundBulkTemplateMessage._FinalStage
-
context
public InboundBulkTemplateMessage._FinalStage context(MessageContext context)
Context to load with this recipient. Will override any context set on message.context.
- Specified by:
contextin interfaceInboundBulkTemplateMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
context
public InboundBulkTemplateMessage._FinalStage context(java.util.Optional<MessageContext> context)
- Specified by:
contextin interfaceInboundBulkTemplateMessage._FinalStage
-
channels
public InboundBulkTemplateMessage._FinalStage channels(java.util.Map<java.lang.String,Channel> channels)
"Define run-time configuration for one or more channels. If you don't specify channels, the default configuration for each channel will be used. Valid ChannelId's are: email, sms, push, inbox, direct_message, banner, and webhook."
- Specified by:
channelsin interfaceInboundBulkTemplateMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
channels
public InboundBulkTemplateMessage._FinalStage channels(java.util.Optional<java.util.Map<java.lang.String,Channel>> channels)
- Specified by:
channelsin interfaceInboundBulkTemplateMessage._FinalStage
-
brandId
public InboundBulkTemplateMessage._FinalStage brandId(java.lang.String brandId)
- Specified by:
brandIdin interfaceInboundBulkTemplateMessage._FinalStage
-
brandId
public InboundBulkTemplateMessage._FinalStage brandId(java.util.Optional<java.lang.String> brandId)
- Specified by:
brandIdin interfaceInboundBulkTemplateMessage._FinalStage
-
data
public InboundBulkTemplateMessage._FinalStage data(java.util.Map<java.lang.String,java.lang.Object> data)
An arbitrary object that includes any data you want to pass to the message. The data will populate the corresponding template or elements variables.
- Specified by:
datain interfaceInboundBulkTemplateMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
data
public InboundBulkTemplateMessage._FinalStage data(java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> data)
- Specified by:
datain interfaceInboundBulkTemplateMessage._FinalStage
-
build
public InboundBulkTemplateMessage build()
- Specified by:
buildin interfaceInboundBulkTemplateMessage._FinalStage
-
-