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

BatchCancelOrderByIdRequest::setOrderCategory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Carpenstar\ByBitAPI\Spot\Trade\BatchCancelOrderById\Request;
3
4
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
5
6
class BatchCancelOrderByIdRequest extends AbstractParameters
7
{
8
    /**
9
     * Order ID, use commas to indicate multiple orderIds. Maximum of 100 ids.
10
     * @var string $orderIds
11
     */
12
    protected string $orderIds;
13
14
    /**
15
     * Order category. 0:normal order by default; 1:TP/SL order, Required for TP/SL order.
16
     * @var int $orderCategory
17
     */
18
    protected int $orderCategory;
19
20
    public function __construct()
21
    {
22
        $this->setRequiredField('orderIds');
23
    }
24
25
    /**
26
     * @param string $orderIds
27
     * @return BatchCancelOrderByIdRequest
28
     */
29
    public function setOrderIds(string $orderIds): self
30
    {
31
        $this->orderIds = $orderIds;
32
        return $this;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getOrderIds(): string
39
    {
40
        return $this->orderIds;
41
    }
42
43
    /**
44
     * @param int $orderCategory
45
     * @return BatchCancelOrderByIdRequest
46
     */
47
    public function setOrderCategory(int $orderCategory): self
48
    {
49
        $this->orderCategory = $orderCategory;
50
        return $this;
51
    }
52
53
    /**
54
     * @return int
55
     */
56
    public function getOrderCategory(): int
57
    {
58
        return $this->orderCategory;
59
    }
60
}