Exemple #1
0
        public string BuildEditUI([AllowNull] string uniqueControlId,
                                  IPlugInAPI.strTrigActInfo actionInfo)
        {
            SendMessageActionConfig config = SendMessageActionConfig.DeserializeActionConfig(actionInfo.DataIn);

            string toNumber = config.ToNumber;

            if (toNumber == null)
            {
                toNumber = "";
            }

            string message = config.Message;

            if (message == null)
            {
                message = "";
            }

            var toField = FormTextBox("ToNumber" + uniqueControlId, "To", toNumber);

            var messageField = FormTextBox("Message" + uniqueControlId, "Message", message);

            return(toField + "<br>" + messageField);
        }
Exemple #2
0
        public bool HandleEvent(IPlugInAPI.strTrigActInfo actionInfo, TwilioServiceFacade twilioService)
        {
            SendMessageActionConfig config = SendMessageActionConfig.DeserializeActionConfig(actionInfo.DataIn);

            if (config.IsValid())
            {
                twilioService.SendMessageToTwilio(pluginConfig, config);
                return(true);
            }
            return(false);
        }
Exemple #3
0
        public bool IsConfigured(IPlugInAPI.strTrigActInfo actionInfo)
        {
            SendMessageActionConfig config = SendMessageActionConfig.DeserializeActionConfig(actionInfo.DataIn);

            return(config.IsValid());
        }
Exemple #4
0
        public string BuildViewUI(IPlugInAPI.strTrigActInfo actionInfo)
        {
            var config = SendMessageActionConfig.DeserializeActionConfig(actionInfo.DataIn);

            return($"Twilio sends a message to {config.ToNumber}");
        }