Balance::ledger()   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 0
1
<?php
2
3
namespace Iamolayemi\Paystack\Endpoints;
4
5
class Balance extends Endpoint
6
{
7
    protected const ENDPOINT = '/balance';
8
9
    /**
10
     * Fetch the available balance.
11
     *
12
     * @link https://paystack.com/docs/api/#transfer-control-balance
13
     */
14
    public function check(): self
15
    {
16
        $this->get($this->url(self::ENDPOINT));
17
18
        return $this;
19
    }
20
21
    /**
22
     * Fetch all pay-ins and pay-outs that occurred on your integration.
23
     *
24
     * @link https://paystack.com/docs/api/#transfer-control-balance-ledger
25
     */
26
    public function ledger(): self
27
    {
28
        $this->get($this->url(self::ENDPOINT).'/ledger');
29
30
        return $this;
31
    }
32
}
33