Class TwilioNotificationChannel.Builder

java.lang.Object
com.chatmotorapi.api.notify.TwilioNotificationChannel.Builder
Enclosing class:
TwilioNotificationChannel

public static class TwilioNotificationChannel.Builder
extends Object
Builder class for TwilioNotificationChannel. This class follows the builder pattern to configure and create instances of TwilioNotificationChannel.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • chatMotor

      public TwilioNotificationChannel.Builder chatMotor​(ChatMotor chatMotor)
      Sets the ChatMotor for sending notifications.
      Parameters:
      chatMotor - the ChatMotor instance to use for sending notifications
      Returns:
      this builder for chaining
    • logger

      public TwilioNotificationChannel.Builder logger​(org.slf4j.Logger logger)
      Sets the Logger instance for logging operations within the treatment process. Default value of Logger is TwilioNotificationChannel.class.getName() if not provided.
      Parameters:
      logger - the Logger to use
      Returns:
      this builder for chaining
    • accountSid

      public TwilioNotificationChannel.Builder accountSid​(String accountSid)
      Sets the Twilio Account SID required for API access.
      Parameters:
      accountSid - the Twilio Account SID
      Returns:
      this Builder instance for chaining
    • authToken

      public TwilioNotificationChannel.Builder authToken​(String authToken)
      Sets the Twilio Auth Token required for API access.
      Parameters:
      authToken - the Twilio Auth Token
      Returns:
      this Builder instance for chaining
    • phoneNumbers

      public TwilioNotificationChannel.Builder phoneNumbers​(List<String> phoneNumbers)
      Sets the list of phone numbers to notify.
      Parameters:
      phoneNumbers - the list of phone numbers
      Returns:
      this Builder instance for chaining
    • messageText

      public TwilioNotificationChannel.Builder messageText​(String messageText)
      Sets the message text to send to all phone numbers.
      Parameters:
      messageText - the message text
      Returns:
      this Builder instance for chaining
    • fromPhoneNumber

      public TwilioNotificationChannel.Builder fromPhoneNumber​(String fromPhoneNumber)
      Sets the Twilio phone number from which the message will be sent.
      Parameters:
      fromPhoneNumber - the Twilio phone number
      Returns:
      this Builder instance for chaining
    • build

      public TwilioNotificationChannel build()
      Builds and returns a TwilioNotificationChannel configured with this builder's settings.
      Returns:
      a new SmsFailoverNotifier instance