Total Complexity | 4 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
12 | final class V0id |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * @var string The type of terminal |
||
17 | */ |
||
18 | private $terminal_type = 'com.givepay.terminal-types.ecommerce'; |
||
19 | |||
20 | /** |
||
21 | * @var string The ID of the transactions to void |
||
22 | */ |
||
23 | private $transaction_id; |
||
24 | |||
25 | /** |
||
26 | * Void constructor. |
||
27 | * @param string $terminal_type |
||
28 | * @param string $transaction_id |
||
29 | */ |
||
30 | 2 | public function __construct(string $terminal_type, string $transaction_id) |
|
31 | { |
||
32 | 2 | $this->terminal_type = $terminal_type; |
|
33 | 2 | $this->transaction_id = $transaction_id; |
|
34 | 2 | } |
|
35 | |||
36 | /** |
||
37 | * Serializes the void into a GPG request |
||
38 | * @param string $merchant_id |
||
39 | * @param string $terminal_id |
||
40 | * @return array |
||
41 | */ |
||
42 | 1 | public function serialize($merchant_id, $terminal_id) |
|
51 | ); |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return string |
||
56 | */ |
||
57 | 1 | public function getTerminalType(): string |
|
58 | { |
||
59 | 1 | return $this->terminal_type; |
|
60 | } |
||
61 | |||
62 | /** |
||
63 | * @return string |
||
64 | */ |
||
65 | 1 | public function getTransactionId(): string |
|
68 | } |
||
69 | } |