Passed
Push — master ( f980d8...9eb105 )
by Tim
09:53
created

TransferRecipient::createBulk()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 4
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
        return static::staticRequest('POST', $url, $batch);
24
    }
25
26
    /**
27
     * @param $recipient_code
28
     *
29
     * @link https://paystack.com/docs/api/#transfer-recipient-delete
30
     *
31
     * @return array|object
32
     */
33
    public static function delete($recipient_code)
34
    {
35
        $url = static::resourceUrl($recipient_code);
36
37
        return static::staticRequest('DELETE', $url);
38
    }
39
}
40