files.com 1.0.91 → 1.0.96

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: ce58e9beada0bbcdf4ece8dc21a14d013ab566b1cb25a3876f2119d3579f52bf
4
- data.tar.gz: 20661480cb55f165e6a986040ac4539b44486049e546216b1c53438dfe6a6c9f
3
+ metadata.gz: 485dc4c0f9287f1c84e8a1191309a20e544d8b12288a1ffb7976ede59b3f1dc2
4
+ data.tar.gz: 85edd613267d4a44d1da0649fce06d6f0df8eede638da01141a90a37b7886329
5
5
  SHA512:
6
- metadata.gz: 95ca1d92bf585e26ef9a2bf27ad18ca61dfdbdb50f8b84eee387a71f4a66687020ed310d6dc7c5b6764c689ab79b62fb0616ae9665f594215182cd6d93aa8821
7
- data.tar.gz: ea101911a34a62be71b9a71f8eee07cabe7cedf89e6900ee1be43b84082d312bb5ecf9b524e111254366cca9500aa1a7bdfcdc40071f44b740d9e9cdf0d09de7
6
+ metadata.gz: 72bd5d7f069551773584f482ac73de300d16025764e08d6f80a9e4a9584bbaf2cddb33e8a952a28b1909c2d333c23b2bedfc8f863e2b5e6f228fb796532e2dab
7
+ data.tar.gz: 11d4d37f6cf87b7e2335e323fc4c2e18de2f463e2b3056efcae22b20ac7fb1935cb53e6f708b61b9dd2a8f38a56512855171ed63b162ab26146b65ad408dc9f9
@@ -1,4 +1,7 @@
1
+ Daniel Cowgill <daniel.cowgill@files.com>
2
+ Dustin Zeisler <dustin.zeisler@files.com>
3
+ Jesse Harris <jesse.harris@files.com>
1
4
  Kevin Bombino <kevin.bombino@files.com>
5
+ Kevin Killingsworth <kevin.killingsworth@files.com>
2
6
  Martyn Garcia <martyn.garcia@files.com>
3
- Dustin Zeisler <dustin.zeisler@files.com>
4
7
  Rommel Santor <rommel.santor@files.com>
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.91
1
+ 1.0.96
@@ -7,6 +7,7 @@
7
7
  "name": "",
8
8
  "extended_description": "",
9
9
  "documentation_links": "Important Info => http://files.test/learn-more",
10
+ "icon_url": "",
10
11
  "logo_url": "",
11
12
  "logo_thumbnail_url": "",
12
13
  "sso_strategy_type": "",
@@ -21,6 +22,7 @@
21
22
  * `name` (string): Name of the App
22
23
  * `extended_description` (string): Long form description of the App
23
24
  * `documentation_links` (string): Collection of named links to documentation
25
+ * `icon_url` (string): App icon
24
26
  * `logo_url` (string): Full size logo for the App
25
27
  * `logo_thumbnail_url` (string): Logo thumbnail for the App
26
28
  * `sso_strategy_type` (string): Associated SSO Strategy type, if any
@@ -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
- clickwrap_id: 1,
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
- * `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
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
- clickwrap_id: 1,
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
- * `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
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
  ---
