Conditions | 1 |
Paths | 1 |
Total Lines | 28 |
Code Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Tests | 15 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types = 1); |
||
30 | 1 | public function send(ApiClient $apiClient): CustomerInfoResponse |
|
31 | { |
||
32 | 1 | $response = $apiClient->get( |
|
33 | 1 | 'customer/echo/{merchantId}/{customerId}/{dttm}/{signature}', |
|
34 | [ |
||
35 | 1 | 'merchantId' => $this->merchantId, |
|
36 | 1 | 'customerId' => $this->customerId, |
|
37 | ], |
||
38 | 1 | new SignatureDataFormatter([ |
|
39 | 1 | 'merchantId' => null, |
|
40 | 'customerId' => null, |
||
41 | 'dttm' => null, |
||
42 | ]), |
||
43 | 1 | new SignatureDataFormatter([ |
|
44 | 1 | 'customerId' => null, |
|
45 | 'dttm' => null, |
||
46 | 'resultCode' => null, |
||
47 | 'resultMessage' => null, |
||
48 | ]) |
||
49 | ); |
||
50 | |||
51 | 1 | $data = $response->getData(); |
|
52 | |||
53 | 1 | return new CustomerInfoResponse( |
|
54 | 1 | DateTimeImmutable::createFromFormat('YmdHis', $data['dttm']), |
|
|
|||
55 | 1 | ResultCode::get($data['resultCode']), |
|
56 | 1 | $data['resultMessage'], |
|
57 | 1 | $data['customerId'] ?? null |
|
58 | ); |
||
62 |