Package com.sinch.sdk.domains.sms.models
Class Batch<T>
- java.lang.Object
-
- com.sinch.sdk.domains.sms.models.Batch<T>
-
- Type Parameters:
T- Type of batch
- Direct Known Subclasses:
BatchBinary,BatchMedia,BatchText
public class Batch<T> extends Object
Base class for Batch types- Since:
- 1.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBatch.BatchBuilder<T>
-
Constructor Summary
Constructors Constructor Description Batch(String id, Collection<String> to, String from, Boolean canceled, T body, Instant createdAt, Instant modifiedAt, DeliveryReportType deliveryReport, Instant sendAt, Instant expireAt, String callbackUrl, String clientReference, Boolean feedbackEnabled)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> Batch.BatchBuilder<T>batchBuilder()TgetBody()StringgetCallbackUrl()StringgetClientReference()InstantgetCreatedAt()DeliveryReportTypegetDeliveryReport()InstantgetExpireAt()StringgetFrom()StringgetId()InstantgetModifiedAt()InstantgetSendAt()Collection<String>getTo()BooleanisCanceled()BooleanisFeedbackEnabled()StringtoString()
-
-
-
Constructor Detail
-
Batch
public Batch(String id, Collection<String> to, String from, Boolean canceled, T body, Instant createdAt, Instant modifiedAt, DeliveryReportType deliveryReport, Instant sendAt, Instant expireAt, String callbackUrl, String clientReference, Boolean feedbackEnabled)
- Parameters:
id- Unique identifier for batchto- List of Phone numbers and group IDs that will receive the batchfrom- Sender number. Must be valid phone number, short code or alphanumeric. Required if Automatic Default Originator not configured.canceled- Indicates if the batch has been canceled or not.body- The message contentcreatedAt- when batch was createdmodifiedAt- when batch was last updateddeliveryReport- Request delivery report callback. Note that delivery reports can be fetched from the API regardless of this settingsendAt- If set in the future, the message will be delayed until send_at occurs. Must be before expire_at. If set in the past, messages will be sent immediatelyexpireAt- If set, the system will stop trying to deliver the message at this point. Must be after send_at. Default and max is 3 days after send_atcallbackUrl- Override the default callback URL for this batch. Must be valid URL.clientReference- The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batchfeedbackEnabled- If set to true, then feedback is expected after successful delivery.
-
-
Method Detail
-
batchBuilder
public static <T> Batch.BatchBuilder<T> batchBuilder()
-
getId
public String getId()
-
getTo
public Collection<String> getTo()
-
getFrom
public String getFrom()
-
isCanceled
public Boolean isCanceled()
-
getBody
public T getBody()
-
getCreatedAt
public Instant getCreatedAt()
-
getModifiedAt
public Instant getModifiedAt()
-
getDeliveryReport
public DeliveryReportType getDeliveryReport()
-
getSendAt
public Instant getSendAt()
-
getExpireAt
public Instant getExpireAt()
-
getCallbackUrl
public String getCallbackUrl()
-
getClientReference
public String getClientReference()
-
isFeedbackEnabled
public Boolean isFeedbackEnabled()
-
-