files.com 1.0.103 → 1.0.108

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 (71) hide show
  1. checksums.yaml +4 -4
  2. data/_VERSION +1 -1
  3. data/docs/api_key.md +18 -2
  4. data/docs/app.md +2 -0
  5. data/docs/as2_key.md +1 -0
  6. data/docs/bandwidth_snapshot.md +8 -0
  7. data/docs/bundle_download.md +1 -0
  8. data/docs/bundle_recipient.md +1 -0
  9. data/docs/clickwrap.md +1 -0
  10. data/docs/dns_record.md +1 -0
  11. data/docs/external_event.md +43 -0
  12. data/docs/file.md +2 -4
  13. data/docs/file_comment.md +1 -0
  14. data/docs/file_part_upload.md +12 -10
  15. data/docs/folder.md +2 -4
  16. data/docs/group_user.md +1 -0
  17. data/docs/history_export.md +20 -20
  18. data/docs/history_export_result.md +0 -1
  19. data/docs/invoice.md +1 -0
  20. data/docs/ip_address.md +2 -0
  21. data/docs/lock.md +1 -0
  22. data/docs/message.md +1 -0
  23. data/docs/message_comment.md +1 -0
  24. data/docs/message_comment_reaction.md +1 -0
  25. data/docs/message_reaction.md +1 -0
  26. data/docs/payment.md +1 -0
  27. data/docs/project.md +1 -0
  28. data/docs/public_key.md +1 -0
  29. data/docs/remote_server.md +1 -0
  30. data/docs/session.md +10 -2
  31. data/docs/site.md +18 -2
  32. data/docs/sso_strategy.md +3 -0
  33. data/docs/usage_snapshot.md +1 -0
  34. data/docs/user_cipher_use.md +1 -0
  35. data/docs/user_request.md +1 -0
  36. data/lib/files.com.rb +1 -0
  37. data/lib/files.com/api_client.rb +7 -2
  38. data/lib/files.com/models/api_key.rb +12 -0
  39. data/lib/files.com/models/app.rb +5 -0
  40. data/lib/files.com/models/as2_key.rb +4 -3
  41. data/lib/files.com/models/bandwidth_snapshot.rb +18 -3
  42. data/lib/files.com/models/bundle_download.rb +4 -3
  43. data/lib/files.com/models/bundle_recipient.rb +4 -3
  44. data/lib/files.com/models/clickwrap.rb +4 -3
  45. data/lib/files.com/models/dns_record.rb +4 -3
  46. data/lib/files.com/models/external_event.rb +66 -0
  47. data/lib/files.com/models/file.rb +6 -15
  48. data/lib/files.com/models/file_comment.rb +4 -3
  49. data/lib/files.com/models/file_part_upload.rb +10 -5
  50. data/lib/files.com/models/folder.rb +3 -12
  51. data/lib/files.com/models/group_user.rb +4 -3
  52. data/lib/files.com/models/history_export.rb +15 -15
  53. data/lib/files.com/models/history_export_result.rb +0 -2
  54. data/lib/files.com/models/invoice.rb +4 -3
  55. data/lib/files.com/models/ip_address.rb +8 -6
  56. data/lib/files.com/models/lock.rb +4 -3
  57. data/lib/files.com/models/message.rb +4 -3
  58. data/lib/files.com/models/message_comment.rb +4 -3
  59. data/lib/files.com/models/message_comment_reaction.rb +4 -3
  60. data/lib/files.com/models/message_reaction.rb +4 -3
  61. data/lib/files.com/models/payment.rb +4 -3
  62. data/lib/files.com/models/project.rb +4 -3
  63. data/lib/files.com/models/public_key.rb +4 -3
  64. data/lib/files.com/models/remote_server.rb +4 -3
  65. data/lib/files.com/models/session.rb +6 -0
  66. data/lib/files.com/models/site.rb +12 -0
  67. data/lib/files.com/models/sso_strategy.rb +9 -3
  68. data/lib/files.com/models/usage_snapshot.rb +4 -3
  69. data/lib/files.com/models/user_cipher_use.rb +4 -3
  70. data/lib/files.com/models/user_request.rb +4 -3
  71. metadata +4 -2
