files.com 1.0.100 → 1.0.105

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) 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_comment.md +1 -0
  12. data/docs/file_part_upload.md +2 -0
  13. data/docs/folder.md +1 -1
  14. data/docs/group_user.md +1 -0
  15. data/docs/history_export.md +23 -69
  16. data/docs/history_export_result.md +79 -0
  17. data/docs/invoice.md +1 -0
  18. data/docs/ip_address.md +2 -0
  19. data/docs/lock.md +1 -0
  20. data/docs/message.md +1 -0
  21. data/docs/message_comment.md +1 -0
  22. data/docs/message_comment_reaction.md +1 -0
  23. data/docs/message_reaction.md +1 -0
  24. data/docs/payment.md +1 -0
  25. data/docs/permission.md +17 -2
  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/request.md +19 -3
  30. data/docs/session.md +10 -2
  31. data/docs/site.md +18 -2
  32. data/docs/sso_strategy.md +1 -0
  33. data/docs/usage_snapshot.md +1 -0
  34. data/docs/user_cipher_use.md +1 -0
  35. data/docs/user_request.md +3 -0
  36. data/lib/files.com.rb +2 -0
  37. data/lib/files.com/api_client.rb +2 -1
  38. data/lib/files.com/models/api_key.rb +12 -0
  39. data/lib/files.com/models/as2_key.rb +4 -3
  40. data/lib/files.com/models/bandwidth_snapshot.rb +18 -3
  41. data/lib/files.com/models/bundle_download.rb +4 -3
  42. data/lib/files.com/models/bundle_recipient.rb +4 -3
  43. data/lib/files.com/models/clickwrap.rb +4 -3
  44. data/lib/files.com/models/dns_record.rb +4 -3
  45. data/lib/files.com/models/external_event.rb +66 -0
  46. data/lib/files.com/models/file.rb +6 -10
  47. data/lib/files.com/models/file_comment.rb +4 -3
  48. data/lib/files.com/models/file_part_upload.rb +5 -0
  49. data/lib/files.com/models/folder.rb +4 -8
  50. data/lib/files.com/models/group_user.rb +4 -3
  51. data/lib/files.com/models/history_export.rb +24 -64
  52. data/lib/files.com/models/history_export_result.rb +152 -0
  53. data/lib/files.com/models/invoice.rb +4 -3
  54. data/lib/files.com/models/ip_address.rb +8 -6
  55. data/lib/files.com/models/lock.rb +6 -9
  56. data/lib/files.com/models/message.rb +4 -3
  57. data/lib/files.com/models/message_comment.rb +4 -3
  58. data/lib/files.com/models/message_comment_reaction.rb +4 -3
  59. data/lib/files.com/models/message_reaction.rb +4 -3
  60. data/lib/files.com/models/payment.rb +4 -3
  61. data/lib/files.com/models/permission.rb +19 -11
  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/request.rb +20 -12
  66. data/lib/files.com/models/session.rb +6 -0
  67. data/lib/files.com/models/site.rb +12 -0
  68. data/lib/files.com/models/sso_strategy.rb +4 -3
  69. data/lib/files.com/models/usage_snapshot.rb +4 -3
  70. data/lib/files.com/models/user_cipher_use.rb +4 -3
  71. data/lib/files.com/models/user_request.rb +13 -3
  72. metadata +6 -2
@@ -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
  ---
@@ -30,7 +30,7 @@
30
30
  ## List Permissions
31
31
 
32
32
  ```
33
- Files::Permission.list(path,
33
+ Files::Permission.list(
34
34
  page: 1,
35
35
  per_page: 1,
36
36
  group_id: 1,
@@ -63,7 +63,7 @@ Files::Permission.list(path,
63
63
  ## Create Permission
64
64
 
65
65
  ```
66
- Files::Permission.create(path,
66
+ Files::Permission.create(
67
67
  group_id: 1,
68
68
  permission: "full",
69
69
  recursive: true,
@@ -93,3 +93,18 @@ Files::Permission.delete(id)
93
93
  ### Parameters
94
94
 
95
95
  * `id` (int64): Required - Permission ID.
96
+
97
+
98
+ ---
99
+
100
+ ## Delete Permission
101
+
102
+ ```
103
+ permission = Files::Permission.list_for(path).first
104
+
105
+ permission.delete
106
+ ```
107
+
108
+ ### Parameters
109
+
110
+ * `id` (int64): Required - Permission ID.
@@ -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
  ---
@@ -28,7 +28,7 @@
28
28
  ## List Requests
29
29
 
30
30
  ```
31
- Files::Request.list(path,
31
+ Files::Request.list(
32
32
  page: 1,
33
33
  per_page: 1,
34
34
  mine: true
@@ -51,7 +51,7 @@ Files::Request.list(path,
51
51
  ## List Requests
52
52
 
53
53
  ```
54
- Files::Request.find_folder(path,
54
+ Files::Request.get_folder(path,
55
55
  page: 1,
56
56
  per_page: 1,
57
57
  mine: true
@@ -74,7 +74,8 @@ Files::Request.find_folder(path,
74
74
  ## Create Request
75
75
 
76
76
  ```
77
- Files::Request.create(path,
77
+ Files::Request.create(
78
+ path: "path",
78
79
  destination: "destination"
79
80
  )
80
81
  ```
@@ -98,3 +99,18 @@ Files::Request.delete(id)
98
99
  ### Parameters
99
100
 
100
101
  * `id` (int64): Required - Request ID.
102
+
103
+
104
+ ---
105
+
106
+ ## Delete Request
107
+
108
+ ```
109
+ request = Files::Request.list_for(path).first
110
+
111
+ request.delete
112
+ ```
113
+
114
+ ### Parameters
115
+
116
+ * `id` (int64): Required - Request ID.
@@ -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
 
@@ -99,6 +99,7 @@ Files::SsoStrategy.list(
99
99
  * `page` (int64): Current page number.
100
100
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
101
101
  * `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
102
+ * `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
103
 
103
104
 
104
105
  ---
@@ -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