| Conditions | 1 |
| Paths | 1 |
| Total Lines | 24 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types = 1); |
||
| 22 | 1 | public function send(ApiClient $apiClient): EchoResponse |
|
| 23 | { |
||
| 24 | 1 | $response = $apiClient->post( |
|
| 25 | 1 | 'echo', |
|
| 26 | [ |
||
| 27 | 1 | 'merchantId' => $this->merchantId, |
|
| 28 | ], |
||
| 29 | 1 | new SignatureDataFormatter([ |
|
| 30 | 1 | 'merchantId' => null, |
|
| 31 | 'dttm' => null, |
||
| 32 | ]), |
||
| 33 | 1 | new SignatureDataFormatter([ |
|
| 34 | 1 | 'dttm' => null, |
|
| 35 | 'resultCode' => null, |
||
| 36 | 'resultMessage' => null, |
||
| 37 | ]) |
||
| 38 | ); |
||
| 39 | |||
| 40 | 1 | $data = $response->getData(); |
|
| 41 | |||
| 42 | 1 | return new EchoResponse( |
|
| 43 | 1 | DateTimeImmutable::createFromFormat('YmdHis', $data['dttm']), |
|
|
|
|||
| 44 | 1 | ResultCode::get($data['resultCode']), |
|
| 45 | 1 | $data['resultMessage'] |
|
| 46 | ); |
||
| 50 |