File tree Expand file tree Collapse file tree 1 file changed +26
-14
lines changed Expand file tree Collapse file tree 1 file changed +26
-14
lines changed Original file line number Diff line number Diff line change 1
1
export class GeolocationParams {
2
2
3
- ip : string ;
3
+ ipAddress : string ;
4
4
fields : string ;
5
- ips : any ;
5
+ excludes : string ;
6
+ lang : string ;
7
+ ipAddresses : string [ ] ;
6
8
7
9
constructor ( ) {
8
- this . ip = "" ;
9
- this . fields = "" ;
10
- this . ips = "" ;
10
+ this . ipAddress = "" ;
11
+ this . fields = "" ;
12
+ this . excludes = "" ;
13
+ this . lang = "en" ;
14
+ this . ipAddresses = [ ] ;
11
15
}
12
16
13
- setIP ( ip = "" ) {
14
- this . ip = ip ;
17
+ setIPAddress ( ipAddress = "" ) {
18
+ this . ipAddress = ipAddress ;
15
19
}
16
20
17
- getIP ( ) {
18
- return this . ip ;
21
+ getIPAddress ( ) {
22
+ return this . ipAddress ;
19
23
}
20
24
21
25
setFields ( fields = "" ) {
@@ -26,15 +30,23 @@ export class GeolocationParams {
26
30
return this . fields ;
27
31
}
28
32
29
- setIPList ( ips : any = null ) {
30
- if ( ips . length > 50 ) {
33
+ setExcludes ( excludes = "" ) {
34
+ this . excludes = excludes ;
35
+ }
36
+
37
+ getExcludes ( ) {
38
+ return this . excludes ;
39
+ }
40
+
41
+ setIPAddresses ( ipAddresses : string [ ] = [ ] ) {
42
+ if ( ipAddresses . length > 50 ) {
31
43
console . log ( "Max. number of IP addresses cannot be more than 50." ) ;
32
44
} else {
33
- this . ips = ips ;
45
+ this . ipAddresses = ipAddresses ;
34
46
}
35
47
}
36
48
37
- getIPList ( ) {
38
- return this . ips ;
49
+ getIPAddresses ( ) {
50
+ return this . ipAddresses ;
39
51
}
40
52
}
You can’t perform that action at this time.
0 commit comments