code

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Consume

func Consume(clt *core.Client, id *CardItemIdentifier) (cardId, openId string, err error)

核销Code接口.

func Decrypt

func Decrypt(clt *core.Client, encryptCode string) (code string, err error)

Code解码接口

func Unavailable

func Unavailable(clt *core.Client, id *CardItemIdentifier) (err error)

设置卡券失效接口.

func Update

func Update(clt *core.Client, id *CardItemIdentifier, newCode string) (err error)

更改Code接口.

Types

type CardItem

type CardItem struct {
	Code   string `json:"code"`   // 卡券的Code码
	OpenId string `json:"openid"` // 用户openid
	Card   struct {
		CardId    string `json:"card_id"`    // 卡券ID
		BeginTime int64  `json:"begin_time"` // 起始使用时间
		EndTime   int64  `json:"end_time"`   // 结束时间
	} `json:"card"`
}

某一张特定卡券的信息

func Get

func Get(clt *core.Client, id *CardItemIdentifier) (info *CardItem, err error)

查询code.

type CardItemIdentifier

type CardItemIdentifier struct {
	Code   string `json:"code"`              // 卡券的Code码
	CardId string `json:"card_id,omitempty"` // 卡券ID。创建卡券时use_custom_code填写true时必填。非自定义Code不必填写。
}

某一张特定卡券的标识

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL