PaymentPlan::cancel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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