Test Failed
Pull Request — master (#14)
by Vladislav
22:59 queued 14:48
created

BatchCancelOrderRequest::__construct()   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
3
namespace Carpenstar\ByBitAPI\Spot\Trade\BatchCancelOrder\Request;
4
5
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
6
use Carpenstar\ByBitAPI\Spot\Trade\BatchCancelOrder\Interfaces\IBatchCancelOrderRequestInterface;
7
8
class BatchCancelOrderRequest extends AbstractParameters implements IBatchCancelOrderRequestInterface
9
{
10
    /**
11
     * Name of the trading pair
12
     * @var string $symbol
13
     */
14
    protected string $symbol;
15
16
    /**
17
     * Side. BUY, SELL
18
     * @var string $side
19
     */
20
    protected string $side;
21
22
    /**
23
     * Order type. LIMIT in default. It allows multiple types, separated by comma, e.a LIMIT,LIMIT_MAKER
24
     * @var string $orderTypes
25
     */
26
    protected string $orderTypes;
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 BatchCancelOrderRequest
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 string $side
54
     * @return BatchCancelOrderRequest
55
     */
56
    public function setSide(string $side): self
57
    {
58
        $this->side = $side;
59
        return $this;
60
    }
61
62
    /**
63
     * @return string
64
     */
65
    public function getSide(): string
66
    {
67
        return $this->side;
68
    }
69
70
    /**
71
     * @param string $orderTypes
72
     * @return BatchCancelOrderRequest
73
     */
74
    public function setOrderTypes(string $orderTypes): self
75
    {
76
        $this->orderTypes = $orderTypes;
77
        return $this;
78
    }
79
80
    /**
81
     * @return string
82
     */
83
    public function getOrderTypes(): string
84
    {
85
        return $this->orderTypes;
86
    }
87
88
    /**
89
     * @param int $orderCategory
90
     * @return BatchCancelOrderRequest
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
}
106