1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Abbotton\DouDian\Api; |
4
|
|
|
|
5
|
|
|
use Illuminate\Http\Client\RequestException; |
6
|
|
|
use Psr\SimpleCache\InvalidArgumentException; |
7
|
|
|
|
8
|
|
|
class Order extends BaseRequest |
9
|
|
|
{ |
10
|
|
|
/** |
11
|
|
|
* 添加订单备注. |
12
|
|
|
* |
13
|
|
|
* @param array $params |
14
|
|
|
* @return array |
15
|
|
|
* @throws RequestException |
16
|
|
|
* @throws InvalidArgumentException |
17
|
|
|
*/ |
18
|
|
|
public function addOrderRemark(array $params): array |
19
|
|
|
{ |
20
|
|
|
return $this->httpPost('order/addOrderRemark', $params); |
21
|
|
|
} |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* 设置店铺支持地址变更审核. |
25
|
|
|
* |
26
|
|
|
* @param array $params |
27
|
|
|
* @return array |
28
|
|
|
* @throws RequestException |
29
|
|
|
* @throws InvalidArgumentException |
30
|
|
|
*/ |
31
|
|
|
public function AddressAppliedSwitch(array $params): array |
32
|
|
|
{ |
33
|
|
|
return $this->httpPost('order/AddressAppliedSwitch', $params); |
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* 买家地址变更确认. |
38
|
|
|
* |
39
|
|
|
* @param array $params |
40
|
|
|
* @return array |
41
|
|
|
* @throws RequestException |
42
|
|
|
* @throws InvalidArgumentException |
43
|
|
|
*/ |
44
|
|
|
public function addressConfirm(array $params): array |
45
|
|
|
{ |
46
|
|
|
return $this->httpPost('order/addressConfirm', $params); |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* 卖家主动修改收货地址 |
51
|
|
|
* |
52
|
|
|
* @param array $params |
53
|
|
|
* @return array |
54
|
|
|
* @throws RequestException |
55
|
|
|
* @throws InvalidArgumentException |
56
|
|
|
*/ |
57
|
|
|
public function addressModify(array $params): array |
58
|
|
|
{ |
59
|
|
|
return $this->httpPost('order/addressModify', $params); |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* 取消货到付款订单. |
64
|
|
|
* |
65
|
|
|
* @param array $params |
66
|
|
|
* @return array |
67
|
|
|
* @throws RequestException |
68
|
|
|
* @throws InvalidArgumentException |
69
|
|
|
*/ |
70
|
|
|
public function cancel(array $params): array |
71
|
|
|
{ |
72
|
|
|
return $this->httpPost('order/cancel', $params); |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* 获取订单详情. |
77
|
|
|
* |
78
|
|
|
* @param array $params |
79
|
|
|
* @return array |
80
|
|
|
* @throws RequestException |
81
|
|
|
* @throws InvalidArgumentException |
82
|
|
|
*/ |
83
|
|
|
public function detail(array $params): array |
84
|
|
|
{ |
85
|
|
|
return $this->httpPost('order/detail', $params); |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* 获取服务单列表. |
90
|
|
|
* |
91
|
|
|
* @param array $params |
92
|
|
|
* @return array |
93
|
|
|
* @throws RequestException |
94
|
|
|
* @throws InvalidArgumentException |
95
|
|
|
*/ |
96
|
|
|
public function getServiceList(array $params): array |
97
|
|
|
{ |
98
|
|
|
return $this->httpPost('order/getServiceList', $params); |
99
|
|
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* 获取订单列表. |
103
|
|
|
* |
104
|
|
|
* @param array $params |
105
|
|
|
* @return array |
106
|
|
|
* @throws RequestException |
107
|
|
|
* @throws InvalidArgumentException |
108
|
|
|
*/ |
109
|
|
|
public function list(array $params): array |
110
|
|
|
{ |
111
|
|
|
return $this->httpPost('order/list', $params); |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* 回复服务请求 |
116
|
|
|
* |
117
|
|
|
* @param array $params |
118
|
|
|
* @return array |
119
|
|
|
* @throws RequestException |
120
|
|
|
* @throws InvalidArgumentException |
121
|
|
|
*/ |
122
|
|
|
public function replyService(array $params): array |
123
|
|
|
{ |
124
|
|
|
return $this->httpPost('order/replyService', $params); |
125
|
|
|
} |
126
|
|
|
|
127
|
|
|
/** |
128
|
|
|
* 查询商家服务单详情请求 |
129
|
|
|
* |
130
|
|
|
* @param array $params |
131
|
|
|
* @return array |
132
|
|
|
* @throws RequestException |
133
|
|
|
* @throws InvalidArgumentException |
134
|
|
|
*/ |
135
|
|
|
public function serviceDetail(array $params): array |
136
|
|
|
{ |
137
|
|
|
return $this->httpPost('order/serviceDetail', $params); |
138
|
|
|
} |
139
|
|
|
|
140
|
|
|
/** |
141
|
|
|
* 获取服务请求列表. |
142
|
|
|
* |
143
|
|
|
* @param array $params |
144
|
|
|
* @return array |
145
|
|
|
* @throws RequestException |
146
|
|
|
* @throws InvalidArgumentException |
147
|
|
|
*/ |
148
|
|
|
public function serviceList(array $params): array |
149
|
|
|
{ |
150
|
|
|
return $this->httpPost('order/serviceList', $params); |
151
|
|
|
} |
152
|
|
|
|
153
|
|
|
/** |
154
|
|
|
* 确认货到付款订单. |
155
|
|
|
* |
156
|
|
|
* @param array $params |
157
|
|
|
* @return array |
158
|
|
|
* @throws RequestException |
159
|
|
|
* @throws InvalidArgumentException |
160
|
|
|
*/ |
161
|
|
|
public function stockUp(array $params): array |
162
|
|
|
{ |
163
|
|
|
return $this->httpPost('order/stockUp', $params); |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* 未支付订单改货款. |
168
|
|
|
* |
169
|
|
|
* @param array $params |
170
|
|
|
* @return array |
171
|
|
|
* @throws RequestException |
172
|
|
|
* @throws InvalidArgumentException |
173
|
|
|
*/ |
174
|
|
|
public function updateOrderAmount(array $params): array |
175
|
|
|
{ |
176
|
|
|
return $this->httpPost('order/updateOrderAmount', $params); |
177
|
|
|
} |
178
|
|
|
|
179
|
|
|
/** |
180
|
|
|
* 未支付订单邮费修改. |
181
|
|
|
* |
182
|
|
|
* @param array $params |
183
|
|
|
* @return array |
184
|
|
|
* @throws RequestException |
185
|
|
|
* @throws InvalidArgumentException |
186
|
|
|
*/ |
187
|
|
|
public function updatePostAmount(array $params): array |
188
|
|
|
{ |
189
|
|
|
return $this->httpPost('order/updatePostAmount', $params); |
190
|
|
|
} |
191
|
|
|
|
192
|
|
|
/** |
193
|
|
|
* 查询订单账单明细. |
194
|
|
|
* |
195
|
|
|
* @param array $params |
196
|
|
|
* @return array |
197
|
|
|
* @throws RequestException |
198
|
|
|
* @throws InvalidArgumentException |
199
|
|
|
*/ |
200
|
|
|
public function settle(array $params): array |
201
|
|
|
{ |
202
|
|
|
return $this->httpPost('order/settle', $params); |
203
|
|
|
} |
204
|
|
|
|
205
|
|
|
/** |
206
|
|
|
* 获取运费险保单详情. |
207
|
|
|
* |
208
|
|
|
* @param array $params |
209
|
|
|
* @return array |
210
|
|
|
* @throws RequestException |
211
|
|
|
* @throws InvalidArgumentException |
212
|
|
|
*/ |
213
|
|
|
public function insurance(array $params): array |
214
|
|
|
{ |
215
|
|
|
return $this->httpPost('order/insurance', $params); |
216
|
|
|
} |
217
|
|
|
|
218
|
|
|
/** |
219
|
|
|
* 新版查询订单的详细信息. |
220
|
|
|
* |
221
|
|
|
* @param array $params |
222
|
|
|
* @return array |
223
|
|
|
* @throws InvalidArgumentException |
224
|
|
|
* @throws RequestException |
225
|
|
|
*/ |
226
|
|
|
public function orderDetail(array $params): array |
227
|
|
|
{ |
228
|
|
|
return $this->httpPost('order/orderDetail', $params); |
229
|
|
|
} |
230
|
|
|
|
231
|
|
|
/** |
232
|
|
|
* 订单列表查询. |
233
|
|
|
* |
234
|
|
|
* @param array $params |
235
|
|
|
* @return array |
236
|
|
|
* @throws InvalidArgumentException |
237
|
|
|
* @throws RequestException |
238
|
|
|
*/ |
239
|
|
|
public function searchList(array $params): array |
240
|
|
|
{ |
241
|
|
|
return $this->httpPost('order/searchList', $params); |
242
|
|
|
} |
243
|
|
|
} |
244
|
|
|
|