Example #1
0
        public Task <SendSmsResponse> SendSmsAsync(SendSmsRequest request)
        {
            _smsSentStore.StoreSentSms(new SentSms
            {
                Phone = request.Phone,
                Text  = request.Body,
                Date  = DateTime.Now.UnixTime()
            });

            _logger.LogInformation("Sms send is successful");

            return(Task.FromResult(new SendSmsResponse {
                Status = true
            }));
        }
Example #2
0
 public Task <SendResponse> StoreSentSmsAsync(StoreSentSmsRequest request)
 {
     try
     {
         _smsSentStore.StoreSentSms(request.SentSms);
         return(Task.FromResult(new SendResponse {
             Result = SmsSendResult.OK
         }));
     }
     catch (Exception)
     {
         return(Task.FromResult(new SendResponse {
             Result = SmsSendResult.FAILED
         }));
     }
 }