Total Complexity | 3 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
12 | class RefundRequest extends AbstractRequest |
||
13 | { |
||
14 | /** |
||
15 | * {@inheritdoc} |
||
16 | */ |
||
17 | 3 | public function getData(): array |
|
18 | { |
||
19 | 3 | $data = parent::getData(); |
|
20 | |||
21 | 3 | $data['ContractProfileId'] = $this->getContractProfileId(); |
|
22 | 3 | $data['AmountInCents'] = $this->getAmountInteger(); |
|
23 | 3 | $data['CurrencyCode'] = $this->getCurrencyCode(); |
|
24 | 3 | $data['Reference'] = $this->getReference(); // This isn't the payment reference but needs to be unique among refunds. |
|
25 | 3 | $data['Timestamp'] = $this->getTimestamp()->format(self::TIMESTAMP_FORMAT); |
|
26 | |||
27 | 3 | return $data; |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | * |
||
33 | * @throws InvalidRequestException when transaction reference is not set |
||
34 | */ |
||
35 | 2 | public function sendData($data): ResponseInterface |
|
53 | ); |
||
54 | } |
||
56 |