-
Notifications
You must be signed in to change notification settings - Fork 12
/
TaobaoAlitripTravelItemBaseModifyAPIRequest.go
201 lines (173 loc) · 6.64 KB
/
TaobaoAlitripTravelItemBaseModifyAPIRequest.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
package travel
import (
"net/url"
"github.com/bububa/opentaobao/model"
)
// TaobaoAlitripTravelItemBaseModifyAPIRequest 【API3.0】度假线路商品编辑接口 API请求
// taobao.alitrip.travel.item.base.modify
//
// 旅行度假新商品基本信息修改接口 第三版。提供商家通过TOP API方式修改商品除sku外的基本信息。
type TaobaoAlitripTravelItemBaseModifyAPIRequest struct {
model.Params
// 详细行程描述结构
_itineraries []PontusTravelItemItineraryInfo
// 预定规则结构
_bookingRules []PontusTravelBookingRuleInfo
// 可选,支持清空商品某些字段内容。多个待清空字段名之间以英文逗号分隔。目前支持清除以下字段内容:seller_cids表示删除关联的店铺类目id
_fieldsToClean string
// 跟团游商品相关信息
_groupItemExt *PontusTravelGroupItemExt
// 商品基本信息
_baseInfo *PontusTravelItemBaseInfo
// 商品id
_itemId int64
// 退款规则结构
_refundInfo *PontusTravelItemRefundInfo
// 自由行商品相关信息
_freedomItemExt *PontusTravelFreedomItemExt
// 商品的销售属性相关信息
_salesInfo *PontusTravelItemSaleInfo
// 邮轮商品相关扩展信息
_cruiseItemExt *CruiseItemExt
// 同城活动商品相关扩展信息
_tcwlItemExt *TcwlItemExt
}
// NewTaobaoAlitripTravelItemBaseModifyRequest 初始化TaobaoAlitripTravelItemBaseModifyAPIRequest对象
func NewTaobaoAlitripTravelItemBaseModifyRequest() *TaobaoAlitripTravelItemBaseModifyAPIRequest {
return &TaobaoAlitripTravelItemBaseModifyAPIRequest{
Params: model.NewParams(),
}
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r TaobaoAlitripTravelItemBaseModifyAPIRequest) GetApiMethodName() string {
return "taobao.alitrip.travel.item.base.modify"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r TaobaoAlitripTravelItemBaseModifyAPIRequest) GetApiParams() url.Values {
params := url.Values{}
for k, v := range r.GetRawParams() {
params.Set(k, v.String())
}
return params
}
// SetItineraries is Itineraries Setter
// 详细行程描述结构
func (r *TaobaoAlitripTravelItemBaseModifyAPIRequest) SetItineraries(_itineraries []PontusTravelItemItineraryInfo) error {
r._itineraries = _itineraries
r.Set("itineraries", _itineraries)
return nil
}
// GetItineraries Itineraries Getter
func (r TaobaoAlitripTravelItemBaseModifyAPIRequest) GetItineraries() []PontusTravelItemItineraryInfo {
return r._itineraries
}
// SetBookingRules is BookingRules Setter
// 预定规则结构
func (r *TaobaoAlitripTravelItemBaseModifyAPIRequest) SetBookingRules(_bookingRules []PontusTravelBookingRuleInfo) error {
r._bookingRules = _bookingRules
r.Set("booking_rules", _bookingRules)
return nil
}
// GetBookingRules BookingRules Getter
func (r TaobaoAlitripTravelItemBaseModifyAPIRequest) GetBookingRules() []PontusTravelBookingRuleInfo {
return r._bookingRules
}
// SetFieldsToClean is FieldsToClean Setter
// 可选,支持清空商品某些字段内容。多个待清空字段名之间以英文逗号分隔。目前支持清除以下字段内容:seller_cids表示删除关联的店铺类目id
func (r *TaobaoAlitripTravelItemBaseModifyAPIRequest) SetFieldsToClean(_fieldsToClean string) error {
r._fieldsToClean = _fieldsToClean
r.Set("fields_to_clean", _fieldsToClean)
return nil
}
// GetFieldsToClean FieldsToClean Getter
func (r TaobaoAlitripTravelItemBaseModifyAPIRequest) GetFieldsToClean() string {
return r._fieldsToClean
}
// SetGroupItemExt is GroupItemExt Setter
// 跟团游商品相关信息
func (r *TaobaoAlitripTravelItemBaseModifyAPIRequest) SetGroupItemExt(_groupItemExt *PontusTravelGroupItemExt) error {
r._groupItemExt = _groupItemExt
r.Set("group_item_ext", _groupItemExt)
return nil
}
// GetGroupItemExt GroupItemExt Getter
func (r TaobaoAlitripTravelItemBaseModifyAPIRequest) GetGroupItemExt() *PontusTravelGroupItemExt {
return r._groupItemExt
}
// SetBaseInfo is BaseInfo Setter
// 商品基本信息
func (r *TaobaoAlitripTravelItemBaseModifyAPIRequest) SetBaseInfo(_baseInfo *PontusTravelItemBaseInfo) error {
r._baseInfo = _baseInfo
r.Set("base_info", _baseInfo)
return nil
}
// GetBaseInfo BaseInfo Getter
func (r TaobaoAlitripTravelItemBaseModifyAPIRequest) GetBaseInfo() *PontusTravelItemBaseInfo {
return r._baseInfo
}
// SetItemId is ItemId Setter
// 商品id
func (r *TaobaoAlitripTravelItemBaseModifyAPIRequest) SetItemId(_itemId int64) error {
r._itemId = _itemId
r.Set("item_id", _itemId)
return nil
}
// GetItemId ItemId Getter
func (r TaobaoAlitripTravelItemBaseModifyAPIRequest) GetItemId() int64 {
return r._itemId
}
// SetRefundInfo is RefundInfo Setter
// 退款规则结构
func (r *TaobaoAlitripTravelItemBaseModifyAPIRequest) SetRefundInfo(_refundInfo *PontusTravelItemRefundInfo) error {
r._refundInfo = _refundInfo
r.Set("refund_info", _refundInfo)
return nil
}
// GetRefundInfo RefundInfo Getter
func (r TaobaoAlitripTravelItemBaseModifyAPIRequest) GetRefundInfo() *PontusTravelItemRefundInfo {
return r._refundInfo
}
// SetFreedomItemExt is FreedomItemExt Setter
// 自由行商品相关信息
func (r *TaobaoAlitripTravelItemBaseModifyAPIRequest) SetFreedomItemExt(_freedomItemExt *PontusTravelFreedomItemExt) error {
r._freedomItemExt = _freedomItemExt
r.Set("freedom_item_ext", _freedomItemExt)
return nil
}
// GetFreedomItemExt FreedomItemExt Getter
func (r TaobaoAlitripTravelItemBaseModifyAPIRequest) GetFreedomItemExt() *PontusTravelFreedomItemExt {
return r._freedomItemExt
}
// SetSalesInfo is SalesInfo Setter
// 商品的销售属性相关信息
func (r *TaobaoAlitripTravelItemBaseModifyAPIRequest) SetSalesInfo(_salesInfo *PontusTravelItemSaleInfo) error {
r._salesInfo = _salesInfo
r.Set("sales_info", _salesInfo)
return nil
}
// GetSalesInfo SalesInfo Getter
func (r TaobaoAlitripTravelItemBaseModifyAPIRequest) GetSalesInfo() *PontusTravelItemSaleInfo {
return r._salesInfo
}
// SetCruiseItemExt is CruiseItemExt Setter
// 邮轮商品相关扩展信息
func (r *TaobaoAlitripTravelItemBaseModifyAPIRequest) SetCruiseItemExt(_cruiseItemExt *CruiseItemExt) error {
r._cruiseItemExt = _cruiseItemExt
r.Set("cruise_item_ext", _cruiseItemExt)
return nil
}
// GetCruiseItemExt CruiseItemExt Getter
func (r TaobaoAlitripTravelItemBaseModifyAPIRequest) GetCruiseItemExt() *CruiseItemExt {
return r._cruiseItemExt
}
// SetTcwlItemExt is TcwlItemExt Setter
// 同城活动商品相关扩展信息
func (r *TaobaoAlitripTravelItemBaseModifyAPIRequest) SetTcwlItemExt(_tcwlItemExt *TcwlItemExt) error {
r._tcwlItemExt = _tcwlItemExt
r.Set("tcwl_item_ext", _tcwlItemExt)
return nil
}
// GetTcwlItemExt TcwlItemExt Getter
func (r TaobaoAlitripTravelItemBaseModifyAPIRequest) GetTcwlItemExt() *TcwlItemExt {
return r._tcwlItemExt
}