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

AntiSpam::orderQuery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
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