Total Complexity | 4 |
Total Lines | 121 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | class AddressTransactionsRequest implements RequestInterface |
||
19 | { |
||
20 | /** |
||
21 | * Wallet ID |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | public string $walletId; |
||
26 | |||
27 | /** |
||
28 | * Address |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | private string $address; |
||
33 | |||
34 | /** |
||
35 | * Nonce used for HMAC signature |
||
36 | * |
||
37 | * @var float|null |
||
38 | */ |
||
39 | public ?float $nonce; |
||
40 | |||
41 | /** |
||
42 | * HMAC signature |
||
43 | * |
||
44 | * @var string|null |
||
45 | */ |
||
46 | public ?string $signature; |
||
47 | |||
48 | /** |
||
49 | * Beginning of range in unix timestamp |
||
50 | * |
||
51 | * @var int|null |
||
52 | */ |
||
53 | private ?int $from; |
||
54 | |||
55 | /** |
||
56 | * Ending of range in unix timestamp |
||
57 | * |
||
58 | * @var int|null |
||
59 | */ |
||
60 | private ?int $to; |
||
61 | |||
62 | /** |
||
63 | * Records on page |
||
64 | * |
||
65 | * @var int|null |
||
66 | */ |
||
67 | private ?int $limit; |
||
68 | |||
69 | /** |
||
70 | * Page number |
||
71 | * |
||
72 | * @var int|null |
||
73 | */ |
||
74 | private ?int $page; |
||
75 | |||
76 | /** |
||
77 | * @param string $walletId |
||
78 | * @param string $address |
||
79 | * @param float|null $nonce |
||
80 | * @param string|null $signature |
||
81 | * @param int|null $from |
||
82 | * @param int|null $to |
||
83 | * @param int|null $limit |
||
84 | * @param int|null $page |
||
85 | */ |
||
86 | public function __construct( |
||
87 | string $walletId, |
||
88 | string $address, |
||
89 | float $nonce = null, |
||
90 | string $signature = null, |
||
91 | int $from = null, |
||
92 | int $to = null, |
||
93 | int $limit = null, |
||
94 | int $page = null |
||
95 | ) { |
||
96 | $this->walletId = $walletId; |
||
97 | $this->address = $address; |
||
98 | $this->nonce = $nonce; |
||
99 | $this->signature = $signature; |
||
100 | $this->from = $from; |
||
101 | $this->to = $to; |
||
102 | $this->limit = $limit; |
||
103 | $this->page = $page; |
||
104 | } |
||
105 | |||
106 | /** |
||
107 | * @return string |
||
108 | */ |
||
109 | public function getPathParams(): string |
||
119 | ); |
||
120 | } |
||
121 | |||
122 | /** |
||
123 | * @return array |
||
124 | */ |
||
125 | public function getHeaders(): array |
||
130 | ]; |
||
131 | } |
||
132 | |||
133 | /** |
||
134 | * @return array |
||
135 | */ |
||
136 | public function getBody(): array |
||
141 |