Skip to content

feat: implement Beem SMS provider (Tanzania / East Africa) #56

Open

Description

@teesofttech

Summary

Implement the Beem SMS provider inside src/SmsBridge/Providers/Beem/.

Beem is a Tanzania/East Africa communication provider with public API documentation covering SMS, two-way SMS, multicountry SMS/SMPP, OTP, reporting, and related services. This gives SMSBridge stronger East African coverage.

Official docs:

Files to create

  • src/SmsBridge/Providers/Beem/BeemSmsProvider.cs
  • src/SmsBridge/Providers/Beem/BeemSmsRequestMapper.cs
  • src/SmsBridge/Providers/Beem/BeemSmsResponseMapper.cs
  • src/SmsBridge/Options/BeemOptions.cs
  • Register UseBeem() in src/SmsBridge/DependencyInjection/SmsBridgeProviderBuilder.cs
  • Add HttpClientNames.Beem in src/SmsBridge/Internal/Http/HttpClientNames.cs
  • Add SmsProviderType.Beem to the enum

Beem API Details

  • Docs include SMS, two-way SMS, multicountry SMS/SMPP, OTP, and reporting sections.
  • Auth is API key/secret based.
  • Confirm the current send endpoint and payload from the Beem SMS docs during implementation.
  • Keep initial scope to single-recipient outbound SMS.

Options

public sealed class BeemOptions
{
    public required string ApiKey { get; init; }
    public required string SecretKey { get; init; }
    public required string SenderId { get; init; }
}

Implementation Notes

  • Use the public Beem docs to confirm whether auth is HTTP Basic, token-based, or custom header-based before coding.
  • Map the Beem request id/message id to SmsSendResult.ProviderMessageId.
  • Preserve Beem status/error details in failure messages.
  • Keep OTP and reporting outside the initial provider implementation.

Tests to add

  • tests/SmsBridge.ProviderTests/BeemResponseMapperTests.cs
  • tests/SmsBridge.ProviderTests/BeemProviderTests.cs

Acceptance Criteria

  • Provider sends SMS through Beem using IHttpClientFactory
  • Provider authenticates with configured API credentials
  • Request mapper emits sender, recipient, and message content
  • Response mapper maps provider id/reference to SmsSendResult.ProviderMessageId
  • Provider maps Beem API failures to failed SmsSendResult
  • Transient HTTP failures set IsTransientFailure = true
  • UseBeem() registers the provider in DI
  • All tests pass - dotnet test
  • dotnet build has 0 warnings

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions