files.com 1.0.104 → 1.0.105

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/_VERSION +1 -1
  3. data/docs/api_key.md +18 -2
  4. data/docs/as2_key.md +1 -0
  5. data/docs/bundle_download.md +1 -0
  6. data/docs/bundle_recipient.md +1 -0
  7. data/docs/clickwrap.md +1 -0
  8. data/docs/dns_record.md +1 -0
  9. data/docs/external_event.md +43 -0
  10. data/docs/file_comment.md +1 -0
  11. data/docs/folder.md +1 -1
  12. data/docs/group_user.md +1 -0
  13. data/docs/history_export.md +20 -20
  14. data/docs/history_export_result.md +0 -1
  15. data/docs/invoice.md +1 -0
  16. data/docs/ip_address.md +2 -0
  17. data/docs/lock.md +1 -0
  18. data/docs/message.md +1 -0
  19. data/docs/message_comment.md +1 -0
  20. data/docs/message_comment_reaction.md +1 -0
  21. data/docs/message_reaction.md +1 -0
  22. data/docs/payment.md +1 -0
  23. data/docs/project.md +1 -0
  24. data/docs/public_key.md +1 -0
  25. data/docs/remote_server.md +1 -0
  26. data/docs/session.md +10 -2
  27. data/docs/site.md +18 -2
  28. data/docs/sso_strategy.md +1 -0
  29. data/docs/usage_snapshot.md +1 -0
  30. data/docs/user_cipher_use.md +1 -0
  31. data/docs/user_request.md +1 -0
  32. data/lib/files.com.rb +1 -0
  33. data/lib/files.com/models/api_key.rb +12 -0
  34. data/lib/files.com/models/as2_key.rb +4 -3
  35. data/lib/files.com/models/bundle_download.rb +4 -3
  36. data/lib/files.com/models/bundle_recipient.rb +4 -3
  37. data/lib/files.com/models/clickwrap.rb +4 -3
  38. data/lib/files.com/models/dns_record.rb +4 -3
  39. data/lib/files.com/models/external_event.rb +66 -0
  40. data/lib/files.com/models/file_comment.rb +4 -3
  41. data/lib/files.com/models/folder.rb +2 -2
  42. data/lib/files.com/models/group_user.rb +4 -3
  43. data/lib/files.com/models/history_export.rb +15 -15
  44. data/lib/files.com/models/history_export_result.rb +0 -2
  45. data/lib/files.com/models/invoice.rb +4 -3
  46. data/lib/files.com/models/ip_address.rb +8 -6
  47. data/lib/files.com/models/lock.rb +4 -3
  48. data/lib/files.com/models/message.rb +4 -3
  49. data/lib/files.com/models/message_comment.rb +4 -3
  50. data/lib/files.com/models/message_comment_reaction.rb +4 -3
  51. data/lib/files.com/models/message_reaction.rb +4 -3
  52. data/lib/files.com/models/payment.rb +4 -3
  53. data/lib/files.com/models/project.rb +4 -3
  54. data/lib/files.com/models/public_key.rb +4 -3
  55. data/lib/files.com/models/remote_server.rb +4 -3
  56. data/lib/files.com/models/session.rb +6 -0
  57. data/lib/files.com/models/site.rb +12 -0
  58. data/lib/files.com/models/sso_strategy.rb +4 -3
  59. data/lib/files.com/models/usage_snapshot.rb +4 -3
  60. data/lib/files.com/models/user_cipher_use.rb +4 -3
  61. data/lib/files.com/models/user_request.rb +4 -3
  62. metadata +4 -2
