files.com 1.0.226 → 1.0.227

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d1b6fdac362dd92d13bfa8f5d8a1d3346a67ae0a385e2c0fca9a0448ed680ec
4
- data.tar.gz: c4c0b860dbfde6c79ea9bfb90a52483d46dee36ae8e17b938139ffdc44816561
3
+ metadata.gz: 3d64dbb3481c10c0da18250e033695bc9c910bb7f74b88d6a72fc23fb4dd7551
4
+ data.tar.gz: 91282bbe6e0c52c8e1734d6c44e09181a3a66227a086161387fd2034927df6bb
5
5
  SHA512:
6
- metadata.gz: c9c601e41a40c1c52a65fc804022a0affb1adf08386c314ab2f6a69aa219c6faaccb4a4e0d528ddc44f3580cd693cf43d99b1ab13980e3189c5912ab861d957a
7
- data.tar.gz: 7daae4e406dc7251c6af60db38d5141bdf94bdd35c6463137de2761314944d67912e06258336bea9220d7b478ed16b964e03e63da9f54ab858bb3a2608691b77
6
+ metadata.gz: 989d8f6afaac864f66c5cd9f47e1fdad660cae79876f7b1b8d18b23b6fe8a06cc5779b9d586c3452a15e102d766be183870ebf40fb6e45375a5166cbeaecdaf2
7
+ data.tar.gz: 7d79478717a8dbf4840860da25d5dea6fcf4e3004924ad3981639b7a83343718f9b4c9195865796735965ae80bd896d862ce9c89d769908818e853f007451fb8
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.226
1
+ 1.0.227
data/docs/behavior.md CHANGED
@@ -24,6 +24,7 @@
24
24
  * `description` (string): Description for this behavior.
25
25
  * `value` (object): Settings for this behavior. See the section above for an example value to provide here. Formatting is different for each Behavior type. May be sent as nested JSON or a single JSON-encoded string. If using XML encoding for the API call, this data must be sent as a JSON-encoded string.
26
26
  * `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
27
+ * `attachment_delete` (boolean): If true, will delete the file stored in attachment
27
28
 
28
29
 
29
30
  ---
@@ -145,7 +146,8 @@ Files::Behavior.webhook_test(
145
146
  ```
146
147
  Files::Behavior.update(id,
147
148
  value: "{\"method\": \"GET\"}",
148
- behavior: "webhook"
149
+ behavior: "webhook",
150
+ attachment_delete: true
149
151
  )
150
152
  ```
151
153
 
@@ -158,6 +160,7 @@ Files::Behavior.update(id,
158
160
  * `description` (string): Description for this behavior.
159
161
  * `behavior` (string): Behavior type.
160
162
  * `path` (string): Folder behaviors path.
163
+ * `attachment_delete` (boolean): If true, will delete the file stored in attachment
161
164
 
162
165
 
163
166
  ---
@@ -182,7 +185,8 @@ behavior = Files::Behavior.list.first
182
185
 
183
186
  behavior.update(
184
187
  value: "{\"method\": \"GET\"}",
185
- behavior: "webhook"
188
+ behavior: "webhook",
189
+ attachment_delete: true
186
190
  )
187
191
  ```
188
192
 
@@ -195,6 +199,7 @@ behavior.update(
195
199
  * `description` (string): Description for this behavior.
196
200
  * `behavior` (string): Behavior type.
197
201
  * `path` (string): Folder behaviors path.
202
+ * `attachment_delete` (boolean): If true, will delete the file stored in attachment
198
203
 
199
204
 
200
205
  ---
data/docs/bundle.md CHANGED
@@ -48,6 +48,11 @@
48
48
  "username": "user",
49
49
  "clickwrap_id": 1,
50
50
  "inbox_id": 1,
51
+ "watermark_attachment": {
52
+ "name": "My logo",
53
+ "uri": "https://mysite.files.com/.../my_image.png"
54
+ },
55
+ "watermark_value": "",
51
56
  "has_inbox": true,
52
57
  "paths": [
53
58
  "file.txt"
@@ -73,10 +78,14 @@
73
78
  * `username` (string): Bundle creator username
74
79
  * `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
75
80
  * `inbox_id` (int64): ID of the associated inbox, if available.
81
+ * `watermark_attachment`: Preview watermark image applied to all bundle items.
82
+ * `watermark_value` (object): Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
76
83
  * `has_inbox` (boolean): Does this bundle have an associated inbox?
77
84
  * `paths` (array): A list of paths in this bundle
78
85
  * `password` (string): Password for this bundle.
79
86
  * `form_field_set_id` (int64): Id of Form Field Set to use with this bundle
87
+ * `watermark_attachment_file` (file): Preview watermark image applied to all bundle items.
88
+ * `watermark_attachment_delete` (boolean): If true, will delete the file stored in watermark_attachment
80
89
 
81
90
 
82
91
  ---
@@ -156,6 +165,7 @@ Files::Bundle.create(
156
165
  * `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
157
166
  * `inbox_id` (int64): ID of the associated inbox, if available.
158
167
  * `require_share_recipient` (boolean): Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
168
+ * `watermark_attachment_file` (file): Preview watermark image applied to all bundle items.
159
169
 
160
170
 
161
171
  ---
@@ -196,7 +206,8 @@ Files::Bundle.update(id,
196
206
  note: "The internal note on the bundle.",
197
207
  preview_only: true,
198
208
  require_registration: true,
199
- require_share_recipient: true
209
+ require_share_recipient: true,
210
+ watermark_attachment_delete: true
200
211
  )
201
212
  ```
202
213
 
@@ -216,6 +227,8 @@ Files::Bundle.update(id,
216
227
  * `preview_only` (boolean): Restrict users to previewing files only?
217
228
  * `require_registration` (boolean): Show a registration page that captures the downloader's name and email address?
218
229
  * `require_share_recipient` (boolean): Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
230
+ * `watermark_attachment_delete` (boolean): If true, will delete the file stored in watermark_attachment
231
+ * `watermark_attachment_file` (file): Preview watermark image applied to all bundle items.
219
232
 
220
233
 
221
234
  ---
@@ -273,7 +286,8 @@ bundle.update(
273
286
  note: "The internal note on the bundle.",
274
287
  preview_only: true,
275
288
  require_registration: true,
276
- require_share_recipient: true
289
+ require_share_recipient: true,
290
+ watermark_attachment_delete: true
277
291
  )
278
292
  ```
279
293
 
@@ -293,6 +307,8 @@ bundle.update(
293
307
  * `preview_only` (boolean): Restrict users to previewing files only?
294
308
  * `require_registration` (boolean): Show a registration page that captures the downloader's name and email address?
295
309
  * `require_share_recipient` (boolean): Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
310
+ * `watermark_attachment_delete` (boolean): If true, will delete the file stored in watermark_attachment
311
+ * `watermark_attachment_file` (file): Preview watermark image applied to all bundle items.
296
312
 
297
313
 
298
314
  ---
@@ -81,6 +81,15 @@ module Files
81
81
  @attributes[:attachment_file] = value
82
82
  end
83
83
 
84
+ # boolean - If true, will delete the file stored in attachment
85
+ def attachment_delete
86
+ @attributes[:attachment_delete]
87
+ end
88
+
89
+ def attachment_delete=(value)
90
+ @attributes[:attachment_delete] = value
91
+ end
92
+
84
93
  # Parameters:
85
94
  # value - string - The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior. See The Behavior Types section for example values for each type of behavior.
86
95
  # attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
@@ -88,6 +97,7 @@ module Files
88
97
  # description - string - Description for this behavior.
89
98
  # behavior - string - Behavior type.
90
99
  # path - string - Folder behaviors path.
100
+ # attachment_delete - boolean - If true, will delete the file stored in attachment
91
101
  def update(params = {})
92
102
  params ||= {}
93
103
  params[:id] = @attributes[:id]
@@ -256,6 +266,7 @@ module Files
256
266
  # description - string - Description for this behavior.
257
267
  # behavior - string - Behavior type.
258
268
  # path - string - Folder behaviors path.
269
+ # attachment_delete - boolean - If true, will delete the file stored in attachment
259
270
  def self.update(id, params = {}, options = {})
260
271
  params ||= {}
261
272
  params[:id] = id
@@ -264,7 +275,8 @@ module Files
264
275
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
265
276
  raise InvalidParameterError.new("Bad parameter: description must be an String") if params.dig(:description) and !params.dig(:description).is_a?(String)
266
277
  raise InvalidParameterError.new("Bad parameter: behavior must be an String") if params.dig(:behavior) and !params.dig(:behavior).is_a?(String)
267
- raise InvalidParameterError.new("Bad parameter: path must be one of String, Integer, Hash") if params.dig(:path) and [ String, Integer, Hash ].none? { |klass| params.dig(:path).is_a?(klass) }
278
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
279
+ raise InvalidParameterError.new("Bad parameter: attachment_delete must be one of String, Integer, Hash") if params.dig(:attachment_delete) and [ String, Integer, Hash ].none? { |klass| params.dig(:attachment_delete).is_a?(klass) }
268
280
  raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
269
281
 
270
282
  response, options = Api.send_request("/behaviors/#{params[:id]}", :patch, params, options)
@@ -167,6 +167,24 @@ module Files
167
167
  @attributes[:inbox_id] = value
168
168
  end
169
169
 
170
+ # Preview watermark image applied to all bundle items.
171
+ def watermark_attachment
172
+ @attributes[:watermark_attachment]
173
+ end
174
+
175
+ def watermark_attachment=(value)
176
+ @attributes[:watermark_attachment] = value
177
+ end
178
+
179
+ # object - Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
180
+ def watermark_value
181
+ @attributes[:watermark_value]
182
+ end
183
+
184
+ def watermark_value=(value)
185
+ @attributes[:watermark_value] = value
186
+ end
187
+
170
188
  # boolean - Does this bundle have an associated inbox?
171
189
  def has_inbox
172
190
  @attributes[:has_inbox]
@@ -203,6 +221,24 @@ module Files
203
221
  @attributes[:form_field_set_id] = value
204
222
  end
205
223
 
224
+ # file - Preview watermark image applied to all bundle items.
225
+ def watermark_attachment_file
226
+ @attributes[:watermark_attachment_file]
227
+ end
228
+
229
+ def watermark_attachment_file=(value)
230
+ @attributes[:watermark_attachment_file] = value
231
+ end
232
+
233
+ # boolean - If true, will delete the file stored in watermark_attachment
234
+ def watermark_attachment_delete
235
+ @attributes[:watermark_attachment_delete]
236
+ end
237
+
238
+ def watermark_attachment_delete=(value)
239
+ @attributes[:watermark_attachment_delete] = value
240
+ end
241
+
206
242
  # Send email(s) with a link to bundle
207
243
  #
208
244
  # Parameters:
@@ -236,6 +272,8 @@ module Files
236
272
  # preview_only - boolean - Restrict users to previewing files only?
237
273
  # require_registration - boolean - Show a registration page that captures the downloader's name and email address?
238
274
  # require_share_recipient - boolean - Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
275
+ # watermark_attachment_delete - boolean - If true, will delete the file stored in watermark_attachment
276
+ # watermark_attachment_file - file - Preview watermark image applied to all bundle items.
239
277
  def update(params = {})
240
278
  params ||= {}
241
279
  params[:id] = @attributes[:id]
@@ -342,6 +380,7 @@ module Files
342
380
  # clickwrap_id - int64 - ID of the clickwrap to use with this bundle.
343
381
  # inbox_id - int64 - ID of the associated inbox, if available.
344
382
  # require_share_recipient - boolean - Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
383
+ # watermark_attachment_file - file - Preview watermark image applied to all bundle items.
345
384
  def self.create(params = {}, options = {})
346
385
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
347
386
  raise InvalidParameterError.new("Bad parameter: paths must be an Array") if params.dig(:paths) and !params.dig(:paths).is_a?(Array)
@@ -393,6 +432,8 @@ module Files
393
432
  # preview_only - boolean - Restrict users to previewing files only?
394
433
  # require_registration - boolean - Show a registration page that captures the downloader's name and email address?
395
434
  # require_share_recipient - boolean - Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
435
+ # watermark_attachment_delete - boolean - If true, will delete the file stored in watermark_attachment
436
+ # watermark_attachment_file - file - Preview watermark image applied to all bundle items.
396
437
  def self.update(id, params = {}, options = {})
397
438
  params ||= {}
398
439
  params[:id] = id
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.226
4
+ version: 1.0.227
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-01 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable