## Summary Implement the Esendex SMS provider inside `src/SmsBridge/Providers/Esendex/`. Esendex is a UK-based business messaging provider with strong coverage in the UK, Europe, and Australia. ## Files to create - `src/SmsBridge/Providers/Esendex/EsendexSmsProvider.cs` - `src/SmsBridge/Providers/Esendex/EsendexSmsRequestMapper.cs` - `src/SmsBridge/Providers/Esendex/EsendexSmsResponseMapper.cs` - `src/SmsBridge/Options/EsendexOptions.cs` - Register `UseEsendex()` in `src/SmsBridge/DependencyInjection/SmsBridgeProviderBuilder.cs` - Add `HttpClientNames.Esendex` in `src/SmsBridge/Internal/Http/HttpClientNames.cs` - Add `SmsProviderType.Esendex` to the enum ## Esendex API Details - Endpoint: `https://api.esendex.com/v1.0/messagedispatcher` - Auth: HTTP Basic Auth (`user@email:password`) - Request (XML): ```xml <messages> <accountreference>...</accountreference> <message> <to>...</to> <body>...</body> </message> </messages> ``` - Response (XML): `<messageheaders batchid="..."><header uri="..." id="..." /></messageheaders>` > **Note:** Esendex uses XML for both request and response bodies. Use `System.Xml.Linq` — do not add an XML serialisation package. ## Options ```csharp public sealed class EsendexOptions { public required string Username { get; init; } public required string Password { get; init; } public required string AccountReference { get; init; } public string? From { get; init; } } ``` ## Tests to add - `tests/SmsBridge.ProviderTests/EsendexResponseMapperTests.cs` - `tests/SmsBridge.ProviderTests/EsendexProviderTests.cs` ## Acceptance Criteria - [ ] Provider sends via Esendex REST API using `IHttpClientFactory` - [ ] Request is XML (`Content-Type: application/xml`) - [ ] Response mapper parses XML and extracts the message header `id` - [ ] Transient failures set `IsTransientFailure = true` - [ ] `UseEsendex()` registers the provider in DI - [ ] All tests pass — `dotnet test` - [ ] `dotnet build` has 0 warnings
Activity