-
Notifications
You must be signed in to change notification settings - Fork 9
/
AlibabaLstVendingGoodsSaveAPIRequest.go
54 lines (45 loc) · 1.53 KB
/
AlibabaLstVendingGoodsSaveAPIRequest.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
package lstvending
import (
"net/url"
"github.com/bububa/opentaobao/model"
)
// AlibabaLstVendingGoodsSaveAPIRequest 自动售卖机商品回传 API请求
// alibaba.lst.vending.goods.save
//
// 零售通自动售卖机商品数据回流。
type AlibabaLstVendingGoodsSaveAPIRequest struct {
model.Params
// 商品信息
_goodsDTOList []VendingGoodsDto
}
// NewAlibabaLstVendingGoodsSaveRequest 初始化AlibabaLstVendingGoodsSaveAPIRequest对象
func NewAlibabaLstVendingGoodsSaveRequest() *AlibabaLstVendingGoodsSaveAPIRequest {
return &AlibabaLstVendingGoodsSaveAPIRequest{
Params: model.NewParams(),
}
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r AlibabaLstVendingGoodsSaveAPIRequest) GetApiMethodName() string {
return "alibaba.lst.vending.goods.save"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r AlibabaLstVendingGoodsSaveAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r AlibabaLstVendingGoodsSaveAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetGoodsDTOList is GoodsDTOList Setter
// 商品信息
func (r *AlibabaLstVendingGoodsSaveAPIRequest) SetGoodsDTOList(_goodsDTOList []VendingGoodsDto) error {
r._goodsDTOList = _goodsDTOList
r.Set("goods_d_t_o_list", _goodsDTOList)
return nil
}
// GetGoodsDTOList GoodsDTOList Getter
func (r AlibabaLstVendingGoodsSaveAPIRequest) GetGoodsDTOList() []VendingGoodsDto {
return r._goodsDTOList
}