files.com 1.0.101 → 1.0.106

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.
Files changed (69) 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/bandwidth_snapshot.md +8 -0
  6. data/docs/bundle_download.md +1 -0
  7. data/docs/bundle_recipient.md +1 -0
  8. data/docs/clickwrap.md +1 -0
  9. data/docs/dns_record.md +1 -0
  10. data/docs/external_event.md +43 -0
  11. data/docs/file.md +2 -2
  12. data/docs/file_comment.md +1 -0
  13. data/docs/file_part_upload.md +2 -0
  14. data/docs/folder.md +2 -2
  15. data/docs/group_user.md +1 -0
  16. data/docs/history_export.md +23 -69
  17. data/docs/history_export_result.md +79 -0
  18. data/docs/invoice.md +1 -0
  19. data/docs/ip_address.md +2 -0
  20. data/docs/lock.md +1 -0
  21. data/docs/message.md +1 -0
  22. data/docs/message_comment.md +1 -0
  23. data/docs/message_comment_reaction.md +1 -0
  24. data/docs/message_reaction.md +1 -0
  25. data/docs/payment.md +1 -0
  26. data/docs/project.md +1 -0
  27. data/docs/public_key.md +1 -0
  28. data/docs/remote_server.md +1 -0
  29. data/docs/session.md +10 -2
  30. data/docs/site.md +18 -2
  31. data/docs/sso_strategy.md +3 -0
  32. data/docs/usage_snapshot.md +1 -0
  33. data/docs/user_cipher_use.md +1 -0
  34. data/docs/user_request.md +3 -0
  35. data/lib/files.com.rb +2 -0
  36. data/lib/files.com/api_client.rb +2 -1
  37. data/lib/files.com/models/api_key.rb +12 -0
  38. data/lib/files.com/models/as2_key.rb +4 -3
  39. data/lib/files.com/models/bandwidth_snapshot.rb +18 -3
  40. data/lib/files.com/models/bundle_download.rb +4 -3
  41. data/lib/files.com/models/bundle_recipient.rb +4 -3
  42. data/lib/files.com/models/clickwrap.rb +4 -3
  43. data/lib/files.com/models/dns_record.rb +4 -3
  44. data/lib/files.com/models/external_event.rb +66 -0
  45. data/lib/files.com/models/file.rb +6 -6
  46. data/lib/files.com/models/file_comment.rb +4 -3
  47. data/lib/files.com/models/file_part_upload.rb +5 -0
  48. data/lib/files.com/models/folder.rb +3 -3
  49. data/lib/files.com/models/group_user.rb +4 -3
  50. data/lib/files.com/models/history_export.rb +24 -64
  51. data/lib/files.com/models/history_export_result.rb +152 -0
  52. data/lib/files.com/models/invoice.rb +4 -3
  53. data/lib/files.com/models/ip_address.rb +8 -6
  54. data/lib/files.com/models/lock.rb +4 -3
  55. data/lib/files.com/models/message.rb +4 -3
  56. data/lib/files.com/models/message_comment.rb +4 -3
  57. data/lib/files.com/models/message_comment_reaction.rb +4 -3
  58. data/lib/files.com/models/message_reaction.rb +4 -3
  59. data/lib/files.com/models/payment.rb +4 -3
  60. data/lib/files.com/models/project.rb +4 -3
  61. data/lib/files.com/models/public_key.rb +4 -3
  62. data/lib/files.com/models/remote_server.rb +4 -3
  63. data/lib/files.com/models/session.rb +6 -0
  64. data/lib/files.com/models/site.rb +12 -0
  65. data/lib/files.com/models/sso_strategy.rb +9 -3
  66. data/lib/files.com/models/usage_snapshot.rb +4 -3
  67. data/lib/files.com/models/user_cipher_use.rb +4 -3
  68. data/lib/files.com/models/user_request.rb +13 -3
  69. metadata +6 -2
