Passed
Push — main ( c2314c...1a7704 )
by Abbotton
10:22
created

Order::downloadToShop()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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
     * @deprecated
243
     */
244
    public function getSettleBillDetail(array $params): array
245
    {
246
        return $this->httpPost('order/getSettleBillDetail', $params);
247
    }
248
249
    /**
250
     * 批量加密接口.
251
     *
252
     * @param array $params
253
     *
254
     * @throws InvalidArgumentException
255
     * @throws RequestException
256
     *
257
     * @return array
258
     */
259
    public function batchEncrypt(array $params): array
260
    {
261
        return $this->httpPost('order/batchEncrypt', $params);
262
    }
263
264
    /**
265
     * 批量脱敏接口.
266
     *
267
     * @param array $params
268
     *
269
     * @throws InvalidArgumentException
270
     * @throws RequestException
271
     *
272
     * @return array
273
     */
274
    public function batchSensitive(array $params): array
275
    {
276
        return $this->httpPost('order/batchSensitive', $params);
277
    }
278
279
    /**
280
     * 批量解密接口.
281
     *
282
     * @param array $params
283
     *
284
     * @throws InvalidArgumentException
285
     * @throws RequestException
286
     *
287
     * @return array
288
     */
289
    public function batchDecrypt(array $params): array
290
    {
291
        return $this->httpPost('order/batchDecrypt', $params);
292
    }
293
294
    /**
295
     * 批量获取索引串接口.
296
     *
297
     * @param array $params
298
     *
299
     * @throws InvalidArgumentException
300
     * @throws RequestException
301
     *
302
     * @return array
303
     */
304
    public function batchSearchIndex(array $params): array
305
    {
306
        return $this->httpPost('order/BatchSearchIndex', $params);
307
    }
308
309
    /**
310
     * 查看商家开票列表.
311
     *
312
     * @param array $params
313
     *
314
     * @throws InvalidArgumentException
315
     * @throws RequestException
316
     *
317
     * @return array
318
     */
319
    public function invoiceList(array $params): array
320
    {
321
        return $this->httpPost('order/invoiceList', $params);
322
    }
323
324
    /**
325
     * 订单商品的序列号上传.
326
     *
327
     * @param array $params
328
     *
329
     * @throws InvalidArgumentException
330
     * @throws RequestException
331
     *
332
     * @return array
333
     */
334
    public function addSerialNumber(array $params): array
335
    {
336
        return $this->httpPost('order/addSerialNumber', $params);
337
    }
338
339
    /**
340
     * 发票信息回传API.
341
     *
342
     * @param array $params
343
     *
344
     * @throws InvalidArgumentException
345
     * @throws RequestException
346
     *
347
     * @return array
348
     */
349
    public function invoiceUpload(array $params): array
350
    {
351
        return $this->httpPost('order/invoiceUpload', $params);
352
    }
353
354
    /**
355
     * 查保单详情.
356
     *
357
     * @param array $params
358
     *
359
     * @throws InvalidArgumentException
360
     * @throws RequestException
361
     *
362
     * @return array
363
     */
364
    public function policy(array $params): array
365
    {
366
        return $this->httpPost('order/policy', $params);
367
    }
368
369
    /**
370
     * 下载账单,生成downloadId.
371
     *
372
     * @param array $params
373
     *
374
     * @throws InvalidArgumentException
375
     * @throws RequestException
376
     *
377
     * @return array
378
     */
379
    public function downloadSettleItemToShop(array $params): array
380
    {
381
        return $this->httpPost('order/downloadSettleItemToShop', $params);
382
    }
383
384
    /**
385
     * 查询账单明细V2.
386
     *
387
     * @param  array  $params
388
     *
389
     * @return array
390
     * @throws RequestException
391
     *
392
     * @throws InvalidArgumentException
393
     */
394
    public function getSettleBillDetailV2(array $params): array
395
    {
396
        return $this->httpPost('order/getSettleBillDetailV2', $params);
397
    }
398
399
    /**
400
     * 查看是否下载成功并返回下载地址.
401
     *
402
     * @param  array  $params
403
     *
404
     * @return array
405
     * @throws RequestException
406
     *
407
     * @throws InvalidArgumentException
408
     */
409
    public function downloadToShop(array $params): array
410
    {
411
        return $this->httpPost('order/downloadToShop', $params);
412
    }
413
}
414