-
Notifications
You must be signed in to change notification settings - Fork 9
/
AlitripTravelGereralproductUpdateAPIRequest.go
111 lines (95 loc) · 3.87 KB
/
AlitripTravelGereralproductUpdateAPIRequest.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
package travel
import (
"net/url"
"github.com/bububa/opentaobao/model"
)
// AlitripTravelGereralproductUpdateAPIRequest 通用类目产品发布编辑 API请求
// alitrip.travel.gereralproduct.update
//
// 提供给飞猪供销平台供应商发布编辑通用类目产品的API
type AlitripTravelGereralproductUpdateAPIRequest struct {
model.Params
// 必填,预定规则结构。示例: [{ "rule_type": "fee_excluded", "rule_desc": "费用包含描述"},{ "rule_type": "fee_included", "rule_desc": "费用不含描述"},{ "rule_type": "order_info", "rule_desc": "预定须知描述"}]
_bookingRules []BookingRuleInfo
// 更新sku信息,仅限日历商品使用
_dateSkuInfoList []DateSkuInfo
// 产品基本信息
_baseInfo *GeneralProductBaseInfo
// 退款规则结构
_refundInfo *ItemRefundInfo
// 产品销售信息
_productSaleInfo *ProductSaleInfo
}
// NewAlitripTravelGereralproductUpdateRequest 初始化AlitripTravelGereralproductUpdateAPIRequest对象
func NewAlitripTravelGereralproductUpdateRequest() *AlitripTravelGereralproductUpdateAPIRequest {
return &AlitripTravelGereralproductUpdateAPIRequest{
Params: model.NewParams(),
}
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r AlitripTravelGereralproductUpdateAPIRequest) GetApiMethodName() string {
return "alitrip.travel.gereralproduct.update"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r AlitripTravelGereralproductUpdateAPIRequest) GetApiParams() url.Values {
params := url.Values{}
for k, v := range r.GetRawParams() {
params.Set(k, v.String())
}
return params
}
// SetBookingRules is BookingRules Setter
// 必填,预定规则结构。示例: [{ "rule_type": "fee_excluded", "rule_desc": "费用包含描述"},{ "rule_type": "fee_included", "rule_desc": "费用不含描述"},{ "rule_type": "order_info", "rule_desc": "预定须知描述"}]
func (r *AlitripTravelGereralproductUpdateAPIRequest) SetBookingRules(_bookingRules []BookingRuleInfo) error {
r._bookingRules = _bookingRules
r.Set("booking_rules", _bookingRules)
return nil
}
// GetBookingRules BookingRules Getter
func (r AlitripTravelGereralproductUpdateAPIRequest) GetBookingRules() []BookingRuleInfo {
return r._bookingRules
}
// SetDateSkuInfoList is DateSkuInfoList Setter
// 更新sku信息,仅限日历商品使用
func (r *AlitripTravelGereralproductUpdateAPIRequest) SetDateSkuInfoList(_dateSkuInfoList []DateSkuInfo) error {
r._dateSkuInfoList = _dateSkuInfoList
r.Set("date_sku_info_list", _dateSkuInfoList)
return nil
}
// GetDateSkuInfoList DateSkuInfoList Getter
func (r AlitripTravelGereralproductUpdateAPIRequest) GetDateSkuInfoList() []DateSkuInfo {
return r._dateSkuInfoList
}
// SetBaseInfo is BaseInfo Setter
// 产品基本信息
func (r *AlitripTravelGereralproductUpdateAPIRequest) SetBaseInfo(_baseInfo *GeneralProductBaseInfo) error {
r._baseInfo = _baseInfo
r.Set("base_info", _baseInfo)
return nil
}
// GetBaseInfo BaseInfo Getter
func (r AlitripTravelGereralproductUpdateAPIRequest) GetBaseInfo() *GeneralProductBaseInfo {
return r._baseInfo
}
// SetRefundInfo is RefundInfo Setter
// 退款规则结构
func (r *AlitripTravelGereralproductUpdateAPIRequest) SetRefundInfo(_refundInfo *ItemRefundInfo) error {
r._refundInfo = _refundInfo
r.Set("refund_info", _refundInfo)
return nil
}
// GetRefundInfo RefundInfo Getter
func (r AlitripTravelGereralproductUpdateAPIRequest) GetRefundInfo() *ItemRefundInfo {
return r._refundInfo
}
// SetProductSaleInfo is ProductSaleInfo Setter
// 产品销售信息
func (r *AlitripTravelGereralproductUpdateAPIRequest) SetProductSaleInfo(_productSaleInfo *ProductSaleInfo) error {
r._productSaleInfo = _productSaleInfo
r.Set("product_sale_info", _productSaleInfo)
return nil
}
// GetProductSaleInfo ProductSaleInfo Getter
func (r AlitripTravelGereralproductUpdateAPIRequest) GetProductSaleInfo() *ProductSaleInfo {
return r._productSaleInfo
}