@@ -0,0 +1,41 @@
1
+ # BundleRecipient
2
+
3
+ ## Example BundleRecipient Object
4
+
5
+ ```
6
+ {
7
+ "company": "Acme Inc.",
8
+ "name": "John Doe",
9
+ "note": "Some note.",
10
+ "recipient": "john.doe@example.com",
11
+ "sent_at": "2000-01-01T01:00:00Z"
12
+ }
13
+ ```
14
+
15
+ * `company` (string): The recipient's company.
16
+ * `name` (string): The recipient's name.
17
+ * `note` (string): A note sent to the recipient with the bundle.
18
+ * `recipient` (string): The recipient's email address.
19
+ * `sent_at` (date-time): When the Bundle was shared with this recipient.
20
+
21
+
22
+ ---
23
+
24
+ ## List Bundle Recipients
25
+
26
+ ```
27
+ Files::BundleRecipient.list(
28
+ user_id: 1,
29
+ page: 1,
30
+ per_page: 1,
31
+ bundle_id: 1
32
+ )
33
+ ```
34
+
35
+ ### Parameters
36
+
37
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
38
+ * `page` (int64): Current page number.
39
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
40
+ * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
41
+ * `bundle_id` (int64): Required - List recipients for the bundle with this ID.
@@ -0,0 +1,41 @@
1
+ # SettingsChange
2
+
3
+ ## Example SettingsChange Object
4
+
5
+ ```
6
+ {
7
+ "change_details": "{ domain: [\"olddomain.com', \"newdomain.com\"] }",
8
+ "created_at": "2000-01-01T01:00:00Z",
9
+ "user_id": 1
10
+ }
11
+ ```
12
+
13
+ * `change_details` (object): Specifics on what changed.
14
+ * `created_at` (date-time): The time this change was made
15
+ * `user_id` (int64): The user id responsible for this change
16
+
17
+
18
+ ---
19
+
20
+ ## List Settings Changes
21
+
22
+ ```
23
+ Files::SettingsChange.list(
24
+ page: 1,
25
+ per_page: 1
26
+ )
27
+ ```
28
+
29
+ ### Parameters
30
+
31
+ * `page` (int64): Current page number.
32
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
33
+ * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
34
+ * `cursor` (string): Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
35
+ * `sort_by` (object): If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `site_id`, `api_key_id`, `created_at` or `user_id`.
36
+ * `filter` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `api_key_id` and `user_id`.
37
+ * `filter_gt` (object): If set, return records where the specifiied field is greater than the supplied value. Valid fields are `api_key_id` and `user_id`.
38
+ * `filter_gteq` (object): If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `api_key_id` and `user_id`.
39
+ * `filter_like` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `api_key_id` and `user_id`.
40
+ * `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `api_key_id` and `user_id`.
41
+ * `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `api_key_id` and `user_id`.
@@ -36,6 +36,7 @@ require "files.com/models/automation"
36
36
  require "files.com/models/behavior"
37
37
  require "files.com/models/bundle"
38
38
  require "files.com/models/bundle_download"
39
+ require "files.com/models/bundle_recipient"
39
40
  require "files.com/models/clickwrap"
40
41
  require "files.com/models/dns_record"
41
42
  require "files.com/models/errors"
@@ -69,6 +70,7 @@ require "files.com/models/public_key"
69
70
  require "files.com/models/remote_server"
70
71
  require "files.com/models/request"
71
72
  require "files.com/models/session"
73
+ require "files.com/models/settings_change"
72
74
  require "files.com/models/site"
73
75
  require "files.com/models/sso_strategy"
74
76
  require "files.com/models/status"
@@ -55,6 +55,7 @@ module Files
55
55
  return false if num_retries >= Files.max_network_retries
56
56
  return true if error.is_a?(Faraday::TimeoutError)
57
57
  return true if error.is_a?(Faraday::ConnectionFailed)
58
+ return true if error.is_a?(Faraday::ServerError)
58
59
 
59
60
  false
60
61
  end
@@ -24,6 +24,11 @@ module Files
24
24
  @attributes[:documentation_links]
25
25
  end
26
26
 
27
+ # string - App icon
28
+ def icon_url
29
+ @attributes[:icon_url]
30
+ end
31
+
27
32
  # string - Full size logo for the App
28
33
  def logo_url
29
34
  @attributes[:logo_url]
@@ -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
- # clickwrap_id - int64 - ID of the clickwrap to use with this bundle.
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
- # clickwrap_id - int64 - ID of the clickwrap to use with this bundle.
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)
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class BundleRecipient
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # string - The recipient's company.
13
+ def company
14
+ @attributes[:company]
15
+ end
16
+
17
+ # string - The recipient's name.
18
+ def name
19
+ @attributes[:name]
20
+ end
21
+
22
+ # string - A note sent to the recipient with the bundle.
23
+ def note
24
+ @attributes[:note]
25
+ end
26
+
27
+ # string - The recipient's email address.
28
+ def recipient
29
+ @attributes[:recipient]
30
+ end
31
+
32
+ # date-time - When the Bundle was shared with this recipient.
33
+ def sent_at
34
+ @attributes[:sent_at]
35
+ end
36
+
37
+ # Parameters:
38
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
39
+ # page - int64 - Current page number.
40
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
41
+ # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
42
+ # bundle_id (required) - int64 - List recipients for the bundle with this ID.
43
+ def self.list(params = {}, options = {})
44
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
45
+ raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
46
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
47
+ raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
48
+ raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params.dig(:bundle_id) and !params.dig(:bundle_id).is_a?(Integer)
49
+ raise MissingParameterError.new("Parameter missing: bundle_id") unless params.dig(:bundle_id)
50
+
51
+ response, options = Api.send_request("/bundle_recipients", :get, params, options)
52
+ response.data.map do |entity_data|
53
+ BundleRecipient.new(entity_data, options)
54
+ end
55
+ end
56
+
57
+ def self.all(params = {}, options = {})
58
+ list(params, options)
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class SettingsChange
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # object - Specifics on what changed.
13
+ def change_details
14
+ @attributes[:change_details]
15
+ end
16
+
17
+ # date-time - The time this change was made
18
+ def created_at
19
+ @attributes[:created_at]
20
+ end
21
+
22
+ # int64 - The user id responsible for this change
23
+ def user_id
24
+ @attributes[:user_id]
25
+ end
26
+
27
+ # Parameters:
28
+ # page - int64 - Current page number.
29
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
30
+ # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
31
+ # cursor - string - Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
32
+ # sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `site_id`, `api_key_id`, `created_at` or `user_id`.
33
+ # filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `api_key_id` and `user_id`.
34
+ # filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `api_key_id` and `user_id`.
35
+ # filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `api_key_id` and `user_id`.
36
+ # filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `api_key_id` and `user_id`.
37
+ # filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `api_key_id` and `user_id`.
38
+ # filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `api_key_id` and `user_id`.
39
+ def self.list(params = {}, options = {})
40
+ raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
41
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
42
+ raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
43
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
44
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
45
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
46
+ raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
47
+ raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
48
+ raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
49
+ raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
50
+ raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
51
+
52
+ List.new(SettingsChange, params) do
53
+ Api.send_request("/settings_changes", :get, params, options)
54
+ end
55
+ end
56
+
57
+ def self.all(params = {}, options = {})
58
+ list(params, options)
59
+ end
60
+ end
61
+ end
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.91
4
+ version: 1.0.96
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-21 00:00:00.000000000 Z
11
+ date: 2020-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -95,6 +95,7 @@ files:
95
95
  - docs/behavior.md
96
96
  - docs/bundle.md
97
97
  - docs/bundle_download.md
98
+ - docs/bundle_recipient.md
98
99
  - docs/clickwrap.md
99
100
  - docs/dns_record.md
100
101
  - docs/errors.md
@@ -129,6 +130,7 @@ files:
129
130
  - docs/remote_server.md
130
131
  - docs/request.md
131
132
  - docs/session.md
133
+ - docs/settings_change.md
132
134
  - docs/site.md
133
135
  - docs/sso_strategy.md
134
136
  - docs/status.md
@@ -154,6 +156,7 @@ files:
154
156
  - lib/files.com/models/behavior.rb
155
157
  - lib/files.com/models/bundle.rb
156
158
  - lib/files.com/models/bundle_download.rb
159
+ - lib/files.com/models/bundle_recipient.rb
157
160
  - lib/files.com/models/clickwrap.rb
158
161
  - lib/files.com/models/dir.rb
159
162
  - lib/files.com/models/dns_record.rb
@@ -189,6 +192,7 @@ files:
189
192
  - lib/files.com/models/remote_server.rb
190
193
  - lib/files.com/models/request.rb
191
194
  - lib/files.com/models/session.rb
195
+ - lib/files.com/models/settings_change.rb
192
196
  - lib/files.com/models/site.rb
193
197
  - lib/files.com/models/sso_strategy.rb
194
198
  - lib/files.com/models/status.rb
@@ -228,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
232
  - !ruby/object:Gem::Version
229
233
  version: '0'
230
234
  requirements: []
231
- rubygems_version: 3.0.6
235
+ rubygems_version: 3.1.3
232
236
  signing_key:
233
237
  specification_version: 4
234
238
  summary: Files.com Ruby client.