files.com 1.0.265 → 1.0.266

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db72f97f5c50d45af1ba2ffda8089503e3f2dc3f0cb441208851be1a81c87916
4
- data.tar.gz: 35471750be051ca7abd9d92c8ba6ddc5a04e7f2a4345cf7cd94d829d732e5c6c
3
+ metadata.gz: 5bd932a4a99b7a21dabc37284ec0b6ca86718bf48471b1f4589fe2c3be428227
4
+ data.tar.gz: e86ec191784d246cbdb5416a1be455cd5e4dae7b0a956085cfa3ea2454928533
5
5
  SHA512:
6
- metadata.gz: 79af182d5bb3fcfe9dbb26201d339764373cb122f9d9382d55a9662c9ddf7365152dd3c8b3f7fc09fa2eb22100d507e5755940652f4afa65da176aaf0125dfb3
7
- data.tar.gz: ddab423f75b5646667543a0e3d0a47f02ce4dcb0ad990e4f59d78ef7a343b9fb8b9c5355e6993fdd459f910802f6bcb7e235fe67da5605f5061d1e23cbe52fae
6
+ metadata.gz: 5f7934c41f9230fd424124c21243e64e5278ee4cc7e140cb9a5a0d84aae89e4e7d08b0aae99bdec62914972cd1b65a4310ca164a21cde6f77a065d54c0433754
7
+ data.tar.gz: dae557542afe50ab516011f5da15551d555f1fb86232ef5add8d7cf8bd51e8cecbb6c6fd8908dc7d0f4dc2d58d813d2857bb3efeb86977b2019ce829afe4608a
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.265
1
+ 1.0.266
data/docs/notification.md CHANGED
@@ -12,6 +12,7 @@
12
12
  "notify_on_copy": true,
13
13
  "recursive": true,
14
14
  "send_interval": "fifteen_minutes",
15
+ "message": "custom notification email message",
15
16
  "unsubscribed": true,
16
17
  "unsubscribed_reason": "",
17
18
  "user_id": 1,
@@ -28,6 +29,7 @@
28
29
  * `notify_on_copy` (boolean): Triggers notification when moving or copying files to this path
29
30
  * `recursive` (boolean): Enable notifications for each subfolder in this path
30
31
  * `send_interval` (string): The time interval that notifications are aggregated to
32
+ * `message` (string): Custom message to include in notification emails.
31
33
  * `unsubscribed` (boolean): Is the user unsubscribed from this notification?
32
34
  * `unsubscribed_reason` (string): The reason that the user unsubscribed
33
35
  * `user_id` (int64): Notification user ID
@@ -89,6 +91,7 @@ Files::Notification.create(
89
91
  notify_user_actions: true,
90
92
  recursive: true,
91
93
  send_interval: "daily",
94
+ message: "custom notification email message",
92
95
  group_id: 1,
93
96
  username: "User"
94
97
  )
