Ejemplo n.º 1
0
 public SMSIntelSmsService(SmsServiceConfiguration configuration)
 {
     if (configuration.ServiceName != SmsServiceTypes.SMSIntel)
     {
         throw new ArgumentException($"{nameof(SmsServiceConfiguration.ServiceName)} should be {SmsServiceTypes.SMSRU}.", nameof(configuration));
     }
     _configuration = (SMSIntelServiceConfiguration)configuration;
 }
Ejemplo n.º 2
0
        public async Task SMSIntelSendSmsTest()
        {
            SmsServiceConfiguration configuration = new SMSIntelServiceConfiguration
            {
                ServiceName = SmsServiceTypes.SMSIntel,
                AuthToken   = "vie77292oqujo21gj1yr0gmdnlc10ym4z6kds6nhg34g1rezwc3qqgobxav9xz1a",
                ServiceUrl  = "https://lcab.smsint.ru/json/v1.0/sms/send/text"
            };
            ISmsService service = new SMSIntelSmsService(configuration);

            Assert.True(await service.SendAsync("79131743886", "TEST-ТЕСТ"));
        }