@@ -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
 
@@ -24,7 +24,7 @@ module Files
24
24
  @attributes[:ask_about_overwrites]
25
25
  end
26
26
 
27
- # string - Currently unused
27
+ # int64 - Currently unused
28
28
  def available_parts
29
29
  @attributes[:available_parts]
30
30
  end
@@ -44,22 +44,27 @@ module Files
44
44
  @attributes[:http_method]
45
45
  end
46
46
 
47
- # string - Currently unused
47
+ # int64 - Currently unused
48
48
  def next_partsize
49
49
  @attributes[:next_partsize]
50
50
  end
51
51
 
52
- # string - Additional upload parameters
52
+ # boolean - If true, parts may be uploaded in parallel
53
+ def parallel_parts
54
+ @attributes[:parallel_parts]
55
+ end
56
+
57
+ # object - Additional upload parameters
53
58
  def parameters
54
59
  @attributes[:parameters]
55
60
  end
56
61
 
57
- # string - Currently unused
62
+ # int64 - Currently unused
58
63
  def part_number
59
64
  @attributes[:part_number]
60
65
  end
61
66
 
62
- # string - Currently unused
67
+ # int64 - Currently unused
63
68
  def partsize
64
69
  @attributes[:partsize]
65
70
  end
@@ -150,15 +150,6 @@ module Files
150
150
  path
151
151
  end
152
152
 
153
- # int64 - File/Folder ID
154
- def id
155
- @attributes[:id]
156
- end
157
-
158
- def id=(value)
159
- @attributes[:id] = value
160
- end
161
-
162
153
  # string - File/Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
163
154
  def path
164
155
  @attributes[:path]
@@ -311,9 +302,9 @@ module Files
311
302
  # Parameters:
312
303
  # page - int64 - Current page number.
313
304
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
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.
305
+ # action - string - Action to take. Can be `count`, `size`, `permissions`, or blank.
316
306
  # 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.
307
+ # path (required) - string - Path to operate on.
317
308
  # filter - string - If specified, will to filter folders/files list by this string. Wildcards of `*` and `?` are acceptable here.
318
309
  # preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
319
310
  # search - string - If `search_all` is `true`, provide the search string here. Otherwise, this parameter acts like an alias of `filter`.
@@ -326,8 +317,8 @@ module Files
326
317
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
327
318
  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
319
  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
320
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
321
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
331
322
  raise InvalidParameterError.new("Bad parameter: filter must be an String") if params.dig(:filter) and !params.dig(:filter).is_a?(String)
332
323
  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
324
  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
@@ -117,6 +117,7 @@ module Files
117
117
  # page - int64 - Current page number.
118
118
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
119
119
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
120
+ # 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.
120
121
  # path (required) - string - Path to operate on.
121
122
  # include_children - boolean - Include locks from children objects?
122
123
  def self.list_for(path, params = {}, options = {})
@@ -125,12 +126,12 @@ module Files
125
126
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
126
127
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
127
128
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
129
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
128
130
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params.dig(:path) and !params.dig(:path).is_a?(String)
129
131
  raise MissingParameterError.new("Parameter missing: path") unless params.dig(:path)
130
132
 
131
- response, options = Api.send_request("/locks/#{params[:path]}", :get, params, options)
132
- response.data.map do |entity_data|
133
- Lock.new(entity_data, options)
133
+ List.new(Lock, params) do
134
+ Api.send_request("/locks/#{params[:path]}", :get, params, options)
134
135
  end
135
136
  end
136
137
 
@@ -111,18 +111,19 @@ 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
  # project_id (required) - int64 - Project for which to return messages.
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: project_id must be an Integer") if params.dig(:project_id) and !params.dig(:project_id).is_a?(Integer)
121
123
  raise MissingParameterError.new("Parameter missing: project_id") unless params.dig(:project_id)
