files.com 1.0.341 → 1.0.342

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42facb096cac23769533241c08e783056751f132a0a1d5021da0e2f35f8d7d36
4
- data.tar.gz: 3d160c69bcf1af9966be73e4f62706045af6fa903f948623b63354ddf3a73881
3
+ metadata.gz: f7458797b6e16bae6a2cc875ce51e4260071662654c0409f1c4c6a2e52a13c6e
4
+ data.tar.gz: cd8927cc6fd7e377d235023f9619ddebd85c799cac5456349f168b2290eff83f
5
5
  SHA512:
6
- metadata.gz: 8092f446d0281ad11b4d6541d162dd06dcd9a7be8fb1ffcd7635c25b2617394cf3bad31c89471bbf4f9865369238857544245c3fbf517ce9b2a523bbef436dab
7
- data.tar.gz: 9b89571030ea82226be5cf6e719c139a5cf9eaac1ec693b43b1c876ef1632bb21410fe80bc0fa8cbcdff20e135c93398c9a1b290905921f4992f2a7d26c5ad69
6
+ metadata.gz: b5cf369b8c58189785b6cad2660067ca1a558cdf29468558e6ab790639511568ea1b292c8a6a958ae3f4453251737e77f1c60920722868ef26902d9048ceb548
7
+ data.tar.gz: 1e2e6db344b59a26fdbda10284151f02e9e9ba275c561b100b5136a02561bd87cdabf21c93586e5bab375edfe2a3219136a9527156227787178240dc39ac7dd5
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.341
1
+ 1.0.342
data/docs/snapshot.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Snapshot
2
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.
3
20
  * `id` (int64): Snapshot ID.
4
21
 
5
22
 
@@ -9,6 +9,51 @@ module Files
9
9
  @options = options || {}
10
10
  end
11
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
+
12
57
  # int64 - Snapshot ID.
13
58
  def id
14
59
  @attributes[:id]
@@ -58,8 +103,9 @@ module Files
58
103
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
59
104
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
60
105
 
61
- response, _options = Api.send_request("/snapshots", :get, params, options)
62
- response.data
106
+ List.new(Snapshot, params) do
107
+ Api.send_request("/snapshots", :get, params, options)
108
+ end
63
109
  end
64
110
 
65
111
  def self.all(params = {}, options = {})
@@ -74,8 +120,8 @@ module Files
74
120
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
75
121
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
76
122
 
77
- response, _options = Api.send_request("/snapshots/#{params[:id]}", :get, params, options)
78
- response.data
123
+ response, options = Api.send_request("/snapshots/#{params[:id]}", :get, params, options)
124
+ Snapshot.new(response.data, options)
79
125
  end
80
126
 
81
127
  def self.get(id, params = {}, options = {})
@@ -83,8 +129,8 @@ module Files
83
129
  end
84
130
 
85
131
  def self.create(params = {}, options = {})
86
- response, _options = Api.send_request("/snapshots", :post, params, options)
87
- response.data
132
+ response, options = Api.send_request("/snapshots", :post, params, options)
133
+ Snapshot.new(response.data, options)
88
134
  end
89
135
 
90
136
  def self.update(id, params = {}, options = {})
@@ -93,8 +139,8 @@ module Files
93
139
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
94
140
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
95
141
 
96
- response, _options = Api.send_request("/snapshots/#{params[:id]}", :patch, params, options)
97
- response.data
142
+ response, options = Api.send_request("/snapshots/#{params[:id]}", :patch, params, options)
143
+ Snapshot.new(response.data, options)
98
144
  end
99
145
 
100
146
  def self.delete(id, params = {}, options = {})
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.0.341
4
+ version: 1.0.342
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com