-
Notifications
You must be signed in to change notification settings - Fork 9
/
TmallServicecenterWorkcardPushAPIRequest.go
158 lines (135 loc) · 4.94 KB
/
TmallServicecenterWorkcardPushAPIRequest.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
package tmallservice
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// TmallServicecenterWorkcardPushAPIRequest 推送服务工单信息 API请求
// tmall.servicecenter.workcard.push
//
// 服务商家推送工单信息到天猫。
type TmallServicecenterWorkcardPushAPIRequest struct {
model.Params
// 属性列表。使用半角分号隔开,字符串前后都需要有半角分号
_attributes string
// 描述
_desc string
// 服务预约安装时间
_serviceReserveTime string
// 服务预约安装地址。四级地址与街道地址用空格隔开
_serviceReserveAddress string
// 0=初始化, 3=授理, 10=拒绝 ,4=执行 ,5=成功,11=失败
_status string
// 淘宝交易订单号
_bizOrderId int64
}
// NewTmallServicecenterWorkcardPushRequest 初始化TmallServicecenterWorkcardPushAPIRequest对象
func NewTmallServicecenterWorkcardPushRequest() *TmallServicecenterWorkcardPushAPIRequest {
return &TmallServicecenterWorkcardPushAPIRequest{
Params: model.NewParams(6),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *TmallServicecenterWorkcardPushAPIRequest) Reset() {
r._attributes = ""
r._desc = ""
r._serviceReserveTime = ""
r._serviceReserveAddress = ""
r._status = ""
r._bizOrderId = 0
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r TmallServicecenterWorkcardPushAPIRequest) GetApiMethodName() string {
return "tmall.servicecenter.workcard.push"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r TmallServicecenterWorkcardPushAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r TmallServicecenterWorkcardPushAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetAttributes is Attributes Setter
// 属性列表。使用半角分号隔开,字符串前后都需要有半角分号
func (r *TmallServicecenterWorkcardPushAPIRequest) SetAttributes(_attributes string) error {
r._attributes = _attributes
r.Set("attributes", _attributes)
return nil
}
// GetAttributes Attributes Getter
func (r TmallServicecenterWorkcardPushAPIRequest) GetAttributes() string {
return r._attributes
}
// SetDesc is Desc Setter
// 描述
func (r *TmallServicecenterWorkcardPushAPIRequest) SetDesc(_desc string) error {
r._desc = _desc
r.Set("desc", _desc)
return nil
}
// GetDesc Desc Getter
func (r TmallServicecenterWorkcardPushAPIRequest) GetDesc() string {
return r._desc
}
// SetServiceReserveTime is ServiceReserveTime Setter
// 服务预约安装时间
func (r *TmallServicecenterWorkcardPushAPIRequest) SetServiceReserveTime(_serviceReserveTime string) error {
r._serviceReserveTime = _serviceReserveTime
r.Set("service_reserve_time", _serviceReserveTime)
return nil
}
// GetServiceReserveTime ServiceReserveTime Getter
func (r TmallServicecenterWorkcardPushAPIRequest) GetServiceReserveTime() string {
return r._serviceReserveTime
}
// SetServiceReserveAddress is ServiceReserveAddress Setter
// 服务预约安装地址。四级地址与街道地址用空格隔开
func (r *TmallServicecenterWorkcardPushAPIRequest) SetServiceReserveAddress(_serviceReserveAddress string) error {
r._serviceReserveAddress = _serviceReserveAddress
r.Set("service_reserve_address", _serviceReserveAddress)
return nil
}
// GetServiceReserveAddress ServiceReserveAddress Getter
func (r TmallServicecenterWorkcardPushAPIRequest) GetServiceReserveAddress() string {
return r._serviceReserveAddress
}
// SetStatus is Status Setter
// 0=初始化, 3=授理, 10=拒绝 ,4=执行 ,5=成功,11=失败
func (r *TmallServicecenterWorkcardPushAPIRequest) SetStatus(_status string) error {
r._status = _status
r.Set("status", _status)
return nil
}
// GetStatus Status Getter
func (r TmallServicecenterWorkcardPushAPIRequest) GetStatus() string {
return r._status
}
// SetBizOrderId is BizOrderId Setter
// 淘宝交易订单号
func (r *TmallServicecenterWorkcardPushAPIRequest) SetBizOrderId(_bizOrderId int64) error {
r._bizOrderId = _bizOrderId
r.Set("biz_order_id", _bizOrderId)
return nil
}
// GetBizOrderId BizOrderId Getter
func (r TmallServicecenterWorkcardPushAPIRequest) GetBizOrderId() int64 {
return r._bizOrderId
}
var poolTmallServicecenterWorkcardPushAPIRequest = sync.Pool{
New: func() any {
return NewTmallServicecenterWorkcardPushRequest()
},
}
// GetTmallServicecenterWorkcardPushRequest 从 sync.Pool 获取 TmallServicecenterWorkcardPushAPIRequest
func GetTmallServicecenterWorkcardPushAPIRequest() *TmallServicecenterWorkcardPushAPIRequest {
return poolTmallServicecenterWorkcardPushAPIRequest.Get().(*TmallServicecenterWorkcardPushAPIRequest)
}
// ReleaseTmallServicecenterWorkcardPushAPIRequest 将 TmallServicecenterWorkcardPushAPIRequest 放入 sync.Pool
func ReleaseTmallServicecenterWorkcardPushAPIRequest(v *TmallServicecenterWorkcardPushAPIRequest) {
v.Reset()
poolTmallServicecenterWorkcardPushAPIRequest.Put(v)
}