@@ -101,6 +104,7 @@ Files::Notification.create(
101
104
  * `notify_user_actions` (boolean): If `true` actions initiated by the user will still result in a notification
102
105
  * `recursive` (boolean): If `true`, enable notifications for each subfolder in this path
103
106
  * `send_interval` (string): The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
107
+ * `message` (string): Custom message to include in notification emails.
104
108
  * `group_id` (int64): The ID of the group to notify. Provide `user_id`, `username` or `group_id`.
105
109
  * `path` (string): Path
106
110
  * `username` (string): The username of the user to notify. Provide `user_id`, `username` or `group_id`.
@@ -115,7 +119,8 @@ Files::Notification.update(id,
115
119
  notify_on_copy: true,
116
120
  notify_user_actions: true,
117
121
  recursive: true,
118
- send_interval: "daily"
122
+ send_interval: "daily",
123
+ message: "custom notification email message"
119
124
  )
120
125
  ```
121
126
 
@@ -126,6 +131,7 @@ Files::Notification.update(id,
126
131
  * `notify_user_actions` (boolean): If `true` actions initiated by the user will still result in a notification
127
132
  * `recursive` (boolean): If `true`, enable notifications for each subfolder in this path
128
133
  * `send_interval` (string): The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
134
+ * `message` (string): Custom message to include in notification emails.
129
135
 
130
136
 
131
137
  ---
@@ -152,7 +158,8 @@ notification.update(
152
158
  notify_on_copy: true,
153
159
  notify_user_actions: true,
154
160
  recursive: true,
155
- send_interval: "daily"
161
+ send_interval: "daily",
162
+ message: "custom notification email message"
156
163
  )
157
164
  ```
158
165
 
@@ -163,6 +170,7 @@ notification.update(
163
170
  * `notify_user_actions` (boolean): If `true` actions initiated by the user will still result in a notification
164
171
  * `recursive` (boolean): If `true`, enable notifications for each subfolder in this path
165
172
  * `send_interval` (string): The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
173
+ * `message` (string): Custom message to include in notification emails.
166
174
 
167
175
 
168
176
  ---
@@ -81,6 +81,15 @@ module Files
81
81
  @attributes[:send_interval] = value
82
82
  end
83
83
 
84
+ # string - Custom message to include in notification emails.
85
+ def message
86
+ @attributes[:message]
87
+ end
88
+
89
+ def message=(value)
90
+ @attributes[:message] = value
91
+ end
92
+
84
93
  # boolean - Is the user unsubscribed from this notification?
85
94
  def unsubscribed
86
95
  @attributes[:unsubscribed]
@@ -131,12 +140,14 @@ module Files
131
140
  # notify_user_actions - boolean - If `true` actions initiated by the user will still result in a notification
132
141
  # recursive - boolean - If `true`, enable notifications for each subfolder in this path
133
142
  # send_interval - string - The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
143
+ # message - string - Custom message to include in notification emails.
134
144
  def update(params = {})
135
145
  params ||= {}
136
146
  params[:id] = @attributes[:id]
137
147
  raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
138
148
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
139
149
  raise InvalidParameterError.new("Bad parameter: send_interval must be an String") if params.dig(:send_interval) and !params.dig(:send_interval).is_a?(String)
150
+ raise InvalidParameterError.new("Bad parameter: message must be an String") if params.dig(:message) and !params.dig(:message).is_a?(String)
140
151
  raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
141
152
 
142
153
  Api.send_request("/notifications/#{@attributes[:id]}", :patch, params, @options)
@@ -224,12 +235,14 @@ module Files
224
235
  # notify_user_actions - boolean - If `true` actions initiated by the user will still result in a notification
225
236
  # recursive - boolean - If `true`, enable notifications for each subfolder in this path
226
237
  # send_interval - string - The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
238
+ # message - string - Custom message to include in notification emails.
227
239
  # group_id - int64 - The ID of the group to notify. Provide `user_id`, `username` or `group_id`.
228
240
  # path - string - Path
229
241
  # username - string - The username of the user to notify. Provide `user_id`, `username` or `group_id`.
230
242
  def self.create(params = {}, options = {})
231
243
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
232
244
  raise InvalidParameterError.new("Bad parameter: send_interval must be an String") if params.dig(:send_interval) and !params.dig(:send_interval).is_a?(String)
245
+ raise InvalidParameterError.new("Bad parameter: message must be an String") if params.dig(:message) and !params.dig(:message).is_a?(String)
233
246
  raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params.dig(:group_id) and !params.dig(:group_id).is_a?(Integer)
234
247
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
235
248
  raise InvalidParameterError.new("Bad parameter: username must be an String") if params.dig(:username) and !params.dig(:username).is_a?(String)
@@ -243,11 +256,13 @@ module Files
243
256
  # notify_user_actions - boolean - If `true` actions initiated by the user will still result in a notification
244
257
  # recursive - boolean - If `true`, enable notifications for each subfolder in this path
245
258
  # send_interval - string - The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
259
+ # message - string - Custom message to include in notification emails.
246
260
  def self.update(id, params = {}, options = {})
247
261
  params ||= {}
248
262
  params[:id] = id
249
263
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
250
264
  raise InvalidParameterError.new("Bad parameter: send_interval must be an String") if params.dig(:send_interval) and !params.dig(:send_interval).is_a?(String)
265
+ raise InvalidParameterError.new("Bad parameter: message must be an String") if params.dig(:message) and !params.dig(:message).is_a?(String)
251
266
  raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
252
267
 
253
268
  response, options = Api.send_request("/notifications/#{params[:id]}", :patch, params, options)
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.0.265
4
+ version: 1.0.266
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-06 00:00:00.000000000 Z
11
+ date: 2022-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable