FlowChargeProvince::getMethod()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace Vicens\Alidayu\Request;
4
5
/**
6
 * 流量直充分省
7
 * @link https://api.alidayu.com/docs/api.htm?apiId=26477
8
 * @method $this|string phoneNum(string | null $phoneNum = null)
9
 * @method $this|string grade(string | null $grade = null)
10
 * @method $this|string outRechargeId(string | null $outRechargeId = null)
11
 * @method $this|string reason(string | null $reason = null)
12
 */
13
class FlowChargeProvince extends AbstractRequest
14
{
15
16
    /**
17
     * FlowCharge constructor.
18
     * @param string $phoneNum 手机号
19
     * @param int $grade 充值数量
20
     * @param string $outRechargeId 唯一流水号
21
     * @param string $reason 充值原因
22
     */
23
    public function __construct($phoneNum, $grade, $outRechargeId, $reason = '')
24
    {
25
        $this->setParams([
26
            'phone_num' => $phoneNum,
27
            'grade' => $grade,
28
            'out_recharge_id' => $outRechargeId,
29
            'reason' => $reason
30
        ]);
31
    }
32
33
    /**
34
     * 返回接口名
35
     * @return string
36
     */
37
    public function getMethod()
38
    {
39
        return 'alibaba.aliqin.fc.flow.charge.province';
40
    }
41
}
42