files.com 1.0.346 → 1.0.348
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 +3 -1
- data/docs/snapshot.md +25 -3
- data/lib/files.com/api_client.rb +1 -1
- data/lib/files.com/models/bundle.rb +2 -0
- data/lib/files.com/models/snapshot.rb +31 -0
- 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: b28516dcde77d14d7085866cda21aa42835e1d569a6d2aad325bf94f210e6d1a
|
4
|
+
data.tar.gz: 15b66d280f366e18c44e30b13d435792dc724122d3e55090307faa7462a54b11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0327cd8bcd7b3a0973d6b447cabb507f104738df43c627873a8ac528ecd95629baba0e77e03549179213f640a1887a48f7c4009fd25fb4f0588c700a5cac8d75
|
7
|
+
data.tar.gz: 44ede035c52b9a88397f9c4a5bab5bfa5cef9765a2e7dd0e4c1ec81ea256e059cd0ee48e80c862f0fea7bbf2dcf73d0e7e5d5a90e151a1050f7d2fb186e52e61
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.348
|
data/docs/bundle.md
CHANGED
@@ -159,7 +159,8 @@ Files::Bundle.create(
|
|
159
159
|
send_email_receipt_to_uploader: true,
|
160
160
|
skip_email: true,
|
161
161
|
skip_name: true,
|
162
|
-
skip_company: true
|
162
|
+
skip_company: true,
|
163
|
+
snapshot_id: 1
|
163
164
|
)
|
164
165
|
```
|
165
166
|
|
@@ -188,6 +189,7 @@ Files::Bundle.create(
|
|
188
189
|
* `skip_email` (boolean): BundleRegistrations can be saved without providing email?
|
189
190
|
* `skip_name` (boolean): BundleRegistrations can be saved without providing name?
|
190
191
|
* `skip_company` (boolean): BundleRegistrations can be saved without providing company?
|
192
|
+
* `snapshot_id` (int64): ID of the snapshot containing this bundle's contents.
|
191
193
|
* `watermark_attachment_file` (file): Preview watermark image applied to all bundle items.
|
192
194
|
|
193
195
|
|
data/docs/snapshot.md
CHANGED
@@ -17,6 +17,7 @@
|
|
17
17
|
* `name` (string): A name for the snapshot.
|
18
18
|
* `user_id` (int64): The user that created this snapshot, if applicable.
|
19
19
|
* `bundle_id` (int64): The bundle using this snapshot, if applicable.
|
20
|
+
* `paths` (array(string)): An array of paths to add to the snapshot.
|
20
21
|
* `id` (int64): Snapshot ID.
|
21
22
|
|
22
23
|
|
@@ -54,21 +55,36 @@ Files::Snapshot.find(id)
|
|
54
55
|
## Create Snapshot
|
55
56
|
|
56
57
|
```
|
57
|
-
Files::Snapshot.create
|
58
|
+
Files::Snapshot.create(
|
59
|
+
expires_at: "2000-01-01T01:00:00Z",
|
60
|
+
name: "My Snapshot"
|
61
|
+
)
|
58
62
|
```
|
59
63
|
|
64
|
+
### Parameters
|
65
|
+
|
66
|
+
* `expires_at` (string): When the snapshot expires.
|
67
|
+
* `name` (string): A name for the snapshot.
|
68
|
+
* `paths` (array(string)): An array of paths to add to the snapshot.
|
69
|
+
|
60
70
|
|
61
71
|
---
|
62
72
|
|
63
73
|
## Update Snapshot
|
64
74
|
|
65
75
|
```
|
66
|
-
Files::Snapshot.update(id
|
76
|
+
Files::Snapshot.update(id,
|
77
|
+
expires_at: "2000-01-01T01:00:00Z",
|
78
|
+
name: "My Snapshot"
|
79
|
+
)
|
67
80
|
```
|
68
81
|
|
69
82
|
### Parameters
|
70
83
|
|
71
84
|
* `id` (int64): Required - Snapshot ID.
|
85
|
+
* `expires_at` (string): When the snapshot expires.
|
86
|
+
* `name` (string): A name for the snapshot.
|
87
|
+
* `paths` (array(string)): An array of paths to add to the snapshot.
|
72
88
|
|
73
89
|
|
74
90
|
---
|
@@ -91,12 +107,18 @@ Files::Snapshot.delete(id)
|
|
91
107
|
```
|
92
108
|
snapshot = Files::Snapshot.list.first
|
93
109
|
|
94
|
-
snapshot.update
|
110
|
+
snapshot.update(
|
111
|
+
expires_at: "2000-01-01T01:00:00Z",
|
112
|
+
name: "My Snapshot"
|
113
|
+
)
|
95
114
|
```
|
96
115
|
|
97
116
|
### Parameters
|
98
117
|
|
99
118
|
* `id` (int64): Required - Snapshot ID.
|
119
|
+
* `expires_at` (string): When the snapshot expires.
|
120
|
+
* `name` (string): A name for the snapshot.
|
121
|
+
* `paths` (array(string)): An array of paths to add to the snapshot.
|
100
122
|
|
101
123
|
|
102
124
|
---
|
data/lib/files.com/api_client.rb
CHANGED
@@ -34,7 +34,7 @@ module Files
|
|
34
34
|
|
35
35
|
def self.build_default_conn(force_net_http: false)
|
36
36
|
conn = Faraday.new do |builder|
|
37
|
-
if
|
37
|
+
if Gem::Version.new(Faraday::VERSION) < Gem::Version.new("2.0.0")
|
38
38
|
builder.use Faraday::Request::Multipart
|
39
39
|
else
|
40
40
|
builder.request :multipart
|
@@ -488,6 +488,7 @@ module Files
|
|
488
488
|
# skip_email - boolean - BundleRegistrations can be saved without providing email?
|
489
489
|
# skip_name - boolean - BundleRegistrations can be saved without providing name?
|
490
490
|
# skip_company - boolean - BundleRegistrations can be saved without providing company?
|
491
|
+
# snapshot_id - int64 - ID of the snapshot containing this bundle's contents.
|
491
492
|
# watermark_attachment_file - file - Preview watermark image applied to all bundle items.
|
492
493
|
def self.create(params = {}, options = {})
|
493
494
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
@@ -503,6 +504,7 @@ module Files
|
|
503
504
|
raise InvalidParameterError.new("Bad parameter: permissions must be an String") if params[:permissions] and !params[:permissions].is_a?(String)
|
504
505
|
raise InvalidParameterError.new("Bad parameter: clickwrap_id must be an Integer") if params[:clickwrap_id] and !params[:clickwrap_id].is_a?(Integer)
|
505
506
|
raise InvalidParameterError.new("Bad parameter: inbox_id must be an Integer") if params[:inbox_id] and !params[:inbox_id].is_a?(Integer)
|
507
|
+
raise InvalidParameterError.new("Bad parameter: snapshot_id must be an Integer") if params[:snapshot_id] and !params[:snapshot_id].is_a?(Integer)
|
506
508
|
raise MissingParameterError.new("Parameter missing: paths") unless params[:paths]
|
507
509
|
|
508
510
|
response, options = Api.send_request("/bundles", :post, params, options)
|
@@ -54,6 +54,15 @@ module Files
|
|
54
54
|
@attributes[:bundle_id] = value
|
55
55
|
end
|
56
56
|
|
57
|
+
# array(string) - An array of paths to add to the snapshot.
|
58
|
+
def paths
|
59
|
+
@attributes[:paths]
|
60
|
+
end
|
61
|
+
|
62
|
+
def paths=(value)
|
63
|
+
@attributes[:paths] = value
|
64
|
+
end
|
65
|
+
|
57
66
|
# int64 - Snapshot ID.
|
58
67
|
def id
|
59
68
|
@attributes[:id]
|
@@ -63,11 +72,18 @@ module Files
|
|
63
72
|
@attributes[:id] = value
|
64
73
|
end
|
65
74
|
|
75
|
+
# Parameters:
|
76
|
+
# expires_at - string - When the snapshot expires.
|
77
|
+
# name - string - A name for the snapshot.
|
78
|
+
# paths - array(string) - An array of paths to add to the snapshot.
|
66
79
|
def update(params = {})
|
67
80
|
params ||= {}
|
68
81
|
params[:id] = @attributes[:id]
|
69
82
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
70
83
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
84
|
+
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params[:expires_at] and !params[:expires_at].is_a?(String)
|
85
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
86
|
+
raise InvalidParameterError.new("Bad parameter: paths must be an Array") if params[:paths] and !params[:paths].is_a?(Array)
|
71
87
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
72
88
|
|
73
89
|
Api.send_request("/snapshots/#{@attributes[:id]}", :patch, params, @options)
|
@@ -128,15 +144,30 @@ module Files
|
|
128
144
|
find(id, params, options)
|
129
145
|
end
|
130
146
|
|
147
|
+
# Parameters:
|
148
|
+
# expires_at - string - When the snapshot expires.
|
149
|
+
# name - string - A name for the snapshot.
|
150
|
+
# paths - array(string) - An array of paths to add to the snapshot.
|
131
151
|
def self.create(params = {}, options = {})
|
152
|
+
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params[:expires_at] and !params[:expires_at].is_a?(String)
|
153
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
154
|
+
raise InvalidParameterError.new("Bad parameter: paths must be an Array") if params[:paths] and !params[:paths].is_a?(Array)
|
155
|
+
|
132
156
|
response, options = Api.send_request("/snapshots", :post, params, options)
|
133
157
|
Snapshot.new(response.data, options)
|
134
158
|
end
|
135
159
|
|
160
|
+
# Parameters:
|
161
|
+
# expires_at - string - When the snapshot expires.
|
162
|
+
# name - string - A name for the snapshot.
|
163
|
+
# paths - array(string) - An array of paths to add to the snapshot.
|
136
164
|
def self.update(id, params = {}, options = {})
|
137
165
|
params ||= {}
|
138
166
|
params[:id] = id
|
139
167
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
168
|
+
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params[:expires_at] and !params[:expires_at].is_a?(String)
|
169
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
170
|
+
raise InvalidParameterError.new("Bad parameter: paths must be an Array") if params[:paths] and !params[:paths].is_a?(Array)
|
140
171
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
141
172
|
|
142
173
|
response, options = Api.send_request("/snapshots/#{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.348
|
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-05-
|
11
|
+
date: 2023-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|