Completed
Push — master ( aaf38f...220708 )
by Onur
01:05
created

ClaimCancel::deny()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 3
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
    public function list(array $data): object {
30
        $this->_parameters["searchData"] = $data;
31
        return $this->_client->ClaimCancelList($this->_parameters);
32
    }
33
34
    public function deny(int $claimCancelId, int $reasonId, string $note): object {
35
        $this->_parameters["claimCancelId"] = $claimCancelId;
36
        $this->_parameters["denyReasonId"] = $reasonId;
37
        $this->_parameters["denyReasonNote"] = $note;
38
        return $this->_client->ClaimCancelDeny($this->_parameters);
39
    }
40
41
    public function denyReasonTypes(): object {
42
        $this->_client->ClaimCancelDenyReasonType($this->_parameters);
43
    }
44
45
    public function approve(int $claimCancelId): object {
46
        $this->_parameters["claimCancelId"] = $claimCancelId;
47
        $this->_client->ClaimCancelApprove($this->_parameters);
48
    }
49
50
}
51