files.com 1.1.253 → 1.1.255
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/bundle_notification.md +7 -1
- data/docs/bundle_recipient.md +5 -0
- data/docs/user_lifecycle_rule.md +100 -0
- data/lib/files.com/models/bundle_notification.rb +13 -0
- data/lib/files.com/models/bundle_recipient.rb +13 -0
- data/lib/files.com/models/user_lifecycle_rule.rb +166 -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: fa8f23cf49e5643257139825e9eec2f879cd2df43f255e8e87e6b1f1992cb4b2
|
4
|
+
data.tar.gz: 50c942f98356099c42e311f3944b498698718343a6d73ce427cb1f8cc98b28bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8dd2ce19aa031eb49ad5ccc9fd56a40da41506f2da6f9035aafe40445d91a0d8a3a8a00d3168d80b1d969c988409ecea69976343c4b25f64738aa1e1df14bd2
|
7
|
+
data.tar.gz: 02a8201e3d81f0365ec52b843834bf2db748cfe2633a8c84763a2d211d55290ef2e89be885092b634c79d8a96e924ce8cca48f3fbdb356cbcd61f7e84477b61f
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.255
|
data/docs/bundle_notification.md
CHANGED
@@ -17,6 +17,7 @@
|
|
17
17
|
* `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
|
18
18
|
* `notify_on_upload` (boolean): Triggers bundle notification when a upload action occurs for it.
|
19
19
|
* `notify_user_id` (int64): The id of the user to notify.
|
20
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
20
21
|
|
21
22
|
|
22
23
|
---
|
@@ -24,11 +25,14 @@
|
|
24
25
|
## List Bundle Notifications
|
25
26
|
|
26
27
|
```
|
27
|
-
Files::BundleNotification.list
|
28
|
+
Files::BundleNotification.list(
|
29
|
+
user_id: 1
|
30
|
+
)
|
28
31
|
```
|
29
32
|
|
30
33
|
### Parameters
|
31
34
|
|
35
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
32
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.
|
33
37
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
34
38
|
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `bundle_id`.
|
@@ -54,6 +58,7 @@ Files::BundleNotification.find(id)
|
|
54
58
|
|
55
59
|
```
|
56
60
|
Files::BundleNotification.create(
|
61
|
+
user_id: 1,
|
57
62
|
bundle_id: 1,
|
58
63
|
notify_user_id: 1,
|
59
64
|
notify_on_registration: true,
|
@@ -63,6 +68,7 @@ Files::BundleNotification.create(
|
|
63
68
|
|
64
69
|
### Parameters
|
65
70
|
|
71
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
66
72
|
* `bundle_id` (int64): Required - Bundle ID to notify on
|
67
73
|
* `notify_user_id` (int64): The id of the user to notify.
|
68
74
|
* `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
|
data/docs/bundle_recipient.md
CHANGED
@@ -17,6 +17,7 @@
|
|
17
17
|
* `note` (string): A note sent to the recipient with the bundle.
|
18
18
|
* `recipient` (string): The recipient's email address.
|
19
19
|
* `sent_at` (date-time): When the Bundle was shared with this recipient.
|
20
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
20
21
|
* `bundle_id` (int64): Bundle to share.
|
21
22
|
* `share_after_create` (boolean): Set to true to share the link with the recipient upon creation.
|
22
23
|
|
@@ -27,12 +28,14 @@
|
|
27
28
|
|
28
29
|
```
|
29
30
|
Files::BundleRecipient.list(
|
31
|
+
user_id: 1,
|
30
32
|
bundle_id: 1
|
31
33
|
)
|
32
34
|
```
|
33
35
|
|
34
36
|
### Parameters
|
35
37
|
|
38
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
36
39
|
* `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
40
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
38
41
|
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
|
@@ -46,6 +49,7 @@ Files::BundleRecipient.list(
|
|
46
49
|
|
47
50
|
```
|
48
51
|
Files::BundleRecipient.create(
|
52
|
+
user_id: 1,
|
49
53
|
bundle_id: 1,
|
50
54
|
recipient: "johndoe@gmail.com",
|
51
55
|
name: "John Smith",
|
@@ -57,6 +61,7 @@ Files::BundleRecipient.create(
|
|
57
61
|
|
58
62
|
### Parameters
|
59
63
|
|
64
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
60
65
|
* `bundle_id` (int64): Required - Bundle to share.
|
61
66
|
* `recipient` (string): Required - Email addresses to share this bundle with.
|
62
67
|
* `name` (string): Name of recipient.
|
@@ -0,0 +1,100 @@
|
|
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
|
+
## Delete User Lifecycle Rule
|
78
|
+
|
79
|
+
```
|
80
|
+
Files::UserLifecycleRule.delete(id)
|
81
|
+
```
|
82
|
+
|
83
|
+
### Parameters
|
84
|
+
|
85
|
+
* `id` (int64): Required - User Lifecycle Rule ID.
|
86
|
+
|
87
|
+
|
88
|
+
---
|
89
|
+
|
90
|
+
## Delete User Lifecycle Rule
|
91
|
+
|
92
|
+
```
|
93
|
+
user_lifecycle_rule = Files::UserLifecycleRule.find(id)
|
94
|
+
|
95
|
+
user_lifecycle_rule.delete
|
96
|
+
```
|
97
|
+
|
98
|
+
### Parameters
|
99
|
+
|
100
|
+
* `id` (int64): Required - User Lifecycle Rule ID.
|
@@ -54,6 +54,15 @@ module Files
|
|
54
54
|
@attributes[:notify_user_id] = value
|
55
55
|
end
|
56
56
|
|
57
|
+
# int64 - User ID. Provide a value of `0` to operate the current session's user.
|
58
|
+
def user_id
|
59
|
+
@attributes[:user_id]
|
60
|
+
end
|
61
|
+
|
62
|
+
def user_id=(value)
|
63
|
+
@attributes[:user_id] = value
|
64
|
+
end
|
65
|
+
|
57
66
|
# Parameters:
|
58
67
|
# notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
|
59
68
|
# notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
|
@@ -94,11 +103,13 @@ module Files
|
|
94
103
|
end
|
95
104
|
|
96
105
|
# Parameters:
|
106
|
+
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
97
107
|
# 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.
|
98
108
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
99
109
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `bundle_id`.
|
100
110
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `bundle_id`.
|
101
111
|
def self.list(params = {}, options = {})
|
112
|
+
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
102
113
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
103
114
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
104
115
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
@@ -130,11 +141,13 @@ module Files
|
|
130
141
|
end
|
131
142
|
|
132
143
|
# Parameters:
|
144
|
+
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
133
145
|
# bundle_id (required) - int64 - Bundle ID to notify on
|
134
146
|
# notify_user_id - int64 - The id of the user to notify.
|
135
147
|
# notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
|
136
148
|
# notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
|
137
149
|
def self.create(params = {}, options = {})
|
150
|
+
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
138
151
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)
|
139
152
|
raise InvalidParameterError.new("Bad parameter: notify_user_id must be an Integer") if params[:notify_user_id] and !params[:notify_user_id].is_a?(Integer)
|
140
153
|
raise MissingParameterError.new("Parameter missing: bundle_id") unless params[:bundle_id]
|
@@ -54,6 +54,15 @@ module Files
|
|
54
54
|
@attributes[:sent_at] = value
|
55
55
|
end
|
56
56
|
|
57
|
+
# int64 - User ID. Provide a value of `0` to operate the current session's user.
|
58
|
+
def user_id
|
59
|
+
@attributes[:user_id]
|
60
|
+
end
|
61
|
+
|
62
|
+
def user_id=(value)
|
63
|
+
@attributes[:user_id] = value
|
64
|
+
end
|
65
|
+
|
57
66
|
# int64 - Bundle to share.
|
58
67
|
def bundle_id
|
59
68
|
@attributes[:bundle_id]
|
@@ -84,12 +93,14 @@ module Files
|
|
84
93
|
end
|
85
94
|
|
86
95
|
# Parameters:
|
96
|
+
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
87
97
|
# 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.
|
88
98
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
89
99
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
|
90
100
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `has_registrations`.
|
91
101
|
# bundle_id (required) - int64 - List recipients for the bundle with this ID.
|
92
102
|
def self.list(params = {}, options = {})
|
103
|
+
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
93
104
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
94
105
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
95
106
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
@@ -107,6 +118,7 @@ module Files
|
|
107
118
|
end
|
108
119
|
|
109
120
|
# Parameters:
|
121
|
+
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
110
122
|
# bundle_id (required) - int64 - Bundle to share.
|
111
123
|
# recipient (required) - string - Email addresses to share this bundle with.
|
112
124
|
# name - string - Name of recipient.
|
@@ -114,6 +126,7 @@ module Files
|
|
114
126
|
# note - string - Note to include in email.
|
115
127
|
# share_after_create - boolean - Set to true to share the link with the recipient upon creation.
|
116
128
|
def self.create(params = {}, options = {})
|
129
|
+
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
117
130
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)
|
118
131
|
raise InvalidParameterError.new("Bad parameter: recipient must be an String") if params[:recipient] and !params[:recipient].is_a?(String)
|
119
132
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
@@ -0,0 +1,166 @@
|
|
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
|
+
def delete(params = {})
|
76
|
+
params ||= {}
|
77
|
+
params[:id] = @attributes[:id]
|
78
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
79
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
80
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
81
|
+
|
82
|
+
Api.send_request("/user_lifecycle_rules/#{@attributes[:id]}", :delete, params, @options)
|
83
|
+
end
|
84
|
+
|
85
|
+
def destroy(params = {})
|
86
|
+
delete(params)
|
87
|
+
nil
|
88
|
+
end
|
89
|
+
|
90
|
+
def save
|
91
|
+
if @attributes[:id]
|
92
|
+
raise NotImplementedError.new("The UserLifecycleRule object doesn't support updates.")
|
93
|
+
else
|
94
|
+
new_obj = UserLifecycleRule.create(@attributes, @options)
|
95
|
+
end
|
96
|
+
|
97
|
+
@attributes = new_obj.attributes
|
98
|
+
true
|
99
|
+
end
|
100
|
+
|
101
|
+
# Parameters:
|
102
|
+
# 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.
|
103
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
104
|
+
def self.list(params = {}, options = {})
|
105
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
106
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
107
|
+
|
108
|
+
List.new(UserLifecycleRule, params) do
|
109
|
+
Api.send_request("/user_lifecycle_rules", :get, params, options)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
def self.all(params = {}, options = {})
|
114
|
+
list(params, options)
|
115
|
+
end
|
116
|
+
|
117
|
+
# Parameters:
|
118
|
+
# id (required) - int64 - User Lifecycle Rule ID.
|
119
|
+
def self.find(id, params = {}, options = {})
|
120
|
+
params ||= {}
|
121
|
+
params[:id] = id
|
122
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
123
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
124
|
+
|
125
|
+
response, options = Api.send_request("/user_lifecycle_rules/#{params[:id]}", :get, params, options)
|
126
|
+
UserLifecycleRule.new(response.data, options)
|
127
|
+
end
|
128
|
+
|
129
|
+
def self.get(id, params = {}, options = {})
|
130
|
+
find(id, params, options)
|
131
|
+
end
|
132
|
+
|
133
|
+
# Parameters:
|
134
|
+
# action (required) - string - Action to take on inactive users (disable or delete)
|
135
|
+
# authentication_method (required) - string - User authentication method for the rule
|
136
|
+
# inactivity_days (required) - int64 - Number of days of inactivity before the rule applies
|
137
|
+
# include_site_admins - boolean - Include site admins in the rule
|
138
|
+
# include_folder_admins - boolean - Include folder admins in the rule
|
139
|
+
def self.create(params = {}, options = {})
|
140
|
+
raise InvalidParameterError.new("Bad parameter: action must be an String") if params[:action] and !params[:action].is_a?(String)
|
141
|
+
raise InvalidParameterError.new("Bad parameter: authentication_method must be an String") if params[:authentication_method] and !params[:authentication_method].is_a?(String)
|
142
|
+
raise InvalidParameterError.new("Bad parameter: inactivity_days must be an Integer") if params[:inactivity_days] and !params[:inactivity_days].is_a?(Integer)
|
143
|
+
raise MissingParameterError.new("Parameter missing: action") unless params[:action]
|
144
|
+
raise MissingParameterError.new("Parameter missing: authentication_method") unless params[:authentication_method]
|
145
|
+
raise MissingParameterError.new("Parameter missing: inactivity_days") unless params[:inactivity_days]
|
146
|
+
|
147
|
+
response, options = Api.send_request("/user_lifecycle_rules", :post, params, options)
|
148
|
+
UserLifecycleRule.new(response.data, options)
|
149
|
+
end
|
150
|
+
|
151
|
+
def self.delete(id, params = {}, options = {})
|
152
|
+
params ||= {}
|
153
|
+
params[:id] = id
|
154
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
155
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
156
|
+
|
157
|
+
Api.send_request("/user_lifecycle_rules/#{params[:id]}", :delete, params, options)
|
158
|
+
nil
|
159
|
+
end
|
160
|
+
|
161
|
+
def self.destroy(id, params = {}, options = {})
|
162
|
+
delete(id, params, options)
|
163
|
+
nil
|
164
|
+
end
|
165
|
+
end
|
166
|
+
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.255
|
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-15 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
|