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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +47 -7
- data/_VERSION +1 -1
- data/docs/file.md +37 -0
- data/lib/files.com/api.rb +9 -4
- data/lib/files.com/api_client.rb +181 -55
- data/lib/files.com/list.rb +98 -66
- data/lib/files.com/models/action_log.rb +7 -2
- data/lib/files.com/models/action_notification_export.rb +13 -3
- data/lib/files.com/models/action_notification_export_result.rb +7 -2
- data/lib/files.com/models/ai_assistant_personality.rb +34 -8
- data/lib/files.com/models/ai_task.rb +39 -8
- data/lib/files.com/models/api_key.rb +49 -10
- data/lib/files.com/models/api_request_log.rb +7 -2
- data/lib/files.com/models/app.rb +7 -2
- data/lib/files.com/models/as2_incoming_message.rb +7 -2
- data/lib/files.com/models/as2_outgoing_message.rb +7 -2
- data/lib/files.com/models/as2_partner.rb +34 -8
- data/lib/files.com/models/as2_station.rb +34 -8
- data/lib/files.com/models/automation.rb +50 -10
- data/lib/files.com/models/automation_log.rb +7 -2
- data/lib/files.com/models/automation_run.rb +31 -6
- data/lib/files.com/models/bandwidth_snapshot.rb +7 -2
- data/lib/files.com/models/behavior.rb +46 -10
- data/lib/files.com/models/bundle.rb +39 -8
- data/lib/files.com/models/bundle_action.rb +7 -2
- data/lib/files.com/models/bundle_download.rb +7 -2
- data/lib/files.com/models/bundle_notification.rb +34 -8
- data/lib/files.com/models/bundle_recipient.rb +14 -4
- data/lib/files.com/models/bundle_registration.rb +7 -2
- data/lib/files.com/models/chat_session.rb +13 -3
- data/lib/files.com/models/child_site_management_policy.rb +34 -8
- data/lib/files.com/models/clickwrap.rb +34 -8
- data/lib/files.com/models/custom_domain.rb +40 -9
- data/lib/files.com/models/desktop_configuration_profile.rb +34 -8
- data/lib/files.com/models/dns_record.rb +7 -2
- data/lib/files.com/models/email_incoming_message.rb +7 -2
- data/lib/files.com/models/email_log.rb +7 -2
- data/lib/files.com/models/event_channel.rb +34 -8
- data/lib/files.com/models/event_delivery_attempt.rb +13 -3
- data/lib/files.com/models/event_record.rb +13 -3
- data/lib/files.com/models/event_subscription.rb +34 -8
- data/lib/files.com/models/event_target.rb +34 -8
- data/lib/files.com/models/exavault_api_request_log.rb +7 -2
- data/lib/files.com/models/expectation.rb +40 -9
- data/lib/files.com/models/expectation_evaluation.rb +13 -3
- data/lib/files.com/models/expectation_incident.rb +31 -6
- data/lib/files.com/models/external_event.rb +20 -5
- data/lib/files.com/models/file.rb +93 -15
- data/lib/files.com/models/file_comment.rb +28 -7
- data/lib/files.com/models/file_comment_reaction.rb +11 -2
- data/lib/files.com/models/file_migration.rb +6 -1
- data/lib/files.com/models/file_migration_log.rb +7 -2
- data/lib/files.com/models/folder.rb +13 -3
- data/lib/files.com/models/form_field_set.rb +34 -8
- data/lib/files.com/models/ftp_action_log.rb +7 -2
- data/lib/files.com/models/gpg_key.rb +34 -8
- data/lib/files.com/models/group.rb +34 -8
- data/lib/files.com/models/group_user.rb +29 -7
- data/lib/files.com/models/history.rb +35 -10
- data/lib/files.com/models/history_export.rb +13 -3
- data/lib/files.com/models/history_export_result.rb +7 -2
- data/lib/files.com/models/holiday_calendar.rb +34 -8
- data/lib/files.com/models/holiday_region.rb +7 -2
- data/lib/files.com/models/inbound_s3_log.rb +7 -2
- data/lib/files.com/models/inbox_recipient.rb +14 -4
- data/lib/files.com/models/inbox_registration.rb +7 -2
- data/lib/files.com/models/inbox_upload.rb +7 -2
- data/lib/files.com/models/integration_centric_profile.rb +34 -8
- data/lib/files.com/models/invoice.rb +13 -3
- data/lib/files.com/models/ip_address.rb +28 -8
- data/lib/files.com/models/key_lifecycle_rule.rb +34 -8
- data/lib/files.com/models/lock.rb +18 -3
- data/lib/files.com/models/metadata_category.rb +41 -10
- data/lib/files.com/models/notification.rb +34 -8
- data/lib/files.com/models/outbound_connection_log.rb +7 -2
- data/lib/files.com/models/partner.rb +34 -8
- data/lib/files.com/models/partner_channel.rb +34 -8
- data/lib/files.com/models/partner_channel_template.rb +34 -8
- data/lib/files.com/models/partner_site.rb +4 -0
- data/lib/files.com/models/partner_site_request.rb +33 -4
- data/lib/files.com/models/payment.rb +13 -3
- data/lib/files.com/models/pending_work_event.rb +13 -3
- data/lib/files.com/models/permission.rb +18 -4
- data/lib/files.com/models/public_hosting_request_log.rb +7 -2
- data/lib/files.com/models/public_key.rb +34 -8
- data/lib/files.com/models/remote_bandwidth_snapshot.rb +7 -2
- data/lib/files.com/models/remote_mount_backend.rb +39 -8
- data/lib/files.com/models/remote_server.rb +52 -11
- data/lib/files.com/models/remote_server_credential.rb +34 -8
- data/lib/files.com/models/request.rb +25 -6
- data/lib/files.com/models/restore.rb +14 -4
- data/lib/files.com/models/schedule.rb +34 -8
- data/lib/files.com/models/scheduled_export.rb +34 -8
- data/lib/files.com/models/scim_log.rb +13 -3
- data/lib/files.com/models/secret.rb +34 -8
- data/lib/files.com/models/session.rb +11 -2
- data/lib/files.com/models/settings_change.rb +7 -2
- data/lib/files.com/models/sftp_action_log.rb +7 -2
- data/lib/files.com/models/sftp_host_key.rb +34 -8
- data/lib/files.com/models/share_group.rb +34 -8
- data/lib/files.com/models/siem_http_destination.rb +39 -8
- data/lib/files.com/models/siem_http_destination_event.rb +13 -3
- data/lib/files.com/models/site.rb +16 -3
- data/lib/files.com/models/site_subdomain_redirect.rb +17 -3
- data/lib/files.com/models/snapshot.rb +39 -8
- data/lib/files.com/models/sso_event.rb +13 -3
- data/lib/files.com/models/sso_strategy.rb +18 -3
- data/lib/files.com/models/style.rb +20 -5
- data/lib/files.com/models/sync.rb +44 -8
- data/lib/files.com/models/sync_log.rb +7 -2
- data/lib/files.com/models/sync_run.rb +13 -3
- data/lib/files.com/models/usage_daily_snapshot.rb +7 -2
- data/lib/files.com/models/usage_snapshot.rb +7 -2
- data/lib/files.com/models/user.rb +50 -8
- data/lib/files.com/models/user_additional_email_recipient.rb +34 -8
- data/lib/files.com/models/user_cipher_use.rb +7 -2
- data/lib/files.com/models/user_lifecycle_rule.rb +34 -8
- data/lib/files.com/models/user_request.rb +24 -5
- data/lib/files.com/models/user_security_event.rb +13 -3
- data/lib/files.com/models/user_sftp_client_use.rb +7 -2
- data/lib/files.com/models/web_dav_action_log.rb +7 -2
- data/lib/files.com/models/webhook_test.rb +7 -2
- data/lib/files.com/models/workspace.rb +34 -8
- data/lib/files.com/response.rb +24 -0
- data/lib/files.com/sizable_io.rb +65 -4
- data/lib/files.com/version.rb +1 -1
- data/lib/files.com.rb +23 -1
- data/spec/language_spec.rb +20 -10
- data/spec/lib/api_client_spec.rb +173 -18
- data/spec/list_spec.rb +203 -187
- data/spec/models/file_transfer_spec.rb +346 -0
- data/spec/models/persistence_spec.rb +167 -0
- data/spec/spec_helper.rb +122 -6
- data/spec/support/stubbed_api.rb +14 -0
- data/spec/support/transfer_server.rb +60 -0
- metadata +6 -2
|
@@ -158,6 +158,11 @@ module Files
|
|
|
158
158
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `automation_id`, `created_at` or `status`.
|
|
159
159
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ workspace_id, status ]`, `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
|
|
160
160
|
# automation_id (required) - int64 - ID of the associated Automation.
|
|
161
|
+
#
|
|
162
|
+
# params:: Hash of API operation parameter values.
|
|
163
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
164
|
+
#
|
|
165
|
+
# Returns a Files::List of Files::AutomationRun objects.
|
|
161
166
|
def self.list(params = {}, options = {})
|
|
162
167
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
163
168
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
@@ -167,8 +172,8 @@ module Files
|
|
|
167
172
|
raise InvalidParameterError.new("Bad parameter: automation_id must be an Integer") if params[:automation_id] and !params[:automation_id].is_a?(Integer)
|
|
168
173
|
raise MissingParameterError.new("Parameter missing: automation_id") unless params[:automation_id]
|
|
169
174
|
|
|
170
|
-
List.new(AutomationRun, params) do
|
|
171
|
-
Api.send_request("/automation_runs", :get,
|
|
175
|
+
List.new(AutomationRun, params) do |page_params, &check_page|
|
|
176
|
+
Api.send_request("/automation_runs", :get, page_params, options, &check_page)
|
|
172
177
|
end
|
|
173
178
|
end
|
|
174
179
|
|
|
@@ -178,13 +183,18 @@ module Files
|
|
|
178
183
|
|
|
179
184
|
# Parameters:
|
|
180
185
|
# id (required) - int64 - Automation Run ID.
|
|
186
|
+
#
|
|
187
|
+
# params:: Hash of API operation parameter values.
|
|
188
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
189
|
+
#
|
|
190
|
+
# Returns a Files::AutomationRun.
|
|
181
191
|
def self.find(id, params = {}, options = {})
|
|
182
192
|
params ||= {}
|
|
183
193
|
params[:id] = id
|
|
184
194
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
185
195
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
186
196
|
|
|
187
|
-
response, options = Api.send_request("/automation_runs/#{params[:id]}", :get, params, options)
|
|
197
|
+
response, options = Api.send_request("/automation_runs/#{params[:id]}", :get, params, options) { |reply| reply.require_object("AutomationRun") }
|
|
188
198
|
AutomationRun.new(response.data, options)
|
|
189
199
|
end
|
|
190
200
|
|
|
@@ -195,6 +205,11 @@ module Files
|
|
|
195
205
|
# Parameters:
|
|
196
206
|
# id (required) - int64 - Automation Run ID.
|
|
197
207
|
# node_id (required) - string - Node ID from the pinned Automation definition.
|
|
208
|
+
#
|
|
209
|
+
# params:: Hash of API operation parameter values.
|
|
210
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
211
|
+
#
|
|
212
|
+
# Returns a Files::AutomationExecutionNode.
|
|
198
213
|
def self.find_node(id, params = {}, options = {})
|
|
199
214
|
params ||= {}
|
|
200
215
|
params[:id] = id
|
|
@@ -203,18 +218,23 @@ module Files
|
|
|
203
218
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
204
219
|
raise MissingParameterError.new("Parameter missing: node_id") unless params[:node_id]
|
|
205
220
|
|
|
206
|
-
response, options = Api.send_request("/automation_runs/#{params[:id]}/node", :get, params, options)
|
|
221
|
+
response, options = Api.send_request("/automation_runs/#{params[:id]}/node", :get, params, options) { |reply| reply.require_object("AutomationExecutionNode") }
|
|
207
222
|
AutomationExecutionNode.new(response.data, options)
|
|
208
223
|
end
|
|
209
224
|
|
|
210
225
|
# Cancel Automation Run
|
|
226
|
+
#
|
|
227
|
+
# params:: Hash of API operation parameter values.
|
|
228
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
229
|
+
#
|
|
230
|
+
# Returns a Files::AutomationRun.
|
|
211
231
|
def self.cancel(id, params = {}, options = {})
|
|
212
232
|
params ||= {}
|
|
213
233
|
params[:id] = id
|
|
214
234
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
215
235
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
216
236
|
|
|
217
|
-
response, options = Api.send_request("/automation_runs/#{params[:id]}/cancel", :post, params, options)
|
|
237
|
+
response, options = Api.send_request("/automation_runs/#{params[:id]}/cancel", :post, params, options) { |reply| reply.require_object("AutomationRun") }
|
|
218
238
|
AutomationRun.new(response.data, options)
|
|
219
239
|
end
|
|
220
240
|
|
|
@@ -222,6 +242,11 @@ module Files
|
|
|
222
242
|
#
|
|
223
243
|
# Parameters:
|
|
224
244
|
# node_id (required) - string - Node ID at which execution should resume.
|
|
245
|
+
#
|
|
246
|
+
# params:: Hash of API operation parameter values.
|
|
247
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
248
|
+
#
|
|
249
|
+
# Returns a Files::AutomationRun.
|
|
225
250
|
def self.rerun(id, params = {}, options = {})
|
|
226
251
|
params ||= {}
|
|
227
252
|
params[:id] = id
|
|
@@ -230,7 +255,7 @@ module Files
|
|
|
230
255
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
231
256
|
raise MissingParameterError.new("Parameter missing: node_id") unless params[:node_id]
|
|
232
257
|
|
|
233
|
-
response, options = Api.send_request("/automation_runs/#{params[:id]}/rerun", :post, params, options)
|
|
258
|
+
response, options = Api.send_request("/automation_runs/#{params[:id]}/rerun", :post, params, options) { |reply| reply.require_object("AutomationRun") }
|
|
234
259
|
AutomationRun.new(response.data, options)
|
|
235
260
|
end
|
|
236
261
|
end
|
|
@@ -63,6 +63,11 @@ module Files
|
|
|
63
63
|
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `logged_at`.
|
|
64
64
|
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `logged_at`.
|
|
65
65
|
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `logged_at`.
|
|
66
|
+
#
|
|
67
|
+
# params:: Hash of API operation parameter values.
|
|
68
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
69
|
+
#
|
|
70
|
+
# Returns a Files::List of Files::BandwidthSnapshot objects.
|
|
66
71
|
def self.list(params = {}, options = {})
|
|
67
72
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
68
73
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
@@ -73,8 +78,8 @@ module Files
|
|
|
73
78
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
|
|
74
79
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
|
|
75
80
|
|
|
76
|
-
List.new(BandwidthSnapshot, params) do
|
|
77
|
-
Api.send_request("/bandwidth_snapshots", :get,
|
|
81
|
+
List.new(BandwidthSnapshot, params) do |page_params, &check_page|
|
|
82
|
+
Api.send_request("/bandwidth_snapshots", :get, page_params, options, &check_page)
|
|
78
83
|
end
|
|
79
84
|
end
|
|
80
85
|
|
|
@@ -161,7 +161,9 @@ module Files
|
|
|
161
161
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
|
|
162
162
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
163
163
|
|
|
164
|
-
Api.send_request("/behaviors/#{@attributes[:id]}", :patch, params, @options)
|
|
164
|
+
response, options = Api.send_request("/behaviors/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("Behavior") }
|
|
165
|
+
@attributes = response.data
|
|
166
|
+
[ response, options ]
|
|
165
167
|
end
|
|
166
168
|
|
|
167
169
|
def delete(params = {})
|
|
@@ -181,12 +183,12 @@ module Files
|
|
|
181
183
|
|
|
182
184
|
def save
|
|
183
185
|
if @attributes[:id]
|
|
184
|
-
|
|
186
|
+
update(@attributes)
|
|
185
187
|
else
|
|
186
188
|
new_obj = Behavior.create(@attributes, @options)
|
|
189
|
+
@attributes = new_obj.attributes
|
|
187
190
|
end
|
|
188
191
|
|
|
189
|
-
@attributes = new_obj.attributes
|
|
190
192
|
true
|
|
191
193
|
end
|
|
192
194
|
|
|
@@ -195,14 +197,19 @@ module Files
|
|
|
195
197
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
196
198
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `behavior`.
|
|
197
199
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `clickwrap_id`, `form_field_set_id`, `impacts_ui`, `remote_server_id` or `behavior`. Valid field combinations are `[ impacts_ui, behavior ]` and `[ behavior, remote_server_id ]`.
|
|
200
|
+
#
|
|
201
|
+
# params:: Hash of API operation parameter values.
|
|
202
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
203
|
+
#
|
|
204
|
+
# Returns a Files::List of Files::Behavior objects.
|
|
198
205
|
def self.list(params = {}, options = {})
|
|
199
206
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
200
207
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
201
208
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
202
209
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
203
210
|
|
|
204
|
-
List.new(Behavior, params) do
|
|
205
|
-
Api.send_request("/behaviors", :get,
|
|
211
|
+
List.new(Behavior, params) do |page_params, &check_page|
|
|
212
|
+
Api.send_request("/behaviors", :get, page_params, options, &check_page)
|
|
206
213
|
end
|
|
207
214
|
end
|
|
208
215
|
|
|
@@ -212,13 +219,18 @@ module Files
|
|
|
212
219
|
|
|
213
220
|
# Parameters:
|
|
214
221
|
# id (required) - int64 - Behavior ID.
|
|
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::Behavior.
|
|
215
227
|
def self.find(id, params = {}, options = {})
|
|
216
228
|
params ||= {}
|
|
217
229
|
params[:id] = id
|
|
218
230
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
219
231
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
220
232
|
|
|
221
|
-
response, options = Api.send_request("/behaviors/#{params[:id]}", :get, params, options)
|
|
233
|
+
response, options = Api.send_request("/behaviors/#{params[:id]}", :get, params, options) { |reply| reply.require_object("Behavior") }
|
|
222
234
|
Behavior.new(response.data, options)
|
|
223
235
|
end
|
|
224
236
|
|
|
@@ -233,6 +245,11 @@ module Files
|
|
|
233
245
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `impacts_ui` and `behavior`. Valid field combinations are `[ impacts_ui, behavior ]`.
|
|
234
246
|
# path (required) - string - Path to operate on.
|
|
235
247
|
# ancestor_behaviors - boolean - If `true`, behaviors above this path are shown.
|
|
248
|
+
#
|
|
249
|
+
# params:: Hash of API operation parameter values.
|
|
250
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
251
|
+
#
|
|
252
|
+
# Returns a Files::List of Files::Behavior objects.
|
|
236
253
|
def self.list_for(path, params = {}, options = {})
|
|
237
254
|
params ||= {}
|
|
238
255
|
params[:path] = path
|
|
@@ -243,8 +260,8 @@ module Files
|
|
|
243
260
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
244
261
|
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
245
262
|
|
|
246
|
-
List.new(Behavior, params) do
|
|
247
|
-
Api.send_request("/behaviors/folders/#{
|
|
263
|
+
List.new(Behavior, params) do |page_params, &check_page|
|
|
264
|
+
Api.send_request("/behaviors/folders/#{page_params[:path]}", :get, page_params, options, &check_page)
|
|
248
265
|
end
|
|
249
266
|
end
|
|
250
267
|
|
|
@@ -257,6 +274,11 @@ module Files
|
|
|
257
274
|
# description - string - Description for this behavior.
|
|
258
275
|
# path (required) - string - Path where this behavior should apply.
|
|
259
276
|
# behavior (required) - string - Behavior type.
|
|
277
|
+
#
|
|
278
|
+
# params:: Hash of API operation parameter values.
|
|
279
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
280
|
+
#
|
|
281
|
+
# Returns a Files::Behavior.
|
|
260
282
|
def self.create(params = {}, options = {})
|
|
261
283
|
raise InvalidParameterError.new("Bad parameter: value must be an Hash") if params[:value] and !params[:value].is_a?(Hash)
|
|
262
284
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
|
@@ -266,7 +288,7 @@ module Files
|
|
|
266
288
|
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
267
289
|
raise MissingParameterError.new("Parameter missing: behavior") unless params[:behavior]
|
|
268
290
|
|
|
269
|
-
response, options = Api.send_request("/behaviors", :post, params, options)
|
|
291
|
+
response, options = Api.send_request("/behaviors", :post, params, options) { |reply| reply.require_object("Behavior") }
|
|
270
292
|
Behavior.new(response.data, options)
|
|
271
293
|
end
|
|
272
294
|
|
|
@@ -277,6 +299,11 @@ module Files
|
|
|
277
299
|
# headers - object - Additional request headers to send via HTTP.
|
|
278
300
|
# body - object - Additional body parameters to include in the webhook payload.
|
|
279
301
|
# action - string - Action for test body.
|
|
302
|
+
#
|
|
303
|
+
# params:: Hash of API operation parameter values.
|
|
304
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
305
|
+
#
|
|
306
|
+
# Returns nil.
|
|
280
307
|
def self.webhook_test(params = {}, options = {})
|
|
281
308
|
raise InvalidParameterError.new("Bad parameter: url must be an String") if params[:url] and !params[:url].is_a?(String)
|
|
282
309
|
raise InvalidParameterError.new("Bad parameter: method must be an String") if params[:method] and !params[:method].is_a?(String)
|
|
@@ -298,6 +325,11 @@ module Files
|
|
|
298
325
|
# name - string - Name for this behavior.
|
|
299
326
|
# description - string - Description for this behavior.
|
|
300
327
|
# attachment_delete - boolean - If `true`, delete the file stored in `attachment`.
|
|
328
|
+
#
|
|
329
|
+
# params:: Hash of API operation parameter values.
|
|
330
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
331
|
+
#
|
|
332
|
+
# Returns a Files::Behavior.
|
|
301
333
|
def self.update(id, params = {}, options = {})
|
|
302
334
|
params ||= {}
|
|
303
335
|
params[:id] = id
|
|
@@ -308,10 +340,14 @@ module Files
|
|
|
308
340
|
raise InvalidParameterError.new("Bad parameter: attachment_delete must be one of Hash, String, Integer") if params[:attachment_delete] and [ Hash, String, Integer ].none? { |klass| params[:attachment_delete].is_a?(klass) }
|
|
309
341
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
310
342
|
|
|
311
|
-
response, options = Api.send_request("/behaviors/#{params[:id]}", :patch, params, options)
|
|
343
|
+
response, options = Api.send_request("/behaviors/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("Behavior") }
|
|
312
344
|
Behavior.new(response.data, options)
|
|
313
345
|
end
|
|
314
346
|
|
|
347
|
+
# params:: Hash of API operation parameter values.
|
|
348
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
349
|
+
#
|
|
350
|
+
# Returns nil.
|
|
315
351
|
def self.delete(id, params = {}, options = {})
|
|
316
352
|
params ||= {}
|
|
317
353
|
params[:id] = id
|
|
@@ -577,7 +577,9 @@ module Files
|
|
|
577
577
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
578
578
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
579
579
|
|
|
580
|
-
Api.send_request("/bundles/#{@attributes[:id]}", :patch, params, @options)
|
|
580
|
+
response, options = Api.send_request("/bundles/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("Bundle") }
|
|
581
|
+
@attributes = response.data
|
|
582
|
+
[ response, options ]
|
|
581
583
|
end
|
|
582
584
|
|
|
583
585
|
def delete(params = {})
|
|
@@ -597,12 +599,12 @@ module Files
|
|
|
597
599
|
|
|
598
600
|
def save
|
|
599
601
|
if @attributes[:id]
|
|
600
|
-
|
|
602
|
+
update(@attributes)
|
|
601
603
|
else
|
|
602
604
|
new_obj = Bundle.create(@attributes, @options)
|
|
605
|
+
@attributes = new_obj.attributes
|
|
603
606
|
end
|
|
604
607
|
|
|
605
|
-
@attributes = new_obj.attributes
|
|
606
608
|
true
|
|
607
609
|
end
|
|
608
610
|
|
|
@@ -618,6 +620,11 @@ module Files
|
|
|
618
620
|
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at` and `expires_at`.
|
|
619
621
|
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at` and `expires_at`.
|
|
620
622
|
# deleted - boolean - If true, only list deleted Share Links.
|
|
623
|
+
#
|
|
624
|
+
# params:: Hash of API operation parameter values.
|
|
625
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
626
|
+
#
|
|
627
|
+
# Returns a Files::List of Files::Bundle objects.
|
|
621
628
|
def self.list(params = {}, options = {})
|
|
622
629
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
623
630
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
@@ -630,8 +637,8 @@ module Files
|
|
|
630
637
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
|
|
631
638
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
|
|
632
639
|
|
|
633
|
-
List.new(Bundle, params) do
|
|
634
|
-
Api.send_request("/bundles", :get,
|
|
640
|
+
List.new(Bundle, params) do |page_params, &check_page|
|
|
641
|
+
Api.send_request("/bundles", :get, page_params, options, &check_page)
|
|
635
642
|
end
|
|
636
643
|
end
|
|
637
644
|
|
|
@@ -642,13 +649,18 @@ module Files
|
|
|
642
649
|
# Parameters:
|
|
643
650
|
# id (required) - int64 - Bundle ID.
|
|
644
651
|
# deleted - boolean - If true, show a deleted Share Link.
|
|
652
|
+
#
|
|
653
|
+
# params:: Hash of API operation parameter values.
|
|
654
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
655
|
+
#
|
|
656
|
+
# Returns a Files::Bundle.
|
|
645
657
|
def self.find(id, params = {}, options = {})
|
|
646
658
|
params ||= {}
|
|
647
659
|
params[:id] = id
|
|
648
660
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
649
661
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
650
662
|
|
|
651
|
-
response, options = Api.send_request("/bundles/#{params[:id]}", :get, params, options)
|
|
663
|
+
response, options = Api.send_request("/bundles/#{params[:id]}", :get, params, options) { |reply| reply.require_object("Bundle") }
|
|
652
664
|
Bundle.new(response.data, options)
|
|
653
665
|
end
|
|
654
666
|
|
|
@@ -689,6 +701,11 @@ module Files
|
|
|
689
701
|
# workspace_id - int64 - Workspace ID. `0` means the default workspace.
|
|
690
702
|
# watermark_attachment_file - file - Preview watermark image applied to all bundle items.
|
|
691
703
|
# watermark_value - object - Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
|
|
704
|
+
#
|
|
705
|
+
# params:: Hash of API operation parameter values.
|
|
706
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
707
|
+
#
|
|
708
|
+
# Returns a Files::Bundle.
|
|
692
709
|
def self.create(params = {}, options = {})
|
|
693
710
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
694
711
|
raise InvalidParameterError.new("Bad parameter: paths must be an Array") if params[:paths] and !params[:paths].is_a?(Array)
|
|
@@ -712,7 +729,7 @@ module Files
|
|
|
712
729
|
raise InvalidParameterError.new("Bad parameter: watermark_value must be an Hash") if params[:watermark_value] and !params[:watermark_value].is_a?(Hash)
|
|
713
730
|
raise MissingParameterError.new("Parameter missing: paths") unless params[:paths]
|
|
714
731
|
|
|
715
|
-
response, options = Api.send_request("/bundles", :post, params, options)
|
|
732
|
+
response, options = Api.send_request("/bundles", :post, params, options) { |reply| reply.require_object("Bundle") }
|
|
716
733
|
Bundle.new(response.data, options)
|
|
717
734
|
end
|
|
718
735
|
|
|
@@ -722,6 +739,11 @@ module Files
|
|
|
722
739
|
# to - array(string) - A list of email addresses to share this bundle with. Required unless `recipients` is used.
|
|
723
740
|
# note - string - Note to include in email.
|
|
724
741
|
# recipients - array(object) - A list of recipients to share this bundle with. Required unless `to` is used.
|
|
742
|
+
#
|
|
743
|
+
# params:: Hash of API operation parameter values.
|
|
744
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
745
|
+
#
|
|
746
|
+
# Returns nil.
|
|
725
747
|
def self.share(id, params = {}, options = {})
|
|
726
748
|
params ||= {}
|
|
727
749
|
params[:id] = id
|
|
@@ -768,6 +790,11 @@ module Files
|
|
|
768
790
|
# watermark_attachment_file - file - Preview watermark image applied to all bundle items.
|
|
769
791
|
# watermark_value - object - Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
|
|
770
792
|
# workspace_id - int64 - Workspace ID. `0` means the default workspace.
|
|
793
|
+
#
|
|
794
|
+
# params:: Hash of API operation parameter values.
|
|
795
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
796
|
+
#
|
|
797
|
+
# Returns a Files::Bundle.
|
|
771
798
|
def self.update(id, params = {}, options = {})
|
|
772
799
|
params ||= {}
|
|
773
800
|
params[:id] = id
|
|
@@ -793,10 +820,14 @@ module Files
|
|
|
793
820
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
794
821
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
795
822
|
|
|
796
|
-
response, options = Api.send_request("/bundles/#{params[:id]}", :patch, params, options)
|
|
823
|
+
response, options = Api.send_request("/bundles/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("Bundle") }
|
|
797
824
|
Bundle.new(response.data, options)
|
|
798
825
|
end
|
|
799
826
|
|
|
827
|
+
# params:: Hash of API operation parameter values.
|
|
828
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
829
|
+
#
|
|
830
|
+
# Returns nil.
|
|
800
831
|
def self.delete(id, params = {}, options = {})
|
|
801
832
|
params ||= {}
|
|
802
833
|
params[:id] = id
|
|
@@ -86,6 +86,11 @@ module Files
|
|
|
86
86
|
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
|
|
87
87
|
# bundle_id - int64 - Bundle ID
|
|
88
88
|
# bundle_registration_id - int64 - Bundle Registration ID
|
|
89
|
+
#
|
|
90
|
+
# params:: Hash of API operation parameter values.
|
|
91
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
92
|
+
#
|
|
93
|
+
# Returns a Files::List of Files::BundleAction objects.
|
|
89
94
|
def self.list(params = {}, options = {})
|
|
90
95
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
91
96
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
@@ -99,8 +104,8 @@ module Files
|
|
|
99
104
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)
|
|
100
105
|
raise InvalidParameterError.new("Bad parameter: bundle_registration_id must be an Integer") if params[:bundle_registration_id] and !params[:bundle_registration_id].is_a?(Integer)
|
|
101
106
|
|
|
102
|
-
List.new(BundleAction, params) do
|
|
103
|
-
Api.send_request("/bundle_actions", :get,
|
|
107
|
+
List.new(BundleAction, params) do |page_params, &check_page|
|
|
108
|
+
Api.send_request("/bundle_actions", :get, page_params, options, &check_page)
|
|
104
109
|
end
|
|
105
110
|
end
|
|
106
111
|
|
|
@@ -45,6 +45,11 @@ module Files
|
|
|
45
45
|
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
|
|
46
46
|
# bundle_id - int64 - Bundle ID
|
|
47
47
|
# bundle_registration_id - int64 - BundleRegistration ID
|
|
48
|
+
#
|
|
49
|
+
# params:: Hash of API operation parameter values.
|
|
50
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
51
|
+
#
|
|
52
|
+
# Returns a Files::List of Files::BundleDownload objects.
|
|
48
53
|
def self.list(params = {}, options = {})
|
|
49
54
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
50
55
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
@@ -57,8 +62,8 @@ module Files
|
|
|
57
62
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)
|
|
58
63
|
raise InvalidParameterError.new("Bad parameter: bundle_registration_id must be an Integer") if params[:bundle_registration_id] and !params[:bundle_registration_id].is_a?(Integer)
|
|
59
64
|
|
|
60
|
-
List.new(BundleDownload, params) do
|
|
61
|
-
Api.send_request("/bundle_downloads", :get,
|
|
65
|
+
List.new(BundleDownload, params) do |page_params, &check_page|
|
|
66
|
+
Api.send_request("/bundle_downloads", :get, page_params, options, &check_page)
|
|
62
67
|
end
|
|
63
68
|
end
|
|
64
69
|
|
|
@@ -91,7 +91,9 @@ module Files
|
|
|
91
91
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
92
92
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
93
93
|
|
|
94
|
-
Api.send_request("/bundle_notifications/#{@attributes[:id]}", :patch, params, @options)
|
|
94
|
+
response, options = Api.send_request("/bundle_notifications/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("BundleNotification") }
|
|
95
|
+
@attributes = response.data
|
|
96
|
+
[ response, options ]
|
|
95
97
|
end
|
|
96
98
|
|
|
97
99
|
def delete(params = {})
|
|
@@ -111,12 +113,12 @@ module Files
|
|
|
111
113
|
|
|
112
114
|
def save
|
|
113
115
|
if @attributes[:id]
|
|
114
|
-
|
|
116
|
+
update(@attributes)
|
|
115
117
|
else
|
|
116
118
|
new_obj = BundleNotification.create(@attributes, @options)
|
|
119
|
+
@attributes = new_obj.attributes
|
|
117
120
|
end
|
|
118
121
|
|
|
119
|
-
@attributes = new_obj.attributes
|
|
120
122
|
true
|
|
121
123
|
end
|
|
122
124
|
|
|
@@ -127,6 +129,11 @@ module Files
|
|
|
127
129
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id` and `bundle_id`.
|
|
128
130
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `bundle_id`.
|
|
129
131
|
# bundle_id - int64 - Bundle ID
|
|
132
|
+
#
|
|
133
|
+
# params:: Hash of API operation parameter values.
|
|
134
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
135
|
+
#
|
|
136
|
+
# Returns a Files::List of Files::BundleNotification objects.
|
|
130
137
|
def self.list(params = {}, options = {})
|
|
131
138
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
132
139
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
@@ -135,8 +142,8 @@ module Files
|
|
|
135
142
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
136
143
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)
|
|
137
144
|
|
|
138
|
-
List.new(BundleNotification, params) do
|
|
139
|
-
Api.send_request("/bundle_notifications", :get,
|
|
145
|
+
List.new(BundleNotification, params) do |page_params, &check_page|
|
|
146
|
+
Api.send_request("/bundle_notifications", :get, page_params, options, &check_page)
|
|
140
147
|
end
|
|
141
148
|
end
|
|
142
149
|
|
|
@@ -146,13 +153,18 @@ module Files
|
|
|
146
153
|
|
|
147
154
|
# Parameters:
|
|
148
155
|
# id (required) - int64 - Bundle Notification ID.
|
|
156
|
+
#
|
|
157
|
+
# params:: Hash of API operation parameter values.
|
|
158
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
159
|
+
#
|
|
160
|
+
# Returns a Files::BundleNotification.
|
|
149
161
|
def self.find(id, params = {}, options = {})
|
|
150
162
|
params ||= {}
|
|
151
163
|
params[:id] = id
|
|
152
164
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
153
165
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
154
166
|
|
|
155
|
-
response, options = Api.send_request("/bundle_notifications/#{params[:id]}", :get, params, options)
|
|
167
|
+
response, options = Api.send_request("/bundle_notifications/#{params[:id]}", :get, params, options) { |reply| reply.require_object("BundleNotification") }
|
|
156
168
|
BundleNotification.new(response.data, options)
|
|
157
169
|
end
|
|
158
170
|
|
|
@@ -166,29 +178,43 @@ module Files
|
|
|
166
178
|
# notify_user_id - int64 - The id of the user to notify.
|
|
167
179
|
# notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
|
|
168
180
|
# notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
|
|
181
|
+
#
|
|
182
|
+
# params:: Hash of API operation parameter values.
|
|
183
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
184
|
+
#
|
|
185
|
+
# Returns a Files::BundleNotification.
|
|
169
186
|
def self.create(params = {}, options = {})
|
|
170
187
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
171
188
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)
|
|
172
189
|
raise InvalidParameterError.new("Bad parameter: notify_user_id must be an Integer") if params[:notify_user_id] and !params[:notify_user_id].is_a?(Integer)
|
|
173
190
|
raise MissingParameterError.new("Parameter missing: bundle_id") unless params[:bundle_id]
|
|
174
191
|
|
|
175
|
-
response, options = Api.send_request("/bundle_notifications", :post, params, options)
|
|
192
|
+
response, options = Api.send_request("/bundle_notifications", :post, params, options) { |reply| reply.require_object("BundleNotification") }
|
|
176
193
|
BundleNotification.new(response.data, options)
|
|
177
194
|
end
|
|
178
195
|
|
|
179
196
|
# Parameters:
|
|
180
197
|
# notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
|
|
181
198
|
# notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
|
|
199
|
+
#
|
|
200
|
+
# params:: Hash of API operation parameter values.
|
|
201
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
202
|
+
#
|
|
203
|
+
# Returns a Files::BundleNotification.
|
|
182
204
|
def self.update(id, params = {}, options = {})
|
|
183
205
|
params ||= {}
|
|
184
206
|
params[:id] = id
|
|
185
207
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
186
208
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
187
209
|
|
|
188
|
-
response, options = Api.send_request("/bundle_notifications/#{params[:id]}", :patch, params, options)
|
|
210
|
+
response, options = Api.send_request("/bundle_notifications/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("BundleNotification") }
|
|
189
211
|
BundleNotification.new(response.data, options)
|
|
190
212
|
end
|
|
191
213
|
|
|
214
|
+
# params:: Hash of API operation parameter values.
|
|
215
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
216
|
+
#
|
|
217
|
+
# Returns nil.
|
|
192
218
|
def self.delete(id, params = {}, options = {})
|
|
193
219
|
params ||= {}
|
|
194
220
|
params[:id] = id
|
|
@@ -95,9 +95,9 @@ module Files
|
|
|
95
95
|
raise NotImplementedError.new("The BundleRecipient object doesn't support updates.")
|
|
96
96
|
else
|
|
97
97
|
new_obj = BundleRecipient.create(@attributes, @options)
|
|
98
|
+
@attributes = new_obj.attributes
|
|
98
99
|
end
|
|
99
100
|
|
|
100
|
-
@attributes = new_obj.attributes
|
|
101
101
|
true
|
|
102
102
|
end
|
|
103
103
|
|
|
@@ -108,6 +108,11 @@ module Files
|
|
|
108
108
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`.
|
|
109
109
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `has_registrations`.
|
|
110
110
|
# bundle_id (required) - int64 - List recipients for the bundle with this ID.
|
|
111
|
+
#
|
|
112
|
+
# params:: Hash of API operation parameter values.
|
|
113
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
114
|
+
#
|
|
115
|
+
# Returns a Files::List of Files::BundleRecipient objects.
|
|
111
116
|
def self.list(params = {}, options = {})
|
|
112
117
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
113
118
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
@@ -117,8 +122,8 @@ module Files
|
|
|
117
122
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)
|
|
118
123
|
raise MissingParameterError.new("Parameter missing: bundle_id") unless params[:bundle_id]
|
|
119
124
|
|
|
120
|
-
List.new(BundleRecipient, params) do
|
|
121
|
-
Api.send_request("/bundle_recipients", :get,
|
|
125
|
+
List.new(BundleRecipient, params) do |page_params, &check_page|
|
|
126
|
+
Api.send_request("/bundle_recipients", :get, page_params, options, &check_page)
|
|
122
127
|
end
|
|
123
128
|
end
|
|
124
129
|
|
|
@@ -134,6 +139,11 @@ module Files
|
|
|
134
139
|
# company - string - Company of recipient.
|
|
135
140
|
# note - string - Note to include in email.
|
|
136
141
|
# share_after_create - boolean - Set to true to share the link with the recipient upon creation.
|
|
142
|
+
#
|
|
143
|
+
# params:: Hash of API operation parameter values.
|
|
144
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
145
|
+
#
|
|
146
|
+
# Returns a Files::BundleRecipient.
|
|
137
147
|
def self.create(params = {}, options = {})
|
|
138
148
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
139
149
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)
|
|
@@ -144,7 +154,7 @@ module Files
|
|
|
144
154
|
raise MissingParameterError.new("Parameter missing: bundle_id") unless params[:bundle_id]
|
|
145
155
|
raise MissingParameterError.new("Parameter missing: recipient") unless params[:recipient]
|
|
146
156
|
|
|
147
|
-
response, options = Api.send_request("/bundle_recipients", :post, params, options)
|
|
157
|
+
response, options = Api.send_request("/bundle_recipients", :post, params, options) { |reply| reply.require_object("BundleRecipient") }
|
|
148
158
|
BundleRecipient.new(response.data, options)
|
|
149
159
|
end
|
|
150
160
|
end
|
|
@@ -85,6 +85,11 @@ module Files
|
|
|
85
85
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
86
86
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `bundle_id` or `created_at`.
|
|
87
87
|
# bundle_id - int64 - ID of the associated Bundle
|
|
88
|
+
#
|
|
89
|
+
# params:: Hash of API operation parameter values.
|
|
90
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
91
|
+
#
|
|
92
|
+
# Returns a Files::List of Files::BundleRegistration objects.
|
|
88
93
|
def self.list(params = {}, options = {})
|
|
89
94
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
90
95
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
@@ -92,8 +97,8 @@ module Files
|
|
|
92
97
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
93
98
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)
|
|
94
99
|
|
|
95
|
-
List.new(BundleRegistration, params) do
|
|
96
|
-
Api.send_request("/bundle_registrations", :get,
|
|
100
|
+
List.new(BundleRegistration, params) do |page_params, &check_page|
|
|
101
|
+
Api.send_request("/bundle_registrations", :get, page_params, options, &check_page)
|
|
97
102
|
end
|
|
98
103
|
end
|
|
99
104
|
|