-
Notifications
You must be signed in to change notification settings - Fork 7
/
订单-修改订单备注.go
executable file
·49 lines (40 loc) · 1.17 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/order/merchantnotes_update.html
type ReqOrderMerchantnotesUpdate struct {
OrderId string `json:"order_id"`
MerchantNotes string `json:"merchant_notes"`
}
var _ bodyer = ReqOrderMerchantnotesUpdate{}
func (x ReqOrderMerchantnotesUpdate) intoBody() ([]byte, error) {
result, err := json.Marshal(x)
if err != nil {
return nil, err
}
return result, nil
}
type RespOrderMerchantnotesUpdate struct {
CommonResp
}
var _ bodyer = RespOrderMerchantnotesUpdate{}
func (x RespOrderMerchantnotesUpdate) intoBody() ([]byte, error) {
result, err := json.Marshal(x)
if err != nil {
return nil, err
}
return result, nil
}
func (c *ApiClient) ExecOrderMerchantnotesUpdate(req ReqOrderMerchantnotesUpdate) (RespOrderMerchantnotesUpdate, error) {
var resp RespOrderMerchantnotesUpdate
err := c.executeWXApiPost("/channels/ec/order/merchantnotes/update", req, &resp, true)
if err != nil {
return RespOrderMerchantnotesUpdate{}, err
}
if bizErr := resp.TryIntoErr(); bizErr != nil {
return RespOrderMerchantnotesUpdate{}, bizErr
}
return resp, nil
}