|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Abbotton\DouDian\Api; |
|
4
|
|
|
|
|
5
|
|
|
use Illuminate\Http\Client\RequestException; |
|
6
|
|
|
use Psr\SimpleCache\InvalidArgumentException; |
|
7
|
|
|
|
|
8
|
|
|
class Iop extends BaseRequest |
|
9
|
|
|
{ |
|
10
|
|
|
/** |
|
11
|
|
|
* 查询店铺身份. |
|
12
|
|
|
* |
|
13
|
|
|
* @return array |
|
14
|
|
|
* |
|
15
|
|
|
* @throws RequestException |
|
16
|
|
|
* @throws InvalidArgumentException |
|
17
|
|
|
*/ |
|
18
|
|
|
public function roleGet(): array |
|
19
|
|
|
{ |
|
20
|
|
|
return $this->httpPost('iop/roleGet'); |
|
21
|
|
|
} |
|
22
|
|
|
|
|
23
|
|
|
/** |
|
24
|
|
|
* 根据更新时间查询代打订单列表. |
|
25
|
|
|
* |
|
26
|
|
|
* @param array $params |
|
27
|
|
|
* @return array |
|
28
|
|
|
* |
|
29
|
|
|
* @throws InvalidArgumentException |
|
30
|
|
|
* @throws RequestException |
|
31
|
|
|
*/ |
|
32
|
|
|
public function orderList(array $params): array |
|
33
|
|
|
{ |
|
34
|
|
|
return $this->httpPost('iop/orderList', $params); |
|
35
|
|
|
} |
|
36
|
|
|
|
|
37
|
|
|
/** |
|
38
|
|
|
* 电子面单取号. |
|
39
|
|
|
* |
|
40
|
|
|
* @return array |
|
41
|
|
|
* |
|
42
|
|
|
* @throws InvalidArgumentException |
|
43
|
|
|
* @throws RequestException |
|
44
|
|
|
*/ |
|
45
|
|
|
public function waybillGet(): array |
|
46
|
|
|
{ |
|
47
|
|
|
return $this->httpPost('iop/waybillGet'); |
|
48
|
|
|
} |
|
49
|
|
|
|
|
50
|
|
|
/** |
|
51
|
|
|
* 取消电子面单. |
|
52
|
|
|
* |
|
53
|
|
|
* @param array $params |
|
54
|
|
|
* @return array |
|
55
|
|
|
* |
|
56
|
|
|
* @throws InvalidArgumentException |
|
57
|
|
|
* @throws RequestException |
|
58
|
|
|
*/ |
|
59
|
|
|
public function waybillCancel(array $params): array |
|
60
|
|
|
{ |
|
61
|
|
|
return $this->httpPost('iop/waybillCancel', $params); |
|
62
|
|
|
} |
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* 电子面单回传并发货. |
|
66
|
|
|
* |
|
67
|
|
|
* @param array $params |
|
68
|
|
|
* @return array |
|
69
|
|
|
* |
|
70
|
|
|
* @throws InvalidArgumentException |
|
71
|
|
|
* @throws RequestException |
|
72
|
|
|
*/ |
|
73
|
|
|
public function waybillReturn(array $params): array |
|
74
|
|
|
{ |
|
75
|
|
|
return $this->httpPost('iop/waybillReturn', $params); |
|
76
|
|
|
} |
|
77
|
|
|
|
|
78
|
|
|
/** |
|
79
|
|
|
* 更新电子面单. |
|
80
|
|
|
* |
|
81
|
|
|
* @param array $params |
|
82
|
|
|
* @return array |
|
83
|
|
|
* |
|
84
|
|
|
* @throws InvalidArgumentException |
|
85
|
|
|
* @throws RequestException |
|
86
|
|
|
*/ |
|
87
|
|
|
public function waybillUpdate(array $params): array |
|
88
|
|
|
{ |
|
89
|
|
|
return $this->httpPost('iop/waybillUpdate', $params); |
|
90
|
|
|
} |
|
91
|
|
|
|
|
92
|
|
|
/** |
|
93
|
|
|
* 订单详情. |
|
94
|
|
|
* |
|
95
|
|
|
* @param array $params |
|
96
|
|
|
* @return array |
|
97
|
|
|
* |
|
98
|
|
|
* @throws InvalidArgumentException |
|
99
|
|
|
* @throws RequestException |
|
100
|
|
|
*/ |
|
101
|
|
|
public function orderInfo(array $params): array |
|
102
|
|
|
{ |
|
103
|
|
|
return $this->httpPost('iop/orderInfo', $params); |
|
104
|
|
|
} |
|
105
|
|
|
} |
|
106
|
|
|
|