Package io.sendon.sms

Class SendonSms


public class SendonSms extends SendonClient
  • Constructor Details

    • SendonSms

      public SendonSms(String userId, String apiKey)
    • SendonSms

      public SendonSms(String userId, String apiKey, boolean useOkHttp)
  • 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 be List<String>, List<ToWithName>, or List<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 be List<String>, List<ToWithName>, or List<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 be List<String>, List<ToWithName>, or List<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

      public SendSms sendSms(SmsBuilder builder)
      Sends an SMS message using a builder.
      Parameters:
      builder - The SmsBuilder containing the SMS message details.
      Returns:
      The response of the SMS send operation.
      See Also:
    • sendLms

      public SendSms sendLms(LmsBuilder builder)
      Sends an LMS message using a builder.
      Parameters:
      builder - The LmsBuilder containing the LMS message details.
      Returns:
      The response of the LMS send operation.
      See Also:
    • sendMms

      public SendSms sendMms(MmsBuilder builder)
      Sends an MMS message using a builder.
      Parameters:
      builder - The MmsBuilder containing the MMS message details.
      Returns:
      The response of the MMS send operation.
      See Also:
    • getGroup

      public GetGroup getGroup(String groupId)
      Retrieves details of a message group.
      Parameters:
      groupId - The ID of the message group to retrieve.
      Returns:
      The details of the message group.
    • sendGroup

      public SendGroup sendGroup(String groupId)
      Sends a message group.
      Parameters:
      groupId - The ID of the message group to send.
      Returns:
      The response of the send operation.
    • cancelGroup

      public CancelGroup cancelGroup(String groupId)
      Cancels a message group.
      Parameters:
      groupId - The ID of the message group to cancel.
      Returns:
      The response of the cancel operation.
    • getRepeats

      public GetRepeats getRepeats(String groupId, int limit, String cursor)
      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

      public SendRepeat sendRepeat(String groupId, String repeatId)
      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

      public CancelRepeat cancelRepeat(String groupId, String repeatId)
      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

      public GenerateCsvPresignedUrl generateCsvPresignedUrl()
      Generates a presigned URL for uploading a CSV file.
      Returns:
      The presigned URL for uploading a CSV file.
    • uploadImages

      public UploadImage uploadImages(List<File> images)
      Uploads images for use in MMS messages.
      Parameters:
      images - The list of image files to upload.
      Returns:
      The response of the upload operation.
    • getImages

      public GetImage getImages(List<String> images)
      Retrieves URLs for images.
      Parameters:
      images - The list of image IDs to retrieve URLs for.
      Returns:
      The response containing the image URLs.