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

Product::qualityTask()   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 Product 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 freightTemplateList(array $params = []): array
21
    {
22
        return $this->httpPost('freightTemplate/list', $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 productAddV2(array $params): array
36
    {
37
        return $this->httpPost('product/addV2', $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 productDel(array $params): array
51
    {
52
        return $this->httpPost('product/del', $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 productDetail(array $params): array
66
    {
67
        return $this->httpPost('product/detail', $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 editBuyerLimit(array $params): array
81
    {
82
        return $this->httpPost('product/editBuyerLimit', $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 productEditV2(array $params): array
96
    {
97
        return $this->httpPost('product/editV2', $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 getCateProperty(array $params): array
111
    {
112
        return $this->httpPost('product/getCateProperty', $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 setOffline(array $params): array
126
    {
127
        return $this->httpPost('product/setOffline', $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 setOnline(array $params): array
141
    {
142
        return $this->httpPost('product/setOnline', $params);
143
    }
144
145
    /**
146
     * 获取商品sku详情.
147
     *
148
     * @param array $params
149
     *
150
     * @throws RequestException
151
     * @throws InvalidArgumentException
152
     *
153
     * @return array
154
     */
155
    public function skuDetail(array $params): array
156
    {
157
        return $this->httpPost('sku/detail', $params);
158
    }
159
160
    /**
161
     * 修改sku编码
162
     *
163
     * @param array $params
164
     *
165
     * @throws RequestException
166
     * @throws InvalidArgumentException
167
     *
168
     * @return array
169
     */
170
    public function editCode(array $params): array
171
    {
172
        return $this->httpPost('sku/editCode', $params);
173
    }
174
175
    /**
176
     * 编辑sku价格
177
     *
178
     * @param array $params
179
     *
180
     * @throws RequestException
181
     * @throws InvalidArgumentException
182
     *
183
     * @return array
184
     */
185
    public function editPrice(array $params): array
186
    {
187
        return $this->httpPost('sku/editPrice', $params);
188
    }
189
190
    /**
191
     * 获取商品sku列表.
192
     *
193
     * @param array $params
194
     *
195
     * @throws RequestException
196
     * @throws InvalidArgumentException
197
     *
198
     * @return array
199
     */
200
    public function skuList(array $params): array
201
    {
202
        return $this->httpPost('sku/list', $params);
203
    }
204
205
    /**
206
     * 修改sku库存.
207
     *
208
     * @param array $params
209
     *
210
     * @throws RequestException
211
     * @throws InvalidArgumentException
212
     *
213
     * @return array
214
     */
215
    public function syncStock(array $params): array
216
    {
217
        return $this->httpPost('sku/syncStock', $params);
218
    }
219
220
    /**
221
     * 批量同步库存接口.
222
     *
223
     * @param array $params
224
     *
225
     * @throws RequestException
226
     * @throws InvalidArgumentException
227
     *
228
     * @return array
229
     */
230
    public function syncStockBatch(array $params): array
231
    {
232
        return $this->httpPost('sku/syncStockBatch', $params);
233
    }
234
235
    /**
236
     * 获取商品列表新版.
237
     *
238
     * @param array $params
239
     *
240
     * @throws InvalidArgumentException
241
     * @throws RequestException
242
     *
243
     * @return array
244
     */
245
    public function listV2(array $params): array
246
    {
247
        return $this->httpPost('product/listV2', $params);
248
    }
249
250
    /**
251
     * 获取商品列表新版.
252
     *
253
     * @param array $params
254
     *
255
     * @throws InvalidArgumentException
256
     * @throws RequestException
257
     *
258
     * @return array
259
     */
260
    public function opptyProductApply(array $params): array
261
    {
262
        return $this->httpPost('opptyProduct/apply', $params);
263
    }
264
265
    /**
266
     * 机会品线索触达.
267
     *
268
     * @param array $params
269
     *
270
     * @throws InvalidArgumentException
271
     * @throws RequestException
272
     *
273
     * @return array
274
     */
275
    public function opptyProductClue(array $params): array
276
    {
277
        return $this->httpPost('opptyProduct/clue', $params);
278
    }
279
280
    /**
281
     * 机会品提报进度查询.
282
     *
283
     * @param array $params
284
     *
285
     * @throws InvalidArgumentException
286
     * @throws RequestException
287
     *
288
     * @return array
289
     */
290
    public function opptyProductGetApplyProgress(array $params): array
291
    {
292
        return $this->httpPost('opptyProduct/getApplyProgress', $params);
293
    }
294
295
    /**
296
     * 商品每日诊断任务查询API.
297
     *
298
     * @param  array  $params
299
     * @return array
300
     * @throws InvalidArgumentException
301
     * @throws RequestException
302
     */
303
    public function qualityTask(array $params): array
304
    {
305
        return $this->httpPost('product/qualityTask', $params);
306
    }
307
308
    /**
309
     * 店铺商品质量查询API.
310
     *
311
     * @param  array  $params
312
     * @return array
313
     * @throws InvalidArgumentException
314
     * @throws RequestException
315
     */
316
    public function qualityList(array $params): array
317
    {
318
        return $this->httpPost('product/qualityList', $params);
319
    }
320
321
    /**
322
     * 商品信息质量分查询API.
323
     *
324
     * @param  array  $params
325
     * @return array
326
     * @throws InvalidArgumentException
327
     * @throws RequestException
328
     */
329
    public function qualityDetail(array $params): array
330
    {
331
        return $this->httpPost('product/qualityDetail', $params);
332
    }
333
334
    /**
335
     * 根据商品分类获取对应的属性列表.
336
     *
337
     * @param  array  $params
338
     * @return array
339
     * @throws InvalidArgumentException
340
     * @throws RequestException
341
     */
342
    public function getCatePropertyV2(array $params): array
343
    {
344
        return $this->httpPost('product/getCatePropertyV2', $params);
345
    }
346
347
    /**
348
     * 获取类目下需要填写的资质列表.
349
     *
350
     * @param  array  $params
351
     * @return array
352
     * @throws InvalidArgumentException
353
     * @throws RequestException
354
     */
355
    public function qualificationConfig(array $params): array
356
    {
357
        return $this->httpPost('product/qualificationConfig', $params);
358
    }
359
360
    /**
361
     * 根据类目遍历品牌.
362
     *
363
     * @param  array  $params
364
     * @return array
365
     * @throws InvalidArgumentException
366
     * @throws RequestException
367
     */
368
    public function brandList(array $params): array
369
    {
370
        return $this->httpPost('brand/list', $params);
371
    }
372
}
373