Code Duplication    Length = 35-36 lines in 2 locations

src/Models/SapBankStatementEInvoice.php 1 location

@@ 10-45 (lines=36) @@
7
use Onurkacmaz\LaravelN11\Service;
8
use SoapClient;
9
10
class SapBankStatementEInvoice extends Service
11
{
12
13
    /**
14
     * @var SoapClient|null
15
     */
16
    private $_client;
17
18
    /**
19
     * @var string
20
     */
21
    private $endPoint = "/SapBankStatementEInvoiceService.wsdl";
22
23
    /**
24
     * Sap Bank Statement E-Invoice Service constructor
25
     * @throws N11Exception|\SoapFault
26
     */
27
    public function __construct()
28
    {
29
        parent::__construct();
30
        $this->_client = $this->setEndPoint($this->endPoint);
31
    }
32
33
    /**
34
     * @param string $startDate
35
     * @param string $endDate
36
     * @return mixed
37
     * @description Hesap ekstresi için günlük sorgulama limiti sayısı 3 olarak set edilmiştir.
38
     */
39
    public function getSapBankStatementEInvoice(string $startDate, string $endDate) {
40
        $this->_parameters["startDate"] = $startDate;
41
        $this->_parameters["endDate"] = $endDate;
42
        return $this->_client->GetSapBankStatementEInvoice($this->_parameters);
43
    }
44
45
}
46

src/Models/ShipmentTemplate.php 1 location

@@ 10-44 (lines=35) @@
7
use Onurkacmaz\LaravelN11\Service;
8
use SoapClient;
9
10
class ShipmentTemplate extends Service
11
{
12
13
    /**
14
     * @var SoapClient|null
15
     */
16
    private $_client;
17
18
    /**
19
     * @var string
20
     */
21
    private $endPoint = "/ShipmentService.wsdl";
22
23
    /**
24
     * Shipment Service constructor
25
     * @throws N11Exception|\SoapFault
26
     */
27
    public function __construct()
28
    {
29
        parent::__construct();
30
        $this->_client = $this->setEndPoint($this->endPoint);
31
    }
32
33
    /**
34
     * @param string $templateName
35
     * @return mixed
36
     * @description Teslimat şablon ismi ile aratılan şablonun adres metod gibi özelliklerini gösterme.
37
     * deliverableCities teslimat yapılacak şehirlerin seçimini yaptığımız alan bu alana değer girilmezse tüm şehirlere gönderim yapılacak anlamındadır.
38
     */
39
    public function getShipmentTemplate(string $templateName) {
40
        $this->_parameters["name"] = $templateName;
41
        return $this->_client->GetShipmentTemplate($this->_parameters);
42
    }
43
44
}
45