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
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<connection>scm:git:git@github.com:messagebird/java-rest-api.git</connection>
<developerConnection>scm:git:git@github.com:messagebird/java-rest-api.git</developerConnection>
<url>git@github.com:messagebird/java-rest-api.git</url>
<tag>HEAD</tag>
<tag>HEAD</tag>
</scm>

<profiles>
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/com/messagebird/objects/ListBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class ListBase<T> {
private Integer limit;
private Integer totalCount;
private Links links;
private List<T> items;

public ListBase() {
}
Expand All @@ -28,7 +29,6 @@ public String toString() {
'}';
}

private List<T> items;

public Integer getOffset() {
return offset;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ public class MessageReference {

private String href;
private int totalCount;
private String lastMessageId;

public String getHREF() {
return href;
Expand All @@ -21,11 +22,16 @@ public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}

public String getLastMessageId() {
return lastMessageId;
}

@Override
public String toString() {
return "MessageReference{" +
"href='" + href + '\'' +
", totalCount=" + totalCount +
", lastMessageId='" + lastMessageId + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public class ConversationChannel {

private String id;
private String name;
// See: ConversationPlatformConstants
private String platformId;
private ConversationChannelStatus status;
private Date createdDatetime;
private Date updatedDatetime;
Expand Down Expand Up @@ -55,11 +57,20 @@ public void setUpdatedDatetime(final Date updatedDatetime) {
this.updatedDatetime = updatedDatetime;
}

public String getPlatformId() {
return platformId;
}

public void setPlatformId(String platformId) {
this.platformId = platformId;
}

@Override
public String toString() {
return "ConversationChannel{" +
"id='" + id + '\'' +
", name='" + name + '\'' +
", platformId=" + platformId +
", status=" + status +
", createdDatetime=" + createdDatetime +
", updatedDatetime=" + updatedDatetime +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class ConversationContent {
private ConversationContentHsm hsm;
private ConversationContentMedia image;
private ConversationContentLocation location;
private ConversationContentEmail email;
private String text;
private ConversationContentMedia video;

Expand Down Expand Up @@ -70,6 +71,14 @@ public void setVideo(ConversationContentMedia video) {
this.video = video;
}

public ConversationContentEmail getEmail() {
return email;
}

public void setEmail(ConversationContentEmail email) {
this.email = email;
}

@Override
public String toString() {
return "ConversationContent{" +
Expand All @@ -78,6 +87,7 @@ public String toString() {
", hsm=" + hsm +
", image=" + image +
", location=" + location +
", email=" + email +
", text='" + text + '\'' +
", video=" + video +
'}';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
package com.messagebird.objects.conversations;

import java.util.List;
import java.util.Map;

public class ConversationContentEmail {
private String id;
private ConversationEmailRecipient from;
private List<ConversationEmailRecipient> to;
private String subject;
private ConversationEmailContent content;
private String replyTo;
private String returnPath;
private Map<String, String> headers;
private ConversationEmailTracking tracking;
private boolean performSubstitutions;
private List<ConversationEmailAttachment> attachments;
private List<ConversationEmailInlineImage> inlineImages;

public String getId() {
return id;
}

public void setId(String id) {
this.id = id;
}

public ConversationEmailRecipient getFrom() {
return from;
}

public void setFrom(ConversationEmailRecipient from) {
this.from = from;
}

public List<ConversationEmailRecipient> getTo() {
return to;
}

public void setTo(List<ConversationEmailRecipient> to) {
this.to = to;
}

public String getSubject() {
return subject;
}

public void setSubject(String subject) {
this.subject = subject;
}

public ConversationEmailContent getContent() {
return content;
}

public void setContent(ConversationEmailContent content) {
this.content = content;
}

public String getReplyTo() {
return replyTo;
}

public void setReplyTo(String replyTo) {
this.replyTo = replyTo;
}

public String getReturnPath() {
return returnPath;
}

public void setReturnPath(String returnPath) {
this.returnPath = returnPath;
}

public Map<String, String> getHeaders() {
return headers;
}

public void setHeaders(Map<String, String> headers) {
this.headers = headers;
}

public ConversationEmailTracking getTracking() {
return tracking;
}

public void setTracking(ConversationEmailTracking tracking) {
this.tracking = tracking;
}

public boolean isPerformSubstitutions() {
return performSubstitutions;
}

public void setPerformSubstitutions(boolean performSubstitutions) {
this.performSubstitutions = performSubstitutions;
}

public List<ConversationEmailAttachment> getAttachments() {
return attachments;
}

public void setAttachments(List<ConversationEmailAttachment> attachments) {
this.attachments = attachments;
}

public List<ConversationEmailInlineImage> getInlineImages() {
return inlineImages;
}

public void setInlineImages(List<ConversationEmailInlineImage> inlineImages) {
this.inlineImages = inlineImages;
}

@Override
public String toString() {
return "ConversationContentEmail{" +
"id='" + id + '\'' +
", from=" + from +
", to=" + to +
", subject='" + subject + '\'' +
", content=" + content +
", replyTo='" + replyTo + '\'' +
", returnPath='" + returnPath + '\'' +
", headers=" + headers +
", tracking=" + tracking +
", performSubstitutions=" + performSubstitutions +
", attachments=" + attachments +
", inlineImages=" + inlineImages +
'}';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package com.messagebird.objects.conversations;

public class ConversationEmailAttachment {
private String id;
private String name;
private String type;
private String URL;
private String length;

public String getId() {
return id;
}

public void setId(String id) {
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public String getURL() {
return URL;
}

public void setURL(String URL) {
this.URL = URL;
}

public String getLength() {
return length;
}

public void setLength(String length) {
this.length = length;
}

@Override
public String toString() {
return "ConversationEmailAttachment{" +
"id='" + id + '\'' +
", name='" + name + '\'' +
", type='" + type + '\'' +
", URL='" + URL + '\'' +
", length='" + length + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.messagebird.objects.conversations;

public class ConversationEmailContent {
private String html;
private String text;

public String getHtml() {
return html;
}

public void setHtml(String html) {
this.html = html;
}

public String getText() {
return text;
}

public void setText(String text) {
this.text = text;
}

@Override
public String toString() {
return "ConversationEmailContent{" +
"html='" + html + '\'' +
", text='" + text + '\'' +
'}';
}
}
Loading