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

AntiSpam   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 42
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A userLogin() 0 3 1
A orderQuery() 0 3 1
A orderSend() 0 3 1
1
<?php
2
3
namespace Abbotton\DouDian\Api;
4
5
use Illuminate\Http\Client\RequestException;
6
use Psr\SimpleCache\InvalidArgumentException;
7
8
class AntiSpam extends BaseRequest
9
{
10
    /**
11
     * 商户登陆风险检查.
12
     *
13
     * @param  array  $params
14
     * @return array
15
     *
16
     * @throws RequestException
17
     * @throws InvalidArgumentException
18
     */
19
    public function userLogin(array $params): array
20
    {
21
        return $this->httpPost('antispam/userLogin', $params);
22
    }
23
24
    /**
25
     * 用户在ISV查看订单、下载订单时, 上报事件到风控系统.
26
     *
27
     * @param  array  $params
28
     * @return array
29
     *
30
     * @throws RequestException
31
     * @throws InvalidArgumentException
32
     */
33
    public function orderQuery(array $params): array
34
    {
35
        return $this->httpPost('antispam/orderQuery', $params);
36
    }
37
38
    /**
39
     * 支持使用在ISV系统商户发送(外部系统或模块,如快递平台)场景.
40
     *
41
     * @param  array  $params
42
     * @return array
43
     *
44
     * @throws RequestException
45
     * @throws InvalidArgumentException
46
     */
47
    public function orderSend(array $params): array
48
    {
49
        return $this->httpPost('antispam/orderSend', $params);
50
    }
51
}
52