files.com 1.1.786 → 1.1.787
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/README.md +2 -2
- data/_VERSION +1 -1
- data/lib/files.com/api.rb +20 -5
- data/lib/files.com/api_client.rb +196 -17
- data/lib/files.com/list.rb +4 -2
- data/lib/files.com/models/action_log.rb +4 -1
- data/lib/files.com/models/action_notification_export.rb +3 -1
- data/lib/files.com/models/action_notification_export_result.rb +4 -1
- data/lib/files.com/models/ai_assistant_personality.rb +20 -7
- data/lib/files.com/models/ai_task.rb +22 -10
- data/lib/files.com/models/api_key.rb +15 -7
- data/lib/files.com/models/api_request_log.rb +4 -1
- data/lib/files.com/models/app.rb +4 -1
- data/lib/files.com/models/as2_incoming_message.rb +4 -1
- data/lib/files.com/models/as2_outgoing_message.rb +4 -1
- data/lib/files.com/models/as2_partner.rb +18 -7
- data/lib/files.com/models/as2_station.rb +14 -7
- data/lib/files.com/models/automation.rb +47 -13
- data/lib/files.com/models/automation_log.rb +4 -1
- data/lib/files.com/models/automation_run.rb +16 -9
- data/lib/files.com/models/bandwidth_snapshot.rb +4 -1
- data/lib/files.com/models/behavior.rb +27 -9
- data/lib/files.com/models/bundle.rb +57 -10
- data/lib/files.com/models/bundle_action.rb +4 -1
- data/lib/files.com/models/bundle_download.rb +4 -1
- data/lib/files.com/models/bundle_notification.rb +20 -7
- data/lib/files.com/models/bundle_recipient.rb +6 -1
- data/lib/files.com/models/bundle_registration.rb +4 -1
- data/lib/files.com/models/chat_session.rb +5 -2
- data/lib/files.com/models/child_site_management_policy.rb +18 -7
- data/lib/files.com/models/clickwrap.rb +14 -7
- data/lib/files.com/models/custom_domain.rb +18 -8
- data/lib/files.com/models/desktop_configuration_profile.rb +21 -7
- data/lib/files.com/models/dns_record.rb +4 -1
- data/lib/files.com/models/email_incoming_message.rb +4 -1
- data/lib/files.com/models/email_log.rb +4 -1
- data/lib/files.com/models/event_channel.rb +20 -7
- data/lib/files.com/models/event_delivery_attempt.rb +5 -2
- data/lib/files.com/models/event_record.rb +5 -2
- data/lib/files.com/models/event_subscription.rb +25 -7
- data/lib/files.com/models/event_target.rb +22 -7
- data/lib/files.com/models/exavault_api_request_log.rb +4 -1
- data/lib/files.com/models/expectation.rb +23 -10
- data/lib/files.com/models/expectation_evaluation.rb +5 -2
- data/lib/files.com/models/expectation_incident.rb +20 -11
- data/lib/files.com/models/external_event.rb +6 -2
- data/lib/files.com/models/file.rb +110 -37
- data/lib/files.com/models/file_comment.rb +14 -7
- data/lib/files.com/models/file_comment_reaction.rb +6 -3
- data/lib/files.com/models/file_migration.rb +1 -1
- data/lib/files.com/models/file_migration_log.rb +4 -1
- data/lib/files.com/models/folder.rb +11 -3
- data/lib/files.com/models/form_field_set.rb +26 -7
- data/lib/files.com/models/ftp_action_log.rb +4 -1
- data/lib/files.com/models/gpg_key.rb +15 -7
- data/lib/files.com/models/group.rb +30 -7
- data/lib/files.com/models/group_user.rb +16 -6
- data/lib/files.com/models/history.rb +23 -8
- data/lib/files.com/models/history_export.rb +2 -1
- data/lib/files.com/models/history_export_result.rb +4 -1
- data/lib/files.com/models/holiday_calendar.rb +15 -7
- data/lib/files.com/models/holiday_region.rb +4 -1
- data/lib/files.com/models/inbound_s3_log.rb +4 -1
- data/lib/files.com/models/inbox_recipient.rb +6 -1
- data/lib/files.com/models/inbox_registration.rb +4 -1
- data/lib/files.com/models/inbox_upload.rb +4 -1
- data/lib/files.com/models/integration_centric_profile.rb +17 -7
- data/lib/files.com/models/invoice.rb +5 -2
- data/lib/files.com/models/ip_address.rb +16 -4
- data/lib/files.com/models/key_lifecycle_rule.rb +17 -7
- data/lib/files.com/models/lock.rb +16 -6
- data/lib/files.com/models/metadata_category.rb +19 -9
- data/lib/files.com/models/notification.rb +39 -7
- data/lib/files.com/models/outbound_connection_log.rb +4 -1
- data/lib/files.com/models/partner.rb +32 -7
- data/lib/files.com/models/partner_channel.rb +17 -7
- data/lib/files.com/models/partner_channel_template.rb +17 -7
- data/lib/files.com/models/partner_site.rb +5 -3
- data/lib/files.com/models/partner_site_request.rb +10 -4
- data/lib/files.com/models/payment.rb +5 -2
- data/lib/files.com/models/pending_work_event.rb +5 -2
- data/lib/files.com/models/permission.rb +12 -4
- data/lib/files.com/models/public_hosting_request_log.rb +4 -1
- data/lib/files.com/models/public_key.rb +15 -7
- data/lib/files.com/models/remote_bandwidth_snapshot.rb +4 -1
- data/lib/files.com/models/remote_mount_backend.rb +25 -10
- data/lib/files.com/models/remote_server.rb +46 -14
- data/lib/files.com/models/remote_server_credential.rb +14 -7
- data/lib/files.com/models/request.rb +17 -6
- data/lib/files.com/models/restore.rb +8 -1
- data/lib/files.com/models/schedule.rb +14 -7
- data/lib/files.com/models/scheduled_export.rb +18 -7
- data/lib/files.com/models/scim_log.rb +5 -2
- data/lib/files.com/models/secret.rb +15 -7
- data/lib/files.com/models/session.rb +1 -0
- data/lib/files.com/models/settings_change.rb +4 -1
- data/lib/files.com/models/sftp_action_log.rb +4 -1
- data/lib/files.com/models/sftp_host_key.rb +17 -7
- data/lib/files.com/models/share_group.rb +14 -7
- data/lib/files.com/models/siem_http_destination.rb +67 -7
- data/lib/files.com/models/siem_http_destination_event.rb +5 -2
- data/lib/files.com/models/site.rb +109 -0
- data/lib/files.com/models/site_subdomain_redirect.rb +10 -5
- data/lib/files.com/models/snapshot.rb +19 -10
- data/lib/files.com/models/sso_event.rb +5 -2
- data/lib/files.com/models/sso_strategy.rb +10 -5
- data/lib/files.com/models/style.rb +9 -6
- data/lib/files.com/models/sync.rb +36 -13
- data/lib/files.com/models/sync_log.rb +4 -1
- data/lib/files.com/models/sync_run.rb +5 -2
- data/lib/files.com/models/usage_daily_snapshot.rb +4 -1
- data/lib/files.com/models/usage_snapshot.rb +4 -1
- data/lib/files.com/models/user.rb +124 -16
- data/lib/files.com/models/user_additional_email_recipient.rb +14 -7
- data/lib/files.com/models/user_cipher_use.rb +4 -1
- data/lib/files.com/models/user_lifecycle_rule.rb +26 -7
- data/lib/files.com/models/user_request.rb +11 -5
- data/lib/files.com/models/user_security_event.rb +5 -2
- data/lib/files.com/models/user_sftp_client_use.rb +4 -1
- data/lib/files.com/models/web_dav_action_log.rb +4 -1
- data/lib/files.com/models/webhook_test.rb +3 -0
- data/lib/files.com/models/workspace.rb +14 -7
- data/lib/files.com/util.rb +32 -1
- data/lib/files.com.rb +54 -1
- data/spec/lib/api_client_spec.rb +483 -0
- data/spec/list_spec.rb +31 -2
- data/spec/models/persistence_spec.rb +1 -1
- data/spec/models/user_spec.rb +20 -0
- metadata +2 -1
|
@@ -511,7 +511,7 @@ module Files
|
|
|
511
511
|
#
|
|
512
512
|
# Returns the [response, options] pair from Files::Api.send_request.
|
|
513
513
|
def share(params = {})
|
|
514
|
-
params
|
|
514
|
+
params = (params || {}).dup
|
|
515
515
|
params[:id] = @attributes[:id]
|
|
516
516
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
517
517
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
@@ -520,7 +520,9 @@ module Files
|
|
|
520
520
|
raise InvalidParameterError.new("Bad parameter: recipients must be an Array") if !params[:recipients].nil? and !params[:recipients].is_a?(Array)
|
|
521
521
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
522
522
|
|
|
523
|
-
Api.send_request("/bundles/#{@attributes[:id]}/share", :post, params, @options)
|
|
523
|
+
response, options = Api.send_request("/bundles/#{@attributes[:id]}/share", :post, params, @options)
|
|
524
|
+
@options = @options.merge(options)
|
|
525
|
+
[ response, options ]
|
|
524
526
|
end
|
|
525
527
|
|
|
526
528
|
# Parameters:
|
|
@@ -557,17 +559,21 @@ module Files
|
|
|
557
559
|
# watermark_value - object - Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
|
|
558
560
|
# workspace_id - int64 - Workspace ID. `0` means the default workspace.
|
|
559
561
|
def update(params = {})
|
|
560
|
-
params
|
|
562
|
+
params = (params || {}).dup
|
|
561
563
|
params[:id] = @attributes[:id]
|
|
562
564
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
563
565
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
564
566
|
raise InvalidParameterError.new("Bad parameter: paths must be an Array") if !params[:paths].nil? and !params[:paths].is_a?(Array)
|
|
565
567
|
raise InvalidParameterError.new("Bad parameter: password must be an String") if !params[:password].nil? and !params[:password].is_a?(String)
|
|
568
|
+
raise InvalidParameterError.new("Bad parameter: bypasses_site_expiration_rules must be a single value, not #{params[:bypasses_site_expiration_rules].class}") if [ Array, Hash ].any? { |klass| params[:bypasses_site_expiration_rules].is_a?(klass) }
|
|
566
569
|
raise InvalidParameterError.new("Bad parameter: form_field_set_id must be an Integer") if !params[:form_field_set_id].nil? and !params[:form_field_set_id].is_a?(Integer)
|
|
567
570
|
raise InvalidParameterError.new("Bad parameter: clickwrap_id must be an Integer") if !params[:clickwrap_id].nil? and !params[:clickwrap_id].is_a?(Integer)
|
|
568
571
|
raise InvalidParameterError.new("Bad parameter: code must be an String") if !params[:code].nil? and !params[:code].is_a?(String)
|
|
572
|
+
raise InvalidParameterError.new("Bad parameter: create_snapshot must be a single value, not #{params[:create_snapshot].class}") if [ Array, Hash ].any? { |klass| params[:create_snapshot].is_a?(klass) }
|
|
569
573
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if !params[:description].nil? and !params[:description].is_a?(String)
|
|
574
|
+
raise InvalidParameterError.new("Bad parameter: dont_separate_submissions_by_folder must be a single value, not #{params[:dont_separate_submissions_by_folder].class}") if [ Array, Hash ].any? { |klass| params[:dont_separate_submissions_by_folder].is_a?(klass) }
|
|
570
575
|
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if !params[:expires_at].nil? and !params[:expires_at].is_a?(String)
|
|
576
|
+
raise InvalidParameterError.new("Bad parameter: finalize_snapshot must be a single value, not #{params[:finalize_snapshot].class}") if [ Array, Hash ].any? { |klass| params[:finalize_snapshot].is_a?(klass) }
|
|
571
577
|
raise InvalidParameterError.new("Bad parameter: inbox_id must be an Integer") if !params[:inbox_id].nil? and !params[:inbox_id].is_a?(Integer)
|
|
572
578
|
raise InvalidParameterError.new("Bad parameter: max_uses must be an Integer") if !params[:max_uses].nil? and !params[:max_uses].is_a?(Integer)
|
|
573
579
|
raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if !params[:group_id].nil? and !params[:group_id].is_a?(Integer)
|
|
@@ -576,25 +582,37 @@ module Files
|
|
|
576
582
|
raise InvalidParameterError.new("Bad parameter: path_template must be an String") if !params[:path_template].nil? and !params[:path_template].is_a?(String)
|
|
577
583
|
raise InvalidParameterError.new("Bad parameter: path_template_time_zone must be an String") if !params[:path_template_time_zone].nil? and !params[:path_template_time_zone].is_a?(String)
|
|
578
584
|
raise InvalidParameterError.new("Bad parameter: permissions must be an String") if !params[:permissions].nil? and !params[:permissions].is_a?(String)
|
|
585
|
+
raise InvalidParameterError.new("Bad parameter: require_registration must be a single value, not #{params[:require_registration].class}") if [ Array, Hash ].any? { |klass| params[:require_registration].is_a?(klass) }
|
|
586
|
+
raise InvalidParameterError.new("Bad parameter: require_share_recipient must be a single value, not #{params[:require_share_recipient].class}") if [ Array, Hash ].any? { |klass| params[:require_share_recipient].is_a?(klass) }
|
|
587
|
+
raise InvalidParameterError.new("Bad parameter: send_one_time_password_to_recipient_at_registration must be a single value, not #{params[:send_one_time_password_to_recipient_at_registration].class}") if [ Array, Hash ].any? { |klass| params[:send_one_time_password_to_recipient_at_registration].is_a?(klass) }
|
|
588
|
+
raise InvalidParameterError.new("Bad parameter: send_email_receipt_to_uploader must be a single value, not #{params[:send_email_receipt_to_uploader].class}") if [ Array, Hash ].any? { |klass| params[:send_email_receipt_to_uploader].is_a?(klass) }
|
|
589
|
+
raise InvalidParameterError.new("Bad parameter: skip_company must be a single value, not #{params[:skip_company].class}") if [ Array, Hash ].any? { |klass| params[:skip_company].is_a?(klass) }
|
|
579
590
|
raise InvalidParameterError.new("Bad parameter: start_access_on_date must be an String") if !params[:start_access_on_date].nil? and !params[:start_access_on_date].is_a?(String)
|
|
591
|
+
raise InvalidParameterError.new("Bad parameter: skip_email must be a single value, not #{params[:skip_email].class}") if [ Array, Hash ].any? { |klass| params[:skip_email].is_a?(klass) }
|
|
592
|
+
raise InvalidParameterError.new("Bad parameter: skip_name must be a single value, not #{params[:skip_name].class}") if [ Array, Hash ].any? { |klass| params[:skip_name].is_a?(klass) }
|
|
580
593
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if !params[:user_id].nil? and !params[:user_id].is_a?(Integer)
|
|
594
|
+
raise InvalidParameterError.new("Bad parameter: watermark_attachment_delete must be a single value, not #{params[:watermark_attachment_delete].class}") if [ Array, Hash ].any? { |klass| params[:watermark_attachment_delete].is_a?(klass) }
|
|
595
|
+
raise InvalidParameterError.new("Bad parameter: watermark_value must be an Hash") if !params[:watermark_value].nil? and !params[:watermark_value].is_a?(Hash)
|
|
581
596
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if !params[:workspace_id].nil? and !params[:workspace_id].is_a?(Integer)
|
|
582
597
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
583
598
|
|
|
584
599
|
response, options = Api.send_request("/bundles/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("Bundle") }
|
|
585
600
|
@attributes = response.data
|
|
601
|
+
@options = @options.merge(options)
|
|
586
602
|
[ response, options ]
|
|
587
603
|
end
|
|
588
604
|
|
|
589
605
|
# Returns the [response, options] pair from Files::Api.send_request.
|
|
590
606
|
def delete(params = {})
|
|
591
|
-
params
|
|
607
|
+
params = (params || {}).dup
|
|
592
608
|
params[:id] = @attributes[:id]
|
|
593
609
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
594
610
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
595
611
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
596
612
|
|
|
597
|
-
Api.send_request("/bundles/#{@attributes[:id]}", :delete, params, @options)
|
|
613
|
+
response, options = Api.send_request("/bundles/#{@attributes[:id]}", :delete, params, @options)
|
|
614
|
+
@options = @options.merge(options)
|
|
615
|
+
[ response, options ]
|
|
598
616
|
end
|
|
599
617
|
|
|
600
618
|
# Alias for #delete. Returns nil.
|
|
@@ -609,6 +627,7 @@ module Files
|
|
|
609
627
|
else
|
|
610
628
|
new_obj = Bundle.create(@attributes, @options)
|
|
611
629
|
@attributes = new_obj.attributes
|
|
630
|
+
@options = @options.merge(new_obj.options)
|
|
612
631
|
end
|
|
613
632
|
|
|
614
633
|
true
|
|
@@ -642,9 +661,13 @@ module Files
|
|
|
642
661
|
raise InvalidParameterError.new("Bad parameter: filter_prefix must be an Hash") if !params[:filter_prefix].nil? and !params[:filter_prefix].is_a?(Hash)
|
|
643
662
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if !params[:filter_lt].nil? and !params[:filter_lt].is_a?(Hash)
|
|
644
663
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if !params[:filter_lteq].nil? and !params[:filter_lteq].is_a?(Hash)
|
|
664
|
+
raise InvalidParameterError.new("Bad parameter: deleted must be a single value, not #{params[:deleted].class}") if [ Array, Hash ].any? { |klass| params[:deleted].is_a?(klass) }
|
|
645
665
|
|
|
666
|
+
list_options = options.dup
|
|
646
667
|
List.new(Bundle, params) do |page_params, &check_page|
|
|
647
|
-
Api.send_request("/bundles", :get, page_params,
|
|
668
|
+
response, page_options = Api.send_request("/bundles", :get, page_params, list_options, &check_page)
|
|
669
|
+
list_options = list_options.merge(page_options)
|
|
670
|
+
[ response, page_options ]
|
|
648
671
|
end
|
|
649
672
|
end
|
|
650
673
|
|
|
@@ -661,9 +684,10 @@ module Files
|
|
|
661
684
|
#
|
|
662
685
|
# Returns a Files::Bundle.
|
|
663
686
|
def self.find(id, params = {}, options = {})
|
|
664
|
-
params
|
|
687
|
+
params = (params || {}).dup
|
|
665
688
|
params[:id] = id
|
|
666
689
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
690
|
+
raise InvalidParameterError.new("Bad parameter: deleted must be a single value, not #{params[:deleted].class}") if [ Array, Hash ].any? { |klass| params[:deleted].is_a?(klass) }
|
|
667
691
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
668
692
|
|
|
669
693
|
response, options = Api.send_request("/bundles/#{params[:id]}", :get, params, options) { |reply| reply.require_object("Bundle") }
|
|
@@ -716,8 +740,12 @@ module Files
|
|
|
716
740
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if !params[:user_id].nil? and !params[:user_id].is_a?(Integer)
|
|
717
741
|
raise InvalidParameterError.new("Bad parameter: paths must be an Array") if !params[:paths].nil? and !params[:paths].is_a?(Array)
|
|
718
742
|
raise InvalidParameterError.new("Bad parameter: password must be an String") if !params[:password].nil? and !params[:password].is_a?(String)
|
|
743
|
+
raise InvalidParameterError.new("Bad parameter: bypasses_site_expiration_rules must be a single value, not #{params[:bypasses_site_expiration_rules].class}") if [ Array, Hash ].any? { |klass| params[:bypasses_site_expiration_rules].is_a?(klass) }
|
|
719
744
|
raise InvalidParameterError.new("Bad parameter: form_field_set_id must be an Integer") if !params[:form_field_set_id].nil? and !params[:form_field_set_id].is_a?(Integer)
|
|
745
|
+
raise InvalidParameterError.new("Bad parameter: create_snapshot must be a single value, not #{params[:create_snapshot].class}") if [ Array, Hash ].any? { |klass| params[:create_snapshot].is_a?(klass) }
|
|
746
|
+
raise InvalidParameterError.new("Bad parameter: dont_separate_submissions_by_folder must be a single value, not #{params[:dont_separate_submissions_by_folder].class}") if [ Array, Hash ].any? { |klass| params[:dont_separate_submissions_by_folder].is_a?(klass) }
|
|
720
747
|
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if !params[:expires_at].nil? and !params[:expires_at].is_a?(String)
|
|
748
|
+
raise InvalidParameterError.new("Bad parameter: finalize_snapshot must be a single value, not #{params[:finalize_snapshot].class}") if [ Array, Hash ].any? { |klass| params[:finalize_snapshot].is_a?(klass) }
|
|
721
749
|
raise InvalidParameterError.new("Bad parameter: max_uses must be an Integer") if !params[:max_uses].nil? and !params[:max_uses].is_a?(Integer)
|
|
722
750
|
raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if !params[:group_id].nil? and !params[:group_id].is_a?(Integer)
|
|
723
751
|
raise InvalidParameterError.new("Bad parameter: internal_name must be an String") if !params[:internal_name].nil? and !params[:internal_name].is_a?(String)
|
|
@@ -727,8 +755,15 @@ module Files
|
|
|
727
755
|
raise InvalidParameterError.new("Bad parameter: path_template must be an String") if !params[:path_template].nil? and !params[:path_template].is_a?(String)
|
|
728
756
|
raise InvalidParameterError.new("Bad parameter: path_template_time_zone must be an String") if !params[:path_template_time_zone].nil? and !params[:path_template_time_zone].is_a?(String)
|
|
729
757
|
raise InvalidParameterError.new("Bad parameter: permissions must be an String") if !params[:permissions].nil? and !params[:permissions].is_a?(String)
|
|
758
|
+
raise InvalidParameterError.new("Bad parameter: require_registration must be a single value, not #{params[:require_registration].class}") if [ Array, Hash ].any? { |klass| params[:require_registration].is_a?(klass) }
|
|
730
759
|
raise InvalidParameterError.new("Bad parameter: clickwrap_id must be an Integer") if !params[:clickwrap_id].nil? and !params[:clickwrap_id].is_a?(Integer)
|
|
731
760
|
raise InvalidParameterError.new("Bad parameter: inbox_id must be an Integer") if !params[:inbox_id].nil? and !params[:inbox_id].is_a?(Integer)
|
|
761
|
+
raise InvalidParameterError.new("Bad parameter: require_share_recipient must be a single value, not #{params[:require_share_recipient].class}") if [ Array, Hash ].any? { |klass| params[:require_share_recipient].is_a?(klass) }
|
|
762
|
+
raise InvalidParameterError.new("Bad parameter: send_one_time_password_to_recipient_at_registration must be a single value, not #{params[:send_one_time_password_to_recipient_at_registration].class}") if [ Array, Hash ].any? { |klass| params[:send_one_time_password_to_recipient_at_registration].is_a?(klass) }
|
|
763
|
+
raise InvalidParameterError.new("Bad parameter: send_email_receipt_to_uploader must be a single value, not #{params[:send_email_receipt_to_uploader].class}") if [ Array, Hash ].any? { |klass| params[:send_email_receipt_to_uploader].is_a?(klass) }
|
|
764
|
+
raise InvalidParameterError.new("Bad parameter: skip_email must be a single value, not #{params[:skip_email].class}") if [ Array, Hash ].any? { |klass| params[:skip_email].is_a?(klass) }
|
|
765
|
+
raise InvalidParameterError.new("Bad parameter: skip_name must be a single value, not #{params[:skip_name].class}") if [ Array, Hash ].any? { |klass| params[:skip_name].is_a?(klass) }
|
|
766
|
+
raise InvalidParameterError.new("Bad parameter: skip_company must be a single value, not #{params[:skip_company].class}") if [ Array, Hash ].any? { |klass| params[:skip_company].is_a?(klass) }
|
|
732
767
|
raise InvalidParameterError.new("Bad parameter: start_access_on_date must be an String") if !params[:start_access_on_date].nil? and !params[:start_access_on_date].is_a?(String)
|
|
733
768
|
raise InvalidParameterError.new("Bad parameter: snapshot_id must be an Integer") if !params[:snapshot_id].nil? and !params[:snapshot_id].is_a?(Integer)
|
|
734
769
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if !params[:workspace_id].nil? and !params[:workspace_id].is_a?(Integer)
|
|
@@ -751,7 +786,7 @@ module Files
|
|
|
751
786
|
#
|
|
752
787
|
# Returns nil.
|
|
753
788
|
def self.share(id, params = {}, options = {})
|
|
754
|
-
params
|
|
789
|
+
params = (params || {}).dup
|
|
755
790
|
params[:id] = id
|
|
756
791
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
757
792
|
raise InvalidParameterError.new("Bad parameter: to must be an Array") if !params[:to].nil? and !params[:to].is_a?(Array)
|
|
@@ -802,16 +837,20 @@ module Files
|
|
|
802
837
|
#
|
|
803
838
|
# Returns a Files::Bundle.
|
|
804
839
|
def self.update(id, params = {}, options = {})
|
|
805
|
-
params
|
|
840
|
+
params = (params || {}).dup
|
|
806
841
|
params[:id] = id
|
|
807
842
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
808
843
|
raise InvalidParameterError.new("Bad parameter: paths must be an Array") if !params[:paths].nil? and !params[:paths].is_a?(Array)
|
|
809
844
|
raise InvalidParameterError.new("Bad parameter: password must be an String") if !params[:password].nil? and !params[:password].is_a?(String)
|
|
845
|
+
raise InvalidParameterError.new("Bad parameter: bypasses_site_expiration_rules must be a single value, not #{params[:bypasses_site_expiration_rules].class}") if [ Array, Hash ].any? { |klass| params[:bypasses_site_expiration_rules].is_a?(klass) }
|
|
810
846
|
raise InvalidParameterError.new("Bad parameter: form_field_set_id must be an Integer") if !params[:form_field_set_id].nil? and !params[:form_field_set_id].is_a?(Integer)
|
|
811
847
|
raise InvalidParameterError.new("Bad parameter: clickwrap_id must be an Integer") if !params[:clickwrap_id].nil? and !params[:clickwrap_id].is_a?(Integer)
|
|
812
848
|
raise InvalidParameterError.new("Bad parameter: code must be an String") if !params[:code].nil? and !params[:code].is_a?(String)
|
|
849
|
+
raise InvalidParameterError.new("Bad parameter: create_snapshot must be a single value, not #{params[:create_snapshot].class}") if [ Array, Hash ].any? { |klass| params[:create_snapshot].is_a?(klass) }
|
|
813
850
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if !params[:description].nil? and !params[:description].is_a?(String)
|
|
851
|
+
raise InvalidParameterError.new("Bad parameter: dont_separate_submissions_by_folder must be a single value, not #{params[:dont_separate_submissions_by_folder].class}") if [ Array, Hash ].any? { |klass| params[:dont_separate_submissions_by_folder].is_a?(klass) }
|
|
814
852
|
raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if !params[:expires_at].nil? and !params[:expires_at].is_a?(String)
|
|
853
|
+
raise InvalidParameterError.new("Bad parameter: finalize_snapshot must be a single value, not #{params[:finalize_snapshot].class}") if [ Array, Hash ].any? { |klass| params[:finalize_snapshot].is_a?(klass) }
|
|
815
854
|
raise InvalidParameterError.new("Bad parameter: inbox_id must be an Integer") if !params[:inbox_id].nil? and !params[:inbox_id].is_a?(Integer)
|
|
816
855
|
raise InvalidParameterError.new("Bad parameter: max_uses must be an Integer") if !params[:max_uses].nil? and !params[:max_uses].is_a?(Integer)
|
|
817
856
|
raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if !params[:group_id].nil? and !params[:group_id].is_a?(Integer)
|
|
@@ -820,8 +859,16 @@ module Files
|
|
|
820
859
|
raise InvalidParameterError.new("Bad parameter: path_template must be an String") if !params[:path_template].nil? and !params[:path_template].is_a?(String)
|
|
821
860
|
raise InvalidParameterError.new("Bad parameter: path_template_time_zone must be an String") if !params[:path_template_time_zone].nil? and !params[:path_template_time_zone].is_a?(String)
|
|
822
861
|
raise InvalidParameterError.new("Bad parameter: permissions must be an String") if !params[:permissions].nil? and !params[:permissions].is_a?(String)
|
|
862
|
+
raise InvalidParameterError.new("Bad parameter: require_registration must be a single value, not #{params[:require_registration].class}") if [ Array, Hash ].any? { |klass| params[:require_registration].is_a?(klass) }
|
|
863
|
+
raise InvalidParameterError.new("Bad parameter: require_share_recipient must be a single value, not #{params[:require_share_recipient].class}") if [ Array, Hash ].any? { |klass| params[:require_share_recipient].is_a?(klass) }
|
|
864
|
+
raise InvalidParameterError.new("Bad parameter: send_one_time_password_to_recipient_at_registration must be a single value, not #{params[:send_one_time_password_to_recipient_at_registration].class}") if [ Array, Hash ].any? { |klass| params[:send_one_time_password_to_recipient_at_registration].is_a?(klass) }
|
|
865
|
+
raise InvalidParameterError.new("Bad parameter: send_email_receipt_to_uploader must be a single value, not #{params[:send_email_receipt_to_uploader].class}") if [ Array, Hash ].any? { |klass| params[:send_email_receipt_to_uploader].is_a?(klass) }
|
|
866
|
+
raise InvalidParameterError.new("Bad parameter: skip_company must be a single value, not #{params[:skip_company].class}") if [ Array, Hash ].any? { |klass| params[:skip_company].is_a?(klass) }
|
|
823
867
|
raise InvalidParameterError.new("Bad parameter: start_access_on_date must be an String") if !params[:start_access_on_date].nil? and !params[:start_access_on_date].is_a?(String)
|
|
868
|
+
raise InvalidParameterError.new("Bad parameter: skip_email must be a single value, not #{params[:skip_email].class}") if [ Array, Hash ].any? { |klass| params[:skip_email].is_a?(klass) }
|
|
869
|
+
raise InvalidParameterError.new("Bad parameter: skip_name must be a single value, not #{params[:skip_name].class}") if [ Array, Hash ].any? { |klass| params[:skip_name].is_a?(klass) }
|
|
824
870
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if !params[:user_id].nil? and !params[:user_id].is_a?(Integer)
|
|
871
|
+
raise InvalidParameterError.new("Bad parameter: watermark_attachment_delete must be a single value, not #{params[:watermark_attachment_delete].class}") if [ Array, Hash ].any? { |klass| params[:watermark_attachment_delete].is_a?(klass) }
|
|
825
872
|
raise InvalidParameterError.new("Bad parameter: watermark_value must be an Hash") if !params[:watermark_value].nil? and !params[:watermark_value].is_a?(Hash)
|
|
826
873
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if !params[:workspace_id].nil? and !params[:workspace_id].is_a?(Integer)
|
|
827
874
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
@@ -835,7 +882,7 @@ module Files
|
|
|
835
882
|
#
|
|
836
883
|
# Returns nil.
|
|
837
884
|
def self.delete(id, params = {}, options = {})
|
|
838
|
-
params
|
|
885
|
+
params = (params || {}).dup
|
|
839
886
|
params[:id] = id
|
|
840
887
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
841
888
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
@@ -106,8 +106,11 @@ module Files
|
|
|
106
106
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if !params[:bundle_id].nil? and !params[:bundle_id].is_a?(Integer)
|
|
107
107
|
raise InvalidParameterError.new("Bad parameter: bundle_registration_id must be an Integer") if !params[:bundle_registration_id].nil? and !params[:bundle_registration_id].is_a?(Integer)
|
|
108
108
|
|
|
109
|
+
list_options = options.dup
|
|
109
110
|
List.new(BundleAction, params) do |page_params, &check_page|
|
|
110
|
-
Api.send_request("/bundle_actions", :get, page_params,
|
|
111
|
+
response, page_options = Api.send_request("/bundle_actions", :get, page_params, list_options, &check_page)
|
|
112
|
+
list_options = list_options.merge(page_options)
|
|
113
|
+
[ response, page_options ]
|
|
111
114
|
end
|
|
112
115
|
end
|
|
113
116
|
|
|
@@ -64,8 +64,11 @@ module Files
|
|
|
64
64
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if !params[:bundle_id].nil? and !params[:bundle_id].is_a?(Integer)
|
|
65
65
|
raise InvalidParameterError.new("Bad parameter: bundle_registration_id must be an Integer") if !params[:bundle_registration_id].nil? and !params[:bundle_registration_id].is_a?(Integer)
|
|
66
66
|
|
|
67
|
+
list_options = options.dup
|
|
67
68
|
List.new(BundleDownload, params) do |page_params, &check_page|
|
|
68
|
-
Api.send_request("/bundle_downloads", :get, page_params,
|
|
69
|
+
response, page_options = Api.send_request("/bundle_downloads", :get, page_params, list_options, &check_page)
|
|
70
|
+
list_options = list_options.merge(page_options)
|
|
71
|
+
[ response, page_options ]
|
|
69
72
|
end
|
|
70
73
|
end
|
|
71
74
|
|
|
@@ -87,26 +87,31 @@ module Files
|
|
|
87
87
|
# notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
|
|
88
88
|
# notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
|
|
89
89
|
def update(params = {})
|
|
90
|
-
params
|
|
90
|
+
params = (params || {}).dup
|
|
91
91
|
params[:id] = @attributes[:id]
|
|
92
92
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
93
93
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
94
|
+
raise InvalidParameterError.new("Bad parameter: notify_on_registration must be a single value, not #{params[:notify_on_registration].class}") if [ Array, Hash ].any? { |klass| params[:notify_on_registration].is_a?(klass) }
|
|
95
|
+
raise InvalidParameterError.new("Bad parameter: notify_on_upload must be a single value, not #{params[:notify_on_upload].class}") if [ Array, Hash ].any? { |klass| params[:notify_on_upload].is_a?(klass) }
|
|
94
96
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
95
97
|
|
|
96
98
|
response, options = Api.send_request("/bundle_notifications/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("BundleNotification") }
|
|
97
99
|
@attributes = response.data
|
|
100
|
+
@options = @options.merge(options)
|
|
98
101
|
[ response, options ]
|
|
99
102
|
end
|
|
100
103
|
|
|
101
104
|
# Returns the [response, options] pair from Files::Api.send_request.
|
|
102
105
|
def delete(params = {})
|
|
103
|
-
params
|
|
106
|
+
params = (params || {}).dup
|
|
104
107
|
params[:id] = @attributes[:id]
|
|
105
108
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
106
109
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
107
110
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
108
111
|
|
|
109
|
-
Api.send_request("/bundle_notifications/#{@attributes[:id]}", :delete, params, @options)
|
|
112
|
+
response, options = Api.send_request("/bundle_notifications/#{@attributes[:id]}", :delete, params, @options)
|
|
113
|
+
@options = @options.merge(options)
|
|
114
|
+
[ response, options ]
|
|
110
115
|
end
|
|
111
116
|
|
|
112
117
|
# Alias for #delete. Returns nil.
|
|
@@ -121,6 +126,7 @@ module Files
|
|
|
121
126
|
else
|
|
122
127
|
new_obj = BundleNotification.create(@attributes, @options)
|
|
123
128
|
@attributes = new_obj.attributes
|
|
129
|
+
@options = @options.merge(new_obj.options)
|
|
124
130
|
end
|
|
125
131
|
|
|
126
132
|
true
|
|
@@ -146,8 +152,11 @@ module Files
|
|
|
146
152
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if !params[:filter].nil? and !params[:filter].is_a?(Hash)
|
|
147
153
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if !params[:bundle_id].nil? and !params[:bundle_id].is_a?(Integer)
|
|
148
154
|
|
|
155
|
+
list_options = options.dup
|
|
149
156
|
List.new(BundleNotification, params) do |page_params, &check_page|
|
|
150
|
-
Api.send_request("/bundle_notifications", :get, page_params,
|
|
157
|
+
response, page_options = Api.send_request("/bundle_notifications", :get, page_params, list_options, &check_page)
|
|
158
|
+
list_options = list_options.merge(page_options)
|
|
159
|
+
[ response, page_options ]
|
|
151
160
|
end
|
|
152
161
|
end
|
|
153
162
|
|
|
@@ -163,7 +172,7 @@ module Files
|
|
|
163
172
|
#
|
|
164
173
|
# Returns a Files::BundleNotification.
|
|
165
174
|
def self.find(id, params = {}, options = {})
|
|
166
|
-
params
|
|
175
|
+
params = (params || {}).dup
|
|
167
176
|
params[:id] = id
|
|
168
177
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
169
178
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
@@ -191,6 +200,8 @@ module Files
|
|
|
191
200
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if !params[:user_id].nil? and !params[:user_id].is_a?(Integer)
|
|
192
201
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if !params[:bundle_id].nil? and !params[:bundle_id].is_a?(Integer)
|
|
193
202
|
raise InvalidParameterError.new("Bad parameter: notify_user_id must be an Integer") if !params[:notify_user_id].nil? and !params[:notify_user_id].is_a?(Integer)
|
|
203
|
+
raise InvalidParameterError.new("Bad parameter: notify_on_registration must be a single value, not #{params[:notify_on_registration].class}") if [ Array, Hash ].any? { |klass| params[:notify_on_registration].is_a?(klass) }
|
|
204
|
+
raise InvalidParameterError.new("Bad parameter: notify_on_upload must be a single value, not #{params[:notify_on_upload].class}") if [ Array, Hash ].any? { |klass| params[:notify_on_upload].is_a?(klass) }
|
|
194
205
|
raise MissingParameterError.new("Parameter missing: bundle_id") if params[:bundle_id].nil?
|
|
195
206
|
|
|
196
207
|
response, options = Api.send_request("/bundle_notifications", :post, params, options) { |reply| reply.require_object("BundleNotification") }
|
|
@@ -206,9 +217,11 @@ module Files
|
|
|
206
217
|
#
|
|
207
218
|
# Returns a Files::BundleNotification.
|
|
208
219
|
def self.update(id, params = {}, options = {})
|
|
209
|
-
params
|
|
220
|
+
params = (params || {}).dup
|
|
210
221
|
params[:id] = id
|
|
211
222
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
223
|
+
raise InvalidParameterError.new("Bad parameter: notify_on_registration must be a single value, not #{params[:notify_on_registration].class}") if [ Array, Hash ].any? { |klass| params[:notify_on_registration].is_a?(klass) }
|
|
224
|
+
raise InvalidParameterError.new("Bad parameter: notify_on_upload must be a single value, not #{params[:notify_on_upload].class}") if [ Array, Hash ].any? { |klass| params[:notify_on_upload].is_a?(klass) }
|
|
212
225
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
213
226
|
|
|
214
227
|
response, options = Api.send_request("/bundle_notifications/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("BundleNotification") }
|
|
@@ -220,7 +233,7 @@ module Files
|
|
|
220
233
|
#
|
|
221
234
|
# Returns nil.
|
|
222
235
|
def self.delete(id, params = {}, options = {})
|
|
223
|
-
params
|
|
236
|
+
params = (params || {}).dup
|
|
224
237
|
params[:id] = id
|
|
225
238
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
226
239
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
@@ -98,6 +98,7 @@ module Files
|
|
|
98
98
|
else
|
|
99
99
|
new_obj = BundleRecipient.create(@attributes, @options)
|
|
100
100
|
@attributes = new_obj.attributes
|
|
101
|
+
@options = @options.merge(new_obj.options)
|
|
101
102
|
end
|
|
102
103
|
|
|
103
104
|
true
|
|
@@ -124,8 +125,11 @@ module Files
|
|
|
124
125
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if !params[:bundle_id].nil? and !params[:bundle_id].is_a?(Integer)
|
|
125
126
|
raise MissingParameterError.new("Parameter missing: bundle_id") if params[:bundle_id].nil?
|
|
126
127
|
|
|
128
|
+
list_options = options.dup
|
|
127
129
|
List.new(BundleRecipient, params) do |page_params, &check_page|
|
|
128
|
-
Api.send_request("/bundle_recipients", :get, page_params,
|
|
130
|
+
response, page_options = Api.send_request("/bundle_recipients", :get, page_params, list_options, &check_page)
|
|
131
|
+
list_options = list_options.merge(page_options)
|
|
132
|
+
[ response, page_options ]
|
|
129
133
|
end
|
|
130
134
|
end
|
|
131
135
|
|
|
@@ -153,6 +157,7 @@ module Files
|
|
|
153
157
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if !params[:name].nil? and !params[:name].is_a?(String)
|
|
154
158
|
raise InvalidParameterError.new("Bad parameter: company must be an String") if !params[:company].nil? and !params[:company].is_a?(String)
|
|
155
159
|
raise InvalidParameterError.new("Bad parameter: note must be an String") if !params[:note].nil? and !params[:note].is_a?(String)
|
|
160
|
+
raise InvalidParameterError.new("Bad parameter: share_after_create must be a single value, not #{params[:share_after_create].class}") if [ Array, Hash ].any? { |klass| params[:share_after_create].is_a?(klass) }
|
|
156
161
|
raise MissingParameterError.new("Parameter missing: bundle_id") if params[:bundle_id].nil?
|
|
157
162
|
raise MissingParameterError.new("Parameter missing: recipient") if params[:recipient].nil?
|
|
158
163
|
|
|
@@ -99,8 +99,11 @@ module Files
|
|
|
99
99
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if !params[:sort_by].nil? and !params[:sort_by].is_a?(Hash)
|
|
100
100
|
raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if !params[:bundle_id].nil? and !params[:bundle_id].is_a?(Integer)
|
|
101
101
|
|
|
102
|
+
list_options = options.dup
|
|
102
103
|
List.new(BundleRegistration, params) do |page_params, &check_page|
|
|
103
|
-
Api.send_request("/bundle_registrations", :get, page_params,
|
|
104
|
+
response, page_options = Api.send_request("/bundle_registrations", :get, page_params, list_options, &check_page)
|
|
105
|
+
list_options = list_options.merge(page_options)
|
|
106
|
+
[ response, page_options ]
|
|
104
107
|
end
|
|
105
108
|
end
|
|
106
109
|
|
|
@@ -67,8 +67,11 @@ module Files
|
|
|
67
67
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if !params[:sort_by].nil? and !params[:sort_by].is_a?(Hash)
|
|
68
68
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if !params[:filter].nil? and !params[:filter].is_a?(Hash)
|
|
69
69
|
|
|
70
|
+
list_options = options.dup
|
|
70
71
|
List.new(ChatSession, params) do |page_params, &check_page|
|
|
71
|
-
Api.send_request("/chat_sessions", :get, page_params,
|
|
72
|
+
response, page_options = Api.send_request("/chat_sessions", :get, page_params, list_options, &check_page)
|
|
73
|
+
list_options = list_options.merge(page_options)
|
|
74
|
+
[ response, page_options ]
|
|
72
75
|
end
|
|
73
76
|
end
|
|
74
77
|
|
|
@@ -84,7 +87,7 @@ module Files
|
|
|
84
87
|
#
|
|
85
88
|
# Returns a Files::ChatSession.
|
|
86
89
|
def self.find(id, params = {}, options = {})
|
|
87
|
-
params
|
|
90
|
+
params = (params || {}).dup
|
|
88
91
|
params[:id] = id
|
|
89
92
|
raise InvalidParameterError.new("Bad parameter: id must be an String") if !params[:id].nil? and !params[:id].is_a?(String)
|
|
90
93
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
@@ -111,12 +111,14 @@ module Files
|
|
|
111
111
|
# name - string - Name for this policy.
|
|
112
112
|
# description - string - Description for this policy.
|
|
113
113
|
def update(params = {})
|
|
114
|
-
params
|
|
114
|
+
params = (params || {}).dup
|
|
115
115
|
params[:id] = @attributes[:id]
|
|
116
116
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
117
117
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
118
|
+
raise InvalidParameterError.new("Bad parameter: value must be an Hash") if !params[:value].nil? and !params[:value].is_a?(Hash)
|
|
118
119
|
raise InvalidParameterError.new("Bad parameter: skip_child_site_ids must be an Array") if !params[:skip_child_site_ids].nil? and !params[:skip_child_site_ids].is_a?(Array)
|
|
119
120
|
raise InvalidParameterError.new("Bad parameter: child_site_ids must be an Array") if !params[:child_site_ids].nil? and !params[:child_site_ids].is_a?(Array)
|
|
121
|
+
raise InvalidParameterError.new("Bad parameter: default_policy must be a single value, not #{params[:default_policy].class}") if [ Array, Hash ].any? { |klass| params[:default_policy].is_a?(klass) }
|
|
120
122
|
raise InvalidParameterError.new("Bad parameter: policy_type must be an String") if !params[:policy_type].nil? and !params[:policy_type].is_a?(String)
|
|
121
123
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if !params[:name].nil? and !params[:name].is_a?(String)
|
|
122
124
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if !params[:description].nil? and !params[:description].is_a?(String)
|
|
@@ -124,18 +126,21 @@ module Files
|
|
|
124
126
|
|
|
125
127
|
response, options = Api.send_request("/child_site_management_policies/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("ChildSiteManagementPolicy") }
|
|
126
128
|
@attributes = response.data
|
|
129
|
+
@options = @options.merge(options)
|
|
127
130
|
[ response, options ]
|
|
128
131
|
end
|
|
129
132
|
|
|
130
133
|
# Returns the [response, options] pair from Files::Api.send_request.
|
|
131
134
|
def delete(params = {})
|
|
132
|
-
params
|
|
135
|
+
params = (params || {}).dup
|
|
133
136
|
params[:id] = @attributes[:id]
|
|
134
137
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
135
138
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
136
139
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
137
140
|
|
|
138
|
-
Api.send_request("/child_site_management_policies/#{@attributes[:id]}", :delete, params, @options)
|
|
141
|
+
response, options = Api.send_request("/child_site_management_policies/#{@attributes[:id]}", :delete, params, @options)
|
|
142
|
+
@options = @options.merge(options)
|
|
143
|
+
[ response, options ]
|
|
139
144
|
end
|
|
140
145
|
|
|
141
146
|
# Alias for #delete. Returns nil.
|
|
@@ -150,6 +155,7 @@ module Files
|
|
|
150
155
|
else
|
|
151
156
|
new_obj = ChildSiteManagementPolicy.create(@attributes, @options)
|
|
152
157
|
@attributes = new_obj.attributes
|
|
158
|
+
@options = @options.merge(new_obj.options)
|
|
153
159
|
end
|
|
154
160
|
|
|
155
161
|
true
|
|
@@ -167,8 +173,11 @@ module Files
|
|
|
167
173
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if !params[:cursor].nil? and !params[:cursor].is_a?(String)
|
|
168
174
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if !params[:per_page].nil? and !params[:per_page].is_a?(Integer)
|
|
169
175
|
|
|
176
|
+
list_options = options.dup
|
|
170
177
|
List.new(ChildSiteManagementPolicy, params) do |page_params, &check_page|
|
|
171
|
-
Api.send_request("/child_site_management_policies", :get, page_params,
|
|
178
|
+
response, page_options = Api.send_request("/child_site_management_policies", :get, page_params, list_options, &check_page)
|
|
179
|
+
list_options = list_options.merge(page_options)
|
|
180
|
+
[ response, page_options ]
|
|
172
181
|
end
|
|
173
182
|
end
|
|
174
183
|
|
|
@@ -184,7 +193,7 @@ module Files
|
|
|
184
193
|
#
|
|
185
194
|
# Returns a Files::ChildSiteManagementPolicy.
|
|
186
195
|
def self.find(id, params = {}, options = {})
|
|
187
|
-
params
|
|
196
|
+
params = (params || {}).dup
|
|
188
197
|
params[:id] = id
|
|
189
198
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
190
199
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
@@ -214,6 +223,7 @@ module Files
|
|
|
214
223
|
raise InvalidParameterError.new("Bad parameter: value must be an Hash") if !params[:value].nil? and !params[:value].is_a?(Hash)
|
|
215
224
|
raise InvalidParameterError.new("Bad parameter: skip_child_site_ids must be an Array") if !params[:skip_child_site_ids].nil? and !params[:skip_child_site_ids].is_a?(Array)
|
|
216
225
|
raise InvalidParameterError.new("Bad parameter: child_site_ids must be an Array") if !params[:child_site_ids].nil? and !params[:child_site_ids].is_a?(Array)
|
|
226
|
+
raise InvalidParameterError.new("Bad parameter: default_policy must be a single value, not #{params[:default_policy].class}") if [ Array, Hash ].any? { |klass| params[:default_policy].is_a?(klass) }
|
|
217
227
|
raise InvalidParameterError.new("Bad parameter: policy_type must be an String") if !params[:policy_type].nil? and !params[:policy_type].is_a?(String)
|
|
218
228
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if !params[:name].nil? and !params[:name].is_a?(String)
|
|
219
229
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if !params[:description].nil? and !params[:description].is_a?(String)
|
|
@@ -237,12 +247,13 @@ module Files
|
|
|
237
247
|
#
|
|
238
248
|
# Returns a Files::ChildSiteManagementPolicy.
|
|
239
249
|
def self.update(id, params = {}, options = {})
|
|
240
|
-
params
|
|
250
|
+
params = (params || {}).dup
|
|
241
251
|
params[:id] = id
|
|
242
252
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
243
253
|
raise InvalidParameterError.new("Bad parameter: value must be an Hash") if !params[:value].nil? and !params[:value].is_a?(Hash)
|
|
244
254
|
raise InvalidParameterError.new("Bad parameter: skip_child_site_ids must be an Array") if !params[:skip_child_site_ids].nil? and !params[:skip_child_site_ids].is_a?(Array)
|
|
245
255
|
raise InvalidParameterError.new("Bad parameter: child_site_ids must be an Array") if !params[:child_site_ids].nil? and !params[:child_site_ids].is_a?(Array)
|
|
256
|
+
raise InvalidParameterError.new("Bad parameter: default_policy must be a single value, not #{params[:default_policy].class}") if [ Array, Hash ].any? { |klass| params[:default_policy].is_a?(klass) }
|
|
246
257
|
raise InvalidParameterError.new("Bad parameter: policy_type must be an String") if !params[:policy_type].nil? and !params[:policy_type].is_a?(String)
|
|
247
258
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if !params[:name].nil? and !params[:name].is_a?(String)
|
|
248
259
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if !params[:description].nil? and !params[:description].is_a?(String)
|
|
@@ -257,7 +268,7 @@ module Files
|
|
|
257
268
|
#
|
|
258
269
|
# Returns nil.
|
|
259
270
|
def self.delete(id, params = {}, options = {})
|
|
260
|
-
params
|
|
271
|
+
params = (params || {}).dup
|
|
261
272
|
params[:id] = id
|
|
262
273
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
263
274
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
@@ -72,7 +72,7 @@ module Files
|
|
|
72
72
|
# use_with_inboxes - string - Use this Clickwrap for Inboxes?
|
|
73
73
|
# use_with_users - string - Use this Clickwrap for Users? Values: `none`, `require` (new user signup via email invitation only), `require_all_users_once` (show to all users at their next web login; once accepted, not shown again), `require_all_users_always` (show to all users on every web login).
|
|
74
74
|
def update(params = {})
|
|
75
|
-
params
|
|
75
|
+
params = (params || {}).dup
|
|
76
76
|
params[:id] = @attributes[:id]
|
|
77
77
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
78
78
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
@@ -85,18 +85,21 @@ module Files
|
|
|
85
85
|
|
|
86
86
|
response, options = Api.send_request("/clickwraps/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("Clickwrap") }
|
|
87
87
|
@attributes = response.data
|
|
88
|
+
@options = @options.merge(options)
|
|
88
89
|
[ response, options ]
|
|
89
90
|
end
|
|
90
91
|
|
|
91
92
|
# Returns the [response, options] pair from Files::Api.send_request.
|
|
92
93
|
def delete(params = {})
|
|
93
|
-
params
|
|
94
|
+
params = (params || {}).dup
|
|
94
95
|
params[:id] = @attributes[:id]
|
|
95
96
|
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
96
97
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
97
98
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
98
99
|
|
|
99
|
-
Api.send_request("/clickwraps/#{@attributes[:id]}", :delete, params, @options)
|
|
100
|
+
response, options = Api.send_request("/clickwraps/#{@attributes[:id]}", :delete, params, @options)
|
|
101
|
+
@options = @options.merge(options)
|
|
102
|
+
[ response, options ]
|
|
100
103
|
end
|
|
101
104
|
|
|
102
105
|
# Alias for #delete. Returns nil.
|
|
@@ -111,6 +114,7 @@ module Files
|
|
|
111
114
|
else
|
|
112
115
|
new_obj = Clickwrap.create(@attributes, @options)
|
|
113
116
|
@attributes = new_obj.attributes
|
|
117
|
+
@options = @options.merge(new_obj.options)
|
|
114
118
|
end
|
|
115
119
|
|
|
116
120
|
true
|
|
@@ -130,8 +134,11 @@ module Files
|
|
|
130
134
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if !params[:per_page].nil? and !params[:per_page].is_a?(Integer)
|
|
131
135
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if !params[:sort_by].nil? and !params[:sort_by].is_a?(Hash)
|
|
132
136
|
|
|
137
|
+
list_options = options.dup
|
|
133
138
|
List.new(Clickwrap, params) do |page_params, &check_page|
|
|
134
|
-
Api.send_request("/clickwraps", :get, page_params,
|
|
139
|
+
response, page_options = Api.send_request("/clickwraps", :get, page_params, list_options, &check_page)
|
|
140
|
+
list_options = list_options.merge(page_options)
|
|
141
|
+
[ response, page_options ]
|
|
135
142
|
end
|
|
136
143
|
end
|
|
137
144
|
|
|
@@ -147,7 +154,7 @@ module Files
|
|
|
147
154
|
#
|
|
148
155
|
# Returns a Files::Clickwrap.
|
|
149
156
|
def self.find(id, params = {}, options = {})
|
|
150
|
-
params
|
|
157
|
+
params = (params || {}).dup
|
|
151
158
|
params[:id] = id
|
|
152
159
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
153
160
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|
|
@@ -194,7 +201,7 @@ module Files
|
|
|
194
201
|
#
|
|
195
202
|
# Returns a Files::Clickwrap.
|
|
196
203
|
def self.update(id, params = {}, options = {})
|
|
197
|
-
params
|
|
204
|
+
params = (params || {}).dup
|
|
198
205
|
params[:id] = id
|
|
199
206
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
200
207
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if !params[:name].nil? and !params[:name].is_a?(String)
|
|
@@ -213,7 +220,7 @@ module Files
|
|
|
213
220
|
#
|
|
214
221
|
# Returns nil.
|
|
215
222
|
def self.delete(id, params = {}, options = {})
|
|
216
|
-
params
|
|
223
|
+
params = (params || {}).dup
|
|
217
224
|
params[:id] = id
|
|
218
225
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if !params[:id].nil? and !params[:id].is_a?(Integer)
|
|
219
226
|
raise MissingParameterError.new("Parameter missing: id") if params[:id].nil?
|