PaymentPlan   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 8
c 1
b 0
f 0
dl 0
loc 19
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A cancel() 0 5 1
1
<?php
2
3
namespace Digikraaft\Flutterwave;
4
5
class PaymentPlan extends ApiResource
6
{
7
    const OBJECT_NAME = 'payment-plans';
8
9
    use ApiOperations\All;
10
    use ApiOperations\Create;
11
    use ApiOperations\Fetch;
12
    use ApiOperations\Update;
13
14
    /**
15
     * @param string $paymentPlanId
16
     * @return array|object
17
     * @link https://developer.flutterwave.com/reference#cancel-a-payment-plan
18
     */
19
    public static function cancel(string $paymentPlanId)
20
    {
21
        $url = static::endPointUrl("{$paymentPlanId}/cancel");
22
23
        return static::staticRequest('PUT', $url);
24
    }
25
}
26