files.com 1.1.254 → 1.1.256
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/user_lifecycle_rule.md +148 -0
- data/lib/files.com/models/user_lifecycle_rule.rb +210 -0
- data/lib/files.com/version.rb +1 -1
- data/lib/files.com.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93026386c22bffe0c652b27d9bc0a69afff00876c210d65706ff30f1da69ba1c
|
4
|
+
data.tar.gz: 78a166a01106d098d6a0131aa9e85c7751bbac0447f1cd2316f019958300ae86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75ffc5d9dd5bda8c2f3b20ebe33022c48c3222071e22d8b8891cb361f86b33523a0062c74f3458f3b3f15efdedc03f8c76c4feeb869a0e147cc82f42804b4cf7
|
7
|
+
data.tar.gz: aa2837e605b7dfd84a3b4eacc708e6f267b5c18fbf12b2248598ff8e7d4998b52231912b3cd32d8ade5ee8281c95a305f526f7afa1ef995663aa79d131e6de43
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.256
|
@@ -0,0 +1,148 @@
|
|
1
|
+
# UserLifecycleRule
|
2
|
+
|
3
|
+
## Example UserLifecycleRule Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"id": 1,
|
8
|
+
"authentication_method": "password",
|
9
|
+
"inactivity_days": 12,
|
10
|
+
"include_folder_admins": true,
|
11
|
+
"include_site_admins": true,
|
12
|
+
"action": "disable",
|
13
|
+
"site_id": 1
|
14
|
+
}
|
15
|
+
```
|
16
|
+
|
17
|
+
* `id` (int64): User Lifecycle Rule ID
|
18
|
+
* `authentication_method` (string): User authentication method for the rule
|
19
|
+
* `inactivity_days` (int64): Number of days of inactivity before the rule applies
|
20
|
+
* `include_folder_admins` (boolean): Include folder admins in the rule
|
21
|
+
* `include_site_admins` (boolean): Include site admins in the rule
|
22
|
+
* `action` (string): Action to take on inactive users (disable or delete)
|
23
|
+
* `site_id` (int64): Site ID
|
24
|
+
|
25
|
+
|
26
|
+
---
|
27
|
+
|
28
|
+
## List User Lifecycle Rules
|
29
|
+
|
30
|
+
```
|
31
|
+
Files::UserLifecycleRule.list
|
32
|
+
```
|
33
|
+
|
34
|
+
### Parameters
|
35
|
+
|
36
|
+
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
37
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
38
|
+
|
39
|
+
|
40
|
+
---
|
41
|
+
|
42
|
+
## Show User Lifecycle Rule
|
43
|
+
|
44
|
+
```
|
45
|
+
Files::UserLifecycleRule.find(id)
|
46
|
+
```
|
47
|
+
|
48
|
+
### Parameters
|
49
|
+
|
50
|
+
* `id` (int64): Required - User Lifecycle Rule ID.
|
51
|
+
|
52
|
+
|
53
|
+
---
|
54
|
+
|
55
|
+
## Create User Lifecycle Rule
|
56
|
+
|
57
|
+
```
|
58
|
+
Files::UserLifecycleRule.create(
|
59
|
+
authentication_method: "password",
|
60
|
+
inactivity_days: 12,
|
61
|
+
include_site_admins: true,
|
62
|
+
include_folder_admins: true
|
63
|
+
)
|
64
|
+
```
|
65
|
+
|
66
|
+
### Parameters
|
67
|
+
|
68
|
+
* `action` (string): Required - Action to take on inactive users (disable or delete)
|
69
|
+
* `authentication_method` (string): Required - User authentication method for the rule
|
70
|
+
* `inactivity_days` (int64): Required - Number of days of inactivity before the rule applies
|
71
|
+
* `include_site_admins` (boolean): Include site admins in the rule
|
72
|
+
* `include_folder_admins` (boolean): Include folder admins in the rule
|
73
|
+
|
74
|
+
|
75
|
+
---
|
76
|
+
|
77
|
+
## Update User Lifecycle Rule
|
78
|
+
|
79
|
+
```
|
80
|
+
Files::UserLifecycleRule.update(id,
|
81
|
+
authentication_method: "password",
|
82
|
+
inactivity_days: 12,
|
83
|
+
include_site_admins: true,
|
84
|
+
include_folder_admins: true
|
85
|
+
)
|
86
|
+
```
|
87
|
+
|
88
|
+
### Parameters
|
89
|
+
|
90
|
+
* `id` (int64): Required - User Lifecycle Rule ID.
|
91
|
+
* `action` (string): Required - Action to take on inactive users (disable or delete)
|
92
|
+
* `authentication_method` (string): Required - User authentication method for the rule
|
93
|
+
* `inactivity_days` (int64): Required - Number of days of inactivity before the rule applies
|
94
|
+
* `include_site_admins` (boolean): Include site admins in the rule
|
95
|
+
* `include_folder_admins` (boolean): Include folder admins in the rule
|
96
|
+
|
97
|
+
|
98
|
+
---
|
99
|
+
|
100
|
+
## Delete User Lifecycle Rule
|
101
|
+
|
102
|
+
```
|
103
|
+
Files::UserLifecycleRule.delete(id)
|
104
|
+
```
|
105
|
+
|
106
|
+
### Parameters
|
107
|
+
|
108
|
+
* `id` (int64): Required - User Lifecycle Rule ID.
|
109
|
+
|
110
|
+
|
111
|
+
---
|
112
|
+
|
113
|
+
## Update User Lifecycle Rule
|
114
|
+
|
115
|
+
```
|
116
|
+
user_lifecycle_rule = Files::UserLifecycleRule.find(id)
|
117
|
+
|
118
|
+
user_lifecycle_rule.update(
|
119
|
+
authentication_method: "password",
|
120
|
+
inactivity_days: 12,
|
121
|
+
include_site_admins: true,
|
122
|
+
include_folder_admins: true
|
123
|
+
)
|
124
|
+
```
|
125
|
+
|
126
|
+
### Parameters
|
127
|
+
|
128
|
+
* `id` (int64): Required - User Lifecycle Rule ID.
|
129
|
+
* `action` (string): Required - Action to take on inactive users (disable or delete)
|
130
|
+
* `authentication_method` (string): Required - User authentication method for the rule
|
131
|
+
* `inactivity_days` (int64): Required - Number of days of inactivity before the rule applies
|
132
|
+
* `include_site_admins` (boolean): Include site admins in the rule
|
133
|
+
* `include_folder_admins` (boolean): Include folder admins in the rule
|
134
|
+
|
135
|
+
|
136
|
+
---
|
137
|
+
|
138
|
+
## Delete User Lifecycle Rule
|
139
|
+
|
140
|
+
```
|
141
|
+
user_lifecycle_rule = Files::UserLifecycleRule.find(id)
|
142
|
+
|
143
|
+
user_lifecycle_rule.delete
|
144
|
+
```
|
145
|
+
|
146
|
+
### Parameters
|
147
|
+
|
148
|
+
* `id` (int64): Required - User Lifecycle Rule ID.
|
@@ -0,0 +1,210 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Files
|
4
|
+
class UserLifecycleRule
|
5
|
+
attr_reader :options, :attributes
|
6
|
+
|
7
|
+
def initialize(attributes = {}, options = {})
|
8
|
+
@attributes = attributes || {}
|
9
|
+
@options = options || {}
|
10
|
+
end
|
11
|
+
|
12
|
+
# int64 - User Lifecycle Rule ID
|
13
|
+
def id
|
14
|
+
@attributes[:id]
|
15
|
+
end
|
16
|
+
|
17
|
+
def id=(value)
|
18
|
+
@attributes[:id] = value
|
19
|
+
end
|
20
|
+
|
21
|
+
# string - User authentication method for the rule
|
22
|
+
def authentication_method
|
23
|
+
@attributes[:authentication_method]
|
24
|
+
end
|
25
|
+
|
26
|
+
def authentication_method=(value)
|
27
|
+
@attributes[:authentication_method] = value
|
28
|
+
end
|
29
|
+
|
30
|
+
# int64 - Number of days of inactivity before the rule applies
|
31
|
+
def inactivity_days
|
32
|
+
@attributes[:inactivity_days]
|
33
|
+
end
|
34
|
+
|
35
|
+
def inactivity_days=(value)
|
36
|
+
@attributes[:inactivity_days] = value
|
37
|
+
end
|
38
|
+
|
39
|
+
# boolean - Include folder admins in the rule
|
40
|
+
def include_folder_admins
|
41
|
+
@attributes[:include_folder_admins]
|
42
|
+
end
|
43
|
+
|
44
|
+
def include_folder_admins=(value)
|
45
|
+
@attributes[:include_folder_admins] = value
|
46
|
+
end
|
47
|
+
|
48
|
+
# boolean - Include site admins in the rule
|
49
|
+
def include_site_admins
|
50
|
+
@attributes[:include_site_admins]
|
51
|
+
end
|
52
|
+
|
53
|
+
def include_site_admins=(value)
|
54
|
+
@attributes[:include_site_admins] = value
|
55
|
+
end
|
56
|
+
|
57
|
+
# string - Action to take on inactive users (disable or delete)
|
58
|
+
def action
|
59
|
+
@attributes[:action]
|
60
|
+
end
|
61
|
+
|
62
|
+
def action=(value)
|
63
|
+
@attributes[:action] = value
|
64
|
+
end
|
65
|
+
|
66
|
+
# int64 - Site ID
|
67
|
+
def site_id
|
68
|
+
@attributes[:site_id]
|
69
|
+
end
|
70
|
+
|
71
|
+
def site_id=(value)
|
72
|
+
@attributes[:site_id] = value
|
73
|
+
end
|
74
|
+
|
75
|
+
# Parameters:
|
76
|
+
# action (required) - string - Action to take on inactive users (disable or delete)
|
77
|
+
# authentication_method (required) - string - User authentication method for the rule
|
78
|
+
# inactivity_days (required) - int64 - Number of days of inactivity before the rule applies
|
79
|
+
# include_site_admins - boolean - Include site admins in the rule
|
80
|
+
# include_folder_admins - boolean - Include folder admins in the rule
|
81
|
+
def update(params = {})
|
82
|
+
params ||= {}
|
83
|
+
params[:id] = @attributes[:id]
|
84
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
85
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
86
|
+
raise InvalidParameterError.new("Bad parameter: action must be an String") if params[:action] and !params[:action].is_a?(String)
|
87
|
+
raise InvalidParameterError.new("Bad parameter: authentication_method must be an String") if params[:authentication_method] and !params[:authentication_method].is_a?(String)
|
88
|
+
raise InvalidParameterError.new("Bad parameter: inactivity_days must be an Integer") if params[:inactivity_days] and !params[:inactivity_days].is_a?(Integer)
|
89
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
90
|
+
raise MissingParameterError.new("Parameter missing: action") unless params[:action]
|
91
|
+
raise MissingParameterError.new("Parameter missing: authentication_method") unless params[:authentication_method]
|
92
|
+
raise MissingParameterError.new("Parameter missing: inactivity_days") unless params[:inactivity_days]
|
93
|
+
|
94
|
+
Api.send_request("/user_lifecycle_rules/#{@attributes[:id]}", :patch, params, @options)
|
95
|
+
end
|
96
|
+
|
97
|
+
def delete(params = {})
|
98
|
+
params ||= {}
|
99
|
+
params[:id] = @attributes[:id]
|
100
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
101
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
102
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
103
|
+
|
104
|
+
Api.send_request("/user_lifecycle_rules/#{@attributes[:id]}", :delete, params, @options)
|
105
|
+
end
|
106
|
+
|
107
|
+
def destroy(params = {})
|
108
|
+
delete(params)
|
109
|
+
nil
|
110
|
+
end
|
111
|
+
|
112
|
+
def save
|
113
|
+
if @attributes[:id]
|
114
|
+
new_obj = update(@attributes)
|
115
|
+
else
|
116
|
+
new_obj = UserLifecycleRule.create(@attributes, @options)
|
117
|
+
end
|
118
|
+
|
119
|
+
@attributes = new_obj.attributes
|
120
|
+
true
|
121
|
+
end
|
122
|
+
|
123
|
+
# Parameters:
|
124
|
+
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
125
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
126
|
+
def self.list(params = {}, options = {})
|
127
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
128
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
129
|
+
|
130
|
+
List.new(UserLifecycleRule, params) do
|
131
|
+
Api.send_request("/user_lifecycle_rules", :get, params, options)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
def self.all(params = {}, options = {})
|
136
|
+
list(params, options)
|
137
|
+
end
|
138
|
+
|
139
|
+
# Parameters:
|
140
|
+
# id (required) - int64 - User Lifecycle Rule ID.
|
141
|
+
def self.find(id, params = {}, options = {})
|
142
|
+
params ||= {}
|
143
|
+
params[:id] = id
|
144
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
145
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
146
|
+
|
147
|
+
response, options = Api.send_request("/user_lifecycle_rules/#{params[:id]}", :get, params, options)
|
148
|
+
UserLifecycleRule.new(response.data, options)
|
149
|
+
end
|
150
|
+
|
151
|
+
def self.get(id, params = {}, options = {})
|
152
|
+
find(id, params, options)
|
153
|
+
end
|
154
|
+
|
155
|
+
# Parameters:
|
156
|
+
# action (required) - string - Action to take on inactive users (disable or delete)
|
157
|
+
# authentication_method (required) - string - User authentication method for the rule
|
158
|
+
# inactivity_days (required) - int64 - Number of days of inactivity before the rule applies
|
159
|
+
# include_site_admins - boolean - Include site admins in the rule
|
160
|
+
# include_folder_admins - boolean - Include folder admins in the rule
|
161
|
+
def self.create(params = {}, options = {})
|
162
|
+
raise InvalidParameterError.new("Bad parameter: action must be an String") if params[:action] and !params[:action].is_a?(String)
|
163
|
+
raise InvalidParameterError.new("Bad parameter: authentication_method must be an String") if params[:authentication_method] and !params[:authentication_method].is_a?(String)
|
164
|
+
raise InvalidParameterError.new("Bad parameter: inactivity_days must be an Integer") if params[:inactivity_days] and !params[:inactivity_days].is_a?(Integer)
|
165
|
+
raise MissingParameterError.new("Parameter missing: action") unless params[:action]
|
166
|
+
raise MissingParameterError.new("Parameter missing: authentication_method") unless params[:authentication_method]
|
167
|
+
raise MissingParameterError.new("Parameter missing: inactivity_days") unless params[:inactivity_days]
|
168
|
+
|
169
|
+
response, options = Api.send_request("/user_lifecycle_rules", :post, params, options)
|
170
|
+
UserLifecycleRule.new(response.data, options)
|
171
|
+
end
|
172
|
+
|
173
|
+
# Parameters:
|
174
|
+
# action (required) - string - Action to take on inactive users (disable or delete)
|
175
|
+
# authentication_method (required) - string - User authentication method for the rule
|
176
|
+
# inactivity_days (required) - int64 - Number of days of inactivity before the rule applies
|
177
|
+
# include_site_admins - boolean - Include site admins in the rule
|
178
|
+
# include_folder_admins - boolean - Include folder admins in the rule
|
179
|
+
def self.update(id, params = {}, options = {})
|
180
|
+
params ||= {}
|
181
|
+
params[:id] = id
|
182
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
183
|
+
raise InvalidParameterError.new("Bad parameter: action must be an String") if params[:action] and !params[:action].is_a?(String)
|
184
|
+
raise InvalidParameterError.new("Bad parameter: authentication_method must be an String") if params[:authentication_method] and !params[:authentication_method].is_a?(String)
|
185
|
+
raise InvalidParameterError.new("Bad parameter: inactivity_days must be an Integer") if params[:inactivity_days] and !params[:inactivity_days].is_a?(Integer)
|
186
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
187
|
+
raise MissingParameterError.new("Parameter missing: action") unless params[:action]
|
188
|
+
raise MissingParameterError.new("Parameter missing: authentication_method") unless params[:authentication_method]
|
189
|
+
raise MissingParameterError.new("Parameter missing: inactivity_days") unless params[:inactivity_days]
|
190
|
+
|
191
|
+
response, options = Api.send_request("/user_lifecycle_rules/#{params[:id]}", :patch, params, options)
|
192
|
+
UserLifecycleRule.new(response.data, options)
|
193
|
+
end
|
194
|
+
|
195
|
+
def self.delete(id, params = {}, options = {})
|
196
|
+
params ||= {}
|
197
|
+
params[:id] = id
|
198
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
199
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
200
|
+
|
201
|
+
Api.send_request("/user_lifecycle_rules/#{params[:id]}", :delete, params, options)
|
202
|
+
nil
|
203
|
+
end
|
204
|
+
|
205
|
+
def self.destroy(id, params = {}, options = {})
|
206
|
+
delete(id, params, options)
|
207
|
+
nil
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
data/lib/files.com/version.rb
CHANGED
data/lib/files.com.rb
CHANGED
@@ -126,6 +126,7 @@ require "files.com/models/usage_daily_snapshot"
|
|
126
126
|
require "files.com/models/usage_snapshot"
|
127
127
|
require "files.com/models/user"
|
128
128
|
require "files.com/models/user_cipher_use"
|
129
|
+
require "files.com/models/user_lifecycle_rule"
|
129
130
|
require "files.com/models/user_request"
|
130
131
|
require "files.com/models/user_sftp_client_use"
|
131
132
|
require "files.com/models/web_dav_action_log"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: files.com
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.256
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-05-
|
11
|
+
date: 2025-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -209,6 +209,7 @@ files:
|
|
209
209
|
- docs/usage_snapshot.md
|
210
210
|
- docs/user.md
|
211
211
|
- docs/user_cipher_use.md
|
212
|
+
- docs/user_lifecycle_rule.md
|
212
213
|
- docs/user_request.md
|
213
214
|
- docs/user_sftp_client_use.md
|
214
215
|
- docs/web_dav_action_log.md
|
@@ -315,6 +316,7 @@ files:
|
|
315
316
|
- lib/files.com/models/usage_snapshot.rb
|
316
317
|
- lib/files.com/models/user.rb
|
317
318
|
- lib/files.com/models/user_cipher_use.rb
|
319
|
+
- lib/files.com/models/user_lifecycle_rule.rb
|
318
320
|
- lib/files.com/models/user_request.rb
|
319
321
|
- lib/files.com/models/user_sftp_client_use.rb
|
320
322
|
- lib/files.com/models/web_dav_action_log.rb
|