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

AfterSale::refundOrderList()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Abbotton\DouDian\Api;
4
5
use Illuminate\Http\Client\RequestException;
6
use Psr\SimpleCache\InvalidArgumentException;
7
8
class AfterSale extends BaseRequest
9
{
10
    /**
11
     * 商家为订单添加售后备注.
12
     *
13
     * @param  array  $params
14
     * @return array
15
     *
16
     * @throws RequestException
17
     * @throws InvalidArgumentException
18
     */
19
    public function addOrderRemark(array $params): array
20
    {
21
        return $this->httpPost('afterSale/addOrderRemark', $params);
22
    }
23
24
    /**
25
     * 商家处理换货申请.
26
     *
27
     * @param  array  $params
28
     * @return array
29
     *
30
     * @throws RequestException
31
     * @throws InvalidArgumentException
32
     */
33
    public function buyerExchange(array $params): array
34
    {
35
        return $this->httpPost('afterSale/buyerExchange', $params);
36
    }
37
38
    /**
39
     * 商家确认是否收到换货.
40
     *
41
     * @param  array  $params
42
     * @return array
43
     *
44
     * @throws RequestException
45
     * @throws InvalidArgumentException
46
     */
47
    public function buyerExchangeConfirm(array $params): array
48
    {
49
        return $this->httpPost('afterSale/buyerExchangeConfirm', $params);
50
    }
51
52
    /**
53
     * 卖家提交举证信息.
54
     *
55
     * @param  array  $params
56
     * @return array
57
     *
58
     * @throws RequestException
59
     * @throws InvalidArgumentException
60
     */
61
    public function submitEvidence(array $params = []): array
62
    {
63
        return $this->httpPost('afterSale/submitEvidence', $params);
64
    }
65
66
    /**
67
     * 延长售后收货时限.
68
     *
69
     * @param  array  $params
70
     * @return array
71
     *
72
     * @throws RequestException
73
     * @throws InvalidArgumentException
74
     */
75
    public function timeExtend(array $params): array
76
    {
77
        return $this->httpPost('afterSale/timeExtend', $params);
78
    }
79
80
    /**
81
     * 售后单列表查询(推荐使用).
82
     *
83
     * @param  array  $params
84
     * @return array
85
     *
86
     * @throws RequestException
87
     * @throws InvalidArgumentException
88
     */
89
    public function refundListSearch(array $params = []): array
90
    {
91
        return $this->httpPost('trade/refundListSearch', $params);
92
    }
93
94
    /**
95
     * 提供给商家获取售后单详情信息.
96
     *
97
     * @param  array  $params
98
     * @return array
99
     *
100
     * @throws RequestException
101
     * @throws InvalidArgumentException
102
     */
103
    public function detail(array $params = []): array
104
    {
105
        return $this->httpPost('afterSale/Detail', $params);
106
    }
107
108
    /**
109
     * 售后审核接口聚合版.
110
     *
111
     * @param  array  $params
112
     * @return array
113
     *
114
     * @throws RequestException
115
     * @throws InvalidArgumentException
116
     */
117
    public function operate(array $params = []): array
118
    {
119
        return $this->httpPost('afterSale/Operate', $params);
120
    }
121
122
    /**
123
     * 打开售后通道,使用户可以发起超级售后.
124
     *
125
     * @param  array  $params
126
     * @return array
127
     *
128
     * @throws RequestException
129
     * @throws InvalidArgumentException
130
     */
131
    public function openAfterSaleChannel(array $params = []): array
132
    {
133
        return $this->httpPost('afterSale/OpenAfterSaleChannel', $params);
134
    }
135
136
    /**
137
     * 售后列表接口.
138
     *
139
     * @param  array  $params
140
     * @return array
141
     *
142
     * @throws RequestException
143
     * @throws InvalidArgumentException
144
     */
145
    public function List(array $params = []): array
146
    {
147
        return $this->httpPost('afterSale/List', $params);
148
    }
149
150
    /**
151
     * 商家经过质检确认用户退货入仓无误后,售后小助手自动同意退款.
152
     *
153
     * @param  array  $params
154
     * @return array
155
     *
156
     * @throws RequestException
157
     * @throws InvalidArgumentException
158
     */
159
    public function returnGoodsToWareHouseSuccess(array $params = []): array
160
    {
161
        return $this->httpPost('afterSale/returnGoodsToWareHouseSuccess', $params);
162
    }
163
164
    /**
165
     * 商家在未发货仅退款途中取消发货状态,小助手自动同意退款.
166
     *
167
     * @param  array  $params
168
     * @return array
169
     *
170
     * @throws RequestException
171
     * @throws InvalidArgumentException
172
     */
173
    public function cancelSendGoodsSuccess(array $params = []): array
174
    {
175
        return $this->httpPost('afterSale/CancelSendGoodsSuccess', $params);
176
    }
177
178
    /**
179
     * 申请物流拦截.
180
     *
181
     * @param  array  $params
182
     * @return array
183
     *
184
     * @throws RequestException
185
     * @throws InvalidArgumentException
186
     */
187
    public function applyLogisticsIntercept(array $params = []): array
188
    {
189
        return $this->httpPost('afterSale/applyLogisticsIntercept', $params);
190
    }
191
}
192