ClaimCancel::approve()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 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