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

com.seejoke.wechat.entity.TemplateSender Maven / Gradle / Ivy

package com.seejoke.wechat.entity;

import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;

import java.io.IOException;

public class TemplateSender {

	private String touser;
	private String template_id;
	private String url;
	private Object data;
	public String getTouser() {
		return touser;
	}
	public void setTouser(String touser) {
		this.touser = touser;
	}
	public String getTemplate_id() {
		return template_id;
	}
	public void setTemplate_id(String template_id) {
		this.template_id = template_id;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}
	@Override
	public String toString() {
		return "TemplateSender [touser=" + touser + ", template_id=" + template_id + ", url=" + url + ", data=" + data
				+ "]";
	}
	
	public String toJson() throws JsonGenerationException, JsonMappingException, IOException {
		ObjectMapper mapper = new ObjectMapper();
		return mapper.writeValueAsString(this);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy