files.com 1.1.50 → 1.1.51

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: 8685c86117c177940d15ba87bb040d3ab26cce61e2c022645bdb367b69f87c3c
4
- data.tar.gz: 68c508f0f9249b62a8aac746ebb9e3d2e5d5f2de557d61bf31354384d708f05f
3
+ metadata.gz: c8bd9cc3feb73431ee538e9295167cdebb8ce110bf18ee89ef2c8b163efb881b
4
+ data.tar.gz: 858411d5c41eebb73365462ca7c4816a20a586b1270b75391fce1c7d692bd12e
5
5
  SHA512:
6
- metadata.gz: 4722aeca1830c51919a686b51e9f3faea61952e3759d304cff5bac55cbfe1ef13bd7a94e31de90ffe1416a3f2f7e48366b9b94a39b54c2be2db1ac742185862b
7
- data.tar.gz: 9f7110418f121a3f9b773bf3787efe1310768b4c23e33afee889bd94f1ed06d7b42d052efed1934203c384b44726e62f80b82948b30c364bbc51d2134a8c6931
6
+ metadata.gz: 9775894e1107eba82c28bda7d817ce175550dfcdfe0d085b9692a39e182485eb583798cb120918da878ad06eb10eb8f0ed21b75d338932a17bd69a4dad0e1018
7
+ data.tar.gz: 958e5c54dbdf03f378c37f88a3c99a171c954872ed54233f4a93d74e43de3881a4010c7fb4ca8003eacf4ca361303e160e2995a231fa58ff17fdbbfdee909a48
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.50
1
+ 1.1.51
data/docs/snapshot.md CHANGED
@@ -69,6 +69,19 @@ Files::Snapshot.create(
69
69
  * `paths` (array(string)): An array of paths to add to the snapshot.
70
70
 
71
71
 
72
+ ---
73
+
74
+ ## Finalize Snapshot
75
+
76
+ ```
77
+ Files::Snapshot.finalize(id)
78
+ ```
79
+
80
+ ### Parameters
81
+
82
+ * `id` (int64): Required - Snapshot ID.
83
+
84
+
72
85
  ---
73
86
 
74
87
  ## Update Snapshot
@@ -101,6 +114,21 @@ Files::Snapshot.delete(id)
101
114
  * `id` (int64): Required - Snapshot ID.
102
115
 
103
116
 
117
+ ---
118
+
119
+ ## Finalize Snapshot
120
+
121
+ ```
122
+ snapshot = Files::Snapshot.list.first
123
+
124
+ snapshot.finalize
125
+ ```
126
+
127
+ ### Parameters
128
+
129
+ * `id` (int64): Required - Snapshot ID.
130
+
131
+
104
132
  ---
105
133
 
106
134
  ## Update Snapshot
@@ -156,6 +156,7 @@ module Files
156
156
  class UserNotFoundError < NotFoundError; end
157
157
 
158
158
  class ProcessingFailureError < APIError; end
159
+ class AlreadyCompletedError < ProcessingFailureError; end
159
160
  class AutomationCannotBeRunManuallyError < ProcessingFailureError; end
160
161
  class BundleOnlyAllowsPreviewsError < ProcessingFailureError; end
161
162
  class BundleOperationRequiresSubfolderError < ProcessingFailureError; end
@@ -72,6 +72,17 @@ module Files
72
72
  @attributes[:paths] = value
73
73
  end
74
74
 
75
+ # Finalize Snapshot
76
+ def finalize(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]}/finalize", :post, params, @options)
84
+ end
85
+
75
86
  # Parameters:
76
87
  # expires_at - string - When the snapshot expires.
77
88
  # name - string - A name for the snapshot.
@@ -160,6 +171,17 @@ module Files
160
171
  Snapshot.new(response.data, options)
161
172
  end
162
173
 
174
+ # Finalize Snapshot
175
+ def self.finalize(id, params = {}, options = {})
176
+ params ||= {}
177
+ params[:id] = id
178
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
179
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
180
+
181
+ Api.send_request("/snapshots/#{params[:id]}/finalize", :post, params, options)
182
+ nil
183
+ end
184
+
163
185
  # Parameters:
164
186
  # expires_at - string - When the snapshot expires.
165
187
  # name - string - A name for the snapshot.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.50"
4
+ VERSION = "1.1.51"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.50
4
+ version: 1.1.51
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com