Package com.foxinmy.weixin4j.model.card
Class CouponBaseInfo.Builder
- java.lang.Object
-
- com.foxinmy.weixin4j.model.card.CouponBaseInfo.Builder
-
- Enclosing class:
- CouponBaseInfo
public static final class CouponBaseInfo.Builder extends Object
卡券基础信息构造器- Since:
- JDK 1.6
- Author:
- jinyu(foxinmy@gmail.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CouponBaseInfo.Builder.CardActiveType
卡券使用时间类型
-
Constructor Summary
Constructors Constructor Description Builder()
默认永久有效
-
Method Summary
-
-
-
Method Detail
-
customAppBrandPass
public CouponBaseInfo.Builder customAppBrandPass(String pass)
-
centerAppBrandUserName
public CouponBaseInfo.Builder centerAppBrandUserName(String name)
-
centerAppBrandPass
public CouponBaseInfo.Builder centerAppBrandPass(String pass)
-
customAppBrandUserName
public CouponBaseInfo.Builder customAppBrandUserName(String name)
-
promotionAppBrandUserName
public CouponBaseInfo.Builder promotionAppBrandUserName(String userName)
-
promotionAppBrandPass
public CouponBaseInfo.Builder promotionAppBrandPass(String pass)
-
maxGiveFriendTimes
public CouponBaseInfo.Builder maxGiveFriendTimes(int times)
-
price
public CouponBaseInfo.Builder price(int price)
-
logoUrl
public CouponBaseInfo.Builder logoUrl(String logoUrl)
设置商户logo- Parameters:
logoUrl
- 卡券的商户logo,建议像素为300*300。- Returns:
-
brandName
public CouponBaseInfo.Builder brandName(String brandName)
设置商户名字- Parameters:
brandName
- 商户名字,字数上限为12个汉字- Returns:
-
title
public CouponBaseInfo.Builder title(String title)
设置卡券名- Parameters:
title
- 卡券名,字数上限为9个汉字。(建议涵盖卡券属性、服务及金额)。- Returns:
-
codeType
public CouponBaseInfo.Builder codeType(CardCodeType codeType)
设置码型- Parameters:
codeType
- 码型- Returns:
-
cardColor
public CouponBaseInfo.Builder cardColor(CardColor cardColor)
设置卡券颜色- Parameters:
cardColor
- 卡券颜色- Returns:
-
notice
public CouponBaseInfo.Builder notice(String notice)
设置卡券使用提醒- Parameters:
notice
- 卡券使用提醒,字数上限为16个汉字。- Returns:
-
description
public CouponBaseInfo.Builder description(String description)
设置卡券使用说明- Parameters:
description
- 卡券使用说明,字数上限为1024个汉字。- Returns:
-
quantity
public CouponBaseInfo.Builder quantity(int quantity)
设置卡券库存的数量- Parameters:
quantity
- 卡券库存的数量,上限为100000000。- Returns:
-
activeAt
public CouponBaseInfo.Builder activeAt(Date beginTime, Date endTime)
设置卡券在某个时间范围有效- Parameters:
beginTime
- 表示起用时间endTime
- 表示结束时间,建议设置为截止日期的23:59:59过期- Returns:
-
activeAt
public CouponBaseInfo.Builder activeAt(int days, int beginDays, Date endTime)
设置卡券在领取多少天后有效- Parameters:
days
- 表示自领取后多少天内有效,不支持填写0。beginDays
- 表示自领取后多少天开始生效,领取后当天生效填写0。(单位为天)endTime
- 表示卡券统一过期时间,建议设置为截止日期的23:59:59过期。(东八区时间,单位为秒),设置了days卡券, 当时间达到end_timestamp时卡券统一过期- Returns:
-
activeAt
public CouponBaseInfo.Builder activeAt(int days, int beginDays)
设置卡券在领取多少天后有效- Parameters:
days
- 表示自领取后多少天内有效,不支持填写0。beginDays
- 表示自领取后多少天开始生效,领取后当天生效填写0。(单位为天)- Returns:
-
useCustomCode
public CouponBaseInfo.Builder useCustomCode(boolean useCustomCode)
设置是否自定义Code码- Parameters:
useCustomCode
- 填写true或false,默认为false。- Returns:
-
bindOpenId
public CouponBaseInfo.Builder bindOpenId(boolean bindOpenId)
设置是否指定用户领取,填写true或false- Parameters:
bindOpenId
- 默认为false。通常指定特殊用户群体 投放卡券或防止刷券时选择指定用户领取。- Returns:
-
servicePhone
public CouponBaseInfo.Builder servicePhone(String servicePhone)
设置客服电话- Parameters:
servicePhone
- 客服电话- Returns:
-
locationIds
public CouponBaseInfo.Builder locationIds(String... locationIds)
设置门店位置poiid。具备线下门店 的商户为必填- Parameters:
locationIds
- 门店列表- Returns:
-
centerTitle
public CouponBaseInfo.Builder centerTitle(String centerTitle)
设置卡券顶部居中的按钮,仅在卡券状态正常(可以核销)时显示- Parameters:
centerTitle
- 按钮文字- Returns:
-
centerUrl
public CouponBaseInfo.Builder centerUrl(String centerUrl)
设置顶部居中的url ,仅在卡券状态正常(可以核销)时显示- Parameters:
centerUrl
- 按钮链接- Returns:
-
centerSubTitle
public CouponBaseInfo.Builder centerSubTitle(String centerSubTitle)
设置显示在入口下方的提示语 ,仅在卡券状态正常(可以核销)时显示。- Parameters:
centerSubTitle
- 入口下方的提示语- Returns:
-
customTitle
public CouponBaseInfo.Builder customTitle(String customTitle)
设置自定义跳转外链的入口名字- Parameters:
customTitle
- 自定义外链入口文字- Returns:
-
customUrl
public CouponBaseInfo.Builder customUrl(String customUrl)
设置自定义跳转的URL- Parameters:
customUrl
- 跳转链接- Returns:
-
customSubTitle
public CouponBaseInfo.Builder customSubTitle(String customSubTitle)
设置显示在入口右侧的提示语- Parameters:
customSubTitle
- 入口右侧的提示语- Returns:
-
promotionTitle
public CouponBaseInfo.Builder promotionTitle(String promotionTitle)
设置营销场景的自定义入口名称- Parameters:
promotionTitle
- 自定义入口文字- Returns:
-
promotionUrl
public CouponBaseInfo.Builder promotionUrl(String promotionUrl)
设置入口跳转外链的地址链接。- Parameters:
promotionUrl
- 入口跳转链接- Returns:
-
promotionSubTitle
public CouponBaseInfo.Builder promotionSubTitle(String promotionSubTitle)
设置显示在营销入口右侧的提示语- Parameters:
promotionSubTitle
- 入口右侧的提示语- Returns:
-
source
public CouponBaseInfo.Builder source(String source)
设置第三方来源名,例如同程旅游、大众点评。- Parameters:
source
- 来源- Returns:
-
limitNum
public CouponBaseInfo.Builder limitNum(int limitNum)
设置每人可领券的数量限制,不填写默认为50。- Parameters:
limitNum
- 限制数量- Returns:
-
canShare
public CouponBaseInfo.Builder canShare(boolean canShare)
设置卡券领取页面是否可分享。- Parameters:
canShare
- 是否可以分享- Returns:
-
canGiveFriend
public CouponBaseInfo.Builder canGiveFriend(boolean canGiveFriend)
设置卡券是否可转赠- Parameters:
canGiveFriend
- 是否可以转赠- Returns:
-
needPushOnView
public CouponBaseInfo.Builder needPushOnView(boolean needPushOnView)
-
build
public CouponBaseInfo build()
返回卡券的基础信息- Returns:
- 卡券基础信息
-
-