SmsQuery   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 31
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
A getMethod() 0 3 1
1
<?php
2
3
namespace Vicens\Alidayu\Request;
4
5
/**
6
 * 短信发送记录
7
 * @link https://api.alidayu.com/docs/api.htm?apiId=26039
8
 * @method $this|string recNum(string | null $recNum = null)
9
 * @method $this|int currentPage(int | null $currentPage = null)
10
 * @method $this|int pageSize(int | null $pageSize = null)
11
 * @method $this|string queryDate(string | null $queryDate = null)
12
 * @method $this|string bizId(string | null $bizId = null)
13
 */
14
class SmsQuery extends AbstractRequest
15
{
16
17
    protected $params = [];
18
19
    /**
20
     * SmsQuery constructor.
21
     * @param string $recNum 短信接收号码
22
     * @param int $currentPage 当前页码
23
     * @param int $pageSize 每页显示条数
24
     * @param string|null $queryDate 查询日期
25
     * @param string|null $bizId 短信发送流水
26
     */
27
    public function __construct($recNum, $currentPage = 1, $pageSize = 10, $queryDate = null, $bizId = '')
28
    {
29
        $this->setParams([
30
            'rec_num' => $recNum,
31
            'current_page' => $currentPage,
32
            'page_size' => $pageSize,
33
            'query_date' => $queryDate ?: date('Ymd'),
34
            'biz_id' => $bizId
35
        ]);
36
    }
37
38
    /**
39
     * 返回接口名
40
     * @return string
41
     */
42
    public function getMethod()
43
    {
44
        return 'alibaba.aliqin.fc.sms.num.query';
45
    }
46
}
47
48