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
|
|
|
* |
15
|
|
|
* @throws RequestException |
16
|
|
|
* @throws InvalidArgumentException |
17
|
|
|
* |
18
|
|
|
* @return array |
19
|
|
|
*/ |
20
|
|
|
public function addOrderRemark(array $params): array |
21
|
|
|
{ |
22
|
|
|
return $this->httpPost('order/addOrderRemark', $params); |
23
|
|
|
} |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* 设置店铺支持地址变更审核. |
27
|
|
|
* |
28
|
|
|
* @param array $params |
29
|
|
|
* |
30
|
|
|
* @throws RequestException |
31
|
|
|
* @throws InvalidArgumentException |
32
|
|
|
* |
33
|
|
|
* @return array |
34
|
|
|
*/ |
35
|
|
|
public function addressAppliedSwitch(array $params): array |
36
|
|
|
{ |
37
|
|
|
return $this->httpPost('order/AddressAppliedSwitch', $params); |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* 买家地址变更确认. |
42
|
|
|
* |
43
|
|
|
* @param array $params |
44
|
|
|
* |
45
|
|
|
* @throws RequestException |
46
|
|
|
* @throws InvalidArgumentException |
47
|
|
|
* |
48
|
|
|
* @return array |
49
|
|
|
*/ |
50
|
|
|
public function addressConfirm(array $params): array |
51
|
|
|
{ |
52
|
|
|
return $this->httpPost('order/addressConfirm', $params); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* 卖家主动修改收货地址 |
57
|
|
|
* |
58
|
|
|
* @param array $params |
59
|
|
|
* |
60
|
|
|
* @throws RequestException |
61
|
|
|
* @throws InvalidArgumentException |
62
|
|
|
* |
63
|
|
|
* @return array |
64
|
|
|
*/ |
65
|
|
|
public function addressModify(array $params): array |
66
|
|
|
{ |
67
|
|
|
return $this->httpPost('order/addressModify', $params); |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* 获取服务单列表. |
72
|
|
|
* |
73
|
|
|
* @param array $params |
74
|
|
|
* |
75
|
|
|
* @throws RequestException |
76
|
|
|
* @throws InvalidArgumentException |
77
|
|
|
* |
78
|
|
|
* @return array |
79
|
|
|
*/ |
80
|
|
|
public function getServiceList(array $params): array |
81
|
|
|
{ |
82
|
|
|
return $this->httpPost('order/getServiceList', $params); |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* 回复服务请求 |
87
|
|
|
* |
88
|
|
|
* @param array $params |
89
|
|
|
* |
90
|
|
|
* @throws RequestException |
91
|
|
|
* @throws InvalidArgumentException |
92
|
|
|
* |
93
|
|
|
* @return array |
94
|
|
|
*/ |
95
|
|
|
public function replyService(array $params): array |
96
|
|
|
{ |
97
|
|
|
return $this->httpPost('order/replyService', $params); |
98
|
|
|
} |
99
|
|
|
|
100
|
|
|
/** |
101
|
|
|
* 查询商家服务单详情请求 |
102
|
|
|
* |
103
|
|
|
* @param array $params |
104
|
|
|
* |
105
|
|
|
* @throws RequestException |
106
|
|
|
* @throws InvalidArgumentException |
107
|
|
|
* |
108
|
|
|
* @return array |
109
|
|
|
*/ |
110
|
|
|
public function serviceDetail(array $params): array |
111
|
|
|
{ |
112
|
|
|
return $this->httpPost('order/serviceDetail', $params); |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* 未支付订单改货款. |
117
|
|
|
* |
118
|
|
|
* @param array $params |
119
|
|
|
* |
120
|
|
|
* @throws RequestException |
121
|
|
|
* @throws InvalidArgumentException |
122
|
|
|
* |
123
|
|
|
* @return array |
124
|
|
|
*/ |
125
|
|
|
public function updateOrderAmount(array $params): array |
126
|
|
|
{ |
127
|
|
|
return $this->httpPost('order/updateOrderAmount', $params); |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* 未支付订单邮费修改. |
132
|
|
|
* |
133
|
|
|
* @param array $params |
134
|
|
|
* |
135
|
|
|
* @throws RequestException |
136
|
|
|
* @throws InvalidArgumentException |
137
|
|
|
* |
138
|
|
|
* @return array |
139
|
|
|
*/ |
140
|
|
|
public function updatePostAmount(array $params): array |
141
|
|
|
{ |
142
|
|
|
return $this->httpPost('order/updatePostAmount', $params); |
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
/** |
146
|
|
|
* 查询订单账单明细. |
147
|
|
|
* |
148
|
|
|
* @param array $params |
149
|
|
|
* |
150
|
|
|
* @throws RequestException |
151
|
|
|
* @throws InvalidArgumentException |
152
|
|
|
* |
153
|
|
|
* @return array |
154
|
|
|
*/ |
155
|
|
|
public function settle(array $params): array |
156
|
|
|
{ |
157
|
|
|
return $this->httpPost('order/settle', $params); |
158
|
|
|
} |
159
|
|
|
|
160
|
|
|
/** |
161
|
|
|
* 获取运费险保单详情. |
162
|
|
|
* |
163
|
|
|
* @param array $params |
164
|
|
|
* |
165
|
|
|
* @throws RequestException |
166
|
|
|
* @throws InvalidArgumentException |
167
|
|
|
* |
168
|
|
|
* @return array |
169
|
|
|
*/ |
170
|
|
|
public function insurance(array $params): array |
171
|
|
|
{ |
172
|
|
|
return $this->httpPost('order/insurance', $params); |
173
|
|
|
} |
174
|
|
|
|
175
|
|
|
/** |
176
|
|
|
* 新版查询订单的详细信息. |
177
|
|
|
* |
178
|
|
|
* @param array $params |
179
|
|
|
* |
180
|
|
|
* @throws InvalidArgumentException |
181
|
|
|
* @throws RequestException |
182
|
|
|
* |
183
|
|
|
* @return array |
184
|
|
|
*/ |
185
|
|
|
public function orderDetail(array $params): array |
186
|
|
|
{ |
187
|
|
|
return $this->httpPost('order/orderDetail', $params); |
188
|
|
|
} |
189
|
|
|
|
190
|
|
|
/** |
191
|
|
|
* 订单列表查询. |
192
|
|
|
* |
193
|
|
|
* @param array $params |
194
|
|
|
* |
195
|
|
|
* @throws InvalidArgumentException |
196
|
|
|
* @throws RequestException |
197
|
|
|
* |
198
|
|
|
* @return array |
199
|
|
|
*/ |
200
|
|
|
public function searchList(array $params): array |
201
|
|
|
{ |
202
|
|
|
return $this->httpPost('order/searchList', $params); |
203
|
|
|
} |
204
|
|
|
|
205
|
|
|
/** |
206
|
|
|
* 获取跨境承运单信息. |
207
|
|
|
* |
208
|
|
|
* @param array $params |
209
|
|
|
* |
210
|
|
|
* @throws InvalidArgumentException |
211
|
|
|
* @throws RequestException |
212
|
|
|
* |
213
|
|
|
* @return array |
214
|
|
|
*/ |
215
|
|
|
public function getCrossBorderFulfillInfo(array $params): array |
216
|
|
|
{ |
217
|
|
|
return $this->httpPost('order/getCrossBorderFulfillInfo', $params); |
218
|
|
|
} |
219
|
|
|
|
220
|
|
|
/** |
221
|
|
|
* 获取App对于商家订单修改地址的审核权限. |
222
|
|
|
* |
223
|
|
|
* @throws InvalidArgumentException |
224
|
|
|
* @throws RequestException |
225
|
|
|
* |
226
|
|
|
* @return array |
227
|
|
|
*/ |
228
|
|
|
public function addresSwitchConfig(): array |
229
|
|
|
{ |
230
|
|
|
return $this->httpPost('order/addresSwitchConfig'); |
231
|
|
|
} |
232
|
|
|
|
233
|
|
|
/** |
234
|
|
|
* 批量加密接口. |
235
|
|
|
* |
236
|
|
|
* @param array $params |
237
|
|
|
* |
238
|
|
|
* @throws InvalidArgumentException |
239
|
|
|
* @throws RequestException |
240
|
|
|
* |
241
|
|
|
* @return array |
242
|
|
|
*/ |
243
|
|
|
public function batchEncrypt(array $params): array |
244
|
|
|
{ |
245
|
|
|
return $this->httpPost('order/batchEncrypt', $params); |
246
|
|
|
} |
247
|
|
|
|
248
|
|
|
/** |
249
|
|
|
* 批量脱敏接口. |
250
|
|
|
* |
251
|
|
|
* @param array $params |
252
|
|
|
* |
253
|
|
|
* @throws InvalidArgumentException |
254
|
|
|
* @throws RequestException |
255
|
|
|
* |
256
|
|
|
* @return array |
257
|
|
|
*/ |
258
|
|
|
public function batchSensitive(array $params): array |
259
|
|
|
{ |
260
|
|
|
return $this->httpPost('order/batchSensitive', $params); |
261
|
|
|
} |
262
|
|
|
|
263
|
|
|
/** |
264
|
|
|
* 批量解密接口. |
265
|
|
|
* |
266
|
|
|
* @param array $params |
267
|
|
|
* |
268
|
|
|
* @throws InvalidArgumentException |
269
|
|
|
* @throws RequestException |
270
|
|
|
* |
271
|
|
|
* @return array |
272
|
|
|
*/ |
273
|
|
|
public function batchDecrypt(array $params): array |
274
|
|
|
{ |
275
|
|
|
return $this->httpPost('order/batchDecrypt', $params); |
276
|
|
|
} |
277
|
|
|
|
278
|
|
|
/** |
279
|
|
|
* 批量获取索引串接口. |
280
|
|
|
* |
281
|
|
|
* @param array $params |
282
|
|
|
* |
283
|
|
|
* @throws InvalidArgumentException |
284
|
|
|
* @throws RequestException |
285
|
|
|
* |
286
|
|
|
* @return array |
287
|
|
|
*/ |
288
|
|
|
public function batchSearchIndex(array $params): array |
289
|
|
|
{ |
290
|
|
|
return $this->httpPost('order/BatchSearchIndex', $params); |
291
|
|
|
} |
292
|
|
|
|
293
|
|
|
/** |
294
|
|
|
* 查看商家开票列表. |
295
|
|
|
* |
296
|
|
|
* @param array $params |
297
|
|
|
* |
298
|
|
|
* @throws InvalidArgumentException |
299
|
|
|
* @throws RequestException |
300
|
|
|
* |
301
|
|
|
* @return array |
302
|
|
|
*/ |
303
|
|
|
public function invoiceList(array $params): array |
304
|
|
|
{ |
305
|
|
|
return $this->httpPost('order/invoiceList', $params); |
306
|
|
|
} |
307
|
|
|
|
308
|
|
|
/** |
309
|
|
|
* 订单商品的序列号上传. |
310
|
|
|
* |
311
|
|
|
* @param array $params |
312
|
|
|
* |
313
|
|
|
* @throws InvalidArgumentException |
314
|
|
|
* @throws RequestException |
315
|
|
|
* |
316
|
|
|
* @return array |
317
|
|
|
*/ |
318
|
|
|
public function addSerialNumber(array $params): array |
319
|
|
|
{ |
320
|
|
|
return $this->httpPost('order/addSerialNumber', $params); |
321
|
|
|
} |
322
|
|
|
|
323
|
|
|
/** |
324
|
|
|
* 发票信息回传API. |
325
|
|
|
* |
326
|
|
|
* @param array $params |
327
|
|
|
* |
328
|
|
|
* @throws InvalidArgumentException |
329
|
|
|
* @throws RequestException |
330
|
|
|
* |
331
|
|
|
* @return array |
332
|
|
|
*/ |
333
|
|
|
public function invoiceUpload(array $params): array |
334
|
|
|
{ |
335
|
|
|
return $this->httpPost('order/invoiceUpload', $params); |
336
|
|
|
} |
337
|
|
|
|
338
|
|
|
/** |
339
|
|
|
* 查保单详情. |
340
|
|
|
* |
341
|
|
|
* @param array $params |
342
|
|
|
* |
343
|
|
|
* @throws InvalidArgumentException |
344
|
|
|
* @throws RequestException |
345
|
|
|
* |
346
|
|
|
* @return array |
347
|
|
|
*/ |
348
|
|
|
public function policy(array $params): array |
349
|
|
|
{ |
350
|
|
|
return $this->httpPost('order/policy', $params); |
351
|
|
|
} |
352
|
|
|
|
353
|
|
|
/** |
354
|
|
|
* 下载账单,生成downloadId. |
355
|
|
|
* |
356
|
|
|
* @param array $params |
357
|
|
|
* |
358
|
|
|
* @throws InvalidArgumentException |
359
|
|
|
* @throws RequestException |
360
|
|
|
* |
361
|
|
|
* @return array |
362
|
|
|
*/ |
363
|
|
|
public function downloadSettleItemToShop(array $params): array |
364
|
|
|
{ |
365
|
|
|
return $this->httpPost('order/downloadSettleItemToShop', $params); |
366
|
|
|
} |
367
|
|
|
|
368
|
|
|
/** |
369
|
|
|
* 查询账单明细V2. |
370
|
|
|
* |
371
|
|
|
* @param array $params |
372
|
|
|
* |
373
|
|
|
* @return array |
374
|
|
|
* @throws RequestException |
375
|
|
|
* |
376
|
|
|
* @throws InvalidArgumentException |
377
|
|
|
*/ |
378
|
|
|
public function getSettleBillDetailV2(array $params): array |
379
|
|
|
{ |
380
|
|
|
return $this->httpPost('order/getSettleBillDetailV2', $params); |
381
|
|
|
} |
382
|
|
|
|
383
|
|
|
/** |
384
|
|
|
* 查看是否下载成功并返回下载地址. |
385
|
|
|
* |
386
|
|
|
* @param array $params |
387
|
|
|
* |
388
|
|
|
* @return array |
389
|
|
|
* @throws RequestException |
390
|
|
|
* |
391
|
|
|
* @throws InvalidArgumentException |
392
|
|
|
*/ |
393
|
|
|
public function downloadToShop(array $params): array |
394
|
|
|
{ |
395
|
|
|
return $this->httpPost('order/downloadToShop', $params); |
396
|
|
|
} |
397
|
|
|
|
398
|
|
|
/** |
399
|
|
|
* 下载资金流水明细文件. |
400
|
|
|
* |
401
|
|
|
* @param array $params |
402
|
|
|
* |
403
|
|
|
* @return array |
404
|
|
|
* @throws RequestException |
405
|
|
|
* |
406
|
|
|
* @throws InvalidArgumentException |
407
|
|
|
*/ |
408
|
|
|
public function downloadShopAccountItemFile(array $params): array |
409
|
|
|
{ |
410
|
|
|
return $this->httpPost('order/downloadShopAccountItemFile', $params); |
411
|
|
|
} |
412
|
|
|
|
413
|
|
|
/** |
414
|
|
|
* 资金流水明细下载请求. |
415
|
|
|
* |
416
|
|
|
* @param array $params |
417
|
|
|
* |
418
|
|
|
* @return array |
419
|
|
|
* @throws RequestException |
420
|
|
|
* |
421
|
|
|
* @throws InvalidArgumentException |
422
|
|
|
*/ |
423
|
|
|
public function downloadShopAccountItem(array $params): array |
424
|
|
|
{ |
425
|
|
|
return $this->httpPost('order/downloadShopAccountItem', $params); |
426
|
|
|
} |
427
|
|
|
|
428
|
|
|
/** |
429
|
|
|
* 资金流水明细接口. |
430
|
|
|
* |
431
|
|
|
* @param array $params |
432
|
|
|
* |
433
|
|
|
* @return array |
434
|
|
|
* @throws RequestException |
435
|
|
|
* |
436
|
|
|
* @throws InvalidArgumentException |
437
|
|
|
*/ |
438
|
|
|
public function getShopAccountItem(array $params): array |
439
|
|
|
{ |
440
|
|
|
return $this->httpPost('order/getShopAccountItem', $params); |
441
|
|
|
} |
442
|
|
|
|
443
|
|
|
/** |
444
|
|
|
* 查询明文手机号报备接口(PS: 官方文档中方法名拼写错误). |
445
|
|
|
* |
446
|
|
|
* @param array $params |
447
|
|
|
* |
448
|
|
|
* @return array |
449
|
|
|
* @throws RequestException |
450
|
|
|
* |
451
|
|
|
* @throws InvalidArgumentException |
452
|
|
|
*/ |
453
|
|
|
public function orderReportList(array $params): array |
454
|
|
|
{ |
455
|
|
|
return $this->httpPost('order/ordeReportList', $params); |
456
|
|
|
} |
457
|
|
|
} |
458
|
|
|
|