Completed
Push — master ( 251d07...973a55 )
by Oleksandr
10s
created

RiskCheckCall   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 30
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A executeCall() 0 4 1
A throwValidationException() 0 4 1
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\ArvatoRss\Business\Api\Adapter\ApiCall;
9
10
use SoapClient;
11
use SprykerEco\Shared\ArvatoRss\ArvatoRssApiConfig;
12
use SprykerEco\Zed\ArvatoRss\Business\Api\Exception\ArvatoRssRiskCheckApiException;
13
14
class RiskCheckCall extends AbstractCall
15
{
16
    /**
17
     * @const string
18
     */
19
    const CALL_TYPE = ArvatoRssApiConfig::TRANSACTION_TYPE_RISK_CHECK;
20
21
    /**
22
     * @param \SoapClient $soapClient
23
     * @param array $params
24
     *
25
     * @return \stdClass|\SoapFault
26
     */
27
    protected function executeCall(SoapClient $soapClient, array $params)
28
    {
29
        return $soapClient->RiskCheck($params);
30
    }
31
32
    /**
33
     * @param string $message
34
     *
35
     * @throws \SprykerEco\Zed\ArvatoRss\Business\Api\Exception\ArvatoRssRiskCheckApiException
36
     *
37
     * @return void
38
     */
39
    protected function throwValidationException($message)
40
    {
41
        throw new ArvatoRssRiskCheckApiException($message);
42
    }
43
}
44