| Conditions | 2 |
| Paths | 4 |
| Total Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function enquiry($preApprovalCode, HandlerStack $stack = null) |
||
| 23 | { |
||
| 24 | try { |
||
| 25 | $params = $this->generateParams(['preApprovalCode' => $preApprovalCode], $stack); |
||
| 26 | |||
| 27 | $result = $this->getClient()->post('preapprovals/enquire', $params); |
||
| 28 | |||
| 29 | return $this->getSerializer()->deserialize( |
||
| 30 | (string) $result->getBody(), |
||
| 31 | Model\InStore\PreApproval::class, |
||
| 32 | 'json' |
||
| 33 | ); |
||
| 34 | } catch (BadResponseException $exception) { |
||
| 35 | throw new ApiException( |
||
| 36 | $this->getSerializer()->deserialize( |
||
| 37 | (string) $exception->getResponse()->getBody(), |
||
| 38 | Model\ErrorResponse::class, |
||
| 39 | 'json' |
||
| 40 | ), |
||
| 41 | $exception |
||
| 42 | ); |
||
| 43 | } |
||
| 44 | } |
||
| 45 | } |
||
| 46 |