files.com 1.0.94 → 1.0.95
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.md +25 -17
- data/lib/files.com/models/bundle.rb +28 -16
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc5f76212030802af876083085e7dbf117080280c28defd1ccb0eb256cc22ebb
|
4
|
+
data.tar.gz: d542420f40b41fea8cb18d1d7e0b3cc1390134702c190d46a299a535542c21ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8936aa2ae6ed35bee4ebab6486653c92ddf4bc6afdd00784a2d81c19809120a72853f085c087e4aeace4309c2d4cbb80069522755352a1819b0d740d60be9a4
|
7
|
+
data.tar.gz: 4764cac725ab63104b7eb866d2a1aa4933a02c5591908c45ba480f172647b49b516a670a7f2ed8107fe33eecbd17150cf534c9042db5e5abaf5879e84bfa4e40
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.95
|
data/docs/bundle.md
CHANGED
@@ -9,6 +9,7 @@
|
|
9
9
|
"description": "The public description of the bundle.",
|
10
10
|
"password_protected": true,
|
11
11
|
"require_registration": true,
|
12
|
+
"require_share_recipient": true,
|
12
13
|
"clickwrap_body": "[Legal text]",
|
13
14
|
"id": 1,
|
14
15
|
"created_at": "2000-01-01T01:00:00Z",
|
@@ -30,6 +31,7 @@
|
|
30
31
|
* `description` (string): Public description
|
31
32
|
* `password_protected` (boolean): Is this bundle password protected?
|
32
33
|
* `require_registration` (boolean): Show a registration page that captures the downloader's name and email address?
|
34
|
+
* `require_share_recipient` (boolean): Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
|
33
35
|
* `clickwrap_body` (string): Legal text that must be agreed to prior to accessing Bundle.
|
34
36
|
* `id` (int64): Bundle ID
|
35
37
|
* `created_at` (date-time): Bundle created at date/time
|
@@ -101,7 +103,8 @@ Files::Bundle.create(
|
|
101
103
|
code: "abc123",
|
102
104
|
require_registration: true,
|
103
105
|
clickwrap_id: 1,
|
104
|
-
inbox_id: 1
|
106
|
+
inbox_id: 1,
|
107
|
+
require_share_recipient: true
|
105
108
|
)
|
106
109
|
```
|
107
110
|
|
@@ -118,6 +121,7 @@ Files::Bundle.create(
|
|
118
121
|
* `require_registration` (boolean): Show a registration page that captures the downloader's name and email address?
|
119
122
|
* `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
|
120
123
|
* `inbox_id` (int64): ID of the associated inbox, if available.
|
124
|
+
* `require_share_recipient` (boolean): Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
|
121
125
|
|
122
126
|
|
123
127
|
---
|
@@ -145,14 +149,15 @@ Files::Bundle.share(id,
|
|
145
149
|
```
|
146
150
|
Files::Bundle.update(id,
|
147
151
|
password: "Password",
|
152
|
+
clickwrap_id: 1,
|
153
|
+
code: "abc123",
|
154
|
+
description: "The public description of the bundle.",
|
148
155
|
expires_at: "2000-01-01T01:00:00Z",
|
156
|
+
inbox_id: 1,
|
149
157
|
max_uses: 1,
|
150
|
-
description: "The public description of the bundle.",
|
151
158
|
note: "The internal note on the bundle.",
|
152
|
-
code: "abc123",
|
153
159
|
require_registration: true,
|
154
|
-
|
155
|
-
inbox_id: 1
|
160
|
+
require_share_recipient: true
|
156
161
|
)
|
157
162
|
```
|
158
163
|
|
@@ -160,14 +165,15 @@ Files::Bundle.update(id,
|
|
160
165
|
|
161
166
|
* `id` (int64): Required - Bundle ID.
|
162
167
|
* `password` (string): Password for this bundle.
|
168
|
+
* `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
|
169
|
+
* `code` (string): Bundle code. This code forms the end part of the Public URL.
|
170
|
+
* `description` (string): Public description
|
163
171
|
* `expires_at` (string): Bundle expiration date/time
|
172
|
+
* `inbox_id` (int64): ID of the associated inbox, if available.
|
164
173
|
* `max_uses` (int64): Maximum number of times bundle can be accessed
|
165
|
-
* `description` (string): Public description
|
166
174
|
* `note` (string): Bundle internal note
|
167
|
-
* `code` (string): Bundle code. This code forms the end part of the Public URL.
|
168
175
|
* `require_registration` (boolean): Show a registration page that captures the downloader's name and email address?
|
169
|
-
* `
|
170
|
-
* `inbox_id` (int64): ID of the associated inbox, if available.
|
176
|
+
* `require_share_recipient` (boolean): Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
|
171
177
|
|
172
178
|
|
173
179
|
---
|
@@ -212,14 +218,15 @@ bundle = Files::Bundle.list_for(path).first
|
|
212
218
|
|
213
219
|
bundle.update(
|
214
220
|
password: "Password",
|
221
|
+
clickwrap_id: 1,
|
222
|
+
code: "abc123",
|
223
|
+
description: "The public description of the bundle.",
|
215
224
|
expires_at: "2000-01-01T01:00:00Z",
|
225
|
+
inbox_id: 1,
|
216
226
|
max_uses: 1,
|
217
|
-
description: "The public description of the bundle.",
|
218
227
|
note: "The internal note on the bundle.",
|
219
|
-
code: "abc123",
|
220
228
|
require_registration: true,
|
221
|
-
|
222
|
-
inbox_id: 1
|
229
|
+
require_share_recipient: true
|
223
230
|
)
|
224
231
|
```
|
225
232
|
|
@@ -227,14 +234,15 @@ bundle.update(
|
|
227
234
|
|
228
235
|
* `id` (int64): Required - Bundle ID.
|
229
236
|
* `password` (string): Password for this bundle.
|
237
|
+
* `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
|
238
|
+
* `code` (string): Bundle code. This code forms the end part of the Public URL.
|
239
|
+
* `description` (string): Public description
|
230
240
|
* `expires_at` (string): Bundle expiration date/time
|
241
|
+
* `inbox_id` (int64): ID of the associated inbox, if available.
|
231
242
|
* `max_uses` (int64): Maximum number of times bundle can be accessed
|
232
|
-
* `description` (string): Public description
|
233
243
|
* `note` (string): Bundle internal note
|
234
|
-
* `code` (string): Bundle code. This code forms the end part of the Public URL.
|
235
244
|
* `require_registration` (boolean): Show a registration page that captures the downloader's name and email address?
|
236
|
-
* `
|
237
|
-
* `inbox_id` (int64): ID of the associated inbox, if available.
|
245
|
+
* `require_share_recipient` (boolean): Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
|
238
246
|
|
239
247
|
|
240
248
|
---
|
@@ -54,6 +54,15 @@ module Files
|
|
54
54
|
@attributes[:require_registration] = value
|
55
55
|
end
|
56
56
|
|
57
|
+
# boolean - Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
|
58
|
+
def require_share_recipient
|
59
|
+
@attributes[:require_share_recipient]
|
60
|
+
end
|
61
|
+
|
62
|
+
def require_share_recipient=(value)
|
63
|
+
@attributes[:require_share_recipient] = value
|
64
|
+
end
|
65
|
+
|
57
66
|
# string - Legal text that must be agreed to prior to accessing Bundle.
|
58
67
|
def clickwrap_body
|
59
68
|
@attributes[:clickwrap_body]
|
@@ -178,27 +187,28 @@ module Files
|
|
178
187
|
|
179
188
|
# Parameters:
|
180
189
|
# password - string - Password for this bundle.
|
190
|
+
# clickwrap_id - int64 - ID of the clickwrap to use with this bundle.
|
191
|
+
# code - string - Bundle code. This code forms the end part of the Public URL.
|
192
|
+
# description - string - Public description
|
181
193
|
# expires_at - string - Bundle expiration date/time
|
194
|
+
# inbox_id - int64 - ID of the associated inbox, if available.
|
182
195
|
# max_uses - int64 - Maximum number of times bundle can be accessed
|
183
|
-
# description - string - Public description
|
184
196
|
# note - string - Bundle internal note
|
185
|
-
# code - string - Bundle code. This code forms the end part of the Public URL.
|
186
197
|
# require_registration - boolean - Show a registration page that captures the downloader's name and email address?
|
187
|
-
#
|
188
|
-
# inbox_id - int64 - ID of the associated inbox, if available.
|
198
|
+
# require_share_recipient - boolean - Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
|
189
199
|
def update(params = {})
|
190
200
|
params ||= {}
|
191
201
|
params[:id] = @attributes[:id]
|
192
202
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
193
203
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
194
204
|
raise InvalidParameterError.new("Bad parameter: password must be an String") if params.dig(:password) and !params.dig(:password).is_a?(String)
|
205
|
+
raise InvalidParameterError.new("Bad parameter: clickwrap_id must be an Integer") if params.dig(:clickwrap_id) and !params.dig(:clickwrap_id).is_a?(Integer)
|
206
|
+
raise InvalidParameterError.new("Bad parameter: code must be an String") if params.dig(:code) and !params.dig(:code).is_a?(String)
|
207
|
+
raise InvalidParameterError.new("Bad parameter: description must be an String") if params.dig(:description) and !params.dig(:description).is_a?(String)
|
195
208
|
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params.dig(:expires_at) and !params.dig(:expires_at).is_a?(String)
|
209
|
+
raise InvalidParameterError.new("Bad parameter: inbox_id must be an Integer") if params.dig(:inbox_id) and !params.dig(:inbox_id).is_a?(Integer)
|
196
210
|
raise InvalidParameterError.new("Bad parameter: max_uses must be an Integer") if params.dig(:max_uses) and !params.dig(:max_uses).is_a?(Integer)
|
197
|
-
raise InvalidParameterError.new("Bad parameter: description must be an String") if params.dig(:description) and !params.dig(:description).is_a?(String)
|
198
211
|
raise InvalidParameterError.new("Bad parameter: note must be an String") if params.dig(:note) and !params.dig(:note).is_a?(String)
|
199
|
-
raise InvalidParameterError.new("Bad parameter: code must be an String") if params.dig(:code) and !params.dig(:code).is_a?(String)
|
200
|
-
raise InvalidParameterError.new("Bad parameter: clickwrap_id must be an Integer") if params.dig(:clickwrap_id) and !params.dig(:clickwrap_id).is_a?(Integer)
|
201
|
-
raise InvalidParameterError.new("Bad parameter: inbox_id must be an Integer") if params.dig(:inbox_id) and !params.dig(:inbox_id).is_a?(Integer)
|
202
212
|
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
203
213
|
|
204
214
|
Api.send_request("/bundles/#{@attributes[:id]}", :patch, params, @options)
|
@@ -291,6 +301,7 @@ module Files
|
|
291
301
|
# require_registration - boolean - Show a registration page that captures the downloader's name and email address?
|
292
302
|
# clickwrap_id - int64 - ID of the clickwrap to use with this bundle.
|
293
303
|
# inbox_id - int64 - ID of the associated inbox, if available.
|
304
|
+
# require_share_recipient - boolean - Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
|
294
305
|
def self.create(params = {}, options = {})
|
295
306
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
|
296
307
|
raise InvalidParameterError.new("Bad parameter: paths must be an Array") if params.dig(:paths) and !params.dig(:paths).is_a?(Array)
|
@@ -328,26 +339,27 @@ module Files
|
|
328
339
|
|
329
340
|
# Parameters:
|
330
341
|
# password - string - Password for this bundle.
|
342
|
+
# clickwrap_id - int64 - ID of the clickwrap to use with this bundle.
|
343
|
+
# code - string - Bundle code. This code forms the end part of the Public URL.
|
344
|
+
# description - string - Public description
|
331
345
|
# expires_at - string - Bundle expiration date/time
|
346
|
+
# inbox_id - int64 - ID of the associated inbox, if available.
|
332
347
|
# max_uses - int64 - Maximum number of times bundle can be accessed
|
333
|
-
# description - string - Public description
|
334
348
|
# note - string - Bundle internal note
|
335
|
-
# code - string - Bundle code. This code forms the end part of the Public URL.
|
336
349
|
# require_registration - boolean - Show a registration page that captures the downloader's name and email address?
|
337
|
-
#
|
338
|
-
# inbox_id - int64 - ID of the associated inbox, if available.
|
350
|
+
# require_share_recipient - boolean - Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
|
339
351
|
def self.update(id, params = {}, options = {})
|
340
352
|
params ||= {}
|
341
353
|
params[:id] = id
|
342
354
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
343
355
|
raise InvalidParameterError.new("Bad parameter: password must be an String") if params.dig(:password) and !params.dig(:password).is_a?(String)
|
356
|
+
raise InvalidParameterError.new("Bad parameter: clickwrap_id must be an Integer") if params.dig(:clickwrap_id) and !params.dig(:clickwrap_id).is_a?(Integer)
|
357
|
+
raise InvalidParameterError.new("Bad parameter: code must be an String") if params.dig(:code) and !params.dig(:code).is_a?(String)
|
358
|
+
raise InvalidParameterError.new("Bad parameter: description must be an String") if params.dig(:description) and !params.dig(:description).is_a?(String)
|
344
359
|
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params.dig(:expires_at) and !params.dig(:expires_at).is_a?(String)
|
360
|
+
raise InvalidParameterError.new("Bad parameter: inbox_id must be an Integer") if params.dig(:inbox_id) and !params.dig(:inbox_id).is_a?(Integer)
|
345
361
|
raise InvalidParameterError.new("Bad parameter: max_uses must be an Integer") if params.dig(:max_uses) and !params.dig(:max_uses).is_a?(Integer)
|
346
|
-
raise InvalidParameterError.new("Bad parameter: description must be an String") if params.dig(:description) and !params.dig(:description).is_a?(String)
|
347
362
|
raise InvalidParameterError.new("Bad parameter: note must be an String") if params.dig(:note) and !params.dig(:note).is_a?(String)
|
348
|
-
raise InvalidParameterError.new("Bad parameter: code must be an String") if params.dig(:code) and !params.dig(:code).is_a?(String)
|
349
|
-
raise InvalidParameterError.new("Bad parameter: clickwrap_id must be an Integer") if params.dig(:clickwrap_id) and !params.dig(:clickwrap_id).is_a?(Integer)
|
350
|
-
raise InvalidParameterError.new("Bad parameter: inbox_id must be an Integer") if params.dig(:inbox_id) and !params.dig(:inbox_id).is_a?(Integer)
|
351
363
|
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
352
364
|
|
353
365
|
response, options = Api.send_request("/bundles/#{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.
|
4
|
+
version: 1.0.95
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|