All Downloads are FREE. Search and download functionalities are using the official Maven repository.

panda.tube.sendgrid.Personalization Maven / Gradle / Ivy

There is a newer version: 1.8.0
Show newest version
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);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy