-
Notifications
You must be signed in to change notification settings - Fork 7
/
资金-获取资金流水列表.go
executable file
·56 lines (47 loc) · 1.39 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
50
51
52
53
54
55
56
package apis
import (
"encoding/json"
)
// 获取资金流水列表
// 文档:https://developers.weixin.qq.com/doc/channels/API/funds/getfundsflowlist.html
type ReqFundsGetfundsflowlist struct {
EndTime int `json:"end_time"`
NextKey string `json:"next_key"`
Page int `json:"page"`
PageSize int `json:"page_size"`
StartTime int `json:"start_time"`
TransactionID string `json:"transaction_id"`
}
var _ bodyer = ReqFundsGetfundsflowlist{}
func (x ReqFundsGetfundsflowlist) intoBody() ([]byte, error) {
result, err := json.Marshal(x)
if err != nil {
return nil, err
}
return result, nil
}
type RespFundsGetfundsflowlist struct {
CommonResp
FlowIds []string `json:"flow_ids"`
HasMore bool `json:"has_more"`
NextKey string `json:"next_key"`
}
var _ bodyer = RespFundsGetfundsflowlist{}
func (x RespFundsGetfundsflowlist) intoBody() ([]byte, error) {
result, err := json.Marshal(x)
if err != nil {
return nil, err
}
return result, nil
}
func (c *ApiClient) ExecFundsGetfundsflowlist(req ReqFundsGetfundsflowlist) (RespFundsGetfundsflowlist, error) {
var resp RespFundsGetfundsflowlist
err := c.executeWXApiPost("/channels/ec/funds/getfundsflowlist", req, &resp, true)
if err != nil {
return RespFundsGetfundsflowlist{}, err
}
if bizErr := resp.TryIntoErr(); bizErr != nil {
return RespFundsGetfundsflowlist{}, bizErr
}
return resp, nil
}