Passed
Push — main ( 33cb0c...67dbd0 )
by Abbotton
10:38
created

WareHouse::deliveryList()   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 WareHouse 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 stockNum(array $params): array
21
    {
22
        return $this->httpPost('sku/stockNum', $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 create(array $params): array
36
    {
37
        return $this->httpPost('warehouse/create', $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 createBatch(array $params): array
51
    {
52
        return $this->httpPost('warehouse/createBatch', $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 edit(array $params): array
66
    {
67
        return $this->httpPost('warehouse/edit', $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 info(array $params): array
81
    {
82
        return $this->httpPost('warehouse/info', $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 list(array $params): array
96
    {
97
        return $this->httpPost('warehouse/list', $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 removeAddr(array $params): array
111
    {
112
        return $this->httpPost('warehouse/removeAddr', $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 setAddr(array $params): array
126
    {
127
        return $this->httpPost('warehouse/setAddr', $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 setAddrBatch(array $params): array
141
    {
142
        return $this->httpPost('warehouse/setAddrBatch', $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 setPriority(array $params): array
156
    {
157
        return $this->httpPost('warehouse/setPriority', $params);
158
    }
159
160
    /**
161
     * 设置sku发货时效.
162
     *
163
     * @param array $params
164
     *
165
     * @throws InvalidArgumentException
166
     * @throws RequestException
167
     *
168
     * @return array
169
     */
170
    public function setSkuShipTime(array $params): array
171
    {
172
        return $this->httpPost('promise/setSkuShipTime', $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 adjustInventory(array $params): array
186
    {
187
        return $this->httpPost('warehouse/adjustInventory', $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 deliveryList(array $params): array
201
    {
202
        return $this->httpPost('promise/deliveryList', $params);
203
    }
204
}
205