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

CancelOpenOrderRequest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 52
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getMethod() 0 3 1
A __construct() 0 3 1
A getResponseClassName() 0 3 1
A getVisibility() 0 3 1
A getRequestData() 0 5 1
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