1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
/* |
6
|
|
|
* Package: PHP Bitaps API |
7
|
|
|
* |
8
|
|
|
* (c) Eldar Gazaliev <[email protected]> |
9
|
|
|
* |
10
|
|
|
* Link: <https://github.com/MyZik> |
11
|
|
|
* |
12
|
|
|
* For the full copyright and license information, please view the LICENSE file |
13
|
|
|
* that was distributed with this source code. |
14
|
|
|
*/ |
15
|
|
|
|
16
|
|
|
namespace Bitaps\WalletAPI\Response\Addresses\Model; |
17
|
|
|
|
18
|
|
|
class Address |
19
|
|
|
{ |
20
|
|
|
/** |
21
|
|
|
* Address |
22
|
|
|
* |
23
|
|
|
* @var string |
24
|
|
|
*/ |
25
|
|
|
private string $address; |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* Amount received by the address |
29
|
|
|
* |
30
|
|
|
* @var int|null |
31
|
|
|
*/ |
32
|
|
|
private ?int $receivedAmount; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* Count of incoming transactions received by the address |
36
|
|
|
* |
37
|
|
|
* @var int|null |
38
|
|
|
*/ |
39
|
|
|
private ?int $receivedTx; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* Pending amount received by the address |
43
|
|
|
* |
44
|
|
|
* @var int|null |
45
|
|
|
*/ |
46
|
|
|
private ?int $pendingReceivedAmount; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* Count of incoming unconfirmed transactions received by the address |
50
|
|
|
* |
51
|
|
|
* @var int|null |
52
|
|
|
*/ |
53
|
|
|
private ?int $pendingReceivedTx; |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* Date of creation of the address in the format UNIX timestamp |
57
|
|
|
* |
58
|
|
|
* @var int|null |
59
|
|
|
*/ |
60
|
|
|
private ?int $timestamp; |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* Date of creation of the address in the format ISO UTC 0 |
64
|
|
|
* |
65
|
|
|
* @var string |
66
|
|
|
*/ |
67
|
|
|
private string $time; |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* @return string |
71
|
|
|
*/ |
72
|
|
|
public function getAddress(): string |
73
|
|
|
{ |
74
|
|
|
return $this->address; |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* @return int|null |
79
|
|
|
*/ |
80
|
|
|
public function getReceivedAmount(): ?int |
81
|
|
|
{ |
82
|
|
|
return $this->receivedAmount; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @return int|null |
87
|
|
|
*/ |
88
|
|
|
public function getReceivedTx(): ?int |
89
|
|
|
{ |
90
|
|
|
return $this->receivedTx; |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* @return int|null |
95
|
|
|
*/ |
96
|
|
|
public function getPendingReceivedAmount(): ?int |
97
|
|
|
{ |
98
|
|
|
return $this->pendingReceivedAmount; |
99
|
|
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* @return int|null |
103
|
|
|
*/ |
104
|
|
|
public function getPendingReceivedTx(): ?int |
105
|
|
|
{ |
106
|
|
|
return $this->pendingReceivedTx; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* @return int|null |
111
|
|
|
*/ |
112
|
|
|
public function getTimestamp(): ?int |
113
|
|
|
{ |
114
|
|
|
return $this->timestamp; |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* @return string |
119
|
|
|
*/ |
120
|
|
|
public function getTime(): string |
121
|
|
|
{ |
122
|
|
|
return $this->time; |
123
|
|
|
} |
124
|
|
|
} |
125
|
|
|
|