@@ -6,16 +6,14 @@ import { PolymathError } from '../PolymathError';
6
6
import { ErrorCode } from '../types' ;
7
7
8
8
/**
9
- * Represents a unique security token reservation
9
+ * Properties that uniquely identify a Security Token Reservation
10
10
*/
11
11
export interface UniqueIdentifiers {
12
12
symbol : string ;
13
13
}
14
14
15
15
/**
16
16
* Check if the provided value is of type [[UniqueIdentifiers]]
17
- *
18
- * @param identifiers - internal security token reservation representation
19
17
*/
20
18
function isUniqueIdentifiers ( identifiers : any ) : identifiers is UniqueIdentifiers {
21
19
const { symbol } = identifiers ;
@@ -24,16 +22,13 @@ function isUniqueIdentifiers(identifiers: any): identifiers is UniqueIdentifiers
24
22
}
25
23
26
24
/**
27
- * Represents a single Security Token Reservation
25
+ * Constructor parameters
28
26
*/
29
27
export interface Params {
30
28
/**
31
29
* expiry date for the ticker reservation
32
30
*/
33
31
expiry : Date ;
34
- /**
35
- * date at which ticker is registered
36
- */
37
32
reservedAt : Date ;
38
33
ownerAddress : string ;
39
34
securityTokenAddress ?: string ;
@@ -44,7 +39,7 @@ export interface Params {
44
39
*/
45
40
export class SecurityTokenReservation extends Entity < Params > {
46
41
/**
47
- * Transform object to string
42
+ * Generate the Security Token Reservation's UUID from its identifying properties
48
43
*/
49
44
public static generateId ( { symbol } : UniqueIdentifiers ) {
50
45
return serialize ( 'securityTokenReservation' , {
@@ -158,7 +153,7 @@ export class SecurityTokenReservation extends Entity<Params> {
158
153
} ;
159
154
160
155
/**
161
- * Convert entity as a POJO (Plain Old Javascript Object)
156
+ * Convert entity to a POJO (Plain Old Javascript Object)
162
157
*/
163
158
public toPojo ( ) {
164
159
const { uid, symbol, expiry, securityTokenAddress, reservedAt, ownerAddress } = this ;
@@ -167,7 +162,7 @@ export class SecurityTokenReservation extends Entity<Params> {
167
162
}
168
163
169
164
/**
170
- * Hydrating the entity
165
+ * Hydrate the entity
171
166
*/
172
167
public _refresh ( params : Partial < Params > ) {
173
168
const { expiry, securityTokenAddress, reservedAt, ownerAddress } = params ;
0 commit comments