Passed
Push — master ( faa4ac...572ea2 )
by Vladislav
06:35 queued 04:06
created

OpenOrdersRequest::getOrderCategory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
namespace Carpenstar\ByBitAPI\Spot\Trade\OpenOrders\Request;
3
4
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
5
use Carpenstar\ByBitAPI\Spot\Trade\OpenOrders\Interfaces\IOpenOrdersRequestInterface;
6
7
class OpenOrdersRequest extends AbstractParameters implements IOpenOrdersRequestInterface
8
{
9
    /**
10
     * Name of the trading pair
11
     * @var string $symbol
12
     */
13
    protected string $symbol;
14
15
    /**
16
     * Specify orderId to return all the orders that orderId of which are smaller than
17
     * this particular one for pagination purpose
18
     * @var int $orderId
19
     */
20
    protected int $orderId;
21
22
    /**
23
     * Limit for data size. [1, 500]. Default: 500
24
     * @var int $limit
25
     */
26
    protected int $limit = 500;
27
28
    /**
29
     * Order category. 0:normal order by default; 1:TP/SL order, Required for TP/SL order.
30
     * @var int $orderCategory
31
     */
32
    protected int $orderCategory;
33
34
    /**
35
     * @param string $symbol
36
     * @return $this
37
     */
38
    public function setSymbol(string $symbol): self
39
    {
40
        $this->symbol = $symbol;
41
        return $this;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getSymbol(): string
48
    {
49
        return $this->symbol;
50
    }
51
52
    /**
53
     * @param int $orderId
54
     * @return OpenOrdersRequest
55
     */
56
    public function setOrderId(int $orderId): self
57
    {
58
        $this->orderId = $orderId;
59
        return $this;
60
    }
61
62
    /**
63
     * @return int
64
     */
65
    public function getOrderId(): int
66
    {
67
        return $this->orderId;
68
    }
69
70
    /**
71
     * @param int $limit
72
     * @return OpenOrdersRequest
73
     */
74
    public function setLimit(int $limit): self
75
    {
76
        $this->limit = $limit;
77
        return $this;
78
    }
79
80
    /**
81
     * @return int
82
     */
83
    public function getLimit(): int
84
    {
85
        return $this->limit;
86
    }
87
88
    /**
89
     * @param int $orderCategory
90
     * @return OpenOrdersRequest
91
     */
92
    public function setOrderCategory(int $orderCategory): self
93
    {
94
        $this->orderCategory = $orderCategory;
95
        return $this;
96
    }
97
98
    /**
99
     * @return int
100
     */
101
    public function getOrderCategory(): int
102
    {
103
        return $this->orderCategory;
104
    }
105
}