Documentation ¶
Overview ¶
Package stock 微信小店/库存管理
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
增加库存
See: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html
POST https://api.weixin.qq.com/merchant/stock/add?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/stock" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := stock.Add(ctx, payload) fmt.Println(resp, err) }
Output:
func Reduce ¶
func Reduce(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
减少库存
See: https://developers.weixin.qq.com/doc/offiaccount/Instant_Stores/WeChat_Store_Interface.html
POST https://api.weixin.qq.com/merchant/stock/reduce?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/store/stock" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := stock.Reduce(ctx, payload) fmt.Println(resp, err) }
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.