BalanceHistory::ledger()   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 BalanceHistory extends ApiResource
6
{
7
    const OBJECT_NAME = 'balance';
8
9
    /**
10
     * @param array $params
11
     *
12
     * @throws Exceptions\InvalidArgumentException
13
     *
14
     * @return array|object
15
     *
16
     * @link https://developers.paystack.co/reference#fetch-balance-history
17
     */
18
    public static function ledger($params)
19
    {
20
        self::validateParams($params, true);
21
        $url = static::classUrl().'/ledger';
22
23
        return static::staticRequest('get', $url);
24
    }
25
}
26