1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Abbotton\DouDian\Api; |
4
|
|
|
|
5
|
|
|
use Illuminate\Http\Client\RequestException; |
6
|
|
|
use Psr\SimpleCache\InvalidArgumentException; |
7
|
|
|
|
8
|
|
|
class Bats 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 getOrderList(array $params): array |
21
|
|
|
{ |
22
|
|
|
return $this->httpPost('btas/getInspectionOrder', $params); |
23
|
|
|
} |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* 商家送检调用. |
27
|
|
|
* |
28
|
|
|
* @param array $params |
29
|
|
|
* |
30
|
|
|
* @throws InvalidArgumentException |
31
|
|
|
* @throws RequestException |
32
|
|
|
* |
33
|
|
|
* @return array |
34
|
|
|
*/ |
35
|
|
|
public function saveInspectionInfo(array $params): array |
36
|
|
|
{ |
37
|
|
|
return $this->httpPost('btas/saveInspectionInfo', $params); |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* 获取订单的质检结果. |
42
|
|
|
* |
43
|
|
|
* @param array $params |
44
|
|
|
* |
45
|
|
|
* @throws InvalidArgumentException |
46
|
|
|
* @throws RequestException |
47
|
|
|
* |
48
|
|
|
* @return array |
49
|
|
|
*/ |
50
|
|
|
public function getOrderInspectionResult(array $params): array |
51
|
|
|
{ |
52
|
|
|
return $this->httpPost('btas/getOrderInspectionResult', $params); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* 商家调用发货. |
57
|
|
|
* |
58
|
|
|
* @param array $params |
59
|
|
|
* |
60
|
|
|
* @throws InvalidArgumentException |
61
|
|
|
* @throws RequestException |
62
|
|
|
* |
63
|
|
|
* @return array |
64
|
|
|
*/ |
65
|
|
|
public function shipping(array $params): array |
66
|
|
|
{ |
67
|
|
|
return $this->httpPost('btas/shipping', $params); |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* 图片质检送检. |
72
|
|
|
* |
73
|
|
|
* @param array $params |
74
|
|
|
* |
75
|
|
|
* @throws InvalidArgumentException |
76
|
|
|
* @throws RequestException |
77
|
|
|
* |
78
|
|
|
* @return array |
79
|
|
|
*/ |
80
|
|
|
public function saveInspectionOnline(array $params): array |
81
|
|
|
{ |
82
|
|
|
return $this->httpPost('btas/saveInspectionOnline', $params); |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* 获取可图片鉴定的品牌. |
87
|
|
|
* |
88
|
|
|
* @param array $params |
89
|
|
|
* |
90
|
|
|
* @throws InvalidArgumentException |
91
|
|
|
* @throws RequestException |
92
|
|
|
* |
93
|
|
|
* @return array |
94
|
|
|
*/ |
95
|
|
|
public function listBrand(array $params): array |
96
|
|
|
{ |
97
|
|
|
return $this->httpPost('btas/listBrand', $params); |
98
|
|
|
} |
99
|
|
|
} |
100
|
|
|
|