public class CardApi extends Object
构造器和说明 |
---|
CardApi() |
限定符和类型 | 方法和说明 |
---|---|
static ApiResult |
create(String jsonStr)
创建会员卡接口
|
static ApiResult |
createLandingPage(String jsonStr)
创建货架接口
|
static ApiResult |
createQrcode(String jsonStr)
创建二维码接口
|
static ApiResult |
delete(String cardId)
删除卡券接口
|
static ApiResult |
get(String cardId)
查看卡券详情
|
static ApiResult |
getBatch(int offset,
int count)
批量查询卡券列表
|
static ApiResult |
getBatch(int offset,
int count,
List<String> statusList)
批量查询卡券列表
|
static ApiResult |
gethtmlMpnews(String cardId)
图文消息群发卡券
|
static ApiResult |
getUserCardList(String openid)
获取用户已领取卡券接口
|
static ApiResult |
getUserCardList(String openid,
String cardId)
获取用户已领取卡券接口
|
static ApiResult |
modifystock(String cardId,
int stockValue)
修改库存接口
|
static ApiResult |
setPaycell(String cardId,
boolean isOpen)
设置买单接口
|
static ApiResult |
setSelfconsumecell(String cardId,
boolean isOpen)
设置自助核销接口
|
static ApiResult |
setSelfconsumecell(String cardId,
boolean isOpen,
boolean needVerifyCod,
boolean needRemarkAmount)
设置自助核销接口
|
static ApiResult |
setTestWhiteList(String jsonStr)
设置测试白名单
|
static ApiResult |
unavailableByCard(String cardId,
String reason)
设置卡券失效接口,自定义code卡券的请求。
|
static ApiResult |
unavailableByCode(String code,
String reason)
设置卡券失效接口,自定义卡券的请求
|
static ApiResult |
update(String jsonStr)
更改卡券信息接口
|
public static ApiResult createQrcode(String jsonStr)
jsonStr
- JSON数据public static ApiResult createLandingPage(String jsonStr)
jsonStr
- JSON数据public static ApiResult gethtmlMpnews(String cardId)
cardId
- 必填 否 卡券ID。public static ApiResult setTestWhiteList(String jsonStr)
jsonStr
- JSON数据public static ApiResult setPaycell(String cardId, boolean isOpen)
cardId
- 卡券IDisOpen
- 是否开启买单功能,填true/falsepublic static ApiResult setSelfconsumecell(String cardId, boolean isOpen)
cardId
- 卡券IDisOpen
- 是否开启买单功能,填true/falsepublic static ApiResult setSelfconsumecell(String cardId, boolean isOpen, boolean needVerifyCod, boolean needRemarkAmount)
cardId
- 卡券IDisOpen
- 是否开启买单功能,填true/falseneedVerifyCod
- 用户核销时是否需要输入验证码,填true/false,默认为falseneedRemarkAmount
- 用户核销时是否需要备注核销金额,填true/false,默认为falsepublic static ApiResult getUserCardList(String openid)
openid
- 是 string(64) 需要查询的用户openidpublic static ApiResult getUserCardList(String openid, String cardId)
openid
- 是 string(64) 需要查询的用户openidcardId
- 否 string(32) 卡券ID。不填写时默认查询当前appid下的卡券。public static ApiResult getBatch(int offset, int count)
offset
- 查询卡列表的起始偏移量,从0开始,即offset: 5是指从从列表里的第六个开始读取。count
- 需要查询的卡片的数量(数量最大50)。public static ApiResult getBatch(int offset, int count, List<String> statusList)
offset
- 查询卡列表的起始偏移量,从0开始,即offset: 5是指从从列表里的第六个开始读取。count
- 需要查询的卡片的数量(数量最大50)。statusList
- 支持开发者拉出指定状态的卡券列表“CARD_STATUS_NOT_VERIFY”,待审核;“CARD_STATUS_VERIFY_FAIL”,审核失败;“CARD_STATUS_VERIFY_OK”,通过审核;“CARD_STATUS_DELETE”,卡券被商户删除;“CARD_STATUS_DISPATCH”在公众平台投放过的卡券;public static ApiResult modifystock(String cardId, int stockValue)
cardId
- 卡券IDstockValue
- 增减的库存数量 负数为减,正数为增加,0不增不减。public static ApiResult unavailableByCode(String code, String reason)
code
- 设置失效的Code码。reason
- 用户发生退款 失效理由Copyright © 2017. All rights reserved.