Passed
Pull Request — master (#3)
by Gombos
02:22
created

Accounts::show()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Glorand\Drip\Api;
4
5
use Glorand\Drip\Api\Response\ApiResponse;
6
7
class Accounts extends Api
8
{
9
    /**
10
     * List all accounts.
11
     * @return Response\ApiResponse
12
     */
13
    public function list(): ApiResponse
14
    {
15
        return $this->makeRequest(self::GET, $this->prepareUrl('accounts'));
16
    }
17
18
    /**
19
     * Fetch an account.
20
     *
21
     * @param string $accountId
22
     *
23
     * @return ApiResponse
24
     */
25
    public function show(string $accountId): ApiResponse
26
    {
27
        return $this->makeRequest(self::GET, $this->prepareUrl("accounts/$accountId"));
28
    }
29
}
30