-
Notifications
You must be signed in to change notification settings - Fork 12
/
TaobaoOfnSelfRecycleAuthAPIRequest.go
94 lines (79 loc) · 2.61 KB
/
TaobaoOfnSelfRecycleAuthAPIRequest.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
package trade
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// TaobaoOfnSelfRecycleAuthAPIRequest 自助回收鉴权 API请求
// taobao.ofn.self.recycle.auth
//
// 自助回收鉴权
type TaobaoOfnSelfRecycleAuthAPIRequest struct {
model.Params
// 回收单ID
_recycleOrderId string
// 开放小程序ID
_openUid string
}
// NewTaobaoOfnSelfRecycleAuthRequest 初始化TaobaoOfnSelfRecycleAuthAPIRequest对象
func NewTaobaoOfnSelfRecycleAuthRequest() *TaobaoOfnSelfRecycleAuthAPIRequest {
return &TaobaoOfnSelfRecycleAuthAPIRequest{
Params: model.NewParams(2),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *TaobaoOfnSelfRecycleAuthAPIRequest) Reset() {
r._recycleOrderId = ""
r._openUid = ""
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r TaobaoOfnSelfRecycleAuthAPIRequest) GetApiMethodName() string {
return "taobao.ofn.self.recycle.auth"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r TaobaoOfnSelfRecycleAuthAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r TaobaoOfnSelfRecycleAuthAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetRecycleOrderId is RecycleOrderId Setter
// 回收单ID
func (r *TaobaoOfnSelfRecycleAuthAPIRequest) SetRecycleOrderId(_recycleOrderId string) error {
r._recycleOrderId = _recycleOrderId
r.Set("recycle_order_id", _recycleOrderId)
return nil
}
// GetRecycleOrderId RecycleOrderId Getter
func (r TaobaoOfnSelfRecycleAuthAPIRequest) GetRecycleOrderId() string {
return r._recycleOrderId
}
// SetOpenUid is OpenUid Setter
// 开放小程序ID
func (r *TaobaoOfnSelfRecycleAuthAPIRequest) SetOpenUid(_openUid string) error {
r._openUid = _openUid
r.Set("open_uid", _openUid)
return nil
}
// GetOpenUid OpenUid Getter
func (r TaobaoOfnSelfRecycleAuthAPIRequest) GetOpenUid() string {
return r._openUid
}
var poolTaobaoOfnSelfRecycleAuthAPIRequest = sync.Pool{
New: func() any {
return NewTaobaoOfnSelfRecycleAuthRequest()
},
}
// GetTaobaoOfnSelfRecycleAuthRequest 从 sync.Pool 获取 TaobaoOfnSelfRecycleAuthAPIRequest
func GetTaobaoOfnSelfRecycleAuthAPIRequest() *TaobaoOfnSelfRecycleAuthAPIRequest {
return poolTaobaoOfnSelfRecycleAuthAPIRequest.Get().(*TaobaoOfnSelfRecycleAuthAPIRequest)
}
// ReleaseTaobaoOfnSelfRecycleAuthAPIRequest 将 TaobaoOfnSelfRecycleAuthAPIRequest 放入 sync.Pool
func ReleaseTaobaoOfnSelfRecycleAuthAPIRequest(v *TaobaoOfnSelfRecycleAuthAPIRequest) {
v.Reset()
poolTaobaoOfnSelfRecycleAuthAPIRequest.Put(v)
}