GET
GET = 'get'
Class AbstractAPI.
$http : \EasyWeChat\Core\Http
Http instance.
$accessToken : \EasyWeChat\Core\AccessToken
The request token.
$cache : \Doctrine\Common\Cache\Cache
Cache.
__construct(\EasyWeChat\Core\AccessToken $accessToken)
Constructor.
\EasyWeChat\Core\AccessToken | $accessToken |
getHttp() : \EasyWeChat\Core\Http
Return the http instance.
setHttp(\EasyWeChat\Core\Http $http) : $this
Set the http instance.
\EasyWeChat\Core\Http | $http |
getAccessToken() : \EasyWeChat\Core\AccessToken
Return the current accessToken.
setAccessToken(\EasyWeChat\Core\AccessToken $accessToken) : $this
Set the request token.
\EasyWeChat\Core\AccessToken | $accessToken |
parseJSON(string $method, array $args) : \EasyWeChat\Support\Collection
Parse JSON from response and check error.
string | $method | |
array | $args |
| null
getColors() : \EasyWeChat\Support\Collection
获取卡券颜色.
create(string $cardType = 'member_card', array $baseInfo = array(), array $especial = array(), array $advancedInfo = array()) : \EasyWeChat\Support\Collection
创建卡券.
string | $cardType | |
array | $baseInfo | |
array | $especial | |
array | $advancedInfo |
QRCode(array $cards = array()) : \EasyWeChat\Support\Collection
创建二维码.
array | $cards |
createLandingPage(string $banner, string $pageTitle, boolean $canShare, string $scene, array $cardList) : \EasyWeChat\Support\Collection
创建货架接口.
string | $banner | |
string | $pageTitle | |
boolean | $canShare | |
string | $scene | [SCENE_NEAR_BY 附近,SCENE_MENU 自定义菜单,SCENE_QRCODE 二维码,SCENE_ARTICLE 公众号文章, SCENE_H5 h5页面,SCENE_IVR 自动回复,SCENE_CARD_CUSTOM_CELL 卡券自定义cell] |
array | $cardList |
deposit(string $cardId, array $code) : \EasyWeChat\Support\Collection
导入code接口.
string | $cardId | |
array | $code |
getDepositedCount(string $cardId) : \EasyWeChat\Support\Collection
查询导入code数目.
string | $cardId |
checkCode(string $cardId, array $code) : \EasyWeChat\Support\Collection
核查code接口.
string | $cardId | |
array | $code |
getCode(string $code, boolean $checkConsume, string $cardId) : \EasyWeChat\Support\Collection
查询Code接口.
string | $code | |
boolean | $checkConsume | |
string | $cardId |
consume(string $code, string $cardId = null) : \EasyWeChat\Support\Collection
核销Code接口.
string | $code | |
string | $cardId |
decryptCode(string $encryptedCode) : \EasyWeChat\Support\Collection
Code解码接口.
string | $encryptedCode |
getHtml(string $cardId) : \EasyWeChat\Support\Collection
图文消息群发卡券.
string | $cardId |
setTestWhitelist(array $openids) : \EasyWeChat\Support\Collection
设置测试白名单.
array | $openids |
setTestWhitelistByUsername(array $usernames) : \EasyWeChat\Support\Collection
设置测试白名单(by username).
array | $usernames |
getUserCards(string $openid, string $cardId = '') : \EasyWeChat\Support\Collection
获取用户已领取卡券接口.
string | $openid | |
string | $cardId |
getCard(string $cardId) : \EasyWeChat\Support\Collection
查看卡券详情.
string | $cardId |
lists(integer $offset, integer $count = 10, string $statusList = 'CARD_STATUS_VERIFY_OK') : \EasyWeChat\Support\Collection
批量查询卡列表.
integer | $offset | |
integer | $count | |
string | $statusList |
update(string $cardId, string $type, array $baseInfo = array(), array $especial = array()) : \EasyWeChat\Support\Collection
更改卡券信息接口 and 设置跟随推荐接口.
string | $cardId | |
string | $type | |
array | $baseInfo | |
array | $especial |
setPayCell(string $cardId, boolean $isOpen = true) : \EasyWeChat\Support\Collection
设置微信买单接口.
设置买单的 card_id 必须已经配置了门店,否则会报错.
string | $cardId | |
boolean | $isOpen |
increaseStock(string $cardId, integer $amount) : \EasyWeChat\Support\Collection
增加库存.
string | $cardId | |
integer | $amount |
reduceStock(string $cardId, integer $amount) : \EasyWeChat\Support\Collection
减少库存.
string | $cardId | |
integer | $amount |
updateCode(string $code, string $newCode, array $cardId = array()) : \EasyWeChat\Support\Collection
更改Code接口.
string | $code | |
string | $newCode | |
array | $cardId |
delete(string $cardId) : \EasyWeChat\Support\Collection
删除卡券接口.
string | $cardId |
disable(string $code, string $cardId = '') : \EasyWeChat\Support\Collection
设置卡券失效.
string | $code | |
string | $cardId |
activate(array $info = array(), $cardType = 'member_card') : \EasyWeChat\Support\Collection
会员卡接口激活.
array | $info | |
$cardType |
activateUserForm(string $cardId, array $requiredForm = array(), array $optionalForm = array()) : \EasyWeChat\Support\Collection
设置开卡字段接口.
string | $cardId | |
array | $requiredForm | |
array | $optionalForm |
getMemberCardUser(string $cardId, string $code) : \EasyWeChat\Support\Collection
拉取会员信息接口.
string | $cardId | |
string | $code |
updateMemberCardUser(array $params = array()) : \EasyWeChat\Support\Collection
更新会员信息.
array | $params |
updateGeneralCardUser(array $params = array()) : \EasyWeChat\Support\Collection
更新通用员信息.
array | $params |
createSubMerchant(array $info = array()) : \EasyWeChat\Support\Collection
添加子商户.
array | $info |
updateSubMerchant(integer $merchantId, array $info = array()) : \EasyWeChat\Support\Collection
更新子商户.
integer | $merchantId | |
array | $info |
getSubMerchant(integer $merchantId) : \EasyWeChat\Support\Collection
获取子商户信息.
integer | $merchantId |
listSubMerchants(integer $beginId, integer $limit = 50, string $status = 'CHECKING') : \EasyWeChat\Support\Collection
批量获取子商户信息.
integer | $beginId | |
integer | $limit | |
string | $status |
getCategories() : \EasyWeChat\Support\Collection
卡券开放类目查询接口.
setCache(\Doctrine\Common\Cache\Cache $cache) : $this
Set cache manager.
\Doctrine\Common\Cache\Cache | $cache |
getCache() : \Doctrine\Common\Cache\Cache
Return cache manager.
setUrl(string $url) : \EasyWeChat\Card\Card
Set current url.
string | $url |
updateStock(string $cardId, integer $amount, string $action = 'increase') : \EasyWeChat\Support\Collection
修改库存接口.
string | $cardId | |
integer | $amount | |
string | $action |