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

me.chanjar.weixin.cp.bean.messagebuilder.TextCardBuilder Maven / Gradle / Ivy

There is a newer version: 4.6.7.B
Show newest version
package me.chanjar.weixin.cp.bean.messagebuilder;

import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.cp.bean.message.WxCpMessage;

/**
 * 
 * 文本卡片消息Builder
 * 用法: WxCustomMessage m = WxCustomMessage.TEXTCARD().title(...)....toUser(...).build();
 * Created by Binary Wang on 2017-7-2.
 * 
* * @author Binary Wang */ public class TextCardBuilder extends BaseBuilder { private String title; private String description; private String url; private String btnTxt; public TextCardBuilder() { this.msgType = WxConsts.KefuMsgType.TEXTCARD; } public TextCardBuilder title(String title) { this.title = title; return this; } public TextCardBuilder description(String description) { this.description = description; return this; } public TextCardBuilder url(String url) { this.url = url; return this; } public TextCardBuilder btnTxt(String btnTxt) { this.btnTxt = btnTxt; return this; } @Override public WxCpMessage build() { WxCpMessage m = super.build(); m.setTitle(this.title); m.setDescription(this.description); m.setUrl(this.url); m.setBtnTxt(this.btnTxt); return m; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy