TransferRecipient::createBulk()   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\Paystack;
4
5
class TransferRecipient extends ApiResource
6
{
7
    const OBJECT_NAME = 'transferrecipient';
8
9
    use ApiOperations\All;
10
    use ApiOperations\Create;
11
    use ApiOperations\Update;
12
13
    /**
14
     * @param array $batch
15
     *
16
     * @link https://paystack.com/docs/api/#transfer-recipient-bulk
17
     *
18
     * @return array|object
19
     */
20
    public static function createBulk($batch)
21
    {
22
        $url = static::endPointUrl('bulk');
23
24
        return static::staticRequest('POST', $url, $batch);
25
    }
26
27
    /**
28
     * @param $recipient_code
29
     *
30
     * @link https://paystack.com/docs/api/#transfer-recipient-delete
31
     *
32
     * @return array|object
33
     */
34
    public static function delete($recipient_code)
35
    {
36
        $url = static::resourceUrl($recipient_code);
37
38
        return static::staticRequest('DELETE', $url);
39
    }
40
}
41