Documentation
¶
Index ¶
- type BatchCardList
- type BatchGetRequest
- type Card
- func (card *Card) BatchGet(req BatchGetRequest) (res BatchCardList, err error)
- func (card *Card) CreateCard(t Type, attrs util.Params) (cardID string, err error)
- func (card *Card) CreateCardQrcode(attr util.Params) (res Qrcode, err error)
- func (card *Card) DeleteCard(cardID string) (err error)
- func (card *Card) GetApplyProtocol() (c []Category, err error)
- func (card *Card) GetCard(cardID string) (res util.Params, err error)
- func (card *Card) GetColors() (colors []Colors, err error)
- func (card *Card) GetHtml(cardID string) (content string, err error)
- func (card *Card) SetActivateUserForm(cardID string, attrs util.Params) (err error)
- func (card *Card) SetWhiteListByOpenid(openids []string) (err error)
- func (card *Card) SetWhiteListByUsername(names []string) (err error)
- func (card *Card) UpdateCard(cardID string, t Type, attrs util.Params) (check bool, err error)
- type Category
- type Colors
- type Qrcode
- type Status
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchCardList ¶
type BatchCardList struct { CardIDList []string `json:"card_id_list"` TotalNum int `json:"total_num"` }
BatchCardList 批量查询卡券列表 返回结果
type BatchGetRequest ¶
type BatchGetRequest struct { Offset int `json:"offset"` Count int `json:"count"` StatusList Status `json:"status_list"` }
BatchGetRequest 批量查询卡券列表 请求参数
type Card ¶
Card 卡券
func (*Card) BatchGet ¶
func (card *Card) BatchGet(req BatchGetRequest) (res BatchCardList, err error)
BatchGet 批量查询卡券列表
func (*Card) CreateCard ¶
CreateCard 创建卡券
func (*Card) CreateCardQrcode ¶
CreateCardQrcode 创建卡券二维码
func (*Card) GetApplyProtocol ¶
GetApplyProtocol 卡券开放类目查询接口
func (*Card) SetActivateUserForm ¶
SetActivateUserForm 设置开卡字段接口
func (*Card) SetWhiteListByOpenid ¶
SetWhiteListByOpenid 通过openid设置白名单
func (*Card) SetWhiteListByUsername ¶
SetWhiteListByUsername 通过username设置白名单
type Category ¶
type Category struct { PrimaryCategoryID int64 `json:"primary_category_id"` CategoryName string `json:"category_name"` SecondaryCategory []struct { SecondaryCategoryID int64 `json:"secondary_category_id"` CategoryName string `json:"category_name"` NeedQualificationStuffs []string `json:"need_qualification_stuffs"` CanChoosePrepaidCard int64 `json:"can_choose_prepaid_card"` CanChoosePaymentCard int64 `json:"can_choose_payment_card"` } `json:"secondary_category"` }
Category 卡券类目信息
type Qrcode ¶
type Qrcode struct { Ticket string `json:"ticket"` ExpireSeconds int64 `json:"expire_seconds"` URL string `json:"url"` ShowQrcodeURL string `json:"show_qrcode_url"` }
Qrcode 卡券二维码
type Status ¶
type Status string
Status 卡券状态
const ( // StatusNotVerify 待审核 StatusNotVerify Status = "CARD_STATUS_NOT_VERIFY" // StatusVerifyFail 审核失败 StatusVerifyFail Status = "CARD_STATUS_VERIFY_FAIL" // StatusVerifyOk 审核成功 StatusVerifyOk Status = "CARD_STATUS_VERIFY_OK" // StatusDelete 卡券被商户删除 StatusDelete Status = "CARD_STATUS_DELETE" // StatusDispatch 在公众平台投放过的卡券 StatusDispatch Status = "CARD_STATUS_DISPATCH" )
type Type ¶
type Type string
Type 券类型
const ( // Groupon 团购券类型 Groupon Type = "GROUPON" // Cash 代金券类型 Cash Type = "CASH" // Discount 折扣券类型 Discount Type = "DISCOUNT" // Gift 兑换券类型 Gift Type = "GIFT" // GeneralCoupon 通用券。 GeneralCoupon Type = "GENERAL_COUPON" // MemberCard 会员卡 MemberCard Type = "MEMBER_CARD" // GeneralCard 礼品卡 GeneralCard Type = "GENERAL_CARD" )
Click to show internal directories.
Click to hide internal directories.