files.com 1.1.767 → 1.1.769
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/event_record.md +2 -2
- data/docs/event_subscription.md +8 -8
- data/docs/file.md +37 -0
- data/docs/public_key.md +1 -1
- 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 +2 -2
- data/lib/files.com/models/action_notification_export.rb +3 -3
- data/lib/files.com/models/action_notification_export_result.rb +2 -2
- data/lib/files.com/models/ai_assistant_personality.rb +10 -8
- data/lib/files.com/models/ai_task.rb +10 -8
- data/lib/files.com/models/api_key.rb +12 -10
- data/lib/files.com/models/api_request_log.rb +2 -2
- data/lib/files.com/models/app.rb +2 -2
- data/lib/files.com/models/as2_incoming_message.rb +2 -2
- data/lib/files.com/models/as2_outgoing_message.rb +2 -2
- data/lib/files.com/models/as2_partner.rb +10 -8
- data/lib/files.com/models/as2_station.rb +10 -8
- data/lib/files.com/models/automation.rb +12 -10
- data/lib/files.com/models/automation_log.rb +2 -2
- data/lib/files.com/models/automation_run.rb +6 -6
- data/lib/files.com/models/bandwidth_snapshot.rb +2 -2
- data/lib/files.com/models/behavior.rb +12 -10
- data/lib/files.com/models/bundle.rb +10 -8
- data/lib/files.com/models/bundle_action.rb +2 -2
- data/lib/files.com/models/bundle_download.rb +2 -2
- data/lib/files.com/models/bundle_notification.rb +10 -8
- data/lib/files.com/models/bundle_recipient.rb +4 -4
- data/lib/files.com/models/bundle_registration.rb +2 -2
- data/lib/files.com/models/chat_session.rb +3 -3
- data/lib/files.com/models/child_site_management_policy.rb +10 -8
- data/lib/files.com/models/clickwrap.rb +10 -8
- data/lib/files.com/models/custom_domain.rb +11 -9
- data/lib/files.com/models/desktop_configuration_profile.rb +10 -8
- data/lib/files.com/models/dns_record.rb +2 -2
- data/lib/files.com/models/email_incoming_message.rb +2 -2
- data/lib/files.com/models/email_log.rb +2 -2
- data/lib/files.com/models/event_channel.rb +10 -8
- data/lib/files.com/models/event_delivery_attempt.rb +3 -3
- data/lib/files.com/models/event_record.rb +4 -4
- data/lib/files.com/models/event_subscription.rb +14 -12
- data/lib/files.com/models/event_target.rb +10 -8
- data/lib/files.com/models/exavault_api_request_log.rb +2 -2
- data/lib/files.com/models/expectation.rb +11 -9
- data/lib/files.com/models/expectation_evaluation.rb +3 -3
- data/lib/files.com/models/expectation_incident.rb +6 -6
- data/lib/files.com/models/external_event.rb +5 -5
- data/lib/files.com/models/file.rb +23 -15
- data/lib/files.com/models/file_comment.rb +9 -7
- data/lib/files.com/models/file_comment_reaction.rb +2 -2
- data/lib/files.com/models/file_migration.rb +1 -1
- data/lib/files.com/models/file_migration_log.rb +2 -2
- data/lib/files.com/models/folder.rb +3 -3
- data/lib/files.com/models/form_field_set.rb +10 -8
- data/lib/files.com/models/ftp_action_log.rb +2 -2
- data/lib/files.com/models/gpg_key.rb +10 -8
- data/lib/files.com/models/group.rb +10 -8
- data/lib/files.com/models/group_user.rb +9 -7
- data/lib/files.com/models/history.rb +10 -10
- data/lib/files.com/models/history_export.rb +3 -3
- data/lib/files.com/models/history_export_result.rb +2 -2
- data/lib/files.com/models/holiday_calendar.rb +10 -8
- data/lib/files.com/models/holiday_region.rb +2 -2
- data/lib/files.com/models/inbound_s3_log.rb +2 -2
- data/lib/files.com/models/inbox_recipient.rb +4 -4
- data/lib/files.com/models/inbox_registration.rb +2 -2
- data/lib/files.com/models/inbox_upload.rb +2 -2
- data/lib/files.com/models/integration_centric_profile.rb +10 -8
- data/lib/files.com/models/invoice.rb +3 -3
- data/lib/files.com/models/ip_address.rb +8 -8
- data/lib/files.com/models/key_lifecycle_rule.rb +10 -8
- data/lib/files.com/models/lock.rb +3 -3
- data/lib/files.com/models/metadata_category.rb +12 -10
- data/lib/files.com/models/notification.rb +10 -8
- data/lib/files.com/models/outbound_connection_log.rb +2 -2
- data/lib/files.com/models/partner.rb +10 -8
- data/lib/files.com/models/partner_channel.rb +10 -8
- data/lib/files.com/models/partner_channel_template.rb +10 -8
- data/lib/files.com/models/partner_site_request.rb +4 -4
- data/lib/files.com/models/payment.rb +3 -3
- data/lib/files.com/models/pending_work_event.rb +3 -3
- data/lib/files.com/models/permission.rb +4 -4
- data/lib/files.com/models/public_hosting_request_log.rb +2 -2
- data/lib/files.com/models/public_key.rb +11 -9
- data/lib/files.com/models/remote_bandwidth_snapshot.rb +2 -2
- data/lib/files.com/models/remote_mount_backend.rb +10 -8
- data/lib/files.com/models/remote_server.rb +13 -11
- data/lib/files.com/models/remote_server_credential.rb +10 -8
- data/lib/files.com/models/request.rb +6 -6
- data/lib/files.com/models/restore.rb +4 -4
- data/lib/files.com/models/schedule.rb +10 -8
- data/lib/files.com/models/scheduled_export.rb +10 -8
- data/lib/files.com/models/scim_log.rb +3 -3
- data/lib/files.com/models/secret.rb +10 -8
- data/lib/files.com/models/session.rb +2 -2
- data/lib/files.com/models/settings_change.rb +2 -2
- data/lib/files.com/models/sftp_action_log.rb +2 -2
- data/lib/files.com/models/sftp_host_key.rb +10 -8
- data/lib/files.com/models/share_group.rb +10 -8
- data/lib/files.com/models/siem_http_destination.rb +10 -8
- data/lib/files.com/models/siem_http_destination_event.rb +3 -3
- data/lib/files.com/models/site.rb +3 -3
- data/lib/files.com/models/site_subdomain_redirect.rb +3 -3
- data/lib/files.com/models/snapshot.rb +10 -8
- data/lib/files.com/models/sso_event.rb +3 -3
- data/lib/files.com/models/sso_strategy.rb +3 -3
- data/lib/files.com/models/style.rb +6 -5
- data/lib/files.com/models/sync.rb +10 -8
- data/lib/files.com/models/sync_log.rb +2 -2
- data/lib/files.com/models/sync_run.rb +3 -3
- data/lib/files.com/models/usage_daily_snapshot.rb +2 -2
- data/lib/files.com/models/usage_snapshot.rb +2 -2
- data/lib/files.com/models/user.rb +10 -8
- data/lib/files.com/models/user_additional_email_recipient.rb +10 -8
- data/lib/files.com/models/user_cipher_use.rb +2 -2
- data/lib/files.com/models/user_lifecycle_rule.rb +10 -8
- data/lib/files.com/models/user_request.rb +5 -5
- data/lib/files.com/models/user_security_event.rb +3 -3
- data/lib/files.com/models/user_sftp_client_use.rb +2 -2
- data/lib/files.com/models/web_dav_action_log.rb +2 -2
- data/lib/files.com/models/webhook_test.rb +2 -2
- data/lib/files.com/models/workspace.rb +10 -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 +5 -1
|
@@ -509,7 +509,9 @@ module Files
|
|
|
509
509
|
raise InvalidParameterError.new("Bad parameter: automation must be an String") if params[:automation] and !params[:automation].is_a?(String)
|
|
510
510
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
511
511
|
|
|
512
|
-
Api.send_request("/automations/#{@attributes[:id]}", :patch, params, @options)
|
|
512
|
+
response, options = Api.send_request("/automations/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("Automation") }
|
|
513
|
+
@attributes = response.data
|
|
514
|
+
[ response, options ]
|
|
513
515
|
end
|
|
514
516
|
|
|
515
517
|
def delete(params = {})
|
|
@@ -529,12 +531,12 @@ module Files
|
|
|
529
531
|
|
|
530
532
|
def save
|
|
531
533
|
if @attributes[:id]
|
|
532
|
-
|
|
534
|
+
update(@attributes)
|
|
533
535
|
else
|
|
534
536
|
new_obj = Automation.create(@attributes, @options)
|
|
537
|
+
@attributes = new_obj.attributes
|
|
535
538
|
end
|
|
536
539
|
|
|
537
|
-
@attributes = new_obj.attributes
|
|
538
540
|
true
|
|
539
541
|
end
|
|
540
542
|
|
|
@@ -557,8 +559,8 @@ module Files
|
|
|
557
559
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
|
|
558
560
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
|
|
559
561
|
|
|
560
|
-
List.new(Automation, params) do
|
|
561
|
-
Api.send_request("/automations", :get,
|
|
562
|
+
List.new(Automation, params) do |page_params, &check_page|
|
|
563
|
+
Api.send_request("/automations", :get, page_params, options, &check_page)
|
|
562
564
|
end
|
|
563
565
|
end
|
|
564
566
|
|
|
@@ -574,7 +576,7 @@ module Files
|
|
|
574
576
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
575
577
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
576
578
|
|
|
577
|
-
response, options = Api.send_request("/automations/#{params[:id]}", :get, params, options)
|
|
579
|
+
response, options = Api.send_request("/automations/#{params[:id]}", :get, params, options) { |reply| reply.require_object("Automation") }
|
|
578
580
|
Automation.new(response.data, options)
|
|
579
581
|
end
|
|
580
582
|
|
|
@@ -583,7 +585,7 @@ module Files
|
|
|
583
585
|
end
|
|
584
586
|
|
|
585
587
|
def self.get_authoring_schema(params = {}, options = {})
|
|
586
|
-
response, options = Api.send_request("/automations/authoring_schema", :get, params, options)
|
|
588
|
+
response, options = Api.send_request("/automations/authoring_schema", :get, params, options) { |reply| reply.require_object("AutomationAuthoringSchema") }
|
|
587
589
|
AutomationAuthoringSchema.new(response.data, options)
|
|
588
590
|
end
|
|
589
591
|
|
|
@@ -656,7 +658,7 @@ module Files
|
|
|
656
658
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
657
659
|
raise MissingParameterError.new("Parameter missing: automation") unless params[:automation]
|
|
658
660
|
|
|
659
|
-
response, options = Api.send_request("/automations", :post, params, options)
|
|
661
|
+
response, options = Api.send_request("/automations", :post, params, options) { |reply| reply.require_object("Automation") }
|
|
660
662
|
Automation.new(response.data, options)
|
|
661
663
|
end
|
|
662
664
|
|
|
@@ -667,7 +669,7 @@ module Files
|
|
|
667
669
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
668
670
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
669
671
|
|
|
670
|
-
response, options = Api.send_request("/automations/#{params[:id]}/upgrade", :post, params, options)
|
|
672
|
+
response, options = Api.send_request("/automations/#{params[:id]}/upgrade", :post, params, options) { |reply| reply.require_object("Automation") }
|
|
671
673
|
Automation.new(response.data, options)
|
|
672
674
|
end
|
|
673
675
|
|
|
@@ -756,7 +758,7 @@ module Files
|
|
|
756
758
|
raise InvalidParameterError.new("Bad parameter: automation must be an String") if params[:automation] and !params[:automation].is_a?(String)
|
|
757
759
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
758
760
|
|
|
759
|
-
response, options = Api.send_request("/automations/#{params[:id]}", :patch, params, options)
|
|
761
|
+
response, options = Api.send_request("/automations/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("Automation") }
|
|
760
762
|
Automation.new(response.data, options)
|
|
761
763
|
end
|
|
762
764
|
|
|
@@ -108,8 +108,8 @@ module Files
|
|
|
108
108
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
|
|
109
109
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
|
|
110
110
|
|
|
111
|
-
List.new(AutomationLog, params) do
|
|
112
|
-
Api.send_request("/automation_logs", :get,
|
|
111
|
+
List.new(AutomationLog, params) do |page_params, &check_page|
|
|
112
|
+
Api.send_request("/automation_logs", :get, page_params, options, &check_page)
|
|
113
113
|
end
|
|
114
114
|
end
|
|
115
115
|
|
|
@@ -167,8 +167,8 @@ module Files
|
|
|
167
167
|
raise InvalidParameterError.new("Bad parameter: automation_id must be an Integer") if params[:automation_id] and !params[:automation_id].is_a?(Integer)
|
|
168
168
|
raise MissingParameterError.new("Parameter missing: automation_id") unless params[:automation_id]
|
|
169
169
|
|
|
170
|
-
List.new(AutomationRun, params) do
|
|
171
|
-
Api.send_request("/automation_runs", :get,
|
|
170
|
+
List.new(AutomationRun, params) do |page_params, &check_page|
|
|
171
|
+
Api.send_request("/automation_runs", :get, page_params, options, &check_page)
|
|
172
172
|
end
|
|
173
173
|
end
|
|
174
174
|
|
|
@@ -184,7 +184,7 @@ module Files
|
|
|
184
184
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
185
185
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
186
186
|
|
|
187
|
-
response, options = Api.send_request("/automation_runs/#{params[:id]}", :get, params, options)
|
|
187
|
+
response, options = Api.send_request("/automation_runs/#{params[:id]}", :get, params, options) { |reply| reply.require_object("AutomationRun") }
|
|
188
188
|
AutomationRun.new(response.data, options)
|
|
189
189
|
end
|
|
190
190
|
|
|
@@ -203,7 +203,7 @@ module Files
|
|
|
203
203
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
204
204
|
raise MissingParameterError.new("Parameter missing: node_id") unless params[:node_id]
|
|
205
205
|
|
|
206
|
-
response, options = Api.send_request("/automation_runs/#{params[:id]}/node", :get, params, options)
|
|
206
|
+
response, options = Api.send_request("/automation_runs/#{params[:id]}/node", :get, params, options) { |reply| reply.require_object("AutomationExecutionNode") }
|
|
207
207
|
AutomationExecutionNode.new(response.data, options)
|
|
208
208
|
end
|
|
209
209
|
|
|
@@ -214,7 +214,7 @@ module Files
|
|
|
214
214
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
215
215
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
216
216
|
|
|
217
|
-
response, options = Api.send_request("/automation_runs/#{params[:id]}/cancel", :post, params, options)
|
|
217
|
+
response, options = Api.send_request("/automation_runs/#{params[:id]}/cancel", :post, params, options) { |reply| reply.require_object("AutomationRun") }
|
|
218
218
|
AutomationRun.new(response.data, options)
|
|
219
219
|
end
|
|
220
220
|
|
|
@@ -230,7 +230,7 @@ module Files
|
|
|
230
230
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
231
231
|
raise MissingParameterError.new("Parameter missing: node_id") unless params[:node_id]
|
|
232
232
|
|
|
233
|
-
response, options = Api.send_request("/automation_runs/#{params[:id]}/rerun", :post, params, options)
|
|
233
|
+
response, options = Api.send_request("/automation_runs/#{params[:id]}/rerun", :post, params, options) { |reply| reply.require_object("AutomationRun") }
|
|
234
234
|
AutomationRun.new(response.data, options)
|
|
235
235
|
end
|
|
236
236
|
end
|
|
@@ -73,8 +73,8 @@ module Files
|
|
|
73
73
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
|
|
74
74
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
|
|
75
75
|
|
|
76
|
-
List.new(BandwidthSnapshot, params) do
|
|
77
|
-
Api.send_request("/bandwidth_snapshots", :get,
|
|
76
|
+
List.new(BandwidthSnapshot, params) do |page_params, &check_page|
|
|
77
|
+
Api.send_request("/bandwidth_snapshots", :get, page_params, options, &check_page)
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
|
|
@@ -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
|
|
|
@@ -201,8 +203,8 @@ module Files
|
|
|
201
203
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
202
204
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
203
205
|
|
|
204
|
-
List.new(Behavior, params) do
|
|
205
|
-
Api.send_request("/behaviors", :get,
|
|
206
|
+
List.new(Behavior, params) do |page_params, &check_page|
|
|
207
|
+
Api.send_request("/behaviors", :get, page_params, options, &check_page)
|
|
206
208
|
end
|
|
207
209
|
end
|
|
208
210
|
|
|
@@ -218,7 +220,7 @@ module Files
|
|
|
218
220
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
219
221
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
220
222
|
|
|
221
|
-
response, options = Api.send_request("/behaviors/#{params[:id]}", :get, params, options)
|
|
223
|
+
response, options = Api.send_request("/behaviors/#{params[:id]}", :get, params, options) { |reply| reply.require_object("Behavior") }
|
|
222
224
|
Behavior.new(response.data, options)
|
|
223
225
|
end
|
|
224
226
|
|
|
@@ -243,8 +245,8 @@ module Files
|
|
|
243
245
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
244
246
|
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
245
247
|
|
|
246
|
-
List.new(Behavior, params) do
|
|
247
|
-
Api.send_request("/behaviors/folders/#{
|
|
248
|
+
List.new(Behavior, params) do |page_params, &check_page|
|
|
249
|
+
Api.send_request("/behaviors/folders/#{page_params[:path]}", :get, page_params, options, &check_page)
|
|
248
250
|
end
|
|
249
251
|
end
|
|
250
252
|
|
|
@@ -266,7 +268,7 @@ module Files
|
|
|
266
268
|
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
267
269
|
raise MissingParameterError.new("Parameter missing: behavior") unless params[:behavior]
|
|
268
270
|
|
|
269
|
-
response, options = Api.send_request("/behaviors", :post, params, options)
|
|
271
|
+
response, options = Api.send_request("/behaviors", :post, params, options) { |reply| reply.require_object("Behavior") }
|
|
270
272
|
Behavior.new(response.data, options)
|
|
271
273
|
end
|
|
272
274
|
|
|
@@ -308,7 +310,7 @@ module Files
|
|
|
308
310
|
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
311
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
310
312
|
|
|
311
|
-
response, options = Api.send_request("/behaviors/#{params[:id]}", :patch, params, options)
|
|
313
|
+
response, options = Api.send_request("/behaviors/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("Behavior") }
|
|
312
314
|
Behavior.new(response.data, options)
|
|
313
315
|
end
|
|
314
316
|
|
|
@@ -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
|
|
|
@@ -630,8 +632,8 @@ module Files
|
|
|
630
632
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
|
|
631
633
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
|
|
632
634
|
|
|
633
|
-
List.new(Bundle, params) do
|
|
634
|
-
Api.send_request("/bundles", :get,
|
|
635
|
+
List.new(Bundle, params) do |page_params, &check_page|
|
|
636
|
+
Api.send_request("/bundles", :get, page_params, options, &check_page)
|
|
635
637
|
end
|
|
636
638
|
end
|
|
637
639
|
|
|
@@ -648,7 +650,7 @@ module Files
|
|
|
648
650
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
649
651
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
650
652
|
|
|
651
|
-
response, options = Api.send_request("/bundles/#{params[:id]}", :get, params, options)
|
|
653
|
+
response, options = Api.send_request("/bundles/#{params[:id]}", :get, params, options) { |reply| reply.require_object("Bundle") }
|
|
652
654
|
Bundle.new(response.data, options)
|
|
653
655
|
end
|
|
654
656
|
|
|
@@ -712,7 +714,7 @@ module Files
|
|
|
712
714
|
raise InvalidParameterError.new("Bad parameter: watermark_value must be an Hash") if params[:watermark_value] and !params[:watermark_value].is_a?(Hash)
|
|
713
715
|
raise MissingParameterError.new("Parameter missing: paths") unless params[:paths]
|
|
714
716
|
|
|
715
|
-
response, options = Api.send_request("/bundles", :post, params, options)
|
|
717
|
+
response, options = Api.send_request("/bundles", :post, params, options) { |reply| reply.require_object("Bundle") }
|
|
716
718
|
Bundle.new(response.data, options)
|
|
717
719
|
end
|
|
718
720
|
|
|
@@ -793,7 +795,7 @@ module Files
|
|
|
793
795
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
794
796
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
795
797
|
|
|
796
|
-
response, options = Api.send_request("/bundles/#{params[:id]}", :patch, params, options)
|
|
798
|
+
response, options = Api.send_request("/bundles/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("Bundle") }
|
|
797
799
|
Bundle.new(response.data, options)
|
|
798
800
|
end
|
|
799
801
|
|
|
@@ -99,8 +99,8 @@ module Files
|
|
|
99
99
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)
|
|
100
100
|
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
101
|
|
|
102
|
-
List.new(BundleAction, params) do
|
|
103
|
-
Api.send_request("/bundle_actions", :get,
|
|
102
|
+
List.new(BundleAction, params) do |page_params, &check_page|
|
|
103
|
+
Api.send_request("/bundle_actions", :get, page_params, options, &check_page)
|
|
104
104
|
end
|
|
105
105
|
end
|
|
106
106
|
|
|
@@ -57,8 +57,8 @@ module Files
|
|
|
57
57
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)
|
|
58
58
|
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
59
|
|
|
60
|
-
List.new(BundleDownload, params) do
|
|
61
|
-
Api.send_request("/bundle_downloads", :get,
|
|
60
|
+
List.new(BundleDownload, params) do |page_params, &check_page|
|
|
61
|
+
Api.send_request("/bundle_downloads", :get, page_params, options, &check_page)
|
|
62
62
|
end
|
|
63
63
|
end
|
|
64
64
|
|
|
@@ -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
|
|
|
@@ -135,8 +137,8 @@ module Files
|
|
|
135
137
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
136
138
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)
|
|
137
139
|
|
|
138
|
-
List.new(BundleNotification, params) do
|
|
139
|
-
Api.send_request("/bundle_notifications", :get,
|
|
140
|
+
List.new(BundleNotification, params) do |page_params, &check_page|
|
|
141
|
+
Api.send_request("/bundle_notifications", :get, page_params, options, &check_page)
|
|
140
142
|
end
|
|
141
143
|
end
|
|
142
144
|
|
|
@@ -152,7 +154,7 @@ module Files
|
|
|
152
154
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
153
155
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
154
156
|
|
|
155
|
-
response, options = Api.send_request("/bundle_notifications/#{params[:id]}", :get, params, options)
|
|
157
|
+
response, options = Api.send_request("/bundle_notifications/#{params[:id]}", :get, params, options) { |reply| reply.require_object("BundleNotification") }
|
|
156
158
|
BundleNotification.new(response.data, options)
|
|
157
159
|
end
|
|
158
160
|
|
|
@@ -172,7 +174,7 @@ module Files
|
|
|
172
174
|
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
175
|
raise MissingParameterError.new("Parameter missing: bundle_id") unless params[:bundle_id]
|
|
174
176
|
|
|
175
|
-
response, options = Api.send_request("/bundle_notifications", :post, params, options)
|
|
177
|
+
response, options = Api.send_request("/bundle_notifications", :post, params, options) { |reply| reply.require_object("BundleNotification") }
|
|
176
178
|
BundleNotification.new(response.data, options)
|
|
177
179
|
end
|
|
178
180
|
|
|
@@ -185,7 +187,7 @@ module Files
|
|
|
185
187
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
186
188
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
187
189
|
|
|
188
|
-
response, options = Api.send_request("/bundle_notifications/#{params[:id]}", :patch, params, options)
|
|
190
|
+
response, options = Api.send_request("/bundle_notifications/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("BundleNotification") }
|
|
189
191
|
BundleNotification.new(response.data, options)
|
|
190
192
|
end
|
|
191
193
|
|
|
@@ -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
|
|
|
@@ -117,8 +117,8 @@ module Files
|
|
|
117
117
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)
|
|
118
118
|
raise MissingParameterError.new("Parameter missing: bundle_id") unless params[:bundle_id]
|
|
119
119
|
|
|
120
|
-
List.new(BundleRecipient, params) do
|
|
121
|
-
Api.send_request("/bundle_recipients", :get,
|
|
120
|
+
List.new(BundleRecipient, params) do |page_params, &check_page|
|
|
121
|
+
Api.send_request("/bundle_recipients", :get, page_params, options, &check_page)
|
|
122
122
|
end
|
|
123
123
|
end
|
|
124
124
|
|
|
@@ -144,7 +144,7 @@ module Files
|
|
|
144
144
|
raise MissingParameterError.new("Parameter missing: bundle_id") unless params[:bundle_id]
|
|
145
145
|
raise MissingParameterError.new("Parameter missing: recipient") unless params[:recipient]
|
|
146
146
|
|
|
147
|
-
response, options = Api.send_request("/bundle_recipients", :post, params, options)
|
|
147
|
+
response, options = Api.send_request("/bundle_recipients", :post, params, options) { |reply| reply.require_object("BundleRecipient") }
|
|
148
148
|
BundleRecipient.new(response.data, options)
|
|
149
149
|
end
|
|
150
150
|
end
|
|
@@ -92,8 +92,8 @@ module Files
|
|
|
92
92
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
93
93
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)
|
|
94
94
|
|
|
95
|
-
List.new(BundleRegistration, params) do
|
|
96
|
-
Api.send_request("/bundle_registrations", :get,
|
|
95
|
+
List.new(BundleRegistration, params) do |page_params, &check_page|
|
|
96
|
+
Api.send_request("/bundle_registrations", :get, page_params, options, &check_page)
|
|
97
97
|
end
|
|
98
98
|
end
|
|
99
99
|
|
|
@@ -60,8 +60,8 @@ module Files
|
|
|
60
60
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
61
61
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
62
62
|
|
|
63
|
-
List.new(ChatSession, params) do
|
|
64
|
-
Api.send_request("/chat_sessions", :get,
|
|
63
|
+
List.new(ChatSession, params) do |page_params, &check_page|
|
|
64
|
+
Api.send_request("/chat_sessions", :get, page_params, options, &check_page)
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
67
|
|
|
@@ -77,7 +77,7 @@ module Files
|
|
|
77
77
|
raise InvalidParameterError.new("Bad parameter: id must be an String") if params[:id] and !params[:id].is_a?(String)
|
|
78
78
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
79
79
|
|
|
80
|
-
response, options = Api.send_request("/chat_sessions/#{params[:id]}", :get, params, options)
|
|
80
|
+
response, options = Api.send_request("/chat_sessions/#{params[:id]}", :get, params, options) { |reply| reply.require_object("ChatSession") }
|
|
81
81
|
ChatSession.new(response.data, options)
|
|
82
82
|
end
|
|
83
83
|
|
|
@@ -120,7 +120,9 @@ module Files
|
|
|
120
120
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
|
|
121
121
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
122
122
|
|
|
123
|
-
Api.send_request("/child_site_management_policies/#{@attributes[:id]}", :patch, params, @options)
|
|
123
|
+
response, options = Api.send_request("/child_site_management_policies/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("ChildSiteManagementPolicy") }
|
|
124
|
+
@attributes = response.data
|
|
125
|
+
[ response, options ]
|
|
124
126
|
end
|
|
125
127
|
|
|
126
128
|
def delete(params = {})
|
|
@@ -140,12 +142,12 @@ module Files
|
|
|
140
142
|
|
|
141
143
|
def save
|
|
142
144
|
if @attributes[:id]
|
|
143
|
-
|
|
145
|
+
update(@attributes)
|
|
144
146
|
else
|
|
145
147
|
new_obj = ChildSiteManagementPolicy.create(@attributes, @options)
|
|
148
|
+
@attributes = new_obj.attributes
|
|
146
149
|
end
|
|
147
150
|
|
|
148
|
-
@attributes = new_obj.attributes
|
|
149
151
|
true
|
|
150
152
|
end
|
|
151
153
|
|
|
@@ -156,8 +158,8 @@ module Files
|
|
|
156
158
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
157
159
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
158
160
|
|
|
159
|
-
List.new(ChildSiteManagementPolicy, params) do
|
|
160
|
-
Api.send_request("/child_site_management_policies", :get,
|
|
161
|
+
List.new(ChildSiteManagementPolicy, params) do |page_params, &check_page|
|
|
162
|
+
Api.send_request("/child_site_management_policies", :get, page_params, options, &check_page)
|
|
161
163
|
end
|
|
162
164
|
end
|
|
163
165
|
|
|
@@ -173,7 +175,7 @@ module Files
|
|
|
173
175
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
174
176
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
175
177
|
|
|
176
|
-
response, options = Api.send_request("/child_site_management_policies/#{params[:id]}", :get, params, options)
|
|
178
|
+
response, options = Api.send_request("/child_site_management_policies/#{params[:id]}", :get, params, options) { |reply| reply.require_object("ChildSiteManagementPolicy") }
|
|
177
179
|
ChildSiteManagementPolicy.new(response.data, options)
|
|
178
180
|
end
|
|
179
181
|
|
|
@@ -198,7 +200,7 @@ module Files
|
|
|
198
200
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
|
|
199
201
|
raise MissingParameterError.new("Parameter missing: policy_type") unless params[:policy_type]
|
|
200
202
|
|
|
201
|
-
response, options = Api.send_request("/child_site_management_policies", :post, params, options)
|
|
203
|
+
response, options = Api.send_request("/child_site_management_policies", :post, params, options) { |reply| reply.require_object("ChildSiteManagementPolicy") }
|
|
202
204
|
ChildSiteManagementPolicy.new(response.data, options)
|
|
203
205
|
end
|
|
204
206
|
|
|
@@ -222,7 +224,7 @@ module Files
|
|
|
222
224
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
|
|
223
225
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
224
226
|
|
|
225
|
-
response, options = Api.send_request("/child_site_management_policies/#{params[:id]}", :patch, params, options)
|
|
227
|
+
response, options = Api.send_request("/child_site_management_policies/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("ChildSiteManagementPolicy") }
|
|
226
228
|
ChildSiteManagementPolicy.new(response.data, options)
|
|
227
229
|
end
|
|
228
230
|
|
|
@@ -81,7 +81,9 @@ module Files
|
|
|
81
81
|
raise InvalidParameterError.new("Bad parameter: use_with_users must be an String") if params[:use_with_users] and !params[:use_with_users].is_a?(String)
|
|
82
82
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
83
83
|
|
|
84
|
-
Api.send_request("/clickwraps/#{@attributes[:id]}", :patch, params, @options)
|
|
84
|
+
response, options = Api.send_request("/clickwraps/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("Clickwrap") }
|
|
85
|
+
@attributes = response.data
|
|
86
|
+
[ response, options ]
|
|
85
87
|
end
|
|
86
88
|
|
|
87
89
|
def delete(params = {})
|
|
@@ -101,12 +103,12 @@ module Files
|
|
|
101
103
|
|
|
102
104
|
def save
|
|
103
105
|
if @attributes[:id]
|
|
104
|
-
|
|
106
|
+
update(@attributes)
|
|
105
107
|
else
|
|
106
108
|
new_obj = Clickwrap.create(@attributes, @options)
|
|
109
|
+
@attributes = new_obj.attributes
|
|
107
110
|
end
|
|
108
111
|
|
|
109
|
-
@attributes = new_obj.attributes
|
|
110
112
|
true
|
|
111
113
|
end
|
|
112
114
|
|
|
@@ -119,8 +121,8 @@ module Files
|
|
|
119
121
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
120
122
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
121
123
|
|
|
122
|
-
List.new(Clickwrap, params) do
|
|
123
|
-
Api.send_request("/clickwraps", :get,
|
|
124
|
+
List.new(Clickwrap, params) do |page_params, &check_page|
|
|
125
|
+
Api.send_request("/clickwraps", :get, page_params, options, &check_page)
|
|
124
126
|
end
|
|
125
127
|
end
|
|
126
128
|
|
|
@@ -136,7 +138,7 @@ module Files
|
|
|
136
138
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
137
139
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
138
140
|
|
|
139
|
-
response, options = Api.send_request("/clickwraps/#{params[:id]}", :get, params, options)
|
|
141
|
+
response, options = Api.send_request("/clickwraps/#{params[:id]}", :get, params, options) { |reply| reply.require_object("Clickwrap") }
|
|
140
142
|
Clickwrap.new(response.data, options)
|
|
141
143
|
end
|
|
142
144
|
|
|
@@ -157,7 +159,7 @@ module Files
|
|
|
157
159
|
raise InvalidParameterError.new("Bad parameter: use_with_inboxes must be an String") if params[:use_with_inboxes] and !params[:use_with_inboxes].is_a?(String)
|
|
158
160
|
raise InvalidParameterError.new("Bad parameter: use_with_users must be an String") if params[:use_with_users] and !params[:use_with_users].is_a?(String)
|
|
159
161
|
|
|
160
|
-
response, options = Api.send_request("/clickwraps", :post, params, options)
|
|
162
|
+
response, options = Api.send_request("/clickwraps", :post, params, options) { |reply| reply.require_object("Clickwrap") }
|
|
161
163
|
Clickwrap.new(response.data, options)
|
|
162
164
|
end
|
|
163
165
|
|
|
@@ -178,7 +180,7 @@ module Files
|
|
|
178
180
|
raise InvalidParameterError.new("Bad parameter: use_with_users must be an String") if params[:use_with_users] and !params[:use_with_users].is_a?(String)
|
|
179
181
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
180
182
|
|
|
181
|
-
response, options = Api.send_request("/clickwraps/#{params[:id]}", :patch, params, options)
|
|
183
|
+
response, options = Api.send_request("/clickwraps/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("Clickwrap") }
|
|
182
184
|
Clickwrap.new(response.data, options)
|
|
183
185
|
end
|
|
184
186
|
|
|
@@ -137,7 +137,9 @@ module Files
|
|
|
137
137
|
raise InvalidParameterError.new("Bad parameter: domain must be an String") if params[:domain] and !params[:domain].is_a?(String)
|
|
138
138
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
139
139
|
|
|
140
|
-
Api.send_request("/custom_domains/#{@attributes[:id]}", :patch, params, @options)
|
|
140
|
+
response, options = Api.send_request("/custom_domains/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("CustomDomain") }
|
|
141
|
+
@attributes = response.data
|
|
142
|
+
[ response, options ]
|
|
141
143
|
end
|
|
142
144
|
|
|
143
145
|
def delete(params = {})
|
|
@@ -157,12 +159,12 @@ module Files
|
|
|
157
159
|
|
|
158
160
|
def save
|
|
159
161
|
if @attributes[:id]
|
|
160
|
-
|
|
162
|
+
update(@attributes)
|
|
161
163
|
else
|
|
162
164
|
new_obj = CustomDomain.create(@attributes, @options)
|
|
165
|
+
@attributes = new_obj.attributes
|
|
163
166
|
end
|
|
164
167
|
|
|
165
|
-
@attributes = new_obj.attributes
|
|
166
168
|
true
|
|
167
169
|
end
|
|
168
170
|
|
|
@@ -177,8 +179,8 @@ module Files
|
|
|
177
179
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
178
180
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
179
181
|
|
|
180
|
-
List.new(CustomDomain, params) do
|
|
181
|
-
Api.send_request("/custom_domains", :get,
|
|
182
|
+
List.new(CustomDomain, params) do |page_params, &check_page|
|
|
183
|
+
Api.send_request("/custom_domains", :get, page_params, options, &check_page)
|
|
182
184
|
end
|
|
183
185
|
end
|
|
184
186
|
|
|
@@ -194,7 +196,7 @@ module Files
|
|
|
194
196
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
195
197
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
196
198
|
|
|
197
|
-
response, options = Api.send_request("/custom_domains/#{params[:id]}", :get, params, options)
|
|
199
|
+
response, options = Api.send_request("/custom_domains/#{params[:id]}", :get, params, options) { |reply| reply.require_object("CustomDomain") }
|
|
198
200
|
CustomDomain.new(response.data, options)
|
|
199
201
|
end
|
|
200
202
|
|
|
@@ -213,7 +215,7 @@ module Files
|
|
|
213
215
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
214
216
|
raise MissingParameterError.new("Parameter missing: count") unless params[:count]
|
|
215
217
|
|
|
216
|
-
response, options = Api.send_request("/custom_domains/#{params[:id]}/allocate_ips", :post, params, options)
|
|
218
|
+
response, options = Api.send_request("/custom_domains/#{params[:id]}/allocate_ips", :post, params, options) { |reply| reply.require_object("CustomDomain") }
|
|
217
219
|
CustomDomain.new(response.data, options)
|
|
218
220
|
end
|
|
219
221
|
|
|
@@ -232,7 +234,7 @@ module Files
|
|
|
232
234
|
raise InvalidParameterError.new("Bad parameter: domain must be an String") if params[:domain] and !params[:domain].is_a?(String)
|
|
233
235
|
raise MissingParameterError.new("Parameter missing: domain") unless params[:domain]
|
|
234
236
|
|
|
235
|
-
response, options = Api.send_request("/custom_domains", :post, params, options)
|
|
237
|
+
response, options = Api.send_request("/custom_domains", :post, params, options) { |reply| reply.require_object("CustomDomain") }
|
|
236
238
|
CustomDomain.new(response.data, options)
|
|
237
239
|
end
|
|
238
240
|
|
|
@@ -254,7 +256,7 @@ module Files
|
|
|
254
256
|
raise InvalidParameterError.new("Bad parameter: domain must be an String") if params[:domain] and !params[:domain].is_a?(String)
|
|
255
257
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
256
258
|
|
|
257
|
-
response, options = Api.send_request("/custom_domains/#{params[:id]}", :patch, params, options)
|
|
259
|
+
response, options = Api.send_request("/custom_domains/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("CustomDomain") }
|
|
258
260
|
CustomDomain.new(response.data, options)
|
|
259
261
|
end
|
|
260
262
|
|