Passed
Push — main ( 27e66b...25b76e )
by Abbotton
12:06
created

Yunc::erpCargoSinglePush()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Abbotton\DouDian\Api;
4
5
use Illuminate\Http\Client\RequestException;
6
use Psr\SimpleCache\InvalidArgumentException;
7
8
class Yunc extends BaseRequest
9
{
10
    /**
11
     * toB场景取消出库单.
12
     *
13
     * @param  array  $params
14
     * @return array
15
     *
16
     * @throws RequestException
17
     * @throws InvalidArgumentException
18
     */
19
    public function cancelOutboundOrderToB(array $params): array
20
    {
21
        return $this->httpPost('yunc/cancelOutboundOrderToB', $params);
22
    }
23
24
    /**
25
     * 商家入驻仓关系查询.
26
     *
27
     * @param  array  $params
28
     * @return array
29
     *
30
     * @throws RequestException
31
     * @throws InvalidArgumentException
32
     */
33
    public function shopWarehouseRefQuery(array $params): array
34
    {
35
        return $this->httpPost('yunc/shopWarehouseRefQuery', $params);
36
    }
37
38
    /**
39
     * 创建出库单ToC.
40
     *
41
     * @param  array  $params
42
     * @return array
43
     *
44
     * @throws RequestException
45
     * @throws InvalidArgumentException
46
     */
47
    public function pushCloudWarehouseOutboundOrderToC(array $params): array
48
    {
49
        return $this->httpPost('yunc/createOutboundOrderToC', $params);
50
    }
51
52
    /**
53
     * wms入库单回告.
54
     *
55
     * @param  array  $params
56
     * @return array
57
     *
58
     * @throws RequestException
59
     * @throws InvalidArgumentException
60
     */
61
    public function wmsInboundCallback(array $params): array
62
    {
63
        return $this->httpPost('yunc/wmsInboundCallback', $params);
64
    }
65
66
    /**
67
     * 云仓出库接单.
68
     *
69
     * @param  array  $params
70
     * @return array
71
     *
72
     * @throws RequestException
73
     * @throws InvalidArgumentException
74
     */
75
    public function cloudCreateOutboundOrder(array $params): array
76
    {
77
        return $this->httpPost('yunc/cloudCreateOutboundOrder', $params);
78
    }
79
80
    /**
81
     * 销退入库取消.
82
     *
83
     * @param  array  $params
84
     * @return array
85
     *
86
     * @throws RequestException
87
     * @throws InvalidArgumentException
88
     */
89
    public function cloudCancelInboundOrder(array $params): array
90
    {
91
        return $this->httpPost('yunc/cloudCancelInboundOrder', $params);
92
    }
93
94
    /**
95
     * 销退单入库.
96
     *
97
     * @param  array  $params
98
     * @return array
99
     *
100
     * @throws RequestException
101
     * @throws InvalidArgumentException
102
     */
103
    public function cloudCreateInboundOrder(array $params): array
104
    {
105
        return $this->httpPost('yunc/cloudCreateInboundOrder', $params);
106
    }
107
108
    /**
109
     * 云仓出库取消.
110
     *
111
     * @param  array  $params
112
     * @return array
113
     *
114
     * @throws RequestException
115
     * @throws InvalidArgumentException
116
     */
117
    public function cloudCancelOutboundOrder(array $params): array
118
    {
119
        return $this->httpPost('yunc/cloudCancelOutboundOrder', $params);
120
    }
121
122
    /**
123
     * toC场景取消出库单.
124
     *
125
     * @param  array  $params
126
     * @return array
127
     *
128
     * @throws RequestException
129
     * @throws InvalidArgumentException
130
     */
131
    public function cancelOutboundOrderToC(array $params): array
132
    {
133
        return $this->httpPost('yunc/cancelOutboundOrderToC', $params);
134
    }
135
136
    /**
137
     * 给外部WMS调用的推送出库信息回传.
138
     *
139
     * @param  array  $params
140
     * @return array
141
     *
142
     * @throws RequestException
143
     * @throws InvalidArgumentException
144
     */
145
    public function pushOutboundFeedback(array $params): array
146
    {
147
        return $this->httpPost('yunc/pushOutboundFeedback', $params);
148
    }
149
150
    /**
151
     * 货品推送接口-ERP(单个).
152
     *
153
     * @param  array  $params
154
     * @return array
155
     *
156
     * @throws RequestException
157
     * @throws InvalidArgumentException
158
     */
159
    public function erpCargoSinglePush(array $params): array
160
    {
161
        return $this->httpPost('yunc/erpCargoSinglePush', $params);
162
    }
163
164
    /**
165
     * erp创建入库单.
166
     *
167
     * @param  array  $params
168
     * @return array
169
     *
170
     * @throws RequestException
171
     * @throws InvalidArgumentException
172
     */
173
    public function erpInboundCreate(array $params): array
174
    {
175
        return $this->httpPost('yunc/erpInboundCreate', $params);
176
    }
177
178
    /**
179
     * 设置指定地址下的仓的优先级.
180
     *
181
     * @param  array  $params
182
     * @return array
183
     *
184
     * @throws RequestException
185
     * @throws InvalidArgumentException
186
     */
187
    public function erpInboundCancel(array $params): array
188
    {
189
        return $this->httpPost('yunc/erpInboundCancel', $params);
190
    }
191
192
    /**
193
     * 库存调整(盘点和转移).
194
     *
195
     * @param  array  $params
196
     * @return array
197
     *
198
     * @throws RequestException
199
     * @throws InvalidArgumentException
200
     */
201
    public function adjustInventory(array $params): array
202
    {
203
        return $this->httpPost('yunc/adjustInventory', $params);
204
    }
205
206
    /**
207
     * toB出库单.
208
     *
209
     * @param  array  $params
210
     * @return array
211
     *
212
     * @throws RequestException
213
     * @throws InvalidArgumentException
214
     */
215
    public function createOutboundOrderToB(array $params): array
216
    {
217
        return $this->httpPost('yunc/createOutboundOrderToB', $params);
218
    }
219
}
220