Package io.sendon.sms
Class SendonSms
java.lang.Object
io.sendon.base.SendonClient
io.sendon.sms.SendonSms
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class io.sendon.base.SendonClient
gson, httpClient -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncancelGroup(String groupId) Cancels a message group.cancelRepeat(String groupId, String repeatId) Cancels a repeat message for a group.Generates a presigned URL for uploading a CSV file.Retrieves details of a message group.Retrieves URLs for images.getRepeats(String groupId, int limit, String cursor) Retrieves repeat messages for a group.Sends a message group.sendLms(LmsBuilder builder) Sends an LMS message using a builder.sendLms(String from, List<? extends Object> to, String title, String message, boolean isAd, Reservation reservation) Sends an LMS message.sendMms(MmsBuilder builder) Sends an MMS message using a builder.sendMms(String from, List<? extends Object> to, String title, String message, boolean isAd, Reservation reservation, List<String> images) Sends an MMS message.sendRepeat(String groupId, String repeatId) Sends a repeat message for a group.sendSms(SmsBuilder builder) Sends an SMS message using a builder.sendSms(String from, List<? extends Object> to, String message, boolean isAd, Reservation reservation) Sends an SMS message.uploadImages(List<File> images) Uploads images for use in MMS messages.Methods inherited from class io.sendon.base.SendonClient
delete, get, parseJsonResponse, post, postImagesWithMultipartFormData, postImageWithMultipartFormData, postImageWithMultipartFormData, put
-
Constructor Details
-
SendonSms
-
SendonSms
-
-
Method Details
-
sendSms
public SendSms sendSms(String from, List<? extends Object> to, String message, boolean isAd, Reservation reservation) Sends an SMS message.- Parameters:
from- The sender's phone number.to- The list of recipients. Can beList<String>,List<ToWithName>, orList<ToWithBucket>.message- The message content.isAd- Whether the message is an advertisement.reservation- The reservation details for scheduling.- Returns:
- The response of the SMS send operation.
- See Also:
-
sendLms
public SendSms sendLms(String from, List<? extends Object> to, String title, String message, boolean isAd, Reservation reservation) Sends an LMS message.- Parameters:
from- The sender's phone number.to- The list of recipients. Can beList<String>,List<ToWithName>, orList<ToWithBucket>.title- The title of the message.message- The message content.isAd- Whether the message is an advertisement.reservation- The reservation details for scheduling.- Returns:
- The response of the LMS send operation.
- See Also:
-
sendMms
public SendSms sendMms(String from, List<? extends Object> to, String title, String message, boolean isAd, Reservation reservation, List<String> images) Sends an MMS message.- Parameters:
from- The sender's phone number.to- The list of recipients. Can beList<String>,List<ToWithName>, orList<ToWithBucket>.title- The title of the message.message- The message content.isAd- Whether the message is an advertisement.reservation- The reservation details for scheduling.images- The list of image URLs to include in the MMS.- Returns:
- The response of the MMS send operation.
- See Also:
-
sendSms
Sends an SMS message using a builder.- Parameters:
builder- TheSmsBuildercontaining the SMS message details.- Returns:
- The response of the SMS send operation.
- See Also:
-
sendLms
Sends an LMS message using a builder.- Parameters:
builder- TheLmsBuildercontaining the LMS message details.- Returns:
- The response of the LMS send operation.
- See Also:
-
sendMms
Sends an MMS message using a builder.- Parameters:
builder- TheMmsBuildercontaining the MMS message details.- Returns:
- The response of the MMS send operation.
- See Also:
-
getGroup
Retrieves details of a message group.- Parameters:
groupId- The ID of the message group to retrieve.- Returns:
- The details of the message group.
-
sendGroup
Sends a message group.- Parameters:
groupId- The ID of the message group to send.- Returns:
- The response of the send operation.
-
cancelGroup
Cancels a message group.- Parameters:
groupId- The ID of the message group to cancel.- Returns:
- The response of the cancel operation.
-
getRepeats
Retrieves repeat messages for a group.- Parameters:
groupId- The ID of the message group.limit- The maximum number of repeat messages to retrieve.cursor- The cursor for pagination (optional).- Returns:
- The repeat messages for the group.
-
sendRepeat
Sends a repeat message for a group.- Parameters:
groupId- The ID of the message group.repeatId- The ID of the repeat message to send.- Returns:
- The response of the send operation.
-
cancelRepeat
Cancels a repeat message for a group.- Parameters:
groupId- The ID of the message group.repeatId- The ID of the repeat message to cancel.- Returns:
- The response of the cancel operation.
-
generateCsvPresignedUrl
Generates a presigned URL for uploading a CSV file.- Returns:
- The presigned URL for uploading a CSV file.
-
uploadImages
Uploads images for use in MMS messages.- Parameters:
images- The list of image files to upload.- Returns:
- The response of the upload operation.
-
getImages
Retrieves URLs for images.- Parameters:
images- The list of image IDs to retrieve URLs for.- Returns:
- The response containing the image URLs.
-