-
Notifications
You must be signed in to change notification settings - Fork 9
/
TmallMcTaskChargeLaunchAPIRequest.go
108 lines (96 loc) · 2.63 KB
/
TmallMcTaskChargeLaunchAPIRequest.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
package mc
import (
"net/url"
"github.com/bububa/opentaobao/model"
)
/*
云码充电宝投放链路 API请求
tmall.mc.task.charge.launch
云码充电宝投放链路,用于判断用户是否有匹配的投放计划
*/
type TmallMcTaskChargeLaunchAPIRequest struct {
model.Params
// 外部设备编码
_outerCode string
// 渠道ID
_channelId string
// 支付宝openID
_alipayOpenId string
// urlID
_urlId string
// 服务商附加url参数
_extra string
}
// 初始化TmallMcTaskChargeLaunchAPIRequest对象
func NewTmallMcTaskChargeLaunchRequest() *TmallMcTaskChargeLaunchAPIRequest{
return &TmallMcTaskChargeLaunchAPIRequest{
Params: model.NewParams(),
}
}
// IRequest interface 方法, 获取Api method
func (r TmallMcTaskChargeLaunchAPIRequest) GetApiMethodName() string {
return "tmall.mc.task.charge.launch"
}
// IRequest interface 方法, 获取API参数
func (r TmallMcTaskChargeLaunchAPIRequest) GetApiParams() url.Values {
params := url.Values{}
for k, v := range r.GetRawParams() {
params.Set(k, v.String())
}
return params
}
// OuterCode Setter
// 外部设备编码
func (r *TmallMcTaskChargeLaunchAPIRequest) SetOuterCode(_outerCode string) error {
r._outerCode = _outerCode
r.Set("outer_code", _outerCode)
return nil
}
// OuterCode Getter
func (r TmallMcTaskChargeLaunchAPIRequest) GetOuterCode() string {
return r._outerCode
}
// ChannelId Setter
// 渠道ID
func (r *TmallMcTaskChargeLaunchAPIRequest) SetChannelId(_channelId string) error {
r._channelId = _channelId
r.Set("channel_id", _channelId)
return nil
}
// ChannelId Getter
func (r TmallMcTaskChargeLaunchAPIRequest) GetChannelId() string {
return r._channelId
}
// AlipayOpenId Setter
// 支付宝openID
func (r *TmallMcTaskChargeLaunchAPIRequest) SetAlipayOpenId(_alipayOpenId string) error {
r._alipayOpenId = _alipayOpenId
r.Set("alipay_open_id", _alipayOpenId)
return nil
}
// AlipayOpenId Getter
func (r TmallMcTaskChargeLaunchAPIRequest) GetAlipayOpenId() string {
return r._alipayOpenId
}
// UrlId Setter
// urlID
func (r *TmallMcTaskChargeLaunchAPIRequest) SetUrlId(_urlId string) error {
r._urlId = _urlId
r.Set("url_id", _urlId)
return nil
}
// UrlId Getter
func (r TmallMcTaskChargeLaunchAPIRequest) GetUrlId() string {
return r._urlId
}
// Extra Setter
// 服务商附加url参数
func (r *TmallMcTaskChargeLaunchAPIRequest) SetExtra(_extra string) error {
r._extra = _extra
r.Set("extra", _extra)
return nil
}
// Extra Getter
func (r TmallMcTaskChargeLaunchAPIRequest) GetExtra() string {
return r._extra
}