feat: add broadcasts.cancel() method

Merged
DI
2mo ago
+74-0

Summary

  • Adds Broadcasts.cancel(id), calling POST /broadcasts/:id/cancel to cancel a queued or scheduled broadcast.
  • Mirrors Emails.cancel()'s request shape (empty-string body, same content type).
  • Adds CancelBroadcastResponseSuccess model (id + object).

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.

Test plan

  • Added testCancelBroadcast_Success following the existing mock-IHttpClient pattern used by testDeleteBroadcast_Success
  • Could not run ./gradlew test locally (no JDK available in this environment) โ€” relying on CI to verify compilation and test pass

๐Ÿค– Generated with Claude Code


Summary by cubic

Adds Broadcasts.cancel(id) to cancel queued or scheduled broadcasts via POST /broadcasts/:id/cancel with an empty JSON body, mirroring Emails.cancel().

  • New Features
    • Added CancelBroadcastResponseSuccess (id, object) and testCancelBroadcast_Success.
    • Added JavaDoc for cancel() and CancelBroadcastResponseSuccess; removed an unused test helper.