Skip to content

feat: add broadcasts.cancel() method - #122

Merged
dielduarte merged 2 commits into
mainfrom
broadcasts-cancel
Aug 12, 2026
Merged

feat: add broadcasts.cancel() method#122
dielduarte merged 2 commits into
mainfrom
broadcasts-cancel

Conversation

@dielduarte

@dielduarte dielduarte commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

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.

Written for commit 38ddedb. Summary will update on new commits.

Review in cubic

Cancels a queued or scheduled broadcast via POST /broadcasts/:id/cancel,
mirroring emails.cancel()'s request shape (empty body).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/test/java/com/resend/services/util/BroadcastsUtil.java Outdated
Comment thread src/main/java/com/resend/services/broadcasts/Broadcasts.java
Required for the release signing process. Also removes the unused
cancelBroadcastResponseSuccess() test helper (cubic).

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 3 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Adds a new public SDK method (cancel) that exposes a new API endpoint, expanding the library's contract. Requires human sign-off to approve the new public API surface and its response model.

Re-trigger cubic

@dielduarte
dielduarte merged commit 944db9d into main Aug 12, 2026
6 checks passed
@dielduarte
dielduarte deleted the broadcasts-cancel branch August 12, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linear-synced PR has been synced to Linear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants