files.com 1.0.340 → 1.0.342
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/bundle.md +16 -0
- data/docs/snapshot.md +114 -0
- data/lib/files.com/models/bundle.rb +33 -0
- data/lib/files.com/models/snapshot.rb +160 -0
- 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: f7458797b6e16bae6a2cc875ce51e4260071662654c0409f1c4c6a2e52a13c6e
|
4
|
+
data.tar.gz: cd8927cc6fd7e377d235023f9619ddebd85c799cac5456349f168b2290eff83f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5cf369b8c58189785b6cad2660067ca1a558cdf29468558e6ab790639511568ea1b292c8a6a958ae3f4453251737e77f1c60920722868ef26902d9048ceb548
|
7
|
+
data.tar.gz: 1e2e6db344b59a26fdbda10284151f02e9e9ba275c561b100b5136a02561bd87cdabf21c93586e5bab375edfe2a3219136a9527156227787178240dc39ac7dd5
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.342
|
data/docs/bundle.md
CHANGED
@@ -40,6 +40,7 @@
|
|
40
40
|
"note": "The internal note on the bundle.",
|
41
41
|
"path_template": "{{name}}_{{ip}}",
|
42
42
|
"send_email_receipt_to_uploader": true,
|
43
|
+
"snapshot_id": 1,
|
43
44
|
"user_id": 1,
|
44
45
|
"username": "user",
|
45
46
|
"clickwrap_id": 1,
|
@@ -76,6 +77,7 @@
|
|
76
77
|
* `note` (string): Bundle internal note
|
77
78
|
* `path_template` (string): Template for creating submission subfolders. Can use the uploader's name, email address, ip, company, and any custom form data.
|
78
79
|
* `send_email_receipt_to_uploader` (boolean): Send delivery receipt to the uploader. Note: For writable share only
|
80
|
+
* `snapshot_id` (int64): ID of the snapshot containing this bundle's contents.
|
79
81
|
* `user_id` (int64): Bundle creator user ID
|
80
82
|
* `username` (string): Bundle creator username
|
81
83
|
* `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
|
@@ -86,6 +88,8 @@
|
|
86
88
|
* `paths` (array): A list of paths in this bundle. For performance reasons, this is not provided when listing bundles.
|
87
89
|
* `password` (string): Password for this bundle.
|
88
90
|
* `form_field_set_id` (int64): Id of Form Field Set to use with this bundle
|
91
|
+
* `create_snapshot` (boolean): If true, create a snapshot of this bundle's contents.
|
92
|
+
* `finalize_snapshot` (boolean): If true, finalize the snapshot of this bundle's contents. Note that `create_snapshot` must also be true.
|
89
93
|
* `watermark_attachment_file` (file): Preview watermark image applied to all bundle items.
|
90
94
|
* `watermark_attachment_delete` (boolean): If true, will delete the file stored in watermark_attachment
|
91
95
|
|
@@ -137,8 +141,10 @@ Files::Bundle.create(
|
|
137
141
|
paths: ["file.txt"],
|
138
142
|
password: "Password",
|
139
143
|
form_field_set_id: 1,
|
144
|
+
create_snapshot: true,
|
140
145
|
dont_separate_submissions_by_folder: true,
|
141
146
|
expires_at: "2000-01-01T01:00:00Z",
|
147
|
+
finalize_snapshot: true,
|
142
148
|
max_uses: 1,
|
143
149
|
description: "The public description of the bundle.",
|
144
150
|
note: "The internal note on the bundle.",
|
@@ -163,8 +169,10 @@ Files::Bundle.create(
|
|
163
169
|
* `paths` (array(string)): Required - A list of paths to include in this bundle.
|
164
170
|
* `password` (string): Password for this bundle.
|
165
171
|
* `form_field_set_id` (int64): Id of Form Field Set to use with this bundle
|
172
|
+
* `create_snapshot` (boolean): If true, create a snapshot of this bundle's contents.
|
166
173
|
* `dont_separate_submissions_by_folder` (boolean): Do not create subfolders for files uploaded to this share. Note: there are subtle security pitfalls with allowing anonymous uploads from multiple users to live in the same folder. We strongly discourage use of this option unless absolutely required.
|
167
174
|
* `expires_at` (string): Bundle expiration date/time
|
175
|
+
* `finalize_snapshot` (boolean): If true, finalize the snapshot of this bundle's contents. Note that `create_snapshot` must also be true.
|
168
176
|
* `max_uses` (int64): Maximum number of times bundle can be accessed
|
169
177
|
* `description` (string): Public description
|
170
178
|
* `note` (string): Bundle internal note
|
@@ -214,9 +222,11 @@ Files::Bundle.update(id,
|
|
214
222
|
form_field_set_id: 1,
|
215
223
|
clickwrap_id: 1,
|
216
224
|
code: "abc123",
|
225
|
+
create_snapshot: true,
|
217
226
|
description: "The public description of the bundle.",
|
218
227
|
dont_separate_submissions_by_folder: true,
|
219
228
|
expires_at: "2000-01-01T01:00:00Z",
|
229
|
+
finalize_snapshot: true,
|
220
230
|
inbox_id: 1,
|
221
231
|
max_uses: 1,
|
222
232
|
note: "The internal note on the bundle.",
|
@@ -241,9 +251,11 @@ Files::Bundle.update(id,
|
|
241
251
|
* `form_field_set_id` (int64): Id of Form Field Set to use with this bundle
|
242
252
|
* `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
|
243
253
|
* `code` (string): Bundle code. This code forms the end part of the Public URL.
|
254
|
+
* `create_snapshot` (boolean): If true, create a snapshot of this bundle's contents.
|
244
255
|
* `description` (string): Public description
|
245
256
|
* `dont_separate_submissions_by_folder` (boolean): Do not create subfolders for files uploaded to this share. Note: there are subtle security pitfalls with allowing anonymous uploads from multiple users to live in the same folder. We strongly discourage use of this option unless absolutely required.
|
246
257
|
* `expires_at` (string): Bundle expiration date/time
|
258
|
+
* `finalize_snapshot` (boolean): If true, finalize the snapshot of this bundle's contents. Note that `create_snapshot` must also be true.
|
247
259
|
* `inbox_id` (int64): ID of the associated inbox, if available.
|
248
260
|
* `max_uses` (int64): Maximum number of times bundle can be accessed
|
249
261
|
* `note` (string): Bundle internal note
|
@@ -308,9 +320,11 @@ bundle.update(
|
|
308
320
|
form_field_set_id: 1,
|
309
321
|
clickwrap_id: 1,
|
310
322
|
code: "abc123",
|
323
|
+
create_snapshot: true,
|
311
324
|
description: "The public description of the bundle.",
|
312
325
|
dont_separate_submissions_by_folder: true,
|
313
326
|
expires_at: "2000-01-01T01:00:00Z",
|
327
|
+
finalize_snapshot: true,
|
314
328
|
inbox_id: 1,
|
315
329
|
max_uses: 1,
|
316
330
|
note: "The internal note on the bundle.",
|
@@ -335,9 +349,11 @@ bundle.update(
|
|
335
349
|
* `form_field_set_id` (int64): Id of Form Field Set to use with this bundle
|
336
350
|
* `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
|
337
351
|
* `code` (string): Bundle code. This code forms the end part of the Public URL.
|
352
|
+
* `create_snapshot` (boolean): If true, create a snapshot of this bundle's contents.
|
338
353
|
* `description` (string): Public description
|
339
354
|
* `dont_separate_submissions_by_folder` (boolean): Do not create subfolders for files uploaded to this share. Note: there are subtle security pitfalls with allowing anonymous uploads from multiple users to live in the same folder. We strongly discourage use of this option unless absolutely required.
|
340
355
|
* `expires_at` (string): Bundle expiration date/time
|
356
|
+
* `finalize_snapshot` (boolean): If true, finalize the snapshot of this bundle's contents. Note that `create_snapshot` must also be true.
|
341
357
|
* `inbox_id` (int64): ID of the associated inbox, if available.
|
342
358
|
* `max_uses` (int64): Maximum number of times bundle can be accessed
|
343
359
|
* `note` (string): Bundle internal note
|
data/docs/snapshot.md
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
# Snapshot
|
2
|
+
|
3
|
+
## Example Snapshot Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"expires_at": "2000-01-01T01:00:00Z",
|
8
|
+
"finalized_at": "2000-01-01T01:00:00Z",
|
9
|
+
"name": "My Snapshot",
|
10
|
+
"user_id": 1,
|
11
|
+
"bundle_id": 1
|
12
|
+
}
|
13
|
+
```
|
14
|
+
|
15
|
+
* `expires_at` (date-time): When the snapshot expires.
|
16
|
+
* `finalized_at` (date-time): When the snapshot was finalized.
|
17
|
+
* `name` (string): A name for the snapshot.
|
18
|
+
* `user_id` (int64): The user that created this snapshot, if applicable.
|
19
|
+
* `bundle_id` (int64): The bundle using this snapshot, if applicable.
|
20
|
+
* `id` (int64): Snapshot ID.
|
21
|
+
|
22
|
+
|
23
|
+
---
|
24
|
+
|
25
|
+
## List Snapshots
|
26
|
+
|
27
|
+
```
|
28
|
+
Files::Snapshot.list(
|
29
|
+
per_page: 1
|
30
|
+
)
|
31
|
+
```
|
32
|
+
|
33
|
+
### Parameters
|
34
|
+
|
35
|
+
* `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.
|
36
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
37
|
+
|
38
|
+
|
39
|
+
---
|
40
|
+
|
41
|
+
## Show Snapshot
|
42
|
+
|
43
|
+
```
|
44
|
+
Files::Snapshot.find(id)
|
45
|
+
```
|
46
|
+
|
47
|
+
### Parameters
|
48
|
+
|
49
|
+
* `id` (int64): Required - Snapshot ID.
|
50
|
+
|
51
|
+
|
52
|
+
---
|
53
|
+
|
54
|
+
## Create Snapshot
|
55
|
+
|
56
|
+
```
|
57
|
+
Files::Snapshot.create
|
58
|
+
```
|
59
|
+
|
60
|
+
|
61
|
+
---
|
62
|
+
|
63
|
+
## Update Snapshot
|
64
|
+
|
65
|
+
```
|
66
|
+
Files::Snapshot.update(id)
|
67
|
+
```
|
68
|
+
|
69
|
+
### Parameters
|
70
|
+
|
71
|
+
* `id` (int64): Required - Snapshot ID.
|
72
|
+
|
73
|
+
|
74
|
+
---
|
75
|
+
|
76
|
+
## Delete Snapshot
|
77
|
+
|
78
|
+
```
|
79
|
+
Files::Snapshot.delete(id)
|
80
|
+
```
|
81
|
+
|
82
|
+
### Parameters
|
83
|
+
|
84
|
+
* `id` (int64): Required - Snapshot ID.
|
85
|
+
|
86
|
+
|
87
|
+
---
|
88
|
+
|
89
|
+
## Update Snapshot
|
90
|
+
|
91
|
+
```
|
92
|
+
snapshot = Files::Snapshot.list.first
|
93
|
+
|
94
|
+
snapshot.update
|
95
|
+
```
|
96
|
+
|
97
|
+
### Parameters
|
98
|
+
|
99
|
+
* `id` (int64): Required - Snapshot ID.
|
100
|
+
|
101
|
+
|
102
|
+
---
|
103
|
+
|
104
|
+
## Delete Snapshot
|
105
|
+
|
106
|
+
```
|
107
|
+
snapshot = Files::Snapshot.list.first
|
108
|
+
|
109
|
+
snapshot.delete
|
110
|
+
```
|
111
|
+
|
112
|
+
### Parameters
|
113
|
+
|
114
|
+
* `id` (int64): Required - Snapshot ID.
|
@@ -194,6 +194,15 @@ module Files
|
|
194
194
|
@attributes[:send_email_receipt_to_uploader] = value
|
195
195
|
end
|
196
196
|
|
197
|
+
# int64 - ID of the snapshot containing this bundle's contents.
|
198
|
+
def snapshot_id
|
199
|
+
@attributes[:snapshot_id]
|
200
|
+
end
|
201
|
+
|
202
|
+
def snapshot_id=(value)
|
203
|
+
@attributes[:snapshot_id] = value
|
204
|
+
end
|
205
|
+
|
197
206
|
# int64 - Bundle creator user ID
|
198
207
|
def user_id
|
199
208
|
@attributes[:user_id]
|
@@ -284,6 +293,24 @@ module Files
|
|
284
293
|
@attributes[:form_field_set_id] = value
|
285
294
|
end
|
286
295
|
|
296
|
+
# boolean - If true, create a snapshot of this bundle's contents.
|
297
|
+
def create_snapshot
|
298
|
+
@attributes[:create_snapshot]
|
299
|
+
end
|
300
|
+
|
301
|
+
def create_snapshot=(value)
|
302
|
+
@attributes[:create_snapshot] = value
|
303
|
+
end
|
304
|
+
|
305
|
+
# boolean - If true, finalize the snapshot of this bundle's contents. Note that `create_snapshot` must also be true.
|
306
|
+
def finalize_snapshot
|
307
|
+
@attributes[:finalize_snapshot]
|
308
|
+
end
|
309
|
+
|
310
|
+
def finalize_snapshot=(value)
|
311
|
+
@attributes[:finalize_snapshot] = value
|
312
|
+
end
|
313
|
+
|
287
314
|
# file - Preview watermark image applied to all bundle items.
|
288
315
|
def watermark_attachment_file
|
289
316
|
@attributes[:watermark_attachment_file]
|
@@ -327,9 +354,11 @@ module Files
|
|
327
354
|
# form_field_set_id - int64 - Id of Form Field Set to use with this bundle
|
328
355
|
# clickwrap_id - int64 - ID of the clickwrap to use with this bundle.
|
329
356
|
# code - string - Bundle code. This code forms the end part of the Public URL.
|
357
|
+
# create_snapshot - boolean - If true, create a snapshot of this bundle's contents.
|
330
358
|
# description - string - Public description
|
331
359
|
# dont_separate_submissions_by_folder - boolean - Do not create subfolders for files uploaded to this share. Note: there are subtle security pitfalls with allowing anonymous uploads from multiple users to live in the same folder. We strongly discourage use of this option unless absolutely required.
|
332
360
|
# expires_at - string - Bundle expiration date/time
|
361
|
+
# finalize_snapshot - boolean - If true, finalize the snapshot of this bundle's contents. Note that `create_snapshot` must also be true.
|
333
362
|
# inbox_id - int64 - ID of the associated inbox, if available.
|
334
363
|
# max_uses - int64 - Maximum number of times bundle can be accessed
|
335
364
|
# note - string - Bundle internal note
|
@@ -440,8 +469,10 @@ module Files
|
|
440
469
|
# paths (required) - array(string) - A list of paths to include in this bundle.
|
441
470
|
# password - string - Password for this bundle.
|
442
471
|
# form_field_set_id - int64 - Id of Form Field Set to use with this bundle
|
472
|
+
# create_snapshot - boolean - If true, create a snapshot of this bundle's contents.
|
443
473
|
# dont_separate_submissions_by_folder - boolean - Do not create subfolders for files uploaded to this share. Note: there are subtle security pitfalls with allowing anonymous uploads from multiple users to live in the same folder. We strongly discourage use of this option unless absolutely required.
|
444
474
|
# expires_at - string - Bundle expiration date/time
|
475
|
+
# finalize_snapshot - boolean - If true, finalize the snapshot of this bundle's contents. Note that `create_snapshot` must also be true.
|
445
476
|
# max_uses - int64 - Maximum number of times bundle can be accessed
|
446
477
|
# description - string - Public description
|
447
478
|
# note - string - Bundle internal note
|
@@ -503,9 +534,11 @@ module Files
|
|
503
534
|
# form_field_set_id - int64 - Id of Form Field Set to use with this bundle
|
504
535
|
# clickwrap_id - int64 - ID of the clickwrap to use with this bundle.
|
505
536
|
# code - string - Bundle code. This code forms the end part of the Public URL.
|
537
|
+
# create_snapshot - boolean - If true, create a snapshot of this bundle's contents.
|
506
538
|
# description - string - Public description
|
507
539
|
# dont_separate_submissions_by_folder - boolean - Do not create subfolders for files uploaded to this share. Note: there are subtle security pitfalls with allowing anonymous uploads from multiple users to live in the same folder. We strongly discourage use of this option unless absolutely required.
|
508
540
|
# expires_at - string - Bundle expiration date/time
|
541
|
+
# finalize_snapshot - boolean - If true, finalize the snapshot of this bundle's contents. Note that `create_snapshot` must also be true.
|
509
542
|
# inbox_id - int64 - ID of the associated inbox, if available.
|
510
543
|
# max_uses - int64 - Maximum number of times bundle can be accessed
|
511
544
|
# note - string - Bundle internal note
|
@@ -0,0 +1,160 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Files
|
4
|
+
class Snapshot
|
5
|
+
attr_reader :options, :attributes
|
6
|
+
|
7
|
+
def initialize(attributes = {}, options = {})
|
8
|
+
@attributes = attributes || {}
|
9
|
+
@options = options || {}
|
10
|
+
end
|
11
|
+
|
12
|
+
# date-time - When the snapshot expires.
|
13
|
+
def expires_at
|
14
|
+
@attributes[:expires_at]
|
15
|
+
end
|
16
|
+
|
17
|
+
def expires_at=(value)
|
18
|
+
@attributes[:expires_at] = value
|
19
|
+
end
|
20
|
+
|
21
|
+
# date-time - When the snapshot was finalized.
|
22
|
+
def finalized_at
|
23
|
+
@attributes[:finalized_at]
|
24
|
+
end
|
25
|
+
|
26
|
+
def finalized_at=(value)
|
27
|
+
@attributes[:finalized_at] = value
|
28
|
+
end
|
29
|
+
|
30
|
+
# string - A name for the snapshot.
|
31
|
+
def name
|
32
|
+
@attributes[:name]
|
33
|
+
end
|
34
|
+
|
35
|
+
def name=(value)
|
36
|
+
@attributes[:name] = value
|
37
|
+
end
|
38
|
+
|
39
|
+
# int64 - The user that created this snapshot, if applicable.
|
40
|
+
def user_id
|
41
|
+
@attributes[:user_id]
|
42
|
+
end
|
43
|
+
|
44
|
+
def user_id=(value)
|
45
|
+
@attributes[:user_id] = value
|
46
|
+
end
|
47
|
+
|
48
|
+
# int64 - The bundle using this snapshot, if applicable.
|
49
|
+
def bundle_id
|
50
|
+
@attributes[:bundle_id]
|
51
|
+
end
|
52
|
+
|
53
|
+
def bundle_id=(value)
|
54
|
+
@attributes[:bundle_id] = value
|
55
|
+
end
|
56
|
+
|
57
|
+
# int64 - Snapshot ID.
|
58
|
+
def id
|
59
|
+
@attributes[:id]
|
60
|
+
end
|
61
|
+
|
62
|
+
def id=(value)
|
63
|
+
@attributes[:id] = value
|
64
|
+
end
|
65
|
+
|
66
|
+
def update(params = {})
|
67
|
+
params ||= {}
|
68
|
+
params[:id] = @attributes[:id]
|
69
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
70
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
71
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
72
|
+
|
73
|
+
Api.send_request("/snapshots/#{@attributes[:id]}", :patch, params, @options)
|
74
|
+
end
|
75
|
+
|
76
|
+
def delete(params = {})
|
77
|
+
params ||= {}
|
78
|
+
params[:id] = @attributes[:id]
|
79
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
80
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
81
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
82
|
+
|
83
|
+
Api.send_request("/snapshots/#{@attributes[:id]}", :delete, params, @options)
|
84
|
+
end
|
85
|
+
|
86
|
+
def destroy(params = {})
|
87
|
+
delete(params)
|
88
|
+
end
|
89
|
+
|
90
|
+
def save
|
91
|
+
if @attributes[:id]
|
92
|
+
update(@attributes)
|
93
|
+
else
|
94
|
+
new_obj = Snapshot.create(@attributes, @options)
|
95
|
+
@attributes = new_obj.attributes
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
# Parameters:
|
100
|
+
# 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.
|
101
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
102
|
+
def self.list(params = {}, options = {})
|
103
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
104
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
105
|
+
|
106
|
+
List.new(Snapshot, params) do
|
107
|
+
Api.send_request("/snapshots", :get, params, options)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
def self.all(params = {}, options = {})
|
112
|
+
list(params, options)
|
113
|
+
end
|
114
|
+
|
115
|
+
# Parameters:
|
116
|
+
# id (required) - int64 - Snapshot ID.
|
117
|
+
def self.find(id, params = {}, options = {})
|
118
|
+
params ||= {}
|
119
|
+
params[:id] = id
|
120
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
121
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
122
|
+
|
123
|
+
response, options = Api.send_request("/snapshots/#{params[:id]}", :get, params, options)
|
124
|
+
Snapshot.new(response.data, options)
|
125
|
+
end
|
126
|
+
|
127
|
+
def self.get(id, params = {}, options = {})
|
128
|
+
find(id, params, options)
|
129
|
+
end
|
130
|
+
|
131
|
+
def self.create(params = {}, options = {})
|
132
|
+
response, options = Api.send_request("/snapshots", :post, params, options)
|
133
|
+
Snapshot.new(response.data, options)
|
134
|
+
end
|
135
|
+
|
136
|
+
def self.update(id, params = {}, options = {})
|
137
|
+
params ||= {}
|
138
|
+
params[:id] = id
|
139
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
140
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
141
|
+
|
142
|
+
response, options = Api.send_request("/snapshots/#{params[:id]}", :patch, params, options)
|
143
|
+
Snapshot.new(response.data, options)
|
144
|
+
end
|
145
|
+
|
146
|
+
def self.delete(id, params = {}, options = {})
|
147
|
+
params ||= {}
|
148
|
+
params[:id] = id
|
149
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
150
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
151
|
+
|
152
|
+
response, _options = Api.send_request("/snapshots/#{params[:id]}", :delete, params, options)
|
153
|
+
response.data
|
154
|
+
end
|
155
|
+
|
156
|
+
def self.destroy(id, params = {}, options = {})
|
157
|
+
delete(id, params, options)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end
|
data/lib/files.com.rb
CHANGED
@@ -100,6 +100,7 @@ require "files.com/models/session"
|
|
100
100
|
require "files.com/models/settings_change"
|
101
101
|
require "files.com/models/sftp_host_key"
|
102
102
|
require "files.com/models/site"
|
103
|
+
require "files.com/models/snapshot"
|
103
104
|
require "files.com/models/sso_strategy"
|
104
105
|
require "files.com/models/status"
|
105
106
|
require "files.com/models/style"
|
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.342
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -183,6 +183,7 @@ files:
|
|
183
183
|
- docs/settings_change.md
|
184
184
|
- docs/sftp_host_key.md
|
185
185
|
- docs/site.md
|
186
|
+
- docs/snapshot.md
|
186
187
|
- docs/sso_strategy.md
|
187
188
|
- docs/status.md
|
188
189
|
- docs/style.md
|
@@ -268,6 +269,7 @@ files:
|
|
268
269
|
- lib/files.com/models/settings_change.rb
|
269
270
|
- lib/files.com/models/sftp_host_key.rb
|
270
271
|
- lib/files.com/models/site.rb
|
272
|
+
- lib/files.com/models/snapshot.rb
|
271
273
|
- lib/files.com/models/sso_strategy.rb
|
272
274
|
- lib/files.com/models/status.rb
|
273
275
|
- lib/files.com/models/style.rb
|