ClaimCancel   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 1
dl 0
loc 58
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A list() 0 4 1
A deny() 0 6 1
A denyReasonTypes() 0 3 1
A approve() 0 4 1
1
<?php
2
3
namespace Onurkacmaz\LaravelN11\Models;
4
5
use Onurkacmaz\LaravelN11\Exceptions\N11Exception;
6
use Onurkacmaz\LaravelN11\Interfaces\ClaimCancelInterface;
7
use Onurkacmaz\LaravelN11\Service;
8
use SoapClient;
9
10
class ClaimCancel extends Service implements ClaimCancelInterface
11
{
12
13
    /**
14
     * @var SoapClient|null
15
     */
16
    private $_client;
17
18
    /**
19
     * Category constructor
20
     * endPoint set edildi.
21
     * @throws N11Exception|\SoapFault
22
     */
23
    public function __construct()
24
    {
25
        parent::__construct();
26
        $this->_client = $this->setEndPoint(self::END_POINT);
27
    }
28
29
    /**
30
     * @param array $data
31
     * @return object
32
     */
33
    public function list(array $data): object {
34
        $this->_parameters["searchData"] = $data;
35
        return $this->_client->ClaimCancelList($this->_parameters);
36
    }
37
38
    /**
39
     * @param int $claimCancelId
40
     * @param int $reasonId
41
     * @param string $note
42
     * @return object
43
     */
44
    public function deny(int $claimCancelId, int $reasonId, string $note): object {
45
        $this->_parameters["claimCancelId"] = $claimCancelId;
46
        $this->_parameters["denyReasonId"] = $reasonId;
47
        $this->_parameters["denyReasonNote"] = $note;
48
        return $this->_client->ClaimCancelDeny($this->_parameters);
49
    }
50
51
    /**
52
     * @return object
53
     */
54
    public function denyReasonTypes(): object {
55
        $this->_client->ClaimCancelDenyReasonType($this->_parameters);
56
    }
57
58
    /**
59
     * @param int $claimCancelId
60
     * @return object
61
     */
62
    public function approve(int $claimCancelId): object {
63
        $this->_parameters["claimCancelId"] = $claimCancelId;
64
        $this->_client->ClaimCancelApprove($this->_parameters);
65
    }
66
67
}
68