122
124
 
123
- response, options = Api.send_request("/messages", :get, params, options)
124
- response.data.map do |entity_data|
125
- Message.new(entity_data, options)
125
+ List.new(Message, params) do
126
+ Api.send_request("/messages", :get, params, options)
126
127
  end
127
128
  end
128
129
 
@@ -87,18 +87,19 @@ module Files
87
87
  # page - int64 - Current page number.
88
88
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
89
89
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
90
+ # 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.
90
91
  # message_id (required) - int64 - Message comment to return comments for.
91
92
  def self.list(params = {}, options = {})
92
93
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
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: message_id must be an Integer") if params.dig(:message_id) and !params.dig(:message_id).is_a?(Integer)
97
99
  raise MissingParameterError.new("Parameter missing: message_id") unless params.dig(:message_id)
98
100
 
99
- response, options = Api.send_request("/message_comments", :get, params, options)
100
- response.data.map do |entity_data|
101
- MessageComment.new(entity_data, options)
101
+ List.new(MessageComment, params) do
102
+ Api.send_request("/message_comments", :get, params, options)
102
103
  end
103
104
  end
104
105
 
@@ -64,18 +64,19 @@ module Files
64
64
  # page - int64 - Current page number.
65
65
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
66
66
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
67
+ # 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.
67
68
  # message_comment_id (required) - int64 - Message comment to return reactions for.
68
69
  def self.list(params = {}, options = {})
69
70
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
70
71
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
71
72
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
72
73
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
74
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
73
75
  raise InvalidParameterError.new("Bad parameter: message_comment_id must be an Integer") if params.dig(:message_comment_id) and !params.dig(:message_comment_id).is_a?(Integer)
74
76
  raise MissingParameterError.new("Parameter missing: message_comment_id") unless params.dig(:message_comment_id)
75
77
 
76
- response, options = Api.send_request("/message_comment_reactions", :get, params, options)
77
- response.data.map do |entity_data|
78
- MessageCommentReaction.new(entity_data, options)
78
+ List.new(MessageCommentReaction, params) do
79
+ Api.send_request("/message_comment_reactions", :get, params, options)
79
80
  end
80
81
  end
81
82
 
@@ -64,18 +64,19 @@ module Files
64
64
  # page - int64 - Current page number.
65
65
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
66
66
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
67
+ # 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.
67
68
  # message_id (required) - int64 - Message to return reactions for.
68
69
  def self.list(params = {}, options = {})
69
70
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
70
71
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
71
72
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
72
73
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
74
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
73
75
  raise InvalidParameterError.new("Bad parameter: message_id must be an Integer") if params.dig(:message_id) and !params.dig(:message_id).is_a?(Integer)
74
76
  raise MissingParameterError.new("Parameter missing: message_id") unless params.dig(:message_id)
75
77
 
76
- response, options = Api.send_request("/message_reactions", :get, params, options)
77
- response.data.map do |entity_data|
78
- MessageReaction.new(entity_data, options)
78
+ List.new(MessageReaction, params) do
79
+ Api.send_request("/message_reactions", :get, params, options)
79
80
  end
80
81
  end
81
82
 
@@ -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("/payments", :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("/payments", :get, params, options)
94
95
  end
95
96
  end
96
97
 
@@ -68,14 +68,15 @@ module Files
68
68
  # page - int64 - Current page number.
69
69
  # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
70
70
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
71
+ # 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.
71
72
  def self.list(params = {}, options = {})
72
73
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
73
74
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
74
75
  raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
76
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
75
77
 
76
- response, options = Api.send_request("/projects", :get, params, options)
77
- response.data.map do |entity_data|
78
- Project.new(entity_data, options)
78
+ List.new(Project, params) do
79
+ Api.send_request("/projects", :get, params, options)
79
80
  end
80
81
  end
81
82