Settlement   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 7
c 1
b 0
f 0
dl 0
loc 30
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A list() 0 5 1
A fetch() 0 5 1
1
<?php
2
3
namespace Iamolayemi\Paystack\Endpoints;
4
5
class Settlement extends Endpoint
6
{
7
    protected const ENDPOINT = '/settlement';
8
9
    /**
10
     * List settlements made to your settlement accounts.
11
     *
12
     * @param  array<string, mixed>  $query
13
     *
14
     * @link https://paystack.com/docs/api/#settlement-list
15
     */
16
    public function list(array $query = []): self
17
    {
18
        $this->get($this->url(self::ENDPOINT), $query);
19
20
        return $this;
21
    }
22
23
    /**
24
     * Get details of a settlement on your integration.
25
     *
26
     * @param  array<string, mixed>  $query
27
     *
28
     * @link https://paystack.com/docs/api/#settlement-fetch
29
     */
30
    public function fetch(string $settlement_id, array $query = []): self
31
    {
32
        $this->get($this->url(self::ENDPOINT).'/'.$settlement_id, $query);
33
34
        return $this;
35
    }
36
}
37