@@ -39,3 +39,4 @@ Files::UserCipherUse.list(
39
39
  * `page` (int64): Current page number.
40
40
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
41
41
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
42
+ * `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.
@@ -33,6 +33,7 @@ Files::UserRequest.list(
33
33
  * `page` (int64): Current page number.
34
34
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
35
35
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
36
+ * `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.
36
37
 
37
38
 
38
39
  ---
@@ -41,6 +41,7 @@ require "files.com/models/bundle_recipient"
41
41
  require "files.com/models/clickwrap"
42
42
  require "files.com/models/dns_record"
43
43
  require "files.com/models/errors"
44
+ require "files.com/models/external_event"
44
45
  require "files.com/models/file"
45
46
  require "files.com/models/file_action"
46
47
  require "files.com/models/file_comment"
@@ -180,7 +180,13 @@ module Files
180
180
  list(params, options)
181
181
  end
182
182
 
183
+ # Parameters:
184
+ # format - string
185
+ # api_key - object
183
186
  def self.find_current(params = {}, options = {})
187
+ raise InvalidParameterError.new("Bad parameter: format must be an String") if params.dig(:format) and !params.dig(:format).is_a?(String)
188
+ raise InvalidParameterError.new("Bad parameter: api_key must be an Hash") if params.dig(:api_key) and !params.dig(:api_key).is_a?(Hash)
189
+
184
190
  response, options = Api.send_request("/api_key", :get, params, options)
185
191
  ApiKey.new(response.data, options)
186
192
  end
@@ -248,7 +254,13 @@ module Files
248
254
  ApiKey.new(response.data, options)
249
255
  end
250
256
 
257
+ # Parameters:
258
+ # format - string
259
+ # api_key - object
251
260
  def self.delete_current(params = {}, options = {})
261
+ raise InvalidParameterError.new("Bad parameter: format must be an String") if params.dig(:format) and !params.dig(:format).is_a?(String)
262
+ raise InvalidParameterError.new("Bad parameter: api_key must be an Hash") if params.dig(:api_key) and !params.dig(:api_key).is_a?(Hash)
263
+
252
264
  response, _options = Api.send_request("/api_key", :delete, params, options)
253
265
  response.data
254
266
  end
@@ -101,15 +101,16 @@ module Files
101
101
  # page - int64 - Current page number.
102
102
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
103
103
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
104
+ # 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.
104
105
  def self.list(params = {}, options = {})
105
106
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
106
107
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
107
108
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
108
109
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
110
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
109
111
 
110
- response, options = Api.send_request("/as2_keys", :get, params, options)
111
- response.data.map do |entity_data|
112
- As2Key.new(entity_data, options)
112
+ List.new(As2Key, params) do
113
+ Api.send_request("/as2_keys", :get, params, options)
113
114
  end
114
115
  end
115
116
 
@@ -28,17 +28,18 @@ module Files
28
28
  # page - int64 - Current page number.
29
29
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
30
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.
31
32
  # bundle_registration_id (required) - int64 - BundleRegistration ID
32
33
  def self.list(params = {}, options = {})
33
34
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
34
35
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
35
36
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
37
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
36
38
  raise InvalidParameterError.new("Bad parameter: bundle_registration_id must be an Integer") if params.dig(:bundle_registration_id) and !params.dig(:bundle_registration_id).is_a?(Integer)
37
39
  raise MissingParameterError.new("Parameter missing: bundle_registration_id") unless params.dig(:bundle_registration_id)
38
40
 
39
- response, options = Api.send_request("/bundle_downloads", :get, params, options)
40
- response.data.map do |entity_data|
41
- BundleDownload.new(entity_data, options)
41
+ List.new(BundleDownload, params) do
42
+ Api.send_request("/bundle_downloads", :get, params, options)
42
43
  end
43
44
  end
44
45
 
@@ -39,18 +39,19 @@ module Files
39
39
  # page - int64 - Current page number.
40
40
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
41
41
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
42
+ # 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.
42
43
  # bundle_id (required) - int64 - List recipients for the bundle with this ID.
43
44
  def self.list(params = {}, options = {})
44
45
  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
46
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
46
47
  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
48
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
49
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
48
50
  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
51
  raise MissingParameterError.new("Parameter missing: bundle_id") unless params.dig(:bundle_id)
50
52
 
51
- response, options = Api.send_request("/bundle_recipients", :get, params, options)
52
- response.data.map do |entity_data|
53
- BundleRecipient.new(entity_data, options)
53
+ List.new(BundleRecipient, params) do
54
+ Api.send_request("/bundle_recipients", :get, params, options)
54
55
  end
55
56
  end
56
57
 
@@ -111,14 +111,15 @@ module Files
111
111
  # page - int64 - Current page number.
112
112
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
113
113
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
114
+ # 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.
114
115
  def self.list(params = {}, options = {})
115
116
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
116
117
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
117
118
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
119
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
118
120
 
119
- response, options = Api.send_request("/clickwraps", :get, params, options)
120
- response.data.map do |entity_data|
121
- Clickwrap.new(entity_data, options)
121
+ List.new(Clickwrap, params) do
122
+ Api.send_request("/clickwraps", :get, params, options)
122
123
  end
123
124
  end
124
125
 
@@ -33,14 +33,15 @@ module Files
33
33
  # page - int64 - Current page number.
34
34
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
35
35
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
36
+ # 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.
36
37
  def self.list(params = {}, options = {})
37
38
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
38
39
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
39
40
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
41
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
40
42
 
41
- response, options = Api.send_request("/dns_records", :get, params, options)
42
- response.data.map do |entity_data|
43
- DnsRecord.new(entity_data, options)
43
+ List.new(DnsRecord, params) do
44
+ Api.send_request("/dns_records", :get, params, options)
44
45
  end
45
46
  end
46
47
 
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class ExternalEvent
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # string - Type of event being recorded. Valid values: `remote_server_sync`, `lockout`, `ldap_login`, `saml_login`
13
+ def event_type
14
+ @attributes[:event_type]
15
+ end
16
+
17
+ # string - Status of event. Valid values: `error`
18
+ def status
19
+ @attributes[:status]
20
+ end
21
+
22
+ # string - Event body
23
+ def body
24
+ @attributes[:body]
25
+ end
26
+
27
+ # date-time - External event create date/time
28
+ def created_at
29
+ @attributes[:created_at]
30
+ end
31
+
32
+ # Parameters:
33
+ # page - int64 - Current page number.
34
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
35
+ # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
36
+ # 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.
37
+ # 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 `remote_server_type`, `site_id`, `event_type`, `created_at` or `status`.
38
+ # filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
39
+ # filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
40
+ # filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
41
+ # filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
42
+ # filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
43
+ # filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type` or `status`.
44
+ def self.list(params = {}, options = {})
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: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
49
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
50
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
51
+ raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
52
+ raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
53
+ raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
54
+ raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
55
+ raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
56
+
57
+ List.new(ExternalEvent, params) do
58
+ Api.send_request("/external_events", :get, params, options)
59
+ end
60
+ end
61
+
62
+ def self.all(params = {}, options = {})
63
+ list(params, options)
64
+ end
65
+ end
66
+ end
@@ -86,6 +86,7 @@ module Files
86
86
  # page - int64 - Current page number.
87
87
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
88
88
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
89
+ # 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.
89
90
  # path (required) - string - Path to operate on.
90
91
  def self.list_for(path, params = {}, options = {})
91
92
  params ||= {}
@@ -93,12 +94,12 @@ module Files
93
94
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
94
95
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
95
96
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
97
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
96
98
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
97
99
  raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
98
100
 
99
- response, options = Api.send_request("/file_comments/files/#{params[:path]}", :get, params, options)
100
- response.data.map do |entity_data|
101
- FileComment.new(entity_data, options)
101
+ List.new(FileComment, params) do
102
+ Api.send_request("/file_comments/files/#{params[:path]}", :get, params, options)
102
103
  end
103
104
  end
104
105
 
@@ -312,8 +312,8 @@ module Files
312
312
  # page - int64 - Current page number.
313
313
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
314
314
  # action - string - Action to take. Can be `count`, `count_nrs` (non recursive), `size`, `permissions`, or blank.
315
- # path (required) - string - Path to operate on.
316
315
  # 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 header.
316
+ # path (required) - string - Path to operate on.
317
317
  # filter - string - If specified, will to filter folders/files list by this string. Wildcards of `*` and `?` are acceptable here.
318
318
  # preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
319
319
  # search - string - If `search_all` is `true`, provide the search string here. Otherwise, this parameter acts like an alias of `filter`.
@@ -326,8 +326,8 @@ module Files
326
326
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
327
327
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
328
328
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
329
- raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
330
329
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
330
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
331
331
  raise InvalidParameterError.new("Bad parameter: filter must be an String") if params.dig(:filter) and !params.dig(:filter).is_a?(String)
332
332
  raise InvalidParameterError.new("Bad parameter: preview_size must be an String") if params.dig(:preview_size) and !params.dig(:preview_size).is_a?(String)
333
333
  raise InvalidParameterError.new("Bad parameter: search must be an String") if params.dig(:search) and !params.dig(:search).is_a?(String)
@@ -111,17 +111,18 @@ module Files
111
111
  # page - int64 - Current page number.
112
112
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
113
113
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
114
+ # 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.
114
115
  # group_id - int64 - Group ID. If provided, will return group_users of this group.
115
116
  def self.list(params = {}, options = {})
116
117
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
117
118
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
118
119
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
119
120
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
121
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
120
122
  raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params.dig(:group_id) and !params.dig(:group_id).is_a?(Integer)
121
123
 
122
- response, options = Api.send_request("/group_users", :get, params, options)
123
- response.data.map do |entity_data|
124
- GroupUser.new(entity_data, options)
124
+ List.new(GroupUser, params) do
125
+ Api.send_request("/group_users", :get, params, options)
125
126
  end
126
127
  end
127
128
 
@@ -63,7 +63,7 @@ module Files
63
63
  @attributes[:query_interface] = value
64
64
  end
65
65
 
66
- # int64 - Return results that are actions performed by the user indiciated by this User ID
66
+ # string - Return results that are actions performed by the user indiciated by this User ID
67
67
  def query_user_id
68
68
  @attributes[:query_user_id]
69
69
  end
@@ -72,7 +72,7 @@ module Files
72
72
  @attributes[:query_user_id] = value
73
73
  end
74
74
 
75
- # int64 - Return results that are file actions related to the file indicated by this File ID
75
+ # string - Return results that are file actions related to the file indicated by this File ID
76
76
  def query_file_id
77
77
  @attributes[:query_file_id]
78
78
  end
@@ -81,7 +81,7 @@ module Files
81
81
  @attributes[:query_file_id] = value
82
82
  end
83
83
 
84
- # int64 - Return results that are file actions inside the parent folder specified by this folder ID
84
+ # string - Return results that are file actions inside the parent folder specified by this folder ID
85
85
  def query_parent_id
86
86
  @attributes[:query_parent_id]
87
87
  end
@@ -153,7 +153,7 @@ module Files
153
153
  @attributes[:query_failure_type] = value
154
154
  end
155
155
 
156
- # int64 - If searching for Histories about specific objects (such as Users, or API Keys), this paremeter restricts results to objects that match this ID.
156
+ # string - If searching for Histories about specific objects (such as Users, or API Keys), this paremeter restricts results to objects that match this ID.
157
157
  def query_target_id
158
158
  @attributes[:query_target_id]
159
159
  end
@@ -180,7 +180,7 @@ module Files
180
180
  @attributes[:query_target_permission] = value
181
181
  end
182
182
 
183
- # int64 - If searching for Histories about API keys, this parameter restricts results to API keys created by/for this user ID.
183
+ # string - If searching for Histories about API keys, this parameter restricts results to API keys created by/for this user ID.
184
184
  def query_target_user_id
185
185
  @attributes[:query_target_user_id]
186
186
  end
@@ -265,9 +265,9 @@ module Files
265
265
  # end_at - string - End date/time of export range.
266
266
  # query_action - string - Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
267
267
  # query_interface - string - Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`
268
- # query_user_id - int64 - Return results that are actions performed by the user indiciated by this User ID
269
- # query_file_id - int64 - Return results that are file actions related to the file indicated by this File ID
270
- # query_parent_id - int64 - Return results that are file actions inside the parent folder specified by this folder ID
268
+ # query_user_id - string - Return results that are actions performed by the user indiciated by this User ID
269
+ # query_file_id - string - Return results that are file actions related to the file indicated by this File ID
270
+ # query_parent_id - string - Return results that are file actions inside the parent folder specified by this folder ID
271
271
  # query_path - string - Return results that are file actions related to this path.
272
272
  # query_folder - string - Return results that are file actions related to files or folders inside this folder path.
273
273
  # query_src - string - Return results that are file moves originating from this path.
@@ -275,10 +275,10 @@ module Files
275
275
  # query_ip - string - Filter results by this IP address.
276
276
  # query_username - string - Filter results by this username.
277
277
  # query_failure_type - string - If searching for Histories about login failures, this parameter restricts results to failures of this specific type. Valid values: `expired_trial`, `account_overdue`, `locked_out`, `ip_mismatch`, `password_mismatch`, `site_mismatch`, `username_not_found`, `none`, `no_ftp_permission`, `no_web_permission`, `no_directory`, `errno_enoent`, `no_sftp_permission`, `no_dav_permission`, `no_restapi_permission`, `key_mismatch`, `region_mismatch`, `expired_access`, `desktop_ip_mismatch`, `desktop_api_key_not_used_quickly_enough`, `disabled`
278
- # query_target_id - int64 - If searching for Histories about specific objects (such as Users, or API Keys), this paremeter restricts results to objects that match this ID.
278
+ # query_target_id - string - If searching for Histories about specific objects (such as Users, or API Keys), this paremeter restricts results to objects that match this ID.
279
279
  # query_target_name - string - If searching for Histories about Users, Groups or other objects with names, this parameter restricts results to objects with this name/username.
280
280
  # query_target_permission - string - If searching for Histories about Permisisons, this parameter restricts results to permissions of this level.
281
- # query_target_user_id - int64 - If searching for Histories about API keys, this parameter restricts results to API keys created by/for this user ID.
281
+ # query_target_user_id - string - If searching for Histories about API keys, this parameter restricts results to API keys created by/for this user ID.
282
282
  # query_target_username - string - If searching for Histories about API keys, this parameter restricts results to API keys created by/for this username.
283
283
  # query_target_platform - string - If searching for Histories about API keys, this parameter restricts results to API keys associated with this platform.
284
284
  # query_target_permission_set - string - If searching for Histories about API keys, this parameter restricts results to API keys with this permission set.
@@ -288,9 +288,9 @@ module Files
288
288
  raise InvalidParameterError.new("Bad parameter: end_at must be an String") if params.dig(:end_at) and !params.dig(:end_at).is_a?(String)
289
289
  raise InvalidParameterError.new("Bad parameter: query_action must be an String") if params.dig(:query_action) and !params.dig(:query_action).is_a?(String)
290
290
  raise InvalidParameterError.new("Bad parameter: query_interface must be an String") if params.dig(:query_interface) and !params.dig(:query_interface).is_a?(String)
291
- raise InvalidParameterError.new("Bad parameter: query_user_id must be an Integer") if params.dig(:query_user_id) and !params.dig(:query_user_id).is_a?(Integer)
292
- raise InvalidParameterError.new("Bad parameter: query_file_id must be an Integer") if params.dig(:query_file_id) and !params.dig(:query_file_id).is_a?(Integer)
293
- raise InvalidParameterError.new("Bad parameter: query_parent_id must be an Integer") if params.dig(:query_parent_id) and !params.dig(:query_parent_id).is_a?(Integer)
291
+ raise InvalidParameterError.new("Bad parameter: query_user_id must be an String") if params.dig(:query_user_id) and !params.dig(:query_user_id).is_a?(String)
292
+ raise InvalidParameterError.new("Bad parameter: query_file_id must be an String") if params.dig(:query_file_id) and !params.dig(:query_file_id).is_a?(String)
293
+ raise InvalidParameterError.new("Bad parameter: query_parent_id must be an String") if params.dig(:query_parent_id) and !params.dig(:query_parent_id).is_a?(String)
294
294
  raise InvalidParameterError.new("Bad parameter: query_path must be an String") if params.dig(:query_path) and !params.dig(:query_path).is_a?(String)
295
295
  raise InvalidParameterError.new("Bad parameter: query_folder must be an String") if params.dig(:query_folder) and !params.dig(:query_folder).is_a?(String)
296
296
  raise InvalidParameterError.new("Bad parameter: query_src must be an String") if params.dig(:query_src) and !params.dig(:query_src).is_a?(String)
@@ -298,10 +298,10 @@ module Files
298
298
  raise InvalidParameterError.new("Bad parameter: query_ip must be an String") if params.dig(:query_ip) and !params.dig(:query_ip).is_a?(String)
299
299
  raise InvalidParameterError.new("Bad parameter: query_username must be an String") if params.dig(:query_username) and !params.dig(:query_username).is_a?(String)
300
300
  raise InvalidParameterError.new("Bad parameter: query_failure_type must be an String") if params.dig(:query_failure_type) and !params.dig(:query_failure_type).is_a?(String)
301
- raise InvalidParameterError.new("Bad parameter: query_target_id must be an Integer") if params.dig(:query_target_id) and !params.dig(:query_target_id).is_a?(Integer)
301
+ raise InvalidParameterError.new("Bad parameter: query_target_id must be an String") if params.dig(:query_target_id) and !params.dig(:query_target_id).is_a?(String)
302
302
  raise InvalidParameterError.new("Bad parameter: query_target_name must be an String") if params.dig(:query_target_name) and !params.dig(:query_target_name).is_a?(String)
303
303
  raise InvalidParameterError.new("Bad parameter: query_target_permission must be an String") if params.dig(:query_target_permission) and !params.dig(:query_target_permission).is_a?(String)
304
- raise InvalidParameterError.new("Bad parameter: query_target_user_id must be an Integer") if params.dig(:query_target_user_id) and !params.dig(:query_target_user_id).is_a?(Integer)
304
+ raise InvalidParameterError.new("Bad parameter: query_target_user_id must be an String") if params.dig(:query_target_user_id) and !params.dig(:query_target_user_id).is_a?(String)
305
305
  raise InvalidParameterError.new("Bad parameter: query_target_username must be an String") if params.dig(:query_target_username) and !params.dig(:query_target_username).is_a?(String)
306
306
  raise InvalidParameterError.new("Bad parameter: query_target_platform must be an String") if params.dig(:query_target_platform) and !params.dig(:query_target_platform).is_a?(String)
307
307
  raise InvalidParameterError.new("Bad parameter: query_target_permission_set must be an String") if params.dig(:query_target_permission_set) and !params.dig(:query_target_permission_set).is_a?(String)
@@ -130,7 +130,6 @@ module Files
130
130
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
131
131
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
132
132
  # 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.
133
- # 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 `created_at`.
134
133
  # history_export_id (required) - int64 - ID of the associated history export.
135
134
  def self.list(params = {}, options = {})
136
135
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
@@ -138,7 +137,6 @@ module Files
138
137
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
139
138
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
140
139
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
141
- raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
142
140
  raise InvalidParameterError.new("Bad parameter: history_export_id must be an Integer") if params.dig(:history_export_id) and !params.dig(:history_export_id).is_a?(Integer)
143
141
  raise MissingParameterError.new("Parameter missing: history_export_id") unless params.dig(:history_export_id)
144
142
 
@@ -83,14 +83,15 @@ module Files
83
83
  # page - int64 - Current page number.
84
84
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
85
85
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
86
+ # 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.
86
87
  def self.list(params = {}, options = {})
87
88
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
88
89
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
89
90
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
91
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
90
92
 
91
- response, options = Api.send_request("/invoices", :get, params, options)
92
- response.data.map do |entity_data|
93
- AccountLineItem.new(entity_data, options)
93
+ List.new(AccountLineItem, params) do
94
+ Api.send_request("/invoices", :get, params, options)
94
95
  end
95
96
  end
96
97
 
@@ -33,14 +33,15 @@ module Files
33
33
  # page - int64 - Current page number.
34
34
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
35
35
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
36
+ # 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.
36
37
  def self.list(params = {}, options = {})
37
38
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
38
39
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
39
40
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
41
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
40
42
 
41
- response, options = Api.send_request("/ip_addresses", :get, params, options)
42
- response.data.map do |entity_data|
43
- IpAddress.new(entity_data, options)
43
+ List.new(IpAddress, params) do
44
+ Api.send_request("/ip_addresses", :get, params, options)
44
45
  end
45
46
  end
46
47
 
@@ -52,14 +53,15 @@ module Files
52
53
  # page - int64 - Current page number.
53
54
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
54
55
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
56
+ # 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.
55
57
  def self.get_reserved(params = {}, options = {})
56
58
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
57
59
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
58
60
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
61
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
59
62
 
60
- response, options = Api.send_request("/ip_addresses/reserved", :get, params, options)
61
- response.data.map do |entity_data|
62
- PublicIpAddress.new(entity_data, options)
63
+ List.new(PublicIpAddress, params) do
64
+ Api.send_request("/ip_addresses/reserved", :get, params, options)
63
65
  end
64
66
  end
65
67
  end