/
TaobaoSpecialRefundsReceiveGetAPIRequest.go
222 lines (191 loc) · 8.39 KB
/
TaobaoSpecialRefundsReceiveGetAPIRequest.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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
package tbrefund
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// TaobaoSpecialRefundsReceiveGetAPIRequest 特殊退款类型的纠纷单列表查询 API请求
// taobao.special.refunds.receive.get
//
// 特殊退款类型的纠纷单列表查询
type TaobaoSpecialRefundsReceiveGetAPIRequest struct {
model.Params
// 需要返回的字段。目前支持有:refund_id, tid, title, buyer_nick, seller_nick, total_fee, status, created, refund_fee, oid, good_status, company_name, sid, payment, reason, desc, has_good_return, modified, order_status,refund_phase
_fields []string
// 买家昵称
_buyerNick string
// 查询修改时间结束。格式: yyyy-MM-dd HH:mm:ss
_endModified string
// 查询修改时间开始。格式: yyyy-MM-dd HH:mm:ss
_startModified string
// 退款状态,默认查询所有退款状态的数据,除了默认值外每次只能查询一种状态。WAIT_SELLER_AGREE(买家已经申请退款,等待卖家同意) WAIT_BUYER_RETURN_GOODS(卖家已经同意退款,等待买家退货) WAIT_SELLER_CONFIRM_GOODS(买家已经退货,等待卖家确认收货) SELLER_REFUSE_BUYER(卖家拒绝退款) CLOSED(退款关闭) SUCCESS(退款成功)
_status string
// 交易类型列表,一次查询多种类型可用半角逗号分隔,默认同时查询guarantee_trade, auto_delivery这两种类型的数据,<a href="http://open.taobao.com/doc/detail.htm?id=102855" target="_blank">查看可选值</a>
_type string
// 买家openId
_buyerOpenUid string
// 页码。取值范围:大于零的整数; 默认值:1
_pageNo int64
// 每页条数。取值范围:大于零的整数; 默认值:40;最大值:100
_pageSize int64
// 是否启用has_next的分页方式,如果指定true,则返回的结果中不包含总记录数,但是会新增一个是否存在下一页的的字段,通过此种方式获取增量退款,接口调用成功率在原有的基础上有所提升。
_useHasNext bool
}
// NewTaobaoSpecialRefundsReceiveGetRequest 初始化TaobaoSpecialRefundsReceiveGetAPIRequest对象
func NewTaobaoSpecialRefundsReceiveGetRequest() *TaobaoSpecialRefundsReceiveGetAPIRequest {
return &TaobaoSpecialRefundsReceiveGetAPIRequest{
Params: model.NewParams(10),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *TaobaoSpecialRefundsReceiveGetAPIRequest) Reset() {
r._fields = r._fields[:0]
r._buyerNick = ""
r._endModified = ""
r._startModified = ""
r._status = ""
r._type = ""
r._buyerOpenUid = ""
r._pageNo = 0
r._pageSize = 0
r._useHasNext = false
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r TaobaoSpecialRefundsReceiveGetAPIRequest) GetApiMethodName() string {
return "taobao.special.refunds.receive.get"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r TaobaoSpecialRefundsReceiveGetAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r TaobaoSpecialRefundsReceiveGetAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetFields is Fields Setter
// 需要返回的字段。目前支持有:refund_id, tid, title, buyer_nick, seller_nick, total_fee, status, created, refund_fee, oid, good_status, company_name, sid, payment, reason, desc, has_good_return, modified, order_status,refund_phase
func (r *TaobaoSpecialRefundsReceiveGetAPIRequest) SetFields(_fields []string) error {
r._fields = _fields
r.Set("fields", _fields)
return nil
}
// GetFields Fields Getter
func (r TaobaoSpecialRefundsReceiveGetAPIRequest) GetFields() []string {
return r._fields
}
// SetBuyerNick is BuyerNick Setter
// 买家昵称
func (r *TaobaoSpecialRefundsReceiveGetAPIRequest) SetBuyerNick(_buyerNick string) error {
r._buyerNick = _buyerNick
r.Set("buyer_nick", _buyerNick)
return nil
}
// GetBuyerNick BuyerNick Getter
func (r TaobaoSpecialRefundsReceiveGetAPIRequest) GetBuyerNick() string {
return r._buyerNick
}
// SetEndModified is EndModified Setter
// 查询修改时间结束。格式: yyyy-MM-dd HH:mm:ss
func (r *TaobaoSpecialRefundsReceiveGetAPIRequest) SetEndModified(_endModified string) error {
r._endModified = _endModified
r.Set("end_modified", _endModified)
return nil
}
// GetEndModified EndModified Getter
func (r TaobaoSpecialRefundsReceiveGetAPIRequest) GetEndModified() string {
return r._endModified
}
// SetStartModified is StartModified Setter
// 查询修改时间开始。格式: yyyy-MM-dd HH:mm:ss
func (r *TaobaoSpecialRefundsReceiveGetAPIRequest) SetStartModified(_startModified string) error {
r._startModified = _startModified
r.Set("start_modified", _startModified)
return nil
}
// GetStartModified StartModified Getter
func (r TaobaoSpecialRefundsReceiveGetAPIRequest) GetStartModified() string {
return r._startModified
}
// SetStatus is Status Setter
// 退款状态,默认查询所有退款状态的数据,除了默认值外每次只能查询一种状态。WAIT_SELLER_AGREE(买家已经申请退款,等待卖家同意) WAIT_BUYER_RETURN_GOODS(卖家已经同意退款,等待买家退货) WAIT_SELLER_CONFIRM_GOODS(买家已经退货,等待卖家确认收货) SELLER_REFUSE_BUYER(卖家拒绝退款) CLOSED(退款关闭) SUCCESS(退款成功)
func (r *TaobaoSpecialRefundsReceiveGetAPIRequest) SetStatus(_status string) error {
r._status = _status
r.Set("status", _status)
return nil
}
// GetStatus Status Getter
func (r TaobaoSpecialRefundsReceiveGetAPIRequest) GetStatus() string {
return r._status
}
// SetType is Type Setter
// 交易类型列表,一次查询多种类型可用半角逗号分隔,默认同时查询guarantee_trade, auto_delivery这两种类型的数据,<a href="http://open.taobao.com/doc/detail.htm?id=102855" target="_blank">查看可选值</a>
func (r *TaobaoSpecialRefundsReceiveGetAPIRequest) SetType(_type string) error {
r._type = _type
r.Set("type", _type)
return nil
}
// GetType Type Getter
func (r TaobaoSpecialRefundsReceiveGetAPIRequest) GetType() string {
return r._type
}
// SetBuyerOpenUid is BuyerOpenUid Setter
// 买家openId
func (r *TaobaoSpecialRefundsReceiveGetAPIRequest) SetBuyerOpenUid(_buyerOpenUid string) error {
r._buyerOpenUid = _buyerOpenUid
r.Set("buyer_open_uid", _buyerOpenUid)
return nil
}
// GetBuyerOpenUid BuyerOpenUid Getter
func (r TaobaoSpecialRefundsReceiveGetAPIRequest) GetBuyerOpenUid() string {
return r._buyerOpenUid
}
// SetPageNo is PageNo Setter
// 页码。取值范围:大于零的整数; 默认值:1
func (r *TaobaoSpecialRefundsReceiveGetAPIRequest) SetPageNo(_pageNo int64) error {
r._pageNo = _pageNo
r.Set("page_no", _pageNo)
return nil
}
// GetPageNo PageNo Getter
func (r TaobaoSpecialRefundsReceiveGetAPIRequest) GetPageNo() int64 {
return r._pageNo
}
// SetPageSize is PageSize Setter
// 每页条数。取值范围:大于零的整数; 默认值:40;最大值:100
func (r *TaobaoSpecialRefundsReceiveGetAPIRequest) SetPageSize(_pageSize int64) error {
r._pageSize = _pageSize
r.Set("page_size", _pageSize)
return nil
}
// GetPageSize PageSize Getter
func (r TaobaoSpecialRefundsReceiveGetAPIRequest) GetPageSize() int64 {
return r._pageSize
}
// SetUseHasNext is UseHasNext Setter
// 是否启用has_next的分页方式,如果指定true,则返回的结果中不包含总记录数,但是会新增一个是否存在下一页的的字段,通过此种方式获取增量退款,接口调用成功率在原有的基础上有所提升。
func (r *TaobaoSpecialRefundsReceiveGetAPIRequest) SetUseHasNext(_useHasNext bool) error {
r._useHasNext = _useHasNext
r.Set("use_has_next", _useHasNext)
return nil
}
// GetUseHasNext UseHasNext Getter
func (r TaobaoSpecialRefundsReceiveGetAPIRequest) GetUseHasNext() bool {
return r._useHasNext
}
var poolTaobaoSpecialRefundsReceiveGetAPIRequest = sync.Pool{
New: func() any {
return NewTaobaoSpecialRefundsReceiveGetRequest()
},
}
// GetTaobaoSpecialRefundsReceiveGetRequest 从 sync.Pool 获取 TaobaoSpecialRefundsReceiveGetAPIRequest
func GetTaobaoSpecialRefundsReceiveGetAPIRequest() *TaobaoSpecialRefundsReceiveGetAPIRequest {
return poolTaobaoSpecialRefundsReceiveGetAPIRequest.Get().(*TaobaoSpecialRefundsReceiveGetAPIRequest)
}
// ReleaseTaobaoSpecialRefundsReceiveGetAPIRequest 将 TaobaoSpecialRefundsReceiveGetAPIRequest 放入 sync.Pool
func ReleaseTaobaoSpecialRefundsReceiveGetAPIRequest(v *TaobaoSpecialRefundsReceiveGetAPIRequest) {
v.Reset()
poolTaobaoSpecialRefundsReceiveGetAPIRequest.Put(v)
}