files.com 1.1.768 → 1.1.770

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 (138) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +47 -7
  4. data/_VERSION +1 -1
  5. data/docs/file.md +37 -0
  6. data/lib/files.com/api.rb +9 -4
  7. data/lib/files.com/api_client.rb +181 -55
  8. data/lib/files.com/list.rb +98 -66
  9. data/lib/files.com/models/action_log.rb +7 -2
  10. data/lib/files.com/models/action_notification_export.rb +13 -3
  11. data/lib/files.com/models/action_notification_export_result.rb +7 -2
  12. data/lib/files.com/models/ai_assistant_personality.rb +34 -8
  13. data/lib/files.com/models/ai_task.rb +39 -8
  14. data/lib/files.com/models/api_key.rb +49 -10
  15. data/lib/files.com/models/api_request_log.rb +7 -2
  16. data/lib/files.com/models/app.rb +7 -2
  17. data/lib/files.com/models/as2_incoming_message.rb +7 -2
  18. data/lib/files.com/models/as2_outgoing_message.rb +7 -2
  19. data/lib/files.com/models/as2_partner.rb +34 -8
  20. data/lib/files.com/models/as2_station.rb +34 -8
  21. data/lib/files.com/models/automation.rb +50 -10
  22. data/lib/files.com/models/automation_log.rb +7 -2
  23. data/lib/files.com/models/automation_run.rb +31 -6
  24. data/lib/files.com/models/bandwidth_snapshot.rb +7 -2
  25. data/lib/files.com/models/behavior.rb +46 -10
  26. data/lib/files.com/models/bundle.rb +39 -8
  27. data/lib/files.com/models/bundle_action.rb +7 -2
  28. data/lib/files.com/models/bundle_download.rb +7 -2
  29. data/lib/files.com/models/bundle_notification.rb +34 -8
  30. data/lib/files.com/models/bundle_recipient.rb +14 -4
  31. data/lib/files.com/models/bundle_registration.rb +7 -2
  32. data/lib/files.com/models/chat_session.rb +13 -3
  33. data/lib/files.com/models/child_site_management_policy.rb +34 -8
  34. data/lib/files.com/models/clickwrap.rb +34 -8
  35. data/lib/files.com/models/custom_domain.rb +40 -9
  36. data/lib/files.com/models/desktop_configuration_profile.rb +34 -8
  37. data/lib/files.com/models/dns_record.rb +7 -2
  38. data/lib/files.com/models/email_incoming_message.rb +7 -2
  39. data/lib/files.com/models/email_log.rb +7 -2
  40. data/lib/files.com/models/event_channel.rb +34 -8
  41. data/lib/files.com/models/event_delivery_attempt.rb +13 -3
  42. data/lib/files.com/models/event_record.rb +13 -3
  43. data/lib/files.com/models/event_subscription.rb +34 -8
  44. data/lib/files.com/models/event_target.rb +34 -8
  45. data/lib/files.com/models/exavault_api_request_log.rb +7 -2
  46. data/lib/files.com/models/expectation.rb +40 -9
  47. data/lib/files.com/models/expectation_evaluation.rb +13 -3
  48. data/lib/files.com/models/expectation_incident.rb +31 -6
  49. data/lib/files.com/models/external_event.rb +20 -5
  50. data/lib/files.com/models/file.rb +93 -15
  51. data/lib/files.com/models/file_comment.rb +28 -7
  52. data/lib/files.com/models/file_comment_reaction.rb +11 -2
  53. data/lib/files.com/models/file_migration.rb +6 -1
  54. data/lib/files.com/models/file_migration_log.rb +7 -2
  55. data/lib/files.com/models/folder.rb +13 -3
  56. data/lib/files.com/models/form_field_set.rb +34 -8
  57. data/lib/files.com/models/ftp_action_log.rb +7 -2
  58. data/lib/files.com/models/gpg_key.rb +34 -8
  59. data/lib/files.com/models/group.rb +34 -8
  60. data/lib/files.com/models/group_user.rb +29 -7
  61. data/lib/files.com/models/history.rb +35 -10
  62. data/lib/files.com/models/history_export.rb +13 -3
  63. data/lib/files.com/models/history_export_result.rb +7 -2
  64. data/lib/files.com/models/holiday_calendar.rb +34 -8
  65. data/lib/files.com/models/holiday_region.rb +7 -2
  66. data/lib/files.com/models/inbound_s3_log.rb +7 -2
  67. data/lib/files.com/models/inbox_recipient.rb +14 -4
  68. data/lib/files.com/models/inbox_registration.rb +7 -2
  69. data/lib/files.com/models/inbox_upload.rb +7 -2
  70. data/lib/files.com/models/integration_centric_profile.rb +34 -8
  71. data/lib/files.com/models/invoice.rb +13 -3
  72. data/lib/files.com/models/ip_address.rb +28 -8
  73. data/lib/files.com/models/key_lifecycle_rule.rb +34 -8
  74. data/lib/files.com/models/lock.rb +18 -3
  75. data/lib/files.com/models/metadata_category.rb +41 -10
  76. data/lib/files.com/models/notification.rb +34 -8
  77. data/lib/files.com/models/outbound_connection_log.rb +7 -2
  78. data/lib/files.com/models/partner.rb +34 -8
  79. data/lib/files.com/models/partner_channel.rb +34 -8
  80. data/lib/files.com/models/partner_channel_template.rb +34 -8
  81. data/lib/files.com/models/partner_site.rb +4 -0
  82. data/lib/files.com/models/partner_site_request.rb +33 -4
  83. data/lib/files.com/models/payment.rb +13 -3
  84. data/lib/files.com/models/pending_work_event.rb +13 -3
  85. data/lib/files.com/models/permission.rb +18 -4
  86. data/lib/files.com/models/public_hosting_request_log.rb +7 -2
  87. data/lib/files.com/models/public_key.rb +34 -8
  88. data/lib/files.com/models/remote_bandwidth_snapshot.rb +7 -2
  89. data/lib/files.com/models/remote_mount_backend.rb +39 -8
  90. data/lib/files.com/models/remote_server.rb +52 -11
  91. data/lib/files.com/models/remote_server_credential.rb +34 -8
  92. data/lib/files.com/models/request.rb +25 -6
  93. data/lib/files.com/models/restore.rb +14 -4
  94. data/lib/files.com/models/schedule.rb +34 -8
  95. data/lib/files.com/models/scheduled_export.rb +34 -8
  96. data/lib/files.com/models/scim_log.rb +13 -3
  97. data/lib/files.com/models/secret.rb +34 -8
  98. data/lib/files.com/models/session.rb +11 -2
  99. data/lib/files.com/models/settings_change.rb +7 -2
  100. data/lib/files.com/models/sftp_action_log.rb +7 -2
  101. data/lib/files.com/models/sftp_host_key.rb +34 -8
  102. data/lib/files.com/models/share_group.rb +34 -8
  103. data/lib/files.com/models/siem_http_destination.rb +39 -8
  104. data/lib/files.com/models/siem_http_destination_event.rb +13 -3
  105. data/lib/files.com/models/site.rb +16 -3
  106. data/lib/files.com/models/site_subdomain_redirect.rb +17 -3
  107. data/lib/files.com/models/snapshot.rb +39 -8
  108. data/lib/files.com/models/sso_event.rb +13 -3
  109. data/lib/files.com/models/sso_strategy.rb +18 -3
  110. data/lib/files.com/models/style.rb +20 -5
  111. data/lib/files.com/models/sync.rb +44 -8
  112. data/lib/files.com/models/sync_log.rb +7 -2
  113. data/lib/files.com/models/sync_run.rb +13 -3
  114. data/lib/files.com/models/usage_daily_snapshot.rb +7 -2
  115. data/lib/files.com/models/usage_snapshot.rb +7 -2
  116. data/lib/files.com/models/user.rb +50 -8
  117. data/lib/files.com/models/user_additional_email_recipient.rb +34 -8
  118. data/lib/files.com/models/user_cipher_use.rb +7 -2
  119. data/lib/files.com/models/user_lifecycle_rule.rb +34 -8
  120. data/lib/files.com/models/user_request.rb +24 -5
  121. data/lib/files.com/models/user_security_event.rb +13 -3
  122. data/lib/files.com/models/user_sftp_client_use.rb +7 -2
  123. data/lib/files.com/models/web_dav_action_log.rb +7 -2
  124. data/lib/files.com/models/webhook_test.rb +7 -2
  125. data/lib/files.com/models/workspace.rb +34 -8
  126. data/lib/files.com/response.rb +24 -0
  127. data/lib/files.com/sizable_io.rb +65 -4
  128. data/lib/files.com/version.rb +1 -1
  129. data/lib/files.com.rb +23 -1
  130. data/spec/language_spec.rb +20 -10
  131. data/spec/lib/api_client_spec.rb +173 -18
  132. data/spec/list_spec.rb +203 -187
  133. data/spec/models/file_transfer_spec.rb +346 -0
  134. data/spec/models/persistence_spec.rb +167 -0
  135. data/spec/spec_helper.rb +122 -6
  136. data/spec/support/stubbed_api.rb +14 -0
  137. data/spec/support/transfer_server.rb +60 -0
  138. metadata +6 -2
@@ -1009,13 +1009,21 @@ module Files
1009
1009
  @attributes[:windows_mode_ftp]
1010
1010
  end
1011
1011
 
1012
+ # params:: Hash of API operation parameter values.
1013
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
1014
+ #
1015
+ # Returns a Files::Site.
1012
1016
  def self.get(params = {}, options = {})
1013
- response, options = Api.send_request("/site", :get, params, options)
1017
+ response, options = Api.send_request("/site", :get, params, options) { |reply| reply.require_object("Site") }
1014
1018
  Site.new(response.data, options)
1015
1019
  end
1016
1020
 
1021
+ # params:: Hash of API operation parameter values.
1022
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
1023
+ #
1024
+ # Returns a Files::UsageSnapshot.
1017
1025
  def self.get_usage(params = {}, options = {})
1018
- response, options = Api.send_request("/site/usage", :get, params, options)
1026
+ response, options = Api.send_request("/site/usage", :get, params, options) { |reply| reply.require_object("UsageSnapshot") }
1019
1027
  UsageSnapshot.new(response.data, options)
1020
1028
  end
1021
1029
 
@@ -1213,6 +1221,11 @@ module Files
1213
1221
  # ldap_password_change_confirmation - string - Confirm new LDAP password.
1214
1222
  # redirect_old_subdomain - boolean - If true, and if changing the site subdomain, then create a redirect from the previous Files.com subdomain to the new Files.com subdomain.
