/// <summary> /// Sends the SMS. /// </summary> /// <param name="from">Sender name.</param> /// <param name="message">The message.</param> /// <param name="mobileNumbers">The mobile numbers to send the text message (The mobile number must also include the country code).</param> /// <returns>The API response <see cref="YellowPushSMSResponse"/></returns> public YellowPushSMSResponse SendSMS(string from, string message, params string[] mobileNumbers) { string to = ConvertParamsToString(mobileNumbers, ","); YellowPushSMSResponse response = SendMessage(from, message, to); return(response); }
public void BulkSendSMS() { List <BulkSMS> messages = new List <BulkSMS>() { new BulkSMS() { From = "Damian", MobileNumber = "573163985157", Message = "Prueba desde Test Unitario Bulk Damian" }, new BulkSMS() { From = "Jose", MobileNumber = "573175564608", Message = "Prueba desde Test Unitario Bulk Jose" } }; YellowPushSMSResponse response = sms.BulkSendSMS(messages); Assert.AreEqual(HttpStatusCode.OK, response.StatusCode, $@"El status code de la respuesta del mensaje es {response.StatusCode.ToString()}"); }
public void GetMessageStatus() { YellowPushSMSResponse response = sms.GetMessageStatus("5a5600d4-f60a-e9fa-dd05-e53a4b385450", new DateTime(2018, 1, 30)); Assert.AreEqual(HttpStatusCode.OK, response.StatusCode, $@"El status code de la respuesta del mensaje es {response.StatusCode.ToString()}"); }
public void SendSMS() { YellowPushSMSResponse response = sms.SendSMS("Damian", "Esto es una prueba desde Test Unitario 20%", "573163985157"); Assert.AreEqual(HttpStatusCode.OK, response.StatusCode, $@"El status code de la respuesta del mensaje es {response.StatusCode.ToString()}"); }
/// <summary> /// Sends the SMS. /// </summary> /// <param name="from">Sender name.</param> /// <param name="message">The message.</param> /// <param name="mobileNumbers">The mobile numbers separated by commas to send the text message (The mobile number must also include the country code).</param> /// <returns>The API response <see cref="YellowPushSMSResponse"/></returns> public YellowPushSMSResponse SendSMS(string from, string message, string mobileNumbers) { YellowPushSMSResponse response = SendMessage(from, message, mobileNumbers); return(response); }