Test Failed
Pull Request — master (#1663)
by
unknown
06:11 queued 02:04
created

CardClient::set()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
/*
4
 * This file is part of the overtrue/wechat.
5
 *
6
 * (c) overtrue <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace EasyWeChat\OfficialAccount\WiFi;
13
14
use EasyWeChat\Kernel\BaseClient;
15
16
/**
17
 * Class CardClient.
18
 *
19
 * @author her-cat <[email protected]>
20
 */
21
class CardClient extends BaseClient
22
{
23
    /**
24
     * Set shop card coupon delivery information.
25
     *
26
     * @param array $data
27
     *
28
     * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
29
     *
30
     * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
31
     * @throws \GuzzleHttp\Exception\GuzzleException
32
     */
33
    public function set(array $data)
34
    {
35
        return $this->httpPostJson('bizwifi/couponput/set', $data);
36
    }
37
38
    /**
39
     * Get shop card coupon delivery information.
40
     *
41
     * @param int $shopId
42
     *
43
     * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
44
     *
45
     * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
46
     * @throws \GuzzleHttp\Exception\GuzzleException
47
     */
48
    public function get(int $shopId = 0)
49
    {
50
        return $this->httpPostJson('bizwifi/couponput/get', ['shop_id' => $shopId]);
51
    }
52
}
53