1215
1223
  # smtp_password - string - Password for SMTP server.
1224
+ #
1225
+ # params:: Hash of API operation parameter values.
1226
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
1227
+ #
1228
+ # Returns a Files::Site.
1216
1229
  def self.update(params = {}, options = {})
1217
1230
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
1218
1231
  raise InvalidParameterError.new("Bad parameter: subdomain must be an String") if params[:subdomain] and !params[:subdomain].is_a?(String)
@@ -1293,7 +1306,7 @@ module Files
1293
1306
  raise InvalidParameterError.new("Bad parameter: ldap_password_change_confirmation must be an String") if params[:ldap_password_change_confirmation] and !params[:ldap_password_change_confirmation].is_a?(String)
1294
1307
  raise InvalidParameterError.new("Bad parameter: smtp_password must be an String") if params[:smtp_password] and !params[:smtp_password].is_a?(String)
1295
1308
 
1296
- response, options = Api.send_request("/site", :patch, params, options)
1309
+ response, options = Api.send_request("/site", :patch, params, options) { |reply| reply.require_object("Site") }
1297
1310
  Site.new(response.data, options)
1298
1311
  end
1299
1312
  end
@@ -48,13 +48,18 @@ module Files
48
48
  # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
49
49
  # per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
50
50
  # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `id`.
51
+ #
52
+ # params:: Hash of API operation parameter values.
53
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
54
+ #
55
+ # Returns a Files::List of Files::SiteSubdomainRedirect objects.
51
56
  def self.list(params = {}, options = {})
52
57
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
53
58
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
54
59
  raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
55
60
 
56
- List.new(SiteSubdomainRedirect, params) do
57
- Api.send_request("/site_subdomain_redirects", :get, params, options)
61
+ List.new(SiteSubdomainRedirect, params) do |page_params, &check_page|
62
+ Api.send_request("/site_subdomain_redirects", :get, page_params, options, &check_page)
58
63
  end
59
64
  end
60
65
 
@@ -64,13 +69,18 @@ module Files
64
69
 
65
70
  # Parameters:
66
71
  # id (required) - int64 - Site Subdomain Redirect ID.
72
+ #
73
+ # params:: Hash of API operation parameter values.
74
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
75
+ #
76
+ # Returns a Files::SiteSubdomainRedirect.
67
77
  def self.find(id, params = {}, options = {})
68
78
  params ||= {}
69
79
  params[:id] = id
70
80
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
71
81
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
72
82
 
73
- response, options = Api.send_request("/site_subdomain_redirects/#{params[:id]}", :get, params, options)
83
+ response, options = Api.send_request("/site_subdomain_redirects/#{params[:id]}", :get, params, options) { |reply| reply.require_object("SiteSubdomainRedirect") }
74
84
  SiteSubdomainRedirect.new(response.data, options)
75
85
  end
76
86
 
@@ -78,6 +88,10 @@ module Files
78
88
  find(id, params, options)
79
89
  end
80
90
 
91
+ # params:: Hash of API operation parameter values.
92
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
93
+ #
94
+ # Returns nil.
81
95
  def self.delete(id, params = {}, options = {})
82
96
  params ||= {}
83
97
  params[:id] = id
@@ -106,7 +106,9 @@ module Files
106
106
  raise InvalidParameterError.new("Bad parameter: paths must be an Array") if params[:paths] and !params[:paths].is_a?(Array)
107
107
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
108
108
 
