-
Notifications
You must be signed in to change notification settings - Fork 9
/
TaobaoPlaceStoreTagsUpdateRequest.go
80 lines (70 loc) · 1.95 KB
/
TaobaoPlaceStoreTagsUpdateRequest.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
package alsc
import (
"net/url"
"github.com/bububa/opentaobao/model"
)
/*
门店打标去标 API请求
taobao.place.store.tags.update
门店打标去标
*/
type TaobaoPlaceStoreTagsUpdateRequest struct {
model.Params
// 门店信息
storeUpdate *StoreUpdateTopDto
// 新增标list
addTags []int64
// 删除标list
removeTags []int64
}
// 初始化TaobaoPlaceStoreTagsUpdateRequest对象
func NewTaobaoPlaceStoreTagsUpdateRequest() *TaobaoPlaceStoreTagsUpdateRequest{
return &TaobaoPlaceStoreTagsUpdateRequest{
Params: model.NewParams(),
}
}
// IRequest interface 方法, 获取Api method
func (r TaobaoPlaceStoreTagsUpdateRequest) GetApiMethodName() string {
return "taobao.place.store.tags.update"
}
// IRequest interface 方法, 获取API参数
func (r TaobaoPlaceStoreTagsUpdateRequest) GetApiParams() url.Values {
params := url.Values{}
for k, v := range r.GetRawParams() {
params.Set(k, v.String())
}
return params
}
// StoreUpdate Setter
// 门店信息
func (r *TaobaoPlaceStoreTagsUpdateRequest) SetStoreUpdate(storeUpdate *StoreUpdateTopDto) error {
r.storeUpdate = storeUpdate
r.Set("store_update", storeUpdate)
return nil
}
// StoreUpdate Getter
func (r TaobaoPlaceStoreTagsUpdateRequest) GetStoreUpdate() *StoreUpdateTopDto {
return r.storeUpdate
}
// AddTags Setter
// 新增标list
func (r *TaobaoPlaceStoreTagsUpdateRequest) SetAddTags(addTags []int64) error {
r.addTags = addTags
r.Set("add_tags", addTags)
return nil
}
// AddTags Getter
func (r TaobaoPlaceStoreTagsUpdateRequest) GetAddTags() []int64 {
return r.addTags
}
// RemoveTags Setter
// 删除标list
func (r *TaobaoPlaceStoreTagsUpdateRequest) SetRemoveTags(removeTags []int64) error {
r.removeTags = removeTags
r.Set("remove_tags", removeTags)
return nil
}
// RemoveTags Getter
func (r TaobaoPlaceStoreTagsUpdateRequest) GetRemoveTags() []int64 {
return r.removeTags
}