GetBank::getHttpMethod()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Fousky\Component\iDoklad\Functions\Banks;
4
5
use Fousky\Component\iDoklad\Functions\iDokladAbstractFunction;
6
use Fousky\Component\iDoklad\Model\Banks\BankApiModel;
7
8
/**
9
 * @author Lukáš Brzák <[email protected]>
10
 */
11
class GetBank extends iDokladAbstractFunction
12
{
13
    /** @var string $id */
14
    protected $id;
15
16
    /**
17
     * @param string $id
18
     */
19
    public function __construct(string $id)
20
    {
21
        $this->id = $id;
22
    }
23
24
    /**
25
     * Get iDokladModelInterface class.
26
     *
27
     * @see iDokladModelInterface
28
     *
29
     * @return string
30
     */
31
    public function getModelClass(): string
32
    {
33
        return BankApiModel::class;
34
    }
35
36
    /**
37
     * GET|POST|PUT|DELETE e.g.
38
     *
39
     * @see iDoklad::request()
40
     *
41
     * @return string
42
     */
43
    public function getHttpMethod(): string
44
    {
45
        return 'GET';
46
    }
47
48
    /**
49
     * Return base URI, e.g. /invoices; /invoice/1/edit and so on.
50
     *
51
     * @see iDoklad::call()
52
     *
53
     * @return string
54
     */
55
    public function getUri(): string
56
    {
57
        return sprintf('Banks/%s', $this->id);
58
    }
59
60
    /**
61
     * Vrátí seznam parametrů, které se předají GuzzleHttp\Client.
62
     *
63
     * @see \GuzzleHttp\Client::request()
64
     * @see iDoklad::call()
65
     *
66
     * @return array
67
     */
68
    public function getGuzzleOptions(): array
69
    {
70
        return [];
71
    }
72
}
73