109
- Api.send_request("/snapshots/#{@attributes[:id]}", :patch, params, @options)
109
+ response, options = Api.send_request("/snapshots/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("Snapshot") }
110
+ @attributes = response.data
111
+ [ response, options ]
110
112
  end
111
113
 
112
114
  def delete(params = {})
@@ -126,24 +128,29 @@ module Files
126
128
 
127
129
  def save
128
130
  if @attributes[:id]
129
- new_obj = update(@attributes)
131
+ update(@attributes)
130
132
  else
131
133
  new_obj = Snapshot.create(@attributes, @options)
134
+ @attributes = new_obj.attributes
132
135
  end
133
136
 
134
- @attributes = new_obj.attributes
135
137
  true
136
138
  end
137
139
 
138
140
  # Parameters:
139
141
  # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
140
142
  # per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
143
+ #
144
+ # params:: Hash of API operation parameter values.
145
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
146
+ #
147
+ # Returns a Files::List of Files::Snapshot objects.
141
148
  def self.list(params = {}, options = {})
142
149
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
143
150
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
144
151
 
145
- List.new(Snapshot, params) do
146
- Api.send_request("/snapshots", :get, params, options)
152
+ List.new(Snapshot, params) do |page_params, &check_page|
153
+ Api.send_request("/snapshots", :get, page_params, options, &check_page)
147
154
  end
148
155
  end
149
156
 
@@ -153,13 +160,18 @@ module Files
153
160
 
154
161
  # Parameters:
155
162
  # id (required) - int64 - Snapshot ID.
163
+ #
164
+ # params:: Hash of API operation parameter values.
165
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
166
+ #
167
+ # Returns a Files::Snapshot.
156
168
  def self.find(id, params = {}, options = {})
157
169
  params ||= {}
158
170
  params[:id] = id
159
171
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
160
172
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
161
173
 
162
- response, options = Api.send_request("/snapshots/#{params[:id]}", :get, params, options)
174
+ response, options = Api.send_request("/snapshots/#{params[:id]}", :get, params, options) { |reply| reply.require_object("Snapshot") }
163
175
  Snapshot.new(response.data, options)
164
176
  end
165
177
 
@@ -172,17 +184,27 @@ module Files
172
184
  # name - string - A name for the snapshot.
173
185
  # paths - array(string) - An array of paths to add to the snapshot.
174
186
  # workspace_id - int64 - Workspace ID. `0` means the default workspace.
187
+ #
188
+ # params:: Hash of API operation parameter values.
189
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
190
+ #
191
+ # Returns a Files::Snapshot.
175
192
  def self.create(params = {}, options = {})
176
193
  raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params[:expires_at] and !params[:expires_at].is_a?(String)
177
194
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
178
195
  raise InvalidParameterError.new("Bad parameter: paths must be an Array") if params[:paths] and !params[:paths].is_a?(Array)
179
196
  raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
180
197
 
181
- response, options = Api.send_request("/snapshots", :post, params, options)
198
+ response, options = Api.send_request("/snapshots", :post, params, options) { |reply| reply.require_object("Snapshot") }
182
199
  Snapshot.new(response.data, options)
183
200
  end
184
201
 
185
202
  # Finalize Snapshot
203
+ #
204
+ # params:: Hash of API operation parameter values.
205
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
206
+ #
207
+ # Returns nil.
186
208
  def self.finalize(id, params = {}, options = {})
187
209
  params ||= {}
188
210
  params[:id] = id
@@ -197,6 +219,11 @@ module Files
197
219
  # expires_at - string - When the snapshot expires.
198
220
  # name - string - A name for the snapshot.
199
221
  # paths - array(string) - An array of paths to add to the snapshot.
222
+ #
223
+ # params:: Hash of API operation parameter values.
224
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
225
+ #
226
+ # Returns a Files::Snapshot.
200
227
  def self.update(id, params = {}, options = {})
201
228
  params ||= {}
202
229
  params[:id] = id
@@ -206,10 +233,14 @@ module Files
206
233
  raise InvalidParameterError.new("Bad parameter: paths must be an Array") if params[:paths] and !params[:paths].is_a?(Array)
207
234
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
208
235
 
209
- response, options = Api.send_request("/snapshots/#{params[:id]}", :patch, params, options)
236
+ response, options = Api.send_request("/snapshots/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("Snapshot") }
210
237
  Snapshot.new(response.data, options)
211
238
  end
212
239
 
240
+ # params:: Hash of API operation parameter values.
241
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
242
+ #
243
+ # Returns nil.
213
244
  def self.delete(id, params = {}, options = {})
214
245
  params ||= {}
215
246
  params[:id] = id
@@ -89,6 +89,11 @@ module Files
89
89
  # filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `idp_uid`, `ip`, `provider` or `username`.
90
90
  # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
91
91
  # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
92
+ #
93
+ # params:: Hash of API operation parameter values.
94
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
95
+ #
96
+ # Returns a Files::List of Files::SsoEvent objects.
92
97
  def self.list(params = {}, options = {})
93
98
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
94
99
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
@@ -100,8 +105,8 @@ module Files
100
105
  raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
101
106
  raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
102
107
 
103
- List.new(SsoEvent, params) do
104
- Api.send_request("/sso_events", :get, params, options)
108
+ List.new(SsoEvent, params) do |page_params, &check_page|
109
+ Api.send_request("/sso_events", :get, page_params, options, &check_page)
105
110
  end
106
111
  end
107
112
 
@@ -111,13 +116,18 @@ module Files
111
116
 
112
117
  # Parameters:
113
118
  # id (required) - int64 - Sso Event ID.
119
+ #
120
+ # params:: Hash of API operation parameter values.
121
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
122
+ #
123
+ # Returns a Files::SsoEvent.
114
124
  def self.find(id, params = {}, options = {})
115
125
  params ||= {}
116
126
  params[:id] = id
117
127
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
118
128
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
119
129
 
120
- response, options = Api.send_request("/sso_events/#{params[:id]}", :get, params, options)
130
+ response, options = Api.send_request("/sso_events/#{params[:id]}", :get, params, options) { |reply| reply.require_object("SsoEvent") }
121
131
  SsoEvent.new(response.data, options)
122
132
  end
123
133
 
@@ -289,13 +289,18 @@ module Files
289
289
  # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
290
290
  # per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
291
291
  # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
292
+ #
293
+ # params:: Hash of API operation parameter values.
294
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
295
+ #
296
+ # Returns a Files::List of Files::SsoStrategy objects.
292
297
  def self.list(params = {}, options = {})
293
298
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
294
299
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
295
300
  raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
296
301
 
297
- List.new(SsoStrategy, params) do
298
- Api.send_request("/sso_strategies", :get, params, options)
302
+ List.new(SsoStrategy, params) do |page_params, &check_page|
303
+ Api.send_request("/sso_strategies", :get, page_params, options, &check_page)
299
304
  end
300
305
  end
301
306
 
@@ -305,13 +310,18 @@ module Files
305
310
 
306
311
  # Parameters:
307
312
  # id (required) - int64 - Sso Strategy ID.
313
+ #
314
+ # params:: Hash of API operation parameter values.
315
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
316
+ #
317
+ # Returns a Files::SsoStrategy.
308
318
  def self.find(id, params = {}, options = {})
309
319
  params ||= {}
310
320
  params[:id] = id
311
321
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
312
322
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
313
323
 
314
- response, options = Api.send_request("/sso_strategies/#{params[:id]}", :get, params, options)
324
+ response, options = Api.send_request("/sso_strategies/#{params[:id]}", :get, params, options) { |reply| reply.require_object("SsoStrategy") }
315
325
  SsoStrategy.new(response.data, options)
316
326
  end
317
327
 
@@ -320,6 +330,11 @@ module Files
320
330
  end
321
331
 
322
332
  # Synchronize provisioning data with the SSO remote server
333
+ #
334
+ # params:: Hash of API operation parameter values.
335
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
336
+ #
337
+ # Returns nil.
323
338
  def self.sync(id, params = {}, options = {})
324
339
  params ||= {}
325
340
  params[:id] = id
@@ -74,7 +74,9 @@ module Files
74
74
  raise InvalidParameterError.new("Bad parameter: logo_click_href must be an String") if params[:logo_click_href] and !params[:logo_click_href].is_a?(String)
75
75
  raise MissingParameterError.new("Parameter missing: path") unless params[:path]
76
76
 
77
- Api.send_request("/styles/#{@attributes[:path]}", :patch, params, @options)
77
+ response, options = Api.send_request("/styles/#{@attributes[:path]}", :patch, params, @options) { |reply| reply.require_object("Style") }
78
+ @attributes = response.data
79
+ [ response, options ]
78
80
  end
79
81
 
80
82
  def delete(params = {})
@@ -93,20 +95,24 @@ module Files
93
95
  end
94
96
 
95
97
  def save
96
- new_obj = update(@attributes)
97
- @attributes = new_obj.attributes
98
+ update(@attributes)
98
99
  true
99
100
  end
100
101
 
101
102
  # Parameters:
102
103
  # path (required) - string - Style path.
104
+ #
105
+ # params:: Hash of API operation parameter values.
106
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
107
+ #
108
+ # Returns a Files::Style.
103
109
  def self.find(path, params = {}, options = {})
104
110
  params ||= {}
105
111
  params[:path] = path
106
112
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
107
113
  raise MissingParameterError.new("Parameter missing: path") unless params[:path]
108
114
 
109
- response, options = Api.send_request("/styles/#{params[:path]}", :get, params, options)
115
+ response, options = Api.send_request("/styles/#{params[:path]}", :get, params, options) { |reply| reply.require_object("Style") }
110
116
  Style.new(response.data, options)
111
117
  end
112
118
 
@@ -117,6 +123,11 @@ module Files
117
123
  # Parameters:
118
124
  # file - file - Logo for custom branding. Required when creating a new style.
119
125
  # logo_click_href - string - URL to open when a public visitor clicks the logo.
126
+ #
127
+ # params:: Hash of API operation parameter values.
128
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
129
+ #
130
+ # Returns a Files::Style.
120
131
  def self.update(path, params = {}, options = {})
121
132
  params ||= {}
122
133
  params[:path] = path
@@ -124,10 +135,14 @@ module Files
124
135
  raise InvalidParameterError.new("Bad parameter: logo_click_href must be an String") if params[:logo_click_href] and !params[:logo_click_href].is_a?(String)
125
136
  raise MissingParameterError.new("Parameter missing: path") unless params[:path]
126
137
 
127
- response, options = Api.send_request("/styles/#{params[:path]}", :patch, params, options)
138
+ response, options = Api.send_request("/styles/#{params[:path]}", :patch, params, options) { |reply| reply.require_object("Style") }
128
139
  Style.new(response.data, options)
129
140
  end
130
141
 
142
+ # params:: Hash of API operation parameter values.
143
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
144
+ #
145
+ # Returns nil.
131
146
  def self.delete(path, params = {}, options = {})
132
147
  params ||= {}
133
148
  params[:path] = path
@@ -370,7 +370,9 @@ module Files
370
370
  raise InvalidParameterError.new("Bad parameter: trigger_file must be an String") if params[:trigger_file] and !params[:trigger_file].is_a?(String)
371
371
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
372
372
 
373
- Api.send_request("/syncs/#{@attributes[:id]}", :patch, params, @options)
373
+ response, options = Api.send_request("/syncs/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("Sync") }
374
+ @attributes = response.data
375
+ [ response, options ]
374
376
  end
375
377
 
376
378
  def delete(params = {})
@@ -390,12 +392,12 @@ module Files
390
392
 
391
393
  def save
392
394
  if @attributes[:id]
393
- new_obj = update(@attributes)
395
+ update(@attributes)
394
396
  else
395
397
  new_obj = Sync.create(@attributes, @options)
398
+ @attributes = new_obj.attributes
396
399
  end
397
400
 
398
- @attributes = new_obj.attributes
399
401
  true
400
402
  end
401
403
 
@@ -404,14 +406,19 @@ module Files
404
406
  # per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
405
407
  # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `workspace_id` or `name`.
406
408
  # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `workspace_id`, `disabled`, `src_remote_server_id` or `dest_remote_server_id`. Valid field combinations are `[ workspace_id, disabled ]`, `[ workspace_id, src_remote_server_id ]`, `[ workspace_id, dest_remote_server_id ]`, `[ disabled, src_remote_server_id ]`, `[ disabled, dest_remote_server_id ]`, `[ workspace_id, disabled, src_remote_server_id ]` or `[ workspace_id, disabled, dest_remote_server_id ]`.
409
+ #
410
+ # params:: Hash of API operation parameter values.
411
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
412
+ #
413
+ # Returns a Files::List of Files::Sync objects.
407
414
  def self.list(params = {}, options = {})
408
415
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
409
416
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
410
417
  raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
411
418
  raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
412
419
 
413
- List.new(Sync, params) do
414
- Api.send_request("/syncs", :get, params, options)
420
+ List.new(Sync, params) do |page_params, &check_page|
421
+ Api.send_request("/syncs", :get, page_params, options, &check_page)
415
422
  end
416
423
  end
417
424
 
@@ -421,13 +428,18 @@ module Files
421
428
 
422
429
  # Parameters:
423
430
  # id (required) - int64 - Sync ID.
431
+ #
432
+ # params:: Hash of API operation parameter values.
433
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
434
+ #
435
+ # Returns a Files::Sync.
424
436
  def self.find(id, params = {}, options = {})
425
437
  params ||= {}
426
438
  params[:id] = id
427
439
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
428
440
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
429
441
 
430
- response, options = Api.send_request("/syncs/#{params[:id]}", :get, params, options)
442
+ response, options = Api.send_request("/syncs/#{params[:id]}", :get, params, options) { |reply| reply.require_object("Sync") }
431
443
  Sync.new(response.data, options)
432
444
  end
433
445
 
@@ -460,6 +472,11 @@ module Files
460
472
  # trigger_file - string - Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
461
473
  # always_write_trigger_file - boolean - If true, the trigger file will be sent at the end of a successful sync even when no files were transferred.
462
474
  # workspace_id - int64 - Workspace ID this sync belongs to
475
+ #
476
+ # params:: Hash of API operation parameter values.
477
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
478
+ #
479
+ # Returns a Files::Sync.
463
480
  def self.create(params = {}, options = {})
464
481
  raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
465
482
  raise InvalidParameterError.new("Bad parameter: dest_path must be an String") if params[:dest_path] and !params[:dest_path].is_a?(String)
@@ -482,11 +499,16 @@ module Files
482
499
  raise InvalidParameterError.new("Bad parameter: trigger_file must be an String") if params[:trigger_file] and !params[:trigger_file].is_a?(String)
483
500
  raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
484
501
 
485
- response, options = Api.send_request("/syncs", :post, params, options)
502
+ response, options = Api.send_request("/syncs", :post, params, options) { |reply| reply.require_object("Sync") }
486
503
  Sync.new(response.data, options)
487
504
  end
488
505
 
489
506
  # Dry Run Sync
507
+ #
508
+ # params:: Hash of API operation parameter values.
509
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
510
+ #
511
+ # Returns nil.
490
512
  def self.dry_run(id, params = {}, options = {})
491
513
  params ||= {}
492
514
  params[:id] = id
@@ -498,6 +520,11 @@ module Files
498
520
  end
499
521
 
500
522
  # Manually Run Sync
523
+ #
524
+ # params:: Hash of API operation parameter values.
525
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
526
+ #
527
+ # Returns nil.
501
528
  def self.manual_run(id, params = {}, options = {})
502
529
  params ||= {}
503
530
  params[:id] = id
@@ -532,6 +559,11 @@ module Files
532
559
  # trigger - string - Trigger type: daily, custom_schedule, or manual
533
560
  # trigger_file - string - Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
534
561
  # always_write_trigger_file - boolean - If true, the trigger file will be sent at the end of a successful sync even when no files were transferred.
562
+ #
563
+ # params:: Hash of API operation parameter values.
564
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
565
+ #
566
+ # Returns a Files::Sync.
535
567
  def self.update(id, params = {}, options = {})
536
568
  params ||= {}
537
569
  params[:id] = id
@@ -557,10 +589,14 @@ module Files
557
589
  raise InvalidParameterError.new("Bad parameter: trigger_file must be an String") if params[:trigger_file] and !params[:trigger_file].is_a?(String)
558
590
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
559
591
 
560
- response, options = Api.send_request("/syncs/#{params[:id]}", :patch, params, options)
592
+ response, options = Api.send_request("/syncs/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("Sync") }
561
593
  Sync.new(response.data, options)
562
594
  end
563
595
 
596
+ # params:: Hash of API operation parameter values.
597
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
598
+ #
599
+ # Returns nil.
564
600
  def self.delete(id, params = {}, options = {})
565
601
  params ||= {}
566
602
  params[:id] = id
@@ -77,6 +77,11 @@ module Files
77
77
  # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ external_event_id ]`, `[ operation ]`, `[ status ]`, `[ sync_id ]`, `[ created_at ]`, `[ sync_run_id ]`, `[ external_event_id, operation ]`, `[ external_event_id, status ]`, `[ external_event_id, sync_id ]`, `[ external_event_id, created_at ]`, `[ external_event_id, sync_run_id ]`, `[ operation, status ]`, `[ operation, sync_id ]`, `[ operation, created_at ]`, `[ operation, sync_run_id ]`, `[ status, sync_id ]`, `[ status, created_at ]`, `[ status, sync_run_id ]`, `[ sync_id, created_at ]`, `[ sync_id, sync_run_id ]`, `[ created_at, sync_run_id ]`, `[ external_event_id, operation, status ]`, `[ external_event_id, operation, sync_id ]`, `[ external_event_id, operation, created_at ]`, `[ external_event_id, operation, sync_run_id ]`, `[ external_event_id, status, sync_id ]`, `[ external_event_id, status, created_at ]`, `[ external_event_id, status, sync_run_id ]`, `[ external_event_id, sync_id, created_at ]`, `[ external_event_id, sync_id, sync_run_id ]`, `[ external_event_id, created_at, sync_run_id ]`, `[ operation, status, sync_id ]`, `[ operation, status, created_at ]`, `[ operation, status, sync_run_id ]`, `[ operation, sync_id, created_at ]`, `[ operation, sync_id, sync_run_id ]`, `[ operation, created_at, sync_run_id ]`, `[ status, sync_id, created_at ]`, `[ status, sync_id, sync_run_id ]`, `[ status, created_at, sync_run_id ]`, `[ sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id ]`, `[ external_event_id, operation, status, created_at ]`, `[ external_event_id, operation, status, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at ]`, `[ external_event_id, operation, sync_id, sync_run_id ]`, `[ external_event_id, operation, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at ]`, `[ external_event_id, status, sync_id, sync_run_id ]`, `[ external_event_id, status, created_at, sync_run_id ]`, `[ external_event_id, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at ]`, `[ operation, status, sync_id, sync_run_id ]`, `[ operation, status, created_at, sync_run_id ]`, `[ operation, sync_id, created_at, sync_run_id ]`, `[ status, sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id, created_at ]`, `[ external_event_id, operation, status, sync_id, sync_run_id ]`, `[ external_event_id, operation, status, created_at, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at, sync_run_id ]` or `[ external_event_id, operation, status, sync_id, created_at, sync_run_id ]`.
78
78
  # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ external_event_id ]`, `[ operation ]`, `[ status ]`, `[ sync_id ]`, `[ created_at ]`, `[ sync_run_id ]`, `[ external_event_id, operation ]`, `[ external_event_id, status ]`, `[ external_event_id, sync_id ]`, `[ external_event_id, created_at ]`, `[ external_event_id, sync_run_id ]`, `[ operation, status ]`, `[ operation, sync_id ]`, `[ operation, created_at ]`, `[ operation, sync_run_id ]`, `[ status, sync_id ]`, `[ status, created_at ]`, `[ status, sync_run_id ]`, `[ sync_id, created_at ]`, `[ sync_id, sync_run_id ]`, `[ created_at, sync_run_id ]`, `[ external_event_id, operation, status ]`, `[ external_event_id, operation, sync_id ]`, `[ external_event_id, operation, created_at ]`, `[ external_event_id, operation, sync_run_id ]`, `[ external_event_id, status, sync_id ]`, `[ external_event_id, status, created_at ]`, `[ external_event_id, status, sync_run_id ]`, `[ external_event_id, sync_id, created_at ]`, `[ external_event_id, sync_id, sync_run_id ]`, `[ external_event_id, created_at, sync_run_id ]`, `[ operation, status, sync_id ]`, `[ operation, status, created_at ]`, `[ operation, status, sync_run_id ]`, `[ operation, sync_id, created_at ]`, `[ operation, sync_id, sync_run_id ]`, `[ operation, created_at, sync_run_id ]`, `[ status, sync_id, created_at ]`, `[ status, sync_id, sync_run_id ]`, `[ status, created_at, sync_run_id ]`, `[ sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id ]`, `[ external_event_id, operation, status, created_at ]`, `[ external_event_id, operation, status, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at ]`, `[ external_event_id, operation, sync_id, sync_run_id ]`, `[ external_event_id, operation, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at ]`, `[ external_event_id, status, sync_id, sync_run_id ]`, `[ external_event_id, status, created_at, sync_run_id ]`, `[ external_event_id, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at ]`, `[ operation, status, sync_id, sync_run_id ]`, `[ operation, status, created_at, sync_run_id ]`, `[ operation, sync_id, created_at, sync_run_id ]`, `[ status, sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id, created_at ]`, `[ external_event_id, operation, status, sync_id, sync_run_id ]`, `[ external_event_id, operation, status, created_at, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at, sync_run_id ]` or `[ external_event_id, operation, status, sync_id, created_at, sync_run_id ]`.
79
79
  # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ external_event_id ]`, `[ operation ]`, `[ status ]`, `[ sync_id ]`, `[ created_at ]`, `[ sync_run_id ]`, `[ external_event_id, operation ]`, `[ external_event_id, status ]`, `[ external_event_id, sync_id ]`, `[ external_event_id, created_at ]`, `[ external_event_id, sync_run_id ]`, `[ operation, status ]`, `[ operation, sync_id ]`, `[ operation, created_at ]`, `[ operation, sync_run_id ]`, `[ status, sync_id ]`, `[ status, created_at ]`, `[ status, sync_run_id ]`, `[ sync_id, created_at ]`, `[ sync_id, sync_run_id ]`, `[ created_at, sync_run_id ]`, `[ external_event_id, operation, status ]`, `[ external_event_id, operation, sync_id ]`, `[ external_event_id, operation, created_at ]`, `[ external_event_id, operation, sync_run_id ]`, `[ external_event_id, status, sync_id ]`, `[ external_event_id, status, created_at ]`, `[ external_event_id, status, sync_run_id ]`, `[ external_event_id, sync_id, created_at ]`, `[ external_event_id, sync_id, sync_run_id ]`, `[ external_event_id, created_at, sync_run_id ]`, `[ operation, status, sync_id ]`, `[ operation, status, created_at ]`, `[ operation, status, sync_run_id ]`, `[ operation, sync_id, created_at ]`, `[ operation, sync_id, sync_run_id ]`, `[ operation, created_at, sync_run_id ]`, `[ status, sync_id, created_at ]`, `[ status, sync_id, sync_run_id ]`, `[ status, created_at, sync_run_id ]`, `[ sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id ]`, `[ external_event_id, operation, status, created_at ]`, `[ external_event_id, operation, status, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at ]`, `[ external_event_id, operation, sync_id, sync_run_id ]`, `[ external_event_id, operation, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at ]`, `[ external_event_id, status, sync_id, sync_run_id ]`, `[ external_event_id, status, created_at, sync_run_id ]`, `[ external_event_id, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at ]`, `[ operation, status, sync_id, sync_run_id ]`, `[ operation, status, created_at, sync_run_id ]`, `[ operation, sync_id, created_at, sync_run_id ]`, `[ status, sync_id, created_at, sync_run_id ]`, `[ external_event_id, operation, status, sync_id, created_at ]`, `[ external_event_id, operation, status, sync_id, sync_run_id ]`, `[ external_event_id, operation, status, created_at, sync_run_id ]`, `[ external_event_id, operation, sync_id, created_at, sync_run_id ]`, `[ external_event_id, status, sync_id, created_at, sync_run_id ]`, `[ operation, status, sync_id, created_at, sync_run_id ]` or `[ external_event_id, operation, status, sync_id, created_at, sync_run_id ]`.
80
+ #
81
+ # params:: Hash of API operation parameter values.
82
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
83
+ #
84
+ # Returns a Files::List of Files::SyncLog objects.
80
85
  def self.list(params = {}, options = {})
81
86
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
82
87
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
@@ -86,8 +91,8 @@ module Files
86
91
  raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
87
92
  raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
88
93
 
89
- List.new(SyncLog, params) do
90
- Api.send_request("/sync_logs", :get, params, options)
94
+ List.new(SyncLog, params) do |page_params, &check_page|
95
+ Api.send_request("/sync_logs", :get, page_params, options, &check_page)
91
96
  end
92
97
  end
93
98
 
@@ -134,6 +134,11 @@ module Files
134
134
  # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
135
135
  # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
136
136
  # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
137
+ #
138
+ # params:: Hash of API operation parameter values.
139
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
140
+ #
141
+ # Returns a Files::List of Files::SyncRun objects.
137
142
  def self.list(params = {}, options = {})
138
143
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
139
144
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
@@ -145,8 +150,8 @@ module Files
145
150
  raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
146
151
  raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
147
152
 
148
- List.new(SyncRun, params) do
149
- Api.send_request("/sync_runs", :get, params, options)
153
+ List.new(SyncRun, params) do |page_params, &check_page|
154
+ Api.send_request("/sync_runs", :get, page_params, options, &check_page)
150
155
  end
151
156
  end
152
157
 
@@ -156,13 +161,18 @@ module Files
156
161
 
157
162
  # Parameters:
158
163
  # id (required) - int64 - Sync Run ID.
164
+ #
165
+ # params:: Hash of API operation parameter values.
166
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
167
+ #
168
+ # Returns a Files::SyncRun.
159
169
  def self.find(id, params = {}, options = {})
160
170
  params ||= {}
161
171
  params[:id] = id
162
172
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
163
173
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
164
174
 
165
- response, options = Api.send_request("/sync_runs/#{params[:id]}", :get, params, options)
175
+ response, options = Api.send_request("/sync_runs/#{params[:id]}", :get, params, options) { |reply| reply.require_object("SyncRun") }
166
176
  SyncRun.new(response.data, options)
167
177
  end
168
178
 
@@ -78,6 +78,11 @@ module Files
78
78
  # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `date`.
79
79
  # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `date`.
80
80
  # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `date`.
81
+ #
82
+ # params:: Hash of API operation parameter values.
83
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
84
+ #
85
+ # Returns a Files::List of Files::UsageDailySnapshot objects.
81
86
  def self.list(params = {}, options = {})
82
87
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
83
88
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
@@ -88,8 +93,8 @@ module Files
88
93
  raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
89
94
  raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
90
95
 
91
- List.new(UsageDailySnapshot, params) do
92
- Api.send_request("/usage_daily_snapshots", :get, params, options)
96
+ List.new(UsageDailySnapshot, params) do |page_params, &check_page|
97
+ Api.send_request("/usage_daily_snapshots", :get, page_params, options, &check_page)
93
98
  end
94
99
  end
95
100
 
@@ -92,12 +92,17 @@ module Files
92
92
  # Parameters:
93
93
  # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
94
94
  # per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
95
+ #
96
+ # params:: Hash of API operation parameter values.
97
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
98
+ #
99
+ # Returns a Files::List of Files::UsageSnapshot objects.
95
100
  def self.list(params = {}, options = {})
96
101
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
97
102
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
98
103
 
99
- List.new(UsageSnapshot, params) do
100
- Api.send_request("/usage_snapshots", :get, params, options)
104
+ List.new(UsageSnapshot, params) do |page_params, &check_page|
105
+ Api.send_request("/usage_snapshots", :get, page_params, options, &check_page)
101
106
  end
102
107
  end
103
108