-
Notifications
You must be signed in to change notification settings - Fork 9
/
TmallServicecenterIdentifytaskCreateAPIRequest.go
110 lines (93 loc) · 3.41 KB
/
TmallServicecenterIdentifytaskCreateAPIRequest.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
109
110
package tmallservice
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// TmallServicecenterIdentifytaskCreateAPIRequest 服务商创建核销单 API请求
// tmall.servicecenter.identifytask.create
//
// 服务商调用该接口进行创建核销单操作
type TmallServicecenterIdentifytaskCreateAPIRequest struct {
model.Params
// 工单列表
_workcardIds []int64
// 服务商自定义的外部核销单id
_outerId string
// 是否改派
_reassign bool
}
// NewTmallServicecenterIdentifytaskCreateRequest 初始化TmallServicecenterIdentifytaskCreateAPIRequest对象
func NewTmallServicecenterIdentifytaskCreateRequest() *TmallServicecenterIdentifytaskCreateAPIRequest {
return &TmallServicecenterIdentifytaskCreateAPIRequest{
Params: model.NewParams(3),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *TmallServicecenterIdentifytaskCreateAPIRequest) Reset() {
r._workcardIds = r._workcardIds[:0]
r._outerId = ""
r._reassign = false
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r TmallServicecenterIdentifytaskCreateAPIRequest) GetApiMethodName() string {
return "tmall.servicecenter.identifytask.create"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r TmallServicecenterIdentifytaskCreateAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r TmallServicecenterIdentifytaskCreateAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetWorkcardIds is WorkcardIds Setter
// 工单列表
func (r *TmallServicecenterIdentifytaskCreateAPIRequest) SetWorkcardIds(_workcardIds []int64) error {
r._workcardIds = _workcardIds
r.Set("workcard_ids", _workcardIds)
return nil
}
// GetWorkcardIds WorkcardIds Getter
func (r TmallServicecenterIdentifytaskCreateAPIRequest) GetWorkcardIds() []int64 {
return r._workcardIds
}
// SetOuterId is OuterId Setter
// 服务商自定义的外部核销单id
func (r *TmallServicecenterIdentifytaskCreateAPIRequest) SetOuterId(_outerId string) error {
r._outerId = _outerId
r.Set("outer_id", _outerId)
return nil
}
// GetOuterId OuterId Getter
func (r TmallServicecenterIdentifytaskCreateAPIRequest) GetOuterId() string {
return r._outerId
}
// SetReassign is Reassign Setter
// 是否改派
func (r *TmallServicecenterIdentifytaskCreateAPIRequest) SetReassign(_reassign bool) error {
r._reassign = _reassign
r.Set("reassign", _reassign)
return nil
}
// GetReassign Reassign Getter
func (r TmallServicecenterIdentifytaskCreateAPIRequest) GetReassign() bool {
return r._reassign
}
var poolTmallServicecenterIdentifytaskCreateAPIRequest = sync.Pool{
New: func() any {
return NewTmallServicecenterIdentifytaskCreateRequest()
},
}
// GetTmallServicecenterIdentifytaskCreateRequest 从 sync.Pool 获取 TmallServicecenterIdentifytaskCreateAPIRequest
func GetTmallServicecenterIdentifytaskCreateAPIRequest() *TmallServicecenterIdentifytaskCreateAPIRequest {
return poolTmallServicecenterIdentifytaskCreateAPIRequest.Get().(*TmallServicecenterIdentifytaskCreateAPIRequest)
}
// ReleaseTmallServicecenterIdentifytaskCreateAPIRequest 将 TmallServicecenterIdentifytaskCreateAPIRequest 放入 sync.Pool
func ReleaseTmallServicecenterIdentifytaskCreateAPIRequest(v *TmallServicecenterIdentifytaskCreateAPIRequest) {
v.Reset()
poolTmallServicecenterIdentifytaskCreateAPIRequest.Put(v)
}