| Total Complexity | 7 |
| Total Lines | 120 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | class OpenOrder extends AbstractResponse |
||
| 22 | { |
||
| 23 | public const TYPE_SELL = 'sell'; |
||
| 24 | public const TYPE_BUY = 'buy'; |
||
| 25 | |||
| 26 | public const TYPES = [ |
||
| 27 | self::TYPE_SELL, |
||
| 28 | self::TYPE_BUY, |
||
| 29 | ]; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Example: 216145914837 |
||
| 33 | * |
||
| 34 | * @var int |
||
| 35 | */ |
||
| 36 | public $orderNumber; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Example: "sell" |
||
| 40 | * |
||
| 41 | * @var string |
||
| 42 | */ |
||
| 43 | public $type; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Example: "0.02300000" |
||
| 47 | * |
||
| 48 | * @var float |
||
| 49 | */ |
||
| 50 | public $rate; |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Example: "0.04975764" |
||
| 54 | * |
||
| 55 | * @var float |
||
| 56 | */ |
||
| 57 | public $startingAmount; |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Example: "0.04975764" |
||
| 61 | * |
||
| 62 | * @var float |
||
| 63 | */ |
||
| 64 | public $amount; |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Example: "0.00114442" |
||
| 68 | * |
||
| 69 | * @var float |
||
| 70 | */ |
||
| 71 | public $total; |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Example: 0 |
||
| 75 | * |
||
| 76 | * @var int |
||
| 77 | */ |
||
| 78 | public $margin; |
||
| 79 | |||
| 80 | /** |
||
| 81 | * @internal |
||
| 82 | * @param int $orderNumber |
||
| 83 | */ |
||
| 84 | public function setOrderNumber(int $orderNumber): void |
||
| 85 | { |
||
| 86 | $this->orderNumber = $orderNumber; |
||
| 87 | } |
||
| 88 | |||
| 89 | /** |
||
| 90 | * @internal |
||
| 91 | * @param string $type |
||
| 92 | */ |
||
| 93 | public function setType(string $type): void |
||
| 94 | { |
||
| 95 | $this->type = $type; |
||
| 96 | } |
||
| 97 | |||
| 98 | /** |
||
| 99 | * @internal |
||
| 100 | * @param float $rate |
||
| 101 | */ |
||
| 102 | public function setRate(float $rate): void |
||
| 103 | { |
||
| 104 | $this->rate = $rate; |
||
| 105 | } |
||
| 106 | |||
| 107 | /** |
||
| 108 | * @internal |
||
| 109 | * @param float $startingAmount |
||
| 110 | */ |
||
| 111 | public function setStartingAmount(float $startingAmount): void |
||
| 112 | { |
||
| 113 | $this->startingAmount = $startingAmount; |
||
| 114 | } |
||
| 115 | |||
| 116 | /** |
||
| 117 | * @internal |
||
| 118 | * @param float $amount |
||
| 119 | */ |
||
| 120 | public function setAmount(float $amount): void |
||
| 121 | { |
||
| 122 | $this->amount = $amount; |
||
| 123 | } |
||
| 124 | |||
| 125 | /** |
||
| 126 | * @internal |
||
| 127 | * @param float $total |
||
| 128 | */ |
||
| 129 | public function setTotal(float $total): void |
||
| 132 | } |
||
| 133 | |||
| 134 | /** |
||
| 135 | * @internal |
||
| 136 | * @param int $margin |
||
| 137 | */ |
||
| 138 | public function setMargin(int $margin): void |
||
| 141 | } |
||
| 142 | } |