-
Notifications
You must be signed in to change notification settings - Fork 7
/
橱窗-下架橱窗商品.go
executable file
·49 lines (40 loc) · 1.04 KB
/
橱窗-下架橱窗商品.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package apis
import (
"encoding/json"
)
// 下架橱窗商品
// 文档:https://developers.weixin.qq.com/doc/channels/API/windowproduct/off.html
type ReqWindowProductOff struct {
Appid string `json:"appid"`
ProductID string `json:"product_id"`
}
var _ bodyer = ReqWindowProductOff{}
func (x ReqWindowProductOff) intoBody() ([]byte, error) {
result, err := json.Marshal(x)
if err != nil {
return nil, err
}
return result, nil
}
type RespWindowProductOff struct {
CommonResp
}
var _ bodyer = RespWindowProductOff{}
func (x RespWindowProductOff) intoBody() ([]byte, error) {
result, err := json.Marshal(x)
if err != nil {
return nil, err
}
return result, nil
}
func (c *ApiClient) ExecWindowProductOff(req ReqWindowProductOff) (RespWindowProductOff, error) {
var resp RespWindowProductOff
err := c.executeWXApiPost("/channels/ec/window/product/off", req, &resp, true)
if err != nil {
return RespWindowProductOff{}, err
}
if bizErr := resp.TryIntoErr(); bizErr != nil {
return RespWindowProductOff{}, bizErr
}
return resp, nil
}