Skip to content

feat: implement Sendchamp SMS provider (Nigeria) #55

Open

Description

@teesofttech

Summary

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

Sendchamp is a Nigeria-based communication API provider with SMS, WhatsApp, email, and voice APIs. This fills an additional Nigerian provider gap beyond Termii, SmartSMSSolutions, BulkSMSNigeria, and MultiTexter.

Official docs:

Files to create

  • src/SmsBridge/Providers/Sendchamp/SendchampSmsProvider.cs
  • src/SmsBridge/Providers/Sendchamp/SendchampSmsRequestMapper.cs
  • src/SmsBridge/Providers/Sendchamp/SendchampSmsResponseMapper.cs
  • src/SmsBridge/Options/SendchampOptions.cs
  • Register UseSendchamp() in src/SmsBridge/DependencyInjection/SmsBridgeProviderBuilder.cs
  • Add HttpClientNames.Sendchamp in src/SmsBridge/Internal/Http/HttpClientNames.cs
  • Add SmsProviderType.Sendchamp to the enum

Sendchamp API Details

  • API docs are hosted through Sendchamp ReadMe and GitBook.
  • Auth uses an API key/token in the request headers.
  • SMS sending supports sender, recipient, and message body fields.
  • Confirm the current base URL and send endpoint from the ReadMe API reference during implementation.

Options

public sealed class SendchampOptions
{
    public required string ApiKey { get; init; }
    public required string Sender { get; init; }
}

Implementation Notes

  • Re-check the current Sendchamp SMS endpoint immediately before implementation because the API reference is hosted in a dynamic ReadMe site.
  • Keep Sendchamp isolated from other Nigerian providers; do not reuse Termii request/response models.
  • Avoid logging the API key or raw authorization header.
  • Map provider message id/reference fields to SmsSendResult.ProviderMessageId.

Tests to add

  • tests/SmsBridge.ProviderTests/SendchampResponseMapperTests.cs
  • tests/SmsBridge.ProviderTests/SendchampProviderTests.cs

Acceptance Criteria

  • Provider sends SMS using Sendchamp's current SMS API endpoint and IHttpClientFactory
  • Provider authenticates with configured API key/token
  • Request mapper emits sender, recipient, and message body
  • Response mapper maps provider message id/reference to SmsSendResult.ProviderMessageId
  • Provider maps Sendchamp errors to failed SmsSendResult
  • Transient HTTP failures set IsTransientFailure = true
  • UseSendchamp() 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