Passed
Push — master ( a99763...fbfe14 )
by Andrey
03:27
created

InventoryGeneral::getInventoryOrdersList()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 6
nc 2
nop 1
dl 0
loc 12
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Daaner\NovaPoshta\Models;
4
5
use Daaner\NovaPoshta\NovaPoshta;
6
use Daaner\NovaPoshta\Traits\Limit;
7
8
class InventoryGeneral extends NovaPoshta
9
{
10
    use Limit;
11
12
    protected $model = 'InventoryGeneral';
13
    protected $calledMethod;
14
    protected $methodProperties = null;
15
16
    /**
17
     * Получение списка доступных к заказу материальных ценностей.
18
     *
19
     * @since 2022-11-05
20
     *
21
     * @return array
22
     */
23
    public function getInventoryNomenclaturesList(): array
24
    {
25
        $this->calledMethod = 'getInventoryNomenclaturesList';
26
27
        return $this->getResponse($this->model, $this->calledMethod, $this->methodProperties, true);
28
    }
29
30
    /***
31
     * Получение списка заказанных материальных ценностей.
32
     *
33
     * @since 2022-11-05
34
     *
35
     * @param string|null $Ref Ref контрагента
36
     * @return array
37
     */
38
    public function getInventoryOrdersList(?string $Ref = null): array
39
    {
40
        $this->calledMethod = 'getInventoryOrdersList';
41
42
        if ($Ref) {
43
            $this->methodProperties['Ref'] = $Ref;
44
        }
45
46
        $this->getLimit();
47
        $this->getPage();
48
49
        return $this->getResponse($this->model, $this->calledMethod, $this->methodProperties, true);
50
    }
51
52
}
53