Completed
Push — master ( ee3472...674111 )
by Fabian
03:13
created

CancelOpenOrderRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace HanischIt\KrakenApi\Model\CancelOpenOrder;
4
5
use HanischIt\KrakenApi\Enum\VisibilityEnum;
6
use HanischIt\KrakenApi\Model\RequestInterface;
7
8
/**
9
 * Class TradesRequest
10
 * @package HanischIt\KrakenApi\Model\Trades
11
 */
12
class CancelOpenOrderRequest implements RequestInterface
13
{
14
15
    /**
16
     * @var string
17
     */
18
    private $txid;
19
20
    /**
21
     * TradesRequest constructor.
22
     * @param string $txid
23
     */
24 2
    public function __construct($txid)
25
    {
26 2
        $this->txid = $txid;
27 2
    }
28
29
30
    /**
31
     * Returns the api request name
32
     *
33
     * @return string
34
     */
35 1
    public function getMethod()
36
    {
37 1
        return 'CancelOrder';
38
    }
39
40
    /**
41
     * @return string
42
     */
43 1
    public function getVisibility()
44
    {
45 1
        return VisibilityEnum::VISIBILITY_PRIVATE;
46
    }
47
48
    /**
49
     * @return array
50
     */
51 1
    public function getRequestData()
52
    {
53 1
        $ret = [];
54 1
        $ret["txid"] = $this->txid;
55 1
        return $ret;
56
    }
57
58
    /**
59
     * @return string
60
     */
61 1
    public function getResponseClassName()
62
    {
63 1
        return CancelOpenOrderResponse::class;
64
    }
65
}
66