stock

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

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.

Jump to

Keyboard shortcuts

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