-
Notifications
You must be signed in to change notification settings - Fork 9
/
CainiaoGlobalHandoverPdfGetAPIRequest.go
142 lines (121 loc) · 4.1 KB
/
CainiaoGlobalHandoverPdfGetAPIRequest.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
package cainiaohandover
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// CainiaoGlobalHandoverPdfGetAPIRequest 获取面单PDF文件数据 API请求
// cainiao.global.handover.pdf.get
//
// 返回指定大包面单的PDF文件数据
type CainiaoGlobalHandoverPdfGetAPIRequest struct {
model.Params
// 客户端名称,ISV:ISV-ISV英文或拼音名称、商家ERP:SELLER-商家英文或拼音名称
_client string
// 多语言
_locale string
// 用户信息
_userInfo *UserInfoDto
// 大包编号id
_handoverContentId int64
// 打印数据类型,1:面单、4:发货标签、512:交接清单
_type int64
}
// NewCainiaoGlobalHandoverPdfGetRequest 初始化CainiaoGlobalHandoverPdfGetAPIRequest对象
func NewCainiaoGlobalHandoverPdfGetRequest() *CainiaoGlobalHandoverPdfGetAPIRequest {
return &CainiaoGlobalHandoverPdfGetAPIRequest{
Params: model.NewParams(5),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *CainiaoGlobalHandoverPdfGetAPIRequest) Reset() {
r._client = ""
r._locale = ""
r._userInfo = nil
r._handoverContentId = 0
r._type = 0
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r CainiaoGlobalHandoverPdfGetAPIRequest) GetApiMethodName() string {
return "cainiao.global.handover.pdf.get"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r CainiaoGlobalHandoverPdfGetAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r CainiaoGlobalHandoverPdfGetAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetClient is Client Setter
// 客户端名称,ISV:ISV-ISV英文或拼音名称、商家ERP:SELLER-商家英文或拼音名称
func (r *CainiaoGlobalHandoverPdfGetAPIRequest) SetClient(_client string) error {
r._client = _client
r.Set("client", _client)
return nil
}
// GetClient Client Getter
func (r CainiaoGlobalHandoverPdfGetAPIRequest) GetClient() string {
return r._client
}
// SetLocale is Locale Setter
// 多语言
func (r *CainiaoGlobalHandoverPdfGetAPIRequest) SetLocale(_locale string) error {
r._locale = _locale
r.Set("locale", _locale)
return nil
}
// GetLocale Locale Getter
func (r CainiaoGlobalHandoverPdfGetAPIRequest) GetLocale() string {
return r._locale
}
// SetUserInfo is UserInfo Setter
// 用户信息
func (r *CainiaoGlobalHandoverPdfGetAPIRequest) SetUserInfo(_userInfo *UserInfoDto) error {
r._userInfo = _userInfo
r.Set("user_info", _userInfo)
return nil
}
// GetUserInfo UserInfo Getter
func (r CainiaoGlobalHandoverPdfGetAPIRequest) GetUserInfo() *UserInfoDto {
return r._userInfo
}
// SetHandoverContentId is HandoverContentId Setter
// 大包编号id
func (r *CainiaoGlobalHandoverPdfGetAPIRequest) SetHandoverContentId(_handoverContentId int64) error {
r._handoverContentId = _handoverContentId
r.Set("handover_content_id", _handoverContentId)
return nil
}
// GetHandoverContentId HandoverContentId Getter
func (r CainiaoGlobalHandoverPdfGetAPIRequest) GetHandoverContentId() int64 {
return r._handoverContentId
}
// SetType is Type Setter
// 打印数据类型,1:面单、4:发货标签、512:交接清单
func (r *CainiaoGlobalHandoverPdfGetAPIRequest) SetType(_type int64) error {
r._type = _type
r.Set("type", _type)
return nil
}
// GetType Type Getter
func (r CainiaoGlobalHandoverPdfGetAPIRequest) GetType() int64 {
return r._type
}
var poolCainiaoGlobalHandoverPdfGetAPIRequest = sync.Pool{
New: func() any {
return NewCainiaoGlobalHandoverPdfGetRequest()
},
}
// GetCainiaoGlobalHandoverPdfGetRequest 从 sync.Pool 获取 CainiaoGlobalHandoverPdfGetAPIRequest
func GetCainiaoGlobalHandoverPdfGetAPIRequest() *CainiaoGlobalHandoverPdfGetAPIRequest {
return poolCainiaoGlobalHandoverPdfGetAPIRequest.Get().(*CainiaoGlobalHandoverPdfGetAPIRequest)
}
// ReleaseCainiaoGlobalHandoverPdfGetAPIRequest 将 CainiaoGlobalHandoverPdfGetAPIRequest 放入 sync.Pool
func ReleaseCainiaoGlobalHandoverPdfGetAPIRequest(v *CainiaoGlobalHandoverPdfGetAPIRequest) {
v.Reset()
poolCainiaoGlobalHandoverPdfGetAPIRequest.Put(v)
}