feat: add BroadcastCancelAsync method

Merged
DI
3mo ago
+73-0

Summary

  • Adds IResend.BroadcastCancelAsync(broadcastId), calling POST /broadcasts/:id/cancel to cancel a queued or scheduled broadcast, mirroring EmailCancelAsync's shape (no body).
  • Adds the resend broadcast cancel <id> CLI subcommand, matching the existing broadcast delete/broadcast send commands.
  • Adds a matching route to the fake Resend.ApiServer test server and a BroadcastCancel test in ResendClientTests.

Part of the broadcast cancel rollout: resend/resend-monorepo#8126, resend/resend-openapi#85, resend/resend-node#1059, resend/resend-docs#1722, resend/resend-go#144, resend/resend-java#122, resend/resend-php#135, resend/resend-python#250, resend/resend-ruby#216, resend/resend-rust#91.

Test plan

  • dotnet test tests/Resend.Tests โ€” 8/8 broadcast tests passing, including new BroadcastCancel
  • dotnet build resend-dotnet.sln -warnaserror:CS1591 (full 18-project solution, including CLI) โ€” clean

๐Ÿค– Generated with Claude Code


Summary by cubic

Adds broadcast cancel support so users can stop a queued or scheduled broadcast before it sends. Includes a new client method and a matching CLI command.

  • New Features
    • Added IResend.BroadcastCancelAsync(broadcastId) calling POST /broadcasts/:id/cancel (no body), mirroring EmailCancelAsync.
    • Added CLI command: resend broadcast cancel <id>.
    • Added fake server route and a BroadcastCancel test.