Total Complexity | 4 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
11 | final class TokenRequest |
||
12 | { |
||
13 | /** |
||
14 | * @var Card card |
||
15 | */ |
||
16 | private $card; |
||
17 | |||
18 | /** |
||
19 | * @var string Terminal Type |
||
20 | */ |
||
21 | private $terminal_type; |
||
22 | |||
23 | /** |
||
24 | * TokenRequest constructor. |
||
25 | * @param Card $card |
||
26 | * @param string $terminal_type |
||
27 | */ |
||
28 | 2 | public function __construct($card, $terminal_type) |
|
29 | { |
||
30 | 2 | $this->card = $card; |
|
31 | 2 | $this->terminal_type = $terminal_type; |
|
32 | 2 | } |
|
33 | |||
34 | /** |
||
35 | * Serializes the tokenization request into a GPG request |
||
36 | * @param string $merchant_id |
||
37 | * @param string $terminal_id |
||
38 | * @return array |
||
39 | */ |
||
40 | 1 | public function serialize($merchant_id, $terminal_id) |
|
49 | ); |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @return string |
||
54 | */ |
||
55 | 1 | public function getTerminalType() |
|
56 | { |
||
57 | 1 | return $this->terminal_type; |
|
58 | } |
||
59 | |||
60 | /** |
||
61 | * @return \GivePay\Gateway\Transactions\Card |
||
62 | */ |
||
63 | 1 | public function getCard() |
|
66 | } |
||
67 | } |