Passed
Push — master ( 4f79b1...15f90b )
by wannanbigpig
05:41 queued 10s
created

Client   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 161
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 32
dl 0
loc 161
ccs 0
cts 62
cp 0
rs 10
c 0
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A faceAuthenticationResultsQuery() 0 7 1
A deleteSafeDomain() 0 9 1
A getUsageTemplateList() 0 5 1
A contentRiskDetect() 0 9 1
A createSafeDomain() 0 9 1
A updateBaseInfo() 0 5 1
A getCategoryList() 0 7 1
A getBaseInfo() 0 7 1
1
<?php
2
/*
3
 * This file is part of the wannanbigpig/alipay-sdk-php.
4
 *
5
 * (c) wannanbigpig <[email protected]>
6
 *
7
 * This source file is subject to the MIT license that is bundled
8
 * with this source code in the file LICENSE.
9
 */
10
11
namespace EasyAlipay\MiniProgram\Base;
12
13
use EasyAlipay\Kernel\Support\Support;
14
15
class Client extends Support
16
{
17
    /**
18
     * alipay.open.mini.baseinfo.query(查询小程序基础信息).
19
     *
20
     * @return array|object|\Psr\Http\Message\ResponseInterface|\WannanBigPig\Supports\Collection|\WannanBigPig\Supports\Http\Response
21
     *
22
     * @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException
23
     * @throws \GuzzleHttp\Exception\GuzzleException
24
     * @throws \WannanBigPig\Supports\Exceptions\InvalidArgumentException
25
     */
26
    public function getBaseInfo()
27
    {
28
        $method = 'alipay.open.mini.baseinfo.query';
29
        $params = [];
30
31
        return $this->request($method, [
32
            'biz_content' => $params,
33
        ]);
34
    }
35
36
    /**
37
     * alipay.open.mini.baseinfo.modify(小程序修改基础信息).
38
     *
39
     * @param array $params
40
     *
41
     * @return array|object|\Psr\Http\Message\ResponseInterface|\WannanBigPig\Supports\Collection|\WannanBigPig\Supports\Http\Response
42
     *
43
     * @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException
44
     * @throws \GuzzleHttp\Exception\GuzzleException
45
     * @throws \WannanBigPig\Supports\Exceptions\InvalidArgumentException
46
     */
47
    public function updateBaseInfo(array $params)
48
    {
49
        $method = 'alipay.open.mini.baseinfo.modify';
50
51
        return $this->request($method, $params);
52
    }
53
54
    /**
55
     * alipay.open.mini.template.usage.query(查询使用模板的小程序列表).
56
     *
57
     * @param array $params
58
     *
59
     * @return array|object|\Psr\Http\Message\ResponseInterface|\WannanBigPig\Supports\Collection|\WannanBigPig\Supports\Http\Response
60
     *
61
     * @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException
62
     * @throws \GuzzleHttp\Exception\GuzzleException
63
     * @throws \WannanBigPig\Supports\Exceptions\InvalidArgumentException
64
     */
65
    public function getUsageTemplateList(array $params)
66
    {
67
        $method = 'alipay.open.mini.template.usage.query';
68
69
        return $this->request($method, $params);
70
    }
71
72
    /**
73
     * alipay.open.mini.safedomain.create(小程序添加域白名单).
74
     *
75
     * @param string $safeDomain
76
     *
77
     * @return array|object|\Psr\Http\Message\ResponseInterface|\WannanBigPig\Supports\Collection|\WannanBigPig\Supports\Http\Response
78
     *
79
     * @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException
80
     * @throws \GuzzleHttp\Exception\GuzzleException
81
     * @throws \WannanBigPig\Supports\Exceptions\InvalidArgumentException
82
     */
83
    public function createSafeDomain(string $safeDomain)
84
    {
85
        $method = 'alipay.open.mini.safedomain.create';
86
        $params = [
87
            'safe_domain' => $safeDomain,
88
        ];
89
90
        return $this->request($method, [
91
            'biz_content' => $params,
92
        ]);
93
    }
94
95
    /**
96
     * alipay.open.mini.safedomain.delete(小程序删除域白名单).
97
     *
98
     * @param string $safeDomain
99
     *
100
     * @return array|object|\Psr\Http\Message\ResponseInterface|\WannanBigPig\Supports\Collection|\WannanBigPig\Supports\Http\Response
101
     *
102
     * @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException
103
     * @throws \GuzzleHttp\Exception\GuzzleException
104
     * @throws \WannanBigPig\Supports\Exceptions\InvalidArgumentException
105
     */
106
    public function deleteSafeDomain(string $safeDomain)
107
    {
108
        $method = 'alipay.open.mini.safedomain.delete';
109
        $params = [
110
            'safe_domain' => $safeDomain,
111
        ];
112
113
        return $this->request($method, [
114
            'biz_content' => $params,
115
        ]);
116
    }
117
118
    /**
119
     * alipay.security.risk.content.detect(小程序内容风险检测服务).
120
     *
121
     * @param string $content
122
     *
123
     * @return array|object|\Psr\Http\Message\ResponseInterface|\WannanBigPig\Supports\Collection|\WannanBigPig\Supports\Http\Response
124
     *
125
     * @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException
126
     * @throws \GuzzleHttp\Exception\GuzzleException
127
     * @throws \WannanBigPig\Supports\Exceptions\InvalidArgumentException
128
     */
129
    public function contentRiskDetect(string $content)
130
    {
131
        $method = 'alipay.open.mini.safedomain.delete';
132
        $params = [
133
            'content' => $content,
134
        ];
135
136
        return $this->request($method, [
137
            'biz_content' => $params,
138
        ]);
139
    }
140
141
    /**
142
     * alipay.open.mini.category.query(小程序类目树查询).
143
     *
144
     * @return array|object|\Psr\Http\Message\ResponseInterface|\WannanBigPig\Supports\Collection|\WannanBigPig\Supports\Http\Response
145
     *
146
     * @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException
147
     * @throws \GuzzleHttp\Exception\GuzzleException
148
     * @throws \WannanBigPig\Supports\Exceptions\InvalidArgumentException
149
     */
150
    public function getCategoryList()
151
    {
152
        $method = 'alipay.open.mini.category.query';
153
        $params = [];
154
155
        return $this->request($method, [
156
            'biz_content' => $params,
157
        ]);
158
    }
159
160
    /**
161
     * zoloz.identification.customer.certifyzhub.query(刷脸查询认证结果接口).
162
     *
163
     * @return array|object|\Psr\Http\Message\ResponseInterface|\WannanBigPig\Supports\Collection|\WannanBigPig\Supports\Http\Response
164
     *
165
     * @throws \EasyAlipay\Kernel\Exceptions\InvalidSignException
166
     * @throws \GuzzleHttp\Exception\GuzzleException
167
     * @throws \WannanBigPig\Supports\Exceptions\InvalidArgumentException
168
     */
169
    public function faceAuthenticationResultsQuery()
170
    {
171
        $method = 'zoloz.identification.customer.certifyzhub.query';
172
        $params = [];
173
174
        return $this->request($method, [
175
            'biz_content' => $params,
176
        ]);
177
    }
178
}
179