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

Sms::signDelete()   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
nc 1
nop 1
dl 0
loc 3
rs 10
c 1
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 Sms extends BaseRequest
9
{
10
    /**
11
     * 提交短信模板申请单.
12
     *
13
     * @param  array  $params
14
     * @return array
15
     * @throws InvalidArgumentException
16
     * @throws RequestException
17
     */
18
    public function templateApply(array $params): array
19
    {
20
        return $this->httpPost('sms/template/apply', $params);
21
    }
22
23
    /**
24
     * 公共模版查询接口.
25
     *
26
     * @param  array  $params
27
     * @return array
28
     * @throws InvalidArgumentException
29
     * @throws RequestException
30
     */
31
    public function publicTemplate(array $params): array
32
    {
33
        return $this->httpPost('sms/public/template', $params);
34
    }
35
36
    /**
37
     * 提交短信签名申请单.
38
     *
39
     * @param  array  $params
40
     * @return array
41
     * @throws InvalidArgumentException
42
     * @throws RequestException
43
     */
44
    public function signApply(array $params): array
45
    {
46
        return $this->httpPost('sms/sign/apply', $params);
47
    }
48
49
    /**
50
     * 撤销短信模板申请单.
51
     *
52
     * @param  array  $params
53
     * @return array
54
     * @throws InvalidArgumentException
55
     * @throws RequestException
56
     */
57
    public function templateRevoke(array $params): array
58
    {
59
        return $this->httpPost('sms/template/revoke', $params);
60
    }
61
62
    /**
63
     * 查看短信签名申请单.
64
     *
65
     * @param  array  $params
66
     * @return array
67
     * @throws InvalidArgumentException
68
     * @throws RequestException
69
     */
70
    public function signApplyList(array $params): array
71
    {
72
        return $this->httpPost('sms/sign/apply/list', $params);
73
    }
74
75
    /**
76
     * 短信发送.
77
     *
78
     * @param  array  $params
79
     * @return array
80
     * @throws InvalidArgumentException
81
     * @throws RequestException
82
     */
83
    public function send(array $params): array
84
    {
85
        return $this->httpPost('sms/send', $params);
86
    }
87
88
    /**
89
     * 批量短信发送.
90
     *
91
     * @param  array  $params
92
     * @return array
93
     * @throws InvalidArgumentException
94
     * @throws RequestException
95
     */
96
    public function batchSend(array $params): array
97
    {
98
        return $this->httpPost('sms/batchSend', $params);
99
    }
100
101
    /**
102
     * 删除短信签名.
103
     *
104
     * @param  array  $params
105
     * @return array
106
     * @throws InvalidArgumentException
107
     * @throws RequestException
108
     */
109
    public function signDelete(array $params): array
110
    {
111
        return $this->httpPost('sms/sign/delete', $params);
112
    }
113
114
    /**
115
     * 撤销短信签名申请单.
116
     *
117
     * @param  array  $params
118
     * @return array
119
     * @throws InvalidArgumentException
120
     * @throws RequestException
121
     */
122
    public function signApplyRevoke(array $params): array
123
    {
124
        return $this->httpPost('sms/sign/apply/revoke', $params);
125
    }
126
127
    /**
128
     * 删除短信模板.
129
     *
130
     * @param  array  $params
131
     * @return array
132
     * @throws InvalidArgumentException
133
     * @throws RequestException
134
     */
135
    public function templateDelete(array $params): array
136
    {
137
        return $this->httpPost('sms/template/delete', $params);
138
    }
139
140
    /**
141
     * 查询短信发送结果.
142
     *
143
     * @param  array  $params
144
     * @return array
145
     * @throws InvalidArgumentException
146
     * @throws RequestException
147
     */
148
    public function sendResult(array $params): array
149
    {
150
        return $this->httpPost('sms/sendResult', $params);
151
    }
152
153
    /**
154
     * 查询短信模板申请单.
155
     *
156
     * @param  array  $params
157
     * @return array
158
     * @throws InvalidArgumentException
159
     * @throws RequestException
160
     */
161
    public function templateApplyList(array $params): array
162
    {
163
        return $this->httpPost('sms/template/apply/list', $params);
164
    }
165
166
    /**
167
     * 查看短信签名.
168
     *
169
     * @param  array  $params
170
     * @return array
171
     * @throws InvalidArgumentException
172
     * @throws RequestException
173
     */
174
    public function signSearch(array $params): array
175
    {
176
        return $this->httpPost('sms/sign/search', $params);
177
    }
178
179
    /**
180
     * 查询短信模板.
181
     *
182
     * @param  array  $params
183
     * @return array
184
     * @throws InvalidArgumentException
185
     * @throws RequestException
186
     */
187
    public function templateSearch(array $params): array
188
    {
189
        return $this->httpPost('sms/template/search', $params);
190
    }
191
}
192