-
Notifications
You must be signed in to change notification settings - Fork 12
/
TaobaoAlitripAxinTransPayImgUploadAPIRequest.go
94 lines (79 loc) · 3.23 KB
/
TaobaoAlitripAxinTransPayImgUploadAPIRequest.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 axintrade
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// TaobaoAlitripAxinTransPayImgUploadAPIRequest 上传图片到支付宝图片空间接口 API请求
// taobao.alitrip.axin.trans.pay.img.upload
//
// 阿信供销平台-上传图片到支付宝图片空间接口
type TaobaoAlitripAxinTransPayImgUploadAPIRequest struct {
model.Params
// 上传图片到支付宝图片空间接口入参
_axinPayImgUploadDTO *AxinPayImgUploadDto
// 图片字节流
_imgContents *model.File
}
// NewTaobaoAlitripAxinTransPayImgUploadRequest 初始化TaobaoAlitripAxinTransPayImgUploadAPIRequest对象
func NewTaobaoAlitripAxinTransPayImgUploadRequest() *TaobaoAlitripAxinTransPayImgUploadAPIRequest {
return &TaobaoAlitripAxinTransPayImgUploadAPIRequest{
Params: model.NewParams(2),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *TaobaoAlitripAxinTransPayImgUploadAPIRequest) Reset() {
r._axinPayImgUploadDTO = nil
r._imgContents = nil
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r TaobaoAlitripAxinTransPayImgUploadAPIRequest) GetApiMethodName() string {
return "taobao.alitrip.axin.trans.pay.img.upload"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r TaobaoAlitripAxinTransPayImgUploadAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r TaobaoAlitripAxinTransPayImgUploadAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetAxinPayImgUploadDTO is AxinPayImgUploadDTO Setter
// 上传图片到支付宝图片空间接口入参
func (r *TaobaoAlitripAxinTransPayImgUploadAPIRequest) SetAxinPayImgUploadDTO(_axinPayImgUploadDTO *AxinPayImgUploadDto) error {
r._axinPayImgUploadDTO = _axinPayImgUploadDTO
r.Set("axin_pay_img_upload_d_t_o", _axinPayImgUploadDTO)
return nil
}
// GetAxinPayImgUploadDTO AxinPayImgUploadDTO Getter
func (r TaobaoAlitripAxinTransPayImgUploadAPIRequest) GetAxinPayImgUploadDTO() *AxinPayImgUploadDto {
return r._axinPayImgUploadDTO
}
// SetImgContents is ImgContents Setter
// 图片字节流
func (r *TaobaoAlitripAxinTransPayImgUploadAPIRequest) SetImgContents(_imgContents *model.File) error {
r._imgContents = _imgContents
r.Set("img_contents", _imgContents)
return nil
}
// GetImgContents ImgContents Getter
func (r TaobaoAlitripAxinTransPayImgUploadAPIRequest) GetImgContents() *model.File {
return r._imgContents
}
var poolTaobaoAlitripAxinTransPayImgUploadAPIRequest = sync.Pool{
New: func() any {
return NewTaobaoAlitripAxinTransPayImgUploadRequest()
},
}
// GetTaobaoAlitripAxinTransPayImgUploadRequest 从 sync.Pool 获取 TaobaoAlitripAxinTransPayImgUploadAPIRequest
func GetTaobaoAlitripAxinTransPayImgUploadAPIRequest() *TaobaoAlitripAxinTransPayImgUploadAPIRequest {
return poolTaobaoAlitripAxinTransPayImgUploadAPIRequest.Get().(*TaobaoAlitripAxinTransPayImgUploadAPIRequest)
}
// ReleaseTaobaoAlitripAxinTransPayImgUploadAPIRequest 将 TaobaoAlitripAxinTransPayImgUploadAPIRequest 放入 sync.Pool
func ReleaseTaobaoAlitripAxinTransPayImgUploadAPIRequest(v *TaobaoAlitripAxinTransPayImgUploadAPIRequest) {
v.Reset()
poolTaobaoAlitripAxinTransPayImgUploadAPIRequest.Put(v)
}