feat(MessagingService): Möglichkeit hinzugefügt, den Anbieter des Messaging-Servers zu benachrichtigen.

This commit is contained in:
Developer 02 2024-11-27 17:46:32 +01:00
parent 27618a343e
commit 423b293197
2 changed files with 5 additions and 0 deletions

View File

@ -5,5 +5,7 @@ namespace EnvelopeGenerator.Application.Contracts
public interface IMessagingService public interface IMessagingService
{ {
public Task<SmsResponse> SendSmsAsync(string recipient, string message); public Task<SmsResponse> SendSmsAsync(string recipient, string message);
string ServiceProvider { get; }
} }
} }

View File

@ -22,6 +22,7 @@ namespace EnvelopeGenerator.Application.Services
_smsClient = smsClient; _smsClient = smsClient;
_smsParams = smsParamsOptions.Value; _smsParams = smsParamsOptions.Value;
_mapper = mapper; _mapper = mapper;
ServiceProvider = GetType().Name.Replace("Service", string.Empty);
} }
public async Task<SmsResponse> SendSmsAsync(string recipient, string message) public async Task<SmsResponse> SendSmsAsync(string recipient, string message)
@ -34,5 +35,7 @@ namespace EnvelopeGenerator.Application.Services
.ThenAsync(res => res.Json<GtxMessagingResponse>()) .ThenAsync(res => res.Json<GtxMessagingResponse>())
.ThenAsync(_mapper.Map<SmsResponse>); .ThenAsync(_mapper.Map<SmsResponse>);
} }
public string ServiceProvider { get; }
} }
} }