panda.tube.sendgrid.Personalization Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of panda-tube-sendgrid Show documentation
Show all versions of panda-tube-sendgrid Show documentation
Panda Tube SendGrid is a Web Service API client for SendGrid.
package panda.tube.sendgrid;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Personalization {
public List to;
public List cc;
public List bcc;
public String subject;
public Map headers;
public Map substitutions;
public Map custom_args;
public Map dynamic_template_data;
public Long send_at;
public void addTo(Email email) {
if (to == null) {
to = new ArrayList();
}
to.add(email);
}
public void addCc(Email email) {
if (cc == null) {
cc = new ArrayList();
}
cc.add(email);
}
public void addBcc(Email email) {
if (bcc == null) {
bcc = new ArrayList();
}
bcc.add(email);
}
public void addHeader(String key, String value) {
if (headers == null) {
headers = new HashMap();
}
headers.put(key, value);
}
public void addSubstitution(String key, String value) {
if (substitutions == null) {
substitutions = new HashMap();
}
substitutions.put(key, value);
}
public void addCustomArg(String key, String value) {
if (custom_args == null) {
custom_args = new HashMap();
}
custom_args.put(key, value);
}
public void addDynamicTemplateData(String key, Object value) {
if (dynamic_template_data == null) {
dynamic_template_data = new HashMap();
}
dynamic_template_data.put(key, value);
}
}