Passed
Pull Request — master (#7)
by Vladislav
03:08
created

BatchCancelOrderRequest::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
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Carpenstar\ByBitAPI\Spot\Trade\BatchCancelOrder\Request;
3
4
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
5
6
class BatchCancelOrderRequest extends AbstractParameters
7
{
8
    /**
9
     * Name of the trading pair
10
     * @var string $symbol
11
     */
12
    protected string $symbol;
13
14
    /**
15
     * Side. BUY, SELL
16
     * @var string $side
17
     */
18
    protected string $side;
19
20
    /**
21
     * Order type. LIMIT in default. It allows multiple types, separated by comma, e.a LIMIT,LIMIT_MAKER
22
     * @var string $orderTypes
23
     */
24
    protected string $orderTypes;
25
26
    /**
27
     * Order category. 0:normal order by default; 1:TP/SL order, Required for TP/SL order.
28
     * @var int $orderCategory
29
     */
30
    protected int $orderCategory;
31
32
    public function __construct()
33
    {
34
        $this->setRequiredField('symbol');
35
    }
36
37
    /**
38
     * @param string $symbol
39
     * @return BatchCancelOrderRequest
40
     */
41
    public function setSymbol(string $symbol): self
42
    {
43
        $this->symbol = $symbol;
44
        return $this;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getSymbol(): string
51
    {
52
        return $this->symbol;
53
    }
54
55
    /**
56
     * @param string $side
57
     * @return BatchCancelOrderRequest
58
     */
59
    public function setSide(string $side): self
60
    {
61
        $this->side = $side;
62
        return $this;
63
    }
64
65
    /**
66
     * @return string
67
     */
68
    public function getSide(): string
69
    {
70
        return $this->side;
71
    }
72
73
    /**
74
     * @param string $orderTypes
75
     * @return BatchCancelOrderRequest
76
     */
77
    public function setOrderTypes(string $orderTypes): self
78
    {
79
        $this->orderTypes = $orderTypes;
80
        return $this;
81
    }
82
83
    /**
84
     * @return string
85
     */
86
    public function getOrderTypes(): string
87
    {
88
        return $this->orderTypes;
89
    }
90
91
    /**
92
     * @param int $orderCategory
93
     * @return BatchCancelOrderRequest
94
     */
95
    public function setOrderCategory(int $orderCategory): self
96
    {
97
        $this->orderCategory = $orderCategory;
98
        return $this;
99
    }
100
101
    /**
102
     * @return int
103
     */
104
    public function getOrderCategory(): int
105
    {
106
        return $this->orderCategory;
107
    }
108
}