Total Complexity | 6 |
Total Lines | 61 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
13 | class OpenOrdersAbstractRequest extends AbstractRequest |
||
14 | { |
||
15 | /** |
||
16 | * @var bool |
||
17 | */ |
||
18 | private $trades; |
||
19 | /** |
||
20 | * @var string|null |
||
21 | */ |
||
22 | private $userref; |
||
23 | |||
24 | /** |
||
25 | * OrderBookAbstractRequest constructor. |
||
26 | * |
||
27 | * @param bool $trades |
||
28 | * @param null $userref |
||
29 | */ |
||
30 | 3 | public function __construct($trades = false, $userref = null) |
|
31 | { |
||
32 | 3 | $this->trades = $trades; |
|
33 | 3 | $this->userref = $userref; |
|
34 | 3 | } |
|
35 | |||
36 | /** |
||
37 | * Returns the api request name |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | 2 | public function getMethod() |
|
42 | { |
||
43 | 2 | return 'OpenOrders'; |
|
44 | } |
||
45 | |||
46 | /** |
||
47 | * @return string |
||
48 | */ |
||
49 | 2 | public function getVisibility() |
|
50 | { |
||
51 | 2 | return VisibilityEnum::VISIBILITY_PRIVATE; |
|
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return array |
||
56 | */ |
||
57 | 2 | public function getRequestData() |
|
58 | { |
||
59 | 2 | $arr = []; |
|
60 | 2 | $arr["trades"] = $this->trades; |
|
61 | 2 | if (null !== $this->userref) { |
|
62 | 1 | $arr["userref"] = $this->userref; |
|
63 | 1 | } |
|
64 | |||
65 | 2 | return $arr; |
|
66 | } |
||
67 | |||
68 | /** |
||
69 | * @return string |
||
70 | */ |
||
71 | 2 | public function getResponseClassName() |
|
74 | } |
||
75 | } |
||
76 |