@@ -57,6 +57,7 @@ Files::Invoice.list(
57
57
  * `page` (int64): Current page number.
58
58
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
59
59
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
60
+ * `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.
60
61
 
61
62
 
62
63
  ---
@@ -35,6 +35,7 @@ Files::IpAddress.list(
35
35
  * `page` (int64): Current page number.
36
36
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
37
37
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
38
+ * `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.
38
39
 
39
40
 
40
41
  ---
@@ -53,3 +54,4 @@ Files::IpAddress.get_reserved(
53
54
  * `page` (int64): Current page number.
54
55
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
55
56
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
57
+ * `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.
@@ -44,6 +44,7 @@ Files::Lock.list_for(path,
44
44
  * `page` (int64): Current page number.
45
45
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
46
46
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
47
+ * `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.
47
48
  * `path` (string): Required - Path to operate on.
48
49
  * `include_children` (boolean): Include locks from children objects?
49
50
 
@@ -40,6 +40,7 @@ Files::Message.list(
40
40
  * `page` (int64): Current page number.
41
41
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
42
42
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
43
+ * `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.
43
44
  * `project_id` (int64): Required - Project for which to return messages.
44
45
 
45
46
 
@@ -37,6 +37,7 @@ Files::MessageComment.list(
37
37
  * `page` (int64): Current page number.
38
38
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
39
39
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
40
+ * `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.
40
41
  * `message_id` (int64): Required - Message comment to return comments for.
41
42
 
42
43
 
@@ -33,6 +33,7 @@ Files::MessageCommentReaction.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
  * `message_comment_id` (int64): Required - Message comment to return reactions for.
37
38
 
38
39
 
@@ -33,6 +33,7 @@ Files::MessageReaction.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
  * `message_id` (int64): Required - Message to return reactions for.
37
38
 
38
39
 
@@ -57,6 +57,7 @@ Files::Payment.list(
57
57
  * `page` (int64): Current page number.
58
58
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
59
59
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
60
+ * `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.
60
61
 
61
62
 
62
63
  ---
@@ -29,6 +29,7 @@ Files::Project.list(
29
29
  * `page` (int64): Current page number.
30
30
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
31
31
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
32
+ * `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
33
 
33
34
 
34
35
  ---
@@ -37,6 +37,7 @@ Files::PublicKey.list(
37
37
  * `page` (int64): Current page number.
38
38
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
39
39
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
40
+ * `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.
40
41
 
41
42
 
42
43
  ---
@@ -93,6 +93,7 @@ Files::RemoteServer.list(
93
93
  * `page` (int64): Current page number.
94
94
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
95
95
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
96
+ * `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.
96
97
 
97
98
 
98
99
  ---
@@ -10,7 +10,7 @@
10
10
  "login_token_domain": "https://mysite.files.com",
11
11
  "max_dir_listing_size": 1,
12
12
  "multiple_regions": true,
13
- "read_only": "en",
13
+ "read_only": true,
14
14
  "root_path": "",
15
15
  "site_id": 1,
16
16
  "ssl_required": true,
@@ -74,5 +74,13 @@ Files::Session.create(
74
74
  ## Delete user session (log out)
75
75
 
76
76
  ```
77
- Files::Session.delete
77
+ Files::Session.delete(
78
+ format: "",
79
+ session: ""
80
+ )
78
81
  ```
82
+
83
+ ### Parameters
84
+
85
+ * `format` (string):
86
+ * `session` (object):
@@ -234,18 +234,34 @@
234
234
  ## Show site settings
235
235
 
236
236
  ```
237
- Files::Site.get
237
+ Files::Site.get(
238
+ format: "",
239
+ site: ""
240
+ )
238
241
  ```
239
242
 
243
+ ### Parameters
244
+
245
+ * `format` (string):
246
+ * `site` (object):
247
+
240
248
 
241
249
  ---
242
250
 
243
251
  ## Get the most recent usage snapshot (usage data for billing purposes) for a Site
244
252
 
245
253
  ```
246
- Files::Site.get_usage
254
+ Files::Site.get_usage(
255
+ format: "",
256
+ site: ""
257
+ )
247
258
  ```
248
259
 
260
+ ### Parameters
261
+
262
+ * `format` (string):
263
+ * `site` (object):
264
+
249
265
 
250
266
  ---
251
267
 
@@ -23,6 +23,7 @@
23
23
  "provision_groups": true,
24
24
  "deprovision_users": true,
25
25
  "deprovision_groups": true,
26
+ "deprovision_behavior": "disable",
26
27
  "provision_group_default": "Employees",
27
28
  "provision_group_exclusion": "Employees",
28
29
  "provision_group_inclusion": "Employees",
@@ -62,6 +63,7 @@
62
63
  * `provision_groups` (boolean): Auto-provision group membership based on group memberships on the SSO side?
63
64
  * `deprovision_users` (boolean): Auto-deprovision users?
64
65
  * `deprovision_groups` (boolean): Auto-deprovision group membership based on group memberships on the SSO side?
66
+ * `deprovision_behavior` (string): Method used for deprovisioning users.
65
67
  * `provision_group_default` (string): Comma-separated list of group names for groups to automatically add all auto-provisioned users to.
66
68
  * `provision_group_exclusion` (string): Comma-separated list of group names for groups (with optional wildcards) that will be excluded from auto-provisioning.
67
69
  * `provision_group_inclusion` (string): Comma-separated list of group names for groups (with optional wildcards) that will be auto-provisioned.
@@ -99,6 +101,7 @@ Files::SsoStrategy.list(
99
101
  * `page` (int64): Current page number.
100
102
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
101
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.
102
105
 
103
106
 
104
107
  ---
@@ -51,3 +51,4 @@ Files::UsageSnapshot.list(
51
51
  * `page` (int64): Current page number.
52
52
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
53
53
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
54
+ * `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.
@@ -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.
@@ -4,12 +4,14 @@
4
4
 
5
5
  ```
6
6
  {
7
+ "id": 1,
7
8
  "name": "John Doe",
8
9
  "email": "john.doe@files.com",
9
10
  "details": "Changed Departments"
10
11
  }
11
12
  ```
12
13
 
14
+ * `id` (int64): ID
13
15
  * `name` (string): User's full name
14
16
  * `email` (email): User email address
15
17
  * `details` (string): Details of the user's request
@@ -31,6 +33,7 @@ Files::UserRequest.list(
31
33
  * `page` (int64): Current page number.
32
34
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
33
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.
34
37
 
35
38
 
36
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"
@@ -51,6 +52,7 @@ require "files.com/models/group"
51
52
  require "files.com/models/group_user"
52
53
  require "files.com/models/history"
53
54
  require "files.com/models/history_export"
55
+ require "files.com/models/history_export_result"
54
56
  require "files.com/models/image"
55
57
  require "files.com/models/invoice"
56
58
  require "files.com/models/invoice_line_item"
@@ -145,11 +145,12 @@ module Files
145
145
  end
146
146
  end
147
147
 
148
- def stream_download(uri, io)
148
+ def stream_download(uri, io, range)
149
149
  if conn.adapter == Faraday::Adapter::NetHttp
150
150
  uri = URI(uri)
151
151
  Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |http|
152
152
  request = Net::HTTP::Get.new uri
153
+ request["RANGE"] = "bytes=#{range[0]}-#{range[1]}" if range
153
154
  http.request request do |response|
154
155
  io.fulfill_content_length(response.content_length) if io.respond_to?(:fulfill_content_length)
155
156
  response.read_body do |chunk|
@@ -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
 
@@ -58,14 +58,29 @@ module Files
58
58
  # page - int64 - Current page number.
59
59
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
60
60
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
61
+ # 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.
62
+ # 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` and `logged_at`.
63
+ # filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `logged_at`.
64
+ # filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `logged_at`.
65
+ # filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `logged_at`.
66
+ # filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `logged_at`.
67
+ # filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `logged_at`.
68
+ # filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `logged_at`.
61
69
  def self.list(params = {}, options = {})
62
70
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
63
71
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
64
72
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
73
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
74
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
75
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
76
+ raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
77
+ raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
78
+ raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
79
+ raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
80
+ raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
65
81
 
66
- response, options = Api.send_request("/bandwidth_snapshots", :get, params, options)
67
- response.data.map do |entity_data|
68
- BandwidthSnapshot.new(entity_data, options)
82
+ List.new(BandwidthSnapshot, params) do
83
+ Api.send_request("/bandwidth_snapshots", :get, params, options)
69
84
  end
70
85
  end
71
86
 
@@ -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