Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public class GetBroadcastResponseSuccess extends Broadcast {
@JsonProperty("from")
private String from;

@JsonProperty("html")
private String html;

@JsonProperty("subject")
private String subject;

Expand All @@ -27,6 +30,9 @@ public class GetBroadcastResponseSuccess extends Broadcast {
@JsonProperty("preview_text")
private String previewText;

@JsonProperty("text")
private String text;

/**
* Default constructor
*/
Expand All @@ -45,9 +51,11 @@ public GetBroadcastResponseSuccess() {
* @param object Type of the object (e.g., "broadcast").
* @param name Name of the broadcast.
* @param from Sender of the broadcast.
* @param html The HTML content of the broadcast.
* @param subject Subject line of the broadcast.
* @param replyTo Reply-to address for the broadcast.
* @param previewText Preview text of the broadcast.
* @param text The plain text content of the broadcast.
*/
public GetBroadcastResponseSuccess(
String id,
Expand All @@ -59,17 +67,21 @@ public GetBroadcastResponseSuccess(
String object,
String name,
String from,
String html,
String subject,
List<String> replyTo,
String previewText
String previewText,
String text
) {
super(id, audienceId, status, createdAt, scheduledAt, sentAt);
this.object = object;
this.name = name;
this.from = from;
this.html = html;
this.subject = subject;
this.replyTo = replyTo;
this.previewText = previewText;
this.text = text;
}

/**
Expand All @@ -93,6 +105,13 @@ public String getFrom() {
return from;
}

/**
* @return The HTML content of the broadcast.
*/
public String getHtml() {
return html;
}

/**
* @return Subject line of the broadcast.
*/
Expand All @@ -113,5 +132,12 @@ public List<String> getReplyTo() {
public String getPreviewText() {
return previewText;
}

/**
* @return The plain text content of the broadcast.
*/
public String getText() {
return text;
}
}

4 changes: 3 additions & 1 deletion src/test/java/com/resend/services/util/BroadcastsUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ public static GetBroadcastResponseSuccess getBroadcastResponse() {
"broadcast",
"Announcements",
"Acme <onboarding@resend.dev>",
"<p>Hello World</p>",
"Hello World",
null,
"Check out our latest announcements"
"Check out our latest announcements",
"The plain text of the broadcast"
);
}

Expand Down