-
Notifications
You must be signed in to change notification settings - Fork 9
/
CainiaoEndpointLockerTopWithholdQueryAPIRequest.go
110 lines (93 loc) · 3.76 KB
/
CainiaoEndpointLockerTopWithholdQueryAPIRequest.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 cainiaolocker
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// CainiaoEndpointLockerTopWithholdQueryAPIRequest 查询能否代扣 API请求
// cainiao.endpoint.locker.top.withhold.query
//
// 查询是否有代扣欠款,是否签署代扣协议。
type CainiaoEndpointLockerTopWithholdQueryAPIRequest struct {
model.Params
// 柜子公司编码
_companyCode string
// 开放用户Id
_openUserId string
// 柜子业务:0-取件业务,1-寄件业务,2-派样业务,3-小件员约柜(在约期内仅能使用一次)4-小件员租柜(在约期内可反复使用)
_orderType int64
}
// NewCainiaoEndpointLockerTopWithholdQueryRequest 初始化CainiaoEndpointLockerTopWithholdQueryAPIRequest对象
func NewCainiaoEndpointLockerTopWithholdQueryRequest() *CainiaoEndpointLockerTopWithholdQueryAPIRequest {
return &CainiaoEndpointLockerTopWithholdQueryAPIRequest{
Params: model.NewParams(3),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *CainiaoEndpointLockerTopWithholdQueryAPIRequest) Reset() {
r._companyCode = ""
r._openUserId = ""
r._orderType = 0
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r CainiaoEndpointLockerTopWithholdQueryAPIRequest) GetApiMethodName() string {
return "cainiao.endpoint.locker.top.withhold.query"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r CainiaoEndpointLockerTopWithholdQueryAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r CainiaoEndpointLockerTopWithholdQueryAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetCompanyCode is CompanyCode Setter
// 柜子公司编码
func (r *CainiaoEndpointLockerTopWithholdQueryAPIRequest) SetCompanyCode(_companyCode string) error {
r._companyCode = _companyCode
r.Set("company_code", _companyCode)
return nil
}
// GetCompanyCode CompanyCode Getter
func (r CainiaoEndpointLockerTopWithholdQueryAPIRequest) GetCompanyCode() string {
return r._companyCode
}
// SetOpenUserId is OpenUserId Setter
// 开放用户Id
func (r *CainiaoEndpointLockerTopWithholdQueryAPIRequest) SetOpenUserId(_openUserId string) error {
r._openUserId = _openUserId
r.Set("open_user_id", _openUserId)
return nil
}
// GetOpenUserId OpenUserId Getter
func (r CainiaoEndpointLockerTopWithholdQueryAPIRequest) GetOpenUserId() string {
return r._openUserId
}
// SetOrderType is OrderType Setter
// 柜子业务:0-取件业务,1-寄件业务,2-派样业务,3-小件员约柜(在约期内仅能使用一次)4-小件员租柜(在约期内可反复使用)
func (r *CainiaoEndpointLockerTopWithholdQueryAPIRequest) SetOrderType(_orderType int64) error {
r._orderType = _orderType
r.Set("order_type", _orderType)
return nil
}
// GetOrderType OrderType Getter
func (r CainiaoEndpointLockerTopWithholdQueryAPIRequest) GetOrderType() int64 {
return r._orderType
}
var poolCainiaoEndpointLockerTopWithholdQueryAPIRequest = sync.Pool{
New: func() any {
return NewCainiaoEndpointLockerTopWithholdQueryRequest()
},
}
// GetCainiaoEndpointLockerTopWithholdQueryRequest 从 sync.Pool 获取 CainiaoEndpointLockerTopWithholdQueryAPIRequest
func GetCainiaoEndpointLockerTopWithholdQueryAPIRequest() *CainiaoEndpointLockerTopWithholdQueryAPIRequest {
return poolCainiaoEndpointLockerTopWithholdQueryAPIRequest.Get().(*CainiaoEndpointLockerTopWithholdQueryAPIRequest)
}
// ReleaseCainiaoEndpointLockerTopWithholdQueryAPIRequest 将 CainiaoEndpointLockerTopWithholdQueryAPIRequest 放入 sync.Pool
func ReleaseCainiaoEndpointLockerTopWithholdQueryAPIRequest(v *CainiaoEndpointLockerTopWithholdQueryAPIRequest) {
v.Reset()
poolCainiaoEndpointLockerTopWithholdQueryAPIRequest.Put(v)
}