Subscription::disable()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 6
c 1
b 0
f 0
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Digikraaft\Paystack;
4
5
class Subscription extends ApiResource
6
{
7
    const OBJECT_NAME = 'subscription';
8
9
    use ApiOperations\All;
10
    use ApiOperations\Create;
11
    use ApiOperations\Fetch;
12
13
    /**
14
     * @param array $params details at
15
     *
16
     * @link https://paystack.com/docs/api/#subscription-disable
17
     *
18
     * @return array|object
19
     */
20
    public static function disable($params)
21
    {
22
        self::validateParams($params, true);
23
        $url = static::endPointUrl('disable');
24
25
        return static::staticRequest('POST', $url, $params);
26
    }
27
28
    /**
29
     * @param array $params details at
30
     *
31
     * @link https://paystack.com/docs/api/#subscription-enable
32
     *
33
     * @return array|object
34
     */
35
    public static function enable($params)
36
    {
37
        self::validateParams($params, true);
38
        $url = static::endPointUrl('enable');
39
40
        return static::staticRequest('POST', $url, $params);
41
    }
42
}
43