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
|
@@ -57,7 +57,9 @@ module Files
|
|
|
57
57
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
|
58
58
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
59
59
|
|
|
60
|
-
Api.send_request("/holiday_calendars/#{@attributes[:id]}", :patch, params, @options)
|
|
60
|
+
response, options = Api.send_request("/holiday_calendars/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("HolidayCalendar") }
|
|
61
|
+
@attributes = response.data
|
|
62
|
+
[ response, options ]
|
|
61
63
|
end
|
|
62
64
|
|
|
63
65
|
def delete(params = {})
|
|
@@ -77,12 +79,12 @@ module Files
|
|
|
77
79
|
|
|
78
80
|
def save
|
|
79
81
|
if @attributes[:id]
|
|
80
|
-
|
|
82
|
+
update(@attributes)
|
|
81
83
|
else
|
|
82
84
|
new_obj = HolidayCalendar.create(@attributes, @options)
|
|
85
|
+
@attributes = new_obj.attributes
|
|
83
86
|
end
|
|
84
87
|
|
|
85
|
-
@attributes = new_obj.attributes
|
|
86
88
|
true
|
|
87
89
|
end
|
|
88
90
|
|
|
@@ -95,8 +97,8 @@ module Files
|
|
|
95
97
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
96
98
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
97
99
|
|
|
98
|
-
List.new(HolidayCalendar, params) do
|
|
99
|
-
Api.send_request("/holiday_calendars", :get,
|
|
100
|
+
List.new(HolidayCalendar, params) do |page_params, &check_page|
|
|
101
|
+
Api.send_request("/holiday_calendars", :get, page_params, options, &check_page)
|
|
100
102
|
end
|
|
101
103
|
end
|
|
102
104
|
|
|
@@ -112,7 +114,7 @@ module Files
|
|
|
112
114
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
113
115
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
114
116
|
|
|
115
|
-
response, options = Api.send_request("/holiday_calendars/#{params[:id]}", :get, params, options)
|
|
117
|
+
response, options = Api.send_request("/holiday_calendars/#{params[:id]}", :get, params, options) { |reply| reply.require_object("HolidayCalendar") }
|
|
116
118
|
HolidayCalendar.new(response.data, options)
|
|
117
119
|
end
|
|
118
120
|
|
|
@@ -129,7 +131,7 @@ module Files
|
|
|
129
131
|
raise MissingParameterError.new("Parameter missing: definition") unless params[:definition]
|
|
130
132
|
raise MissingParameterError.new("Parameter missing: name") unless params[:name]
|
|
131
133
|
|
|
132
|
-
response, options = Api.send_request("/holiday_calendars", :post, params, options)
|
|
134
|
+
response, options = Api.send_request("/holiday_calendars", :post, params, options) { |reply| reply.require_object("HolidayCalendar") }
|
|
133
135
|
HolidayCalendar.new(response.data, options)
|
|
134
136
|
end
|
|
135
137
|
|
|
@@ -144,7 +146,7 @@ module Files
|
|
|
144
146
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
|
145
147
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
146
148
|
|
|
147
|
-
response, options = Api.send_request("/holiday_calendars/#{params[:id]}", :patch, params, options)
|
|
149
|
+
response, options = Api.send_request("/holiday_calendars/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("HolidayCalendar") }
|
|
148
150
|
HolidayCalendar.new(response.data, options)
|
|
149
151
|
end
|
|
150
152
|
|
|
@@ -26,8 +26,8 @@ module Files
|
|
|
26
26
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
27
27
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
28
28
|
|
|
29
|
-
List.new(HolidayRegion, params) do
|
|
30
|
-
Api.send_request("/holiday_regions/supported", :get,
|
|
29
|
+
List.new(HolidayRegion, params) do |page_params, &check_page|
|
|
30
|
+
Api.send_request("/holiday_regions/supported", :get, page_params, options, &check_page)
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
end
|
|
@@ -83,8 +83,8 @@ module Files
|
|
|
83
83
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
|
|
84
84
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
|
|
85
85
|
|
|
86
|
-
List.new(InboundS3Log, params) do
|
|
87
|
-
Api.send_request("/inbound_s3_logs", :get,
|
|
86
|
+
List.new(InboundS3Log, params) do |page_params, &check_page|
|
|
87
|
+
Api.send_request("/inbound_s3_logs", :get, page_params, options, &check_page)
|
|
88
88
|
end
|
|
89
89
|
end
|
|
90
90
|
|
|
@@ -77,9 +77,9 @@ module Files
|
|
|
77
77
|
raise NotImplementedError.new("The InboxRecipient object doesn't support updates.")
|
|
78
78
|
else
|
|
79
79
|
new_obj = InboxRecipient.create(@attributes, @options)
|
|
80
|
+
@attributes = new_obj.attributes
|
|
80
81
|
end
|
|
81
82
|
|
|
82
|
-
@attributes = new_obj.attributes
|
|
83
83
|
true
|
|
84
84
|
end
|
|
85
85
|
|
|
@@ -97,8 +97,8 @@ module Files
|
|
|
97
97
|
raise InvalidParameterError.new("Bad parameter: inbox_id must be an Integer") if params[:inbox_id] and !params[:inbox_id].is_a?(Integer)
|
|
98
98
|
raise MissingParameterError.new("Parameter missing: inbox_id") unless params[:inbox_id]
|
|
99
99
|
|
|
100
|
-
List.new(InboxRecipient, params) do
|
|
101
|
-
Api.send_request("/inbox_recipients", :get,
|
|
100
|
+
List.new(InboxRecipient, params) do |page_params, &check_page|
|
|
101
|
+
Api.send_request("/inbox_recipients", :get, page_params, options, &check_page)
|
|
102
102
|
end
|
|
103
103
|
end
|
|
104
104
|
|
|
@@ -122,7 +122,7 @@ module Files
|
|
|
122
122
|
raise MissingParameterError.new("Parameter missing: inbox_id") unless params[:inbox_id]
|
|
123
123
|
raise MissingParameterError.new("Parameter missing: recipient") unless params[:recipient]
|
|
124
124
|
|
|
125
|
-
response, options = Api.send_request("/inbox_recipients", :post, params, options)
|
|
125
|
+
response, options = Api.send_request("/inbox_recipients", :post, params, options) { |reply| reply.require_object("InboxRecipient") }
|
|
126
126
|
InboxRecipient.new(response.data, options)
|
|
127
127
|
end
|
|
128
128
|
end
|
|
@@ -78,8 +78,8 @@ module Files
|
|
|
78
78
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
79
79
|
raise InvalidParameterError.new("Bad parameter: folder_behavior_id must be an Integer") if params[:folder_behavior_id] and !params[:folder_behavior_id].is_a?(Integer)
|
|
80
80
|
|
|
81
|
-
List.new(InboxRegistration, params) do
|
|
82
|
-
Api.send_request("/inbox_registrations", :get,
|
|
81
|
+
List.new(InboxRegistration, params) do |page_params, &check_page|
|
|
82
|
+
Api.send_request("/inbox_registrations", :get, page_params, options, &check_page)
|
|
83
83
|
end
|
|
84
84
|
end
|
|
85
85
|
|
|
@@ -43,8 +43,8 @@ module Files
|
|
|
43
43
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
|
|
44
44
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
|
|
45
45
|
|
|
46
|
-
List.new(InboxUpload, params) do
|
|
47
|
-
Api.send_request("/inbox_uploads", :get,
|
|
46
|
+
List.new(InboxUpload, params) do |page_params, &check_page|
|
|
47
|
+
Api.send_request("/inbox_uploads", :get, page_params, options, &check_page)
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
|
|
@@ -69,7 +69,9 @@ module Files
|
|
|
69
69
|
raise InvalidParameterError.new("Bad parameter: expected_remote_servers must be an Array") if params[:expected_remote_servers] and !params[:expected_remote_servers].is_a?(Array)
|
|
70
70
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
71
71
|
|
|
72
|
-
Api.send_request("/integration_centric_profiles/#{@attributes[:id]}", :patch, params, @options)
|
|
72
|
+
response, options = Api.send_request("/integration_centric_profiles/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("IntegrationCentricProfile") }
|
|
73
|
+
@attributes = response.data
|
|
74
|
+
[ response, options ]
|
|
73
75
|
end
|
|
74
76
|
|
|
75
77
|
def delete(params = {})
|
|
@@ -89,12 +91,12 @@ module Files
|
|
|
89
91
|
|
|
90
92
|
def save
|
|
91
93
|
if @attributes[:id]
|
|
92
|
-
|
|
94
|
+
update(@attributes)
|
|
93
95
|
else
|
|
94
96
|
new_obj = IntegrationCentricProfile.create(@attributes, @options)
|
|
97
|
+
@attributes = new_obj.attributes
|
|
95
98
|
end
|
|
96
99
|
|
|
97
|
-
@attributes = new_obj.attributes
|
|
98
100
|
true
|
|
99
101
|
end
|
|
100
102
|
|
|
@@ -109,8 +111,8 @@ module Files
|
|
|
109
111
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
110
112
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
111
113
|
|
|
112
|
-
List.new(IntegrationCentricProfile, params) do
|
|
113
|
-
Api.send_request("/integration_centric_profiles", :get,
|
|
114
|
+
List.new(IntegrationCentricProfile, params) do |page_params, &check_page|
|
|
115
|
+
Api.send_request("/integration_centric_profiles", :get, page_params, options, &check_page)
|
|
114
116
|
end
|
|
115
117
|
end
|
|
116
118
|
|
|
@@ -126,7 +128,7 @@ module Files
|
|
|
126
128
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
127
129
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
128
130
|
|
|
129
|
-
response, options = Api.send_request("/integration_centric_profiles/#{params[:id]}", :get, params, options)
|
|
131
|
+
response, options = Api.send_request("/integration_centric_profiles/#{params[:id]}", :get, params, options) { |reply| reply.require_object("IntegrationCentricProfile") }
|
|
130
132
|
IntegrationCentricProfile.new(response.data, options)
|
|
131
133
|
end
|
|
132
134
|
|
|
@@ -146,7 +148,7 @@ module Files
|
|
|
146
148
|
raise MissingParameterError.new("Parameter missing: name") unless params[:name]
|
|
147
149
|
raise MissingParameterError.new("Parameter missing: expected_remote_servers") unless params[:expected_remote_servers]
|
|
148
150
|
|
|
149
|
-
response, options = Api.send_request("/integration_centric_profiles", :post, params, options)
|
|
151
|
+
response, options = Api.send_request("/integration_centric_profiles", :post, params, options) { |reply| reply.require_object("IntegrationCentricProfile") }
|
|
150
152
|
IntegrationCentricProfile.new(response.data, options)
|
|
151
153
|
end
|
|
152
154
|
|
|
@@ -164,7 +166,7 @@ module Files
|
|
|
164
166
|
raise InvalidParameterError.new("Bad parameter: expected_remote_servers must be an Array") if params[:expected_remote_servers] and !params[:expected_remote_servers].is_a?(Array)
|
|
165
167
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
166
168
|
|
|
167
|
-
response, options = Api.send_request("/integration_centric_profiles/#{params[:id]}", :patch, params, options)
|
|
169
|
+
response, options = Api.send_request("/integration_centric_profiles/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("IntegrationCentricProfile") }
|
|
168
170
|
IntegrationCentricProfile.new(response.data, options)
|
|
169
171
|
end
|
|
170
172
|
|
|
@@ -89,8 +89,8 @@ module Files
|
|
|
89
89
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
90
90
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
91
91
|
|
|
92
|
-
List.new(AccountLineItem, params) do
|
|
93
|
-
Api.send_request("/invoices", :get,
|
|
92
|
+
List.new(AccountLineItem, params) do |page_params, &check_page|
|
|
93
|
+
Api.send_request("/invoices", :get, page_params, options, &check_page)
|
|
94
94
|
end
|
|
95
95
|
end
|
|
96
96
|
|
|
@@ -106,7 +106,7 @@ module Files
|
|
|
106
106
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
107
107
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
108
108
|
|
|
109
|
-
response, options = Api.send_request("/invoices/#{params[:id]}", :get, params, options)
|
|
109
|
+
response, options = Api.send_request("/invoices/#{params[:id]}", :get, params, options) { |reply| reply.require_object("AccountLineItem") }
|
|
110
110
|
AccountLineItem.new(response.data, options)
|
|
111
111
|
end
|
|
112
112
|
|
|
@@ -36,8 +36,8 @@ module Files
|
|
|
36
36
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
37
37
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
38
38
|
|
|
39
|
-
List.new(IpAddress, params) do
|
|
40
|
-
Api.send_request("/ip_addresses", :get,
|
|
39
|
+
List.new(IpAddress, params) do |page_params, &check_page|
|
|
40
|
+
Api.send_request("/ip_addresses", :get, page_params, options, &check_page)
|
|
41
41
|
end
|
|
42
42
|
end
|
|
43
43
|
|
|
@@ -52,8 +52,8 @@ module Files
|
|
|
52
52
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
53
53
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
54
54
|
|
|
55
|
-
List.new(PublicIpAddress, params) do
|
|
56
|
-
Api.send_request("/ip_addresses/smartfile-reserved", :get,
|
|
55
|
+
List.new(PublicIpAddress, params) do |page_params, &check_page|
|
|
56
|
+
Api.send_request("/ip_addresses/smartfile-reserved", :get, page_params, options, &check_page)
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
|
|
@@ -64,8 +64,8 @@ module Files
|
|
|
64
64
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
65
65
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
66
66
|
|
|
67
|
-
List.new(PublicIpAddress, params) do
|
|
68
|
-
Api.send_request("/ip_addresses/exavault-reserved", :get,
|
|
67
|
+
List.new(PublicIpAddress, params) do |page_params, &check_page|
|
|
68
|
+
Api.send_request("/ip_addresses/exavault-reserved", :get, page_params, options, &check_page)
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
@@ -76,8 +76,8 @@ module Files
|
|
|
76
76
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
77
77
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
78
78
|
|
|
79
|
-
List.new(PublicIpAddress, params) do
|
|
80
|
-
Api.send_request("/ip_addresses/reserved", :get,
|
|
79
|
+
List.new(PublicIpAddress, params) do |page_params, &check_page|
|
|
80
|
+
Api.send_request("/ip_addresses/reserved", :get, page_params, options, &check_page)
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
end
|
|
@@ -91,7 +91,9 @@ module Files
|
|
|
91
91
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
92
92
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
93
93
|
|
|
94
|
-
Api.send_request("/key_lifecycle_rules/#{@attributes[:id]}", :patch, params, @options)
|
|
94
|
+
response, options = Api.send_request("/key_lifecycle_rules/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("KeyLifecycleRule") }
|
|
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 = KeyLifecycleRule.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
|
|
|
@@ -131,8 +133,8 @@ module Files
|
|
|
131
133
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
132
134
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
133
135
|
|
|
134
|
-
List.new(KeyLifecycleRule, params) do
|
|
135
|
-
Api.send_request("/key_lifecycle_rules", :get,
|
|
136
|
+
List.new(KeyLifecycleRule, params) do |page_params, &check_page|
|
|
137
|
+
Api.send_request("/key_lifecycle_rules", :get, page_params, options, &check_page)
|
|
136
138
|
end
|
|
137
139
|
end
|
|
138
140
|
|
|
@@ -148,7 +150,7 @@ module Files
|
|
|
148
150
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
149
151
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
150
152
|
|
|
151
|
-
response, options = Api.send_request("/key_lifecycle_rules/#{params[:id]}", :get, params, options)
|
|
153
|
+
response, options = Api.send_request("/key_lifecycle_rules/#{params[:id]}", :get, params, options) { |reply| reply.require_object("KeyLifecycleRule") }
|
|
152
154
|
KeyLifecycleRule.new(response.data, options)
|
|
153
155
|
end
|
|
154
156
|
|
|
@@ -170,7 +172,7 @@ module Files
|
|
|
170
172
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
|
171
173
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
172
174
|
|
|
173
|
-
response, options = Api.send_request("/key_lifecycle_rules", :post, params, options)
|
|
175
|
+
response, options = Api.send_request("/key_lifecycle_rules", :post, params, options) { |reply| reply.require_object("KeyLifecycleRule") }
|
|
174
176
|
KeyLifecycleRule.new(response.data, options)
|
|
175
177
|
end
|
|
176
178
|
|
|
@@ -192,7 +194,7 @@ module Files
|
|
|
192
194
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
193
195
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
194
196
|
|
|
195
|
-
response, options = Api.send_request("/key_lifecycle_rules/#{params[:id]}", :patch, params, options)
|
|
197
|
+
response, options = Api.send_request("/key_lifecycle_rules/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("KeyLifecycleRule") }
|
|
196
198
|
KeyLifecycleRule.new(response.data, options)
|
|
197
199
|
end
|
|
198
200
|
|
|
@@ -164,8 +164,8 @@ module Files
|
|
|
164
164
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
165
165
|
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
166
166
|
|
|
167
|
-
List.new(Lock, params) do
|
|
168
|
-
Api.send_request("/locks/#{
|
|
167
|
+
List.new(Lock, params) do |page_params, &check_page|
|
|
168
|
+
Api.send_request("/locks/#{page_params[:path]}", :get, page_params, options, &check_page)
|
|
169
169
|
end
|
|
170
170
|
end
|
|
171
171
|
|
|
@@ -188,7 +188,7 @@ module Files
|
|
|
188
188
|
raise InvalidParameterError.new("Bad parameter: timeout must be an Integer") if params[:timeout] and !params[:timeout].is_a?(Integer)
|
|
189
189
|
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
190
190
|
|
|
191
|
-
response, options = Api.send_request("/locks/#{params[:path]}", :post, params, options)
|
|
191
|
+
response, options = Api.send_request("/locks/#{params[:path]}", :post, params, options) { |reply| reply.require_object("Lock") }
|
|
192
192
|
Lock.new(response.data, options)
|
|
193
193
|
end
|
|
194
194
|
|
|
@@ -57,7 +57,9 @@ module Files
|
|
|
57
57
|
raise InvalidParameterError.new("Bad parameter: default_columns must be an Array") if params[:default_columns] and !params[:default_columns].is_a?(Array)
|
|
58
58
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
59
59
|
|
|
60
|
-
Api.send_request("/metadata_categories/#{@attributes[:id]}", :patch, params, @options)
|
|
60
|
+
response, options = Api.send_request("/metadata_categories/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("MetadataCategory") }
|
|
61
|
+
@attributes = response.data
|
|
62
|
+
[ response, options ]
|
|
61
63
|
end
|
|
62
64
|
|
|
63
65
|
def delete(params = {})
|
|
@@ -77,12 +79,12 @@ module Files
|
|
|
77
79
|
|
|
78
80
|
def save
|
|
79
81
|
if @attributes[:id]
|
|
80
|
-
|
|
82
|
+
update(@attributes)
|
|
81
83
|
else
|
|
82
84
|
new_obj = MetadataCategory.create(@attributes, @options)
|
|
85
|
+
@attributes = new_obj.attributes
|
|
83
86
|
end
|
|
84
87
|
|
|
85
|
-
@attributes = new_obj.attributes
|
|
86
88
|
true
|
|
87
89
|
end
|
|
88
90
|
|
|
@@ -95,8 +97,8 @@ module Files
|
|
|
95
97
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
96
98
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
97
99
|
|
|
98
|
-
List.new(MetadataCategory, params) do
|
|
99
|
-
Api.send_request("/metadata_categories", :get,
|
|
100
|
+
List.new(MetadataCategory, params) do |page_params, &check_page|
|
|
101
|
+
Api.send_request("/metadata_categories", :get, page_params, options, &check_page)
|
|
100
102
|
end
|
|
101
103
|
end
|
|
102
104
|
|
|
@@ -112,7 +114,7 @@ module Files
|
|
|
112
114
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
113
115
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
114
116
|
|
|
115
|
-
response, options = Api.send_request("/metadata_categories/#{params[:id]}", :get, params, options)
|
|
117
|
+
response, options = Api.send_request("/metadata_categories/#{params[:id]}", :get, params, options) { |reply| reply.require_object("MetadataCategory") }
|
|
116
118
|
MetadataCategory.new(response.data, options)
|
|
117
119
|
end
|
|
118
120
|
|
|
@@ -132,8 +134,8 @@ module Files
|
|
|
132
134
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
133
135
|
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
134
136
|
|
|
135
|
-
List.new(MetadataCategory, params) do
|
|
136
|
-
Api.send_request("/metadata_categories/list_by_path/#{
|
|
137
|
+
List.new(MetadataCategory, params) do |page_params, &check_page|
|
|
138
|
+
Api.send_request("/metadata_categories/list_by_path/#{page_params[:path]}", :get, page_params, options, &check_page)
|
|
137
139
|
end
|
|
138
140
|
end
|
|
139
141
|
|
|
@@ -145,7 +147,7 @@ module Files
|
|
|
145
147
|
raise InvalidParameterError.new("Bad parameter: default_columns must be an Array") if params[:default_columns] and !params[:default_columns].is_a?(Array)
|
|
146
148
|
raise MissingParameterError.new("Parameter missing: name") unless params[:name]
|
|
147
149
|
|
|
148
|
-
response, options = Api.send_request("/metadata_categories", :post, params, options)
|
|
150
|
+
response, options = Api.send_request("/metadata_categories", :post, params, options) { |reply| reply.require_object("MetadataCategory") }
|
|
149
151
|
MetadataCategory.new(response.data, options)
|
|
150
152
|
end
|
|
151
153
|
|
|
@@ -160,7 +162,7 @@ module Files
|
|
|
160
162
|
raise InvalidParameterError.new("Bad parameter: default_columns must be an Array") if params[:default_columns] and !params[:default_columns].is_a?(Array)
|
|
161
163
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
162
164
|
|
|
163
|
-
response, options = Api.send_request("/metadata_categories/#{params[:id]}", :patch, params, options)
|
|
165
|
+
response, options = Api.send_request("/metadata_categories/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("MetadataCategory") }
|
|
164
166
|
MetadataCategory.new(response.data, options)
|
|
165
167
|
end
|
|
166
168
|
|
|
@@ -273,7 +273,9 @@ module Files
|
|
|
273
273
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
274
274
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
275
275
|
|
|
276
|
-
Api.send_request("/notifications/#{@attributes[:id]}", :patch, params, @options)
|
|
276
|
+
response, options = Api.send_request("/notifications/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("Notification") }
|
|
277
|
+
@attributes = response.data
|
|
278
|
+
[ response, options ]
|
|
277
279
|
end
|
|
278
280
|
|
|
279
281
|
def delete(params = {})
|
|
@@ -293,12 +295,12 @@ module Files
|
|
|
293
295
|
|
|
294
296
|
def save
|
|
295
297
|
if @attributes[:id]
|
|
296
|
-
|
|
298
|
+
update(@attributes)
|
|
297
299
|
else
|
|
298
300
|
new_obj = Notification.create(@attributes, @options)
|
|
301
|
+
@attributes = new_obj.attributes
|
|
299
302
|
end
|
|
300
303
|
|
|
301
|
-
@attributes = new_obj.attributes
|
|
302
304
|
true
|
|
303
305
|
end
|
|
304
306
|
|
|
@@ -320,8 +322,8 @@ module Files
|
|
|
320
322
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
321
323
|
raise InvalidParameterError.new("Bad parameter: group_id must be an String") if params[:group_id] and !params[:group_id].is_a?(String)
|
|
322
324
|
|
|
323
|
-
List.new(Notification, params) do
|
|
324
|
-
Api.send_request("/notifications", :get,
|
|
325
|
+
List.new(Notification, params) do |page_params, &check_page|
|
|
326
|
+
Api.send_request("/notifications", :get, page_params, options, &check_page)
|
|
325
327
|
end
|
|
326
328
|
end
|
|
327
329
|
|
|
@@ -337,7 +339,7 @@ module Files
|
|
|
337
339
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
338
340
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
339
341
|
|
|
340
|
-
response, options = Api.send_request("/notifications/#{params[:id]}", :get, params, options)
|
|
342
|
+
response, options = Api.send_request("/notifications/#{params[:id]}", :get, params, options) { |reply| reply.require_object("Notification") }
|
|
341
343
|
Notification.new(response.data, options)
|
|
342
344
|
end
|
|
343
345
|
|
|
@@ -380,7 +382,7 @@ module Files
|
|
|
380
382
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
381
383
|
raise InvalidParameterError.new("Bad parameter: username must be an String") if params[:username] and !params[:username].is_a?(String)
|
|
382
384
|
|
|
383
|
-
response, options = Api.send_request("/notifications", :post, params, options)
|
|
385
|
+
response, options = Api.send_request("/notifications", :post, params, options) { |reply| reply.require_object("Notification") }
|
|
384
386
|
Notification.new(response.data, options)
|
|
385
387
|
end
|
|
386
388
|
|
|
@@ -413,7 +415,7 @@ module Files
|
|
|
413
415
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
414
416
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
415
417
|
|
|
416
|
-
response, options = Api.send_request("/notifications/#{params[:id]}", :patch, params, options)
|
|
418
|
+
response, options = Api.send_request("/notifications/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("Notification") }
|
|
417
419
|
Notification.new(response.data, options)
|
|
418
420
|
end
|
|
419
421
|
|
|
@@ -113,8 +113,8 @@ module Files
|
|
|
113
113
|
raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
|
|
114
114
|
raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
|
|
115
115
|
|
|
116
|
-
List.new(OutboundConnectionLog, params) do
|
|
117
|
-
Api.send_request("/outbound_connection_logs", :get,
|
|
116
|
+
List.new(OutboundConnectionLog, params) do |page_params, &check_page|
|
|
117
|
+
Api.send_request("/outbound_connection_logs", :get, page_params, options, &check_page)
|
|
118
118
|
end
|
|
119
119
|
end
|
|
120
120
|
|
|
@@ -232,7 +232,9 @@ module Files
|
|
|
232
232
|
raise InvalidParameterError.new("Bad parameter: root_folder must be an String") if params[:root_folder] and !params[:root_folder].is_a?(String)
|
|
233
233
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
234
234
|
|
|
235
|
-
Api.send_request("/partners/#{@attributes[:id]}", :patch, params, @options)
|
|
235
|
+
response, options = Api.send_request("/partners/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("Partner") }
|
|
236
|
+
@attributes = response.data
|
|
237
|
+
[ response, options ]
|
|
236
238
|
end
|
|
237
239
|
|
|
238
240
|
def delete(params = {})
|
|
@@ -252,12 +254,12 @@ module Files
|
|
|
252
254
|
|
|
253
255
|
def save
|
|
254
256
|
if @attributes[:id]
|
|
255
|
-
|
|
257
|
+
update(@attributes)
|
|
256
258
|
else
|
|
257
259
|
new_obj = Partner.create(@attributes, @options)
|
|
260
|
+
@attributes = new_obj.attributes
|
|
258
261
|
end
|
|
259
262
|
|
|
260
|
-
@attributes = new_obj.attributes
|
|
261
263
|
true
|
|
262
264
|
end
|
|
263
265
|
|
|
@@ -272,8 +274,8 @@ module Files
|
|
|
272
274
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
273
275
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
274
276
|
|
|
275
|
-
List.new(Partner, params) do
|
|
276
|
-
Api.send_request("/partners", :get,
|
|
277
|
+
List.new(Partner, params) do |page_params, &check_page|
|
|
278
|
+
Api.send_request("/partners", :get, page_params, options, &check_page)
|
|
277
279
|
end
|
|
278
280
|
end
|
|
279
281
|
|
|
@@ -289,7 +291,7 @@ module Files
|
|
|
289
291
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
290
292
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
291
293
|
|
|
292
|
-
response, options = Api.send_request("/partners/#{params[:id]}", :get, params, options)
|
|
294
|
+
response, options = Api.send_request("/partners/#{params[:id]}", :get, params, options) { |reply| reply.require_object("Partner") }
|
|
293
295
|
Partner.new(response.data, options)
|
|
294
296
|
end
|
|
295
297
|
|
|
@@ -328,7 +330,7 @@ module Files
|
|
|
328
330
|
raise MissingParameterError.new("Parameter missing: name") unless params[:name]
|
|
329
331
|
raise MissingParameterError.new("Parameter missing: root_folder") unless params[:root_folder]
|
|
330
332
|
|
|
331
|
-
response, options = Api.send_request("/partners", :post, params, options)
|
|
333
|
+
response, options = Api.send_request("/partners", :post, params, options) { |reply| reply.require_object("Partner") }
|
|
332
334
|
Partner.new(response.data, options)
|
|
333
335
|
end
|
|
334
336
|
|
|
@@ -365,7 +367,7 @@ module Files
|
|
|
365
367
|
raise InvalidParameterError.new("Bad parameter: root_folder must be an String") if params[:root_folder] and !params[:root_folder].is_a?(String)
|
|
366
368
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
367
369
|
|
|
368
|
-
response, options = Api.send_request("/partners/#{params[:id]}", :patch, params, options)
|
|
370
|
+
response, options = Api.send_request("/partners/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("Partner") }
|
|
369
371
|
Partner.new(response.data, options)
|
|
370
372
|
end
|
|
371
373
|
|
|
@@ -196,7 +196,9 @@ module Files
|
|
|
196
196
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
197
197
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
198
198
|
|
|
199
|
-
Api.send_request("/partner_channels/#{@attributes[:id]}", :patch, params, @options)
|
|
199
|
+
response, options = Api.send_request("/partner_channels/#{@attributes[:id]}", :patch, params, @options) { |reply| reply.require_object("PartnerChannel") }
|
|
200
|
+
@attributes = response.data
|
|
201
|
+
[ response, options ]
|
|
200
202
|
end
|
|
201
203
|
|
|
202
204
|
def delete(params = {})
|
|
@@ -216,12 +218,12 @@ module Files
|
|
|
216
218
|
|
|
217
219
|
def save
|
|
218
220
|
if @attributes[:id]
|
|
219
|
-
|
|
221
|
+
update(@attributes)
|
|
220
222
|
else
|
|
221
223
|
new_obj = PartnerChannel.create(@attributes, @options)
|
|
224
|
+
@attributes = new_obj.attributes
|
|
222
225
|
end
|
|
223
226
|
|
|
224
|
-
@attributes = new_obj.attributes
|
|
225
227
|
true
|
|
226
228
|
end
|
|
227
229
|
|
|
@@ -236,8 +238,8 @@ module Files
|
|
|
236
238
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
237
239
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
238
240
|
|
|
239
|
-
List.new(PartnerChannel, params) do
|
|
240
|
-
Api.send_request("/partner_channels", :get,
|
|
241
|
+
List.new(PartnerChannel, params) do |page_params, &check_page|
|
|
242
|
+
Api.send_request("/partner_channels", :get, page_params, options, &check_page)
|
|
241
243
|
end
|
|
242
244
|
end
|
|
243
245
|
|
|
@@ -253,7 +255,7 @@ module Files
|
|
|
253
255
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
254
256
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
255
257
|
|
|
256
|
-
response, options = Api.send_request("/partner_channels/#{params[:id]}", :get, params, options)
|
|
258
|
+
response, options = Api.send_request("/partner_channels/#{params[:id]}", :get, params, options) { |reply| reply.require_object("PartnerChannel") }
|
|
257
259
|
PartnerChannel.new(response.data, options)
|
|
258
260
|
end
|
|
259
261
|
|
|
@@ -287,7 +289,7 @@ module Files
|
|
|
287
289
|
raise MissingParameterError.new("Parameter missing: partner_id") unless params[:partner_id]
|
|
288
290
|
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
289
291
|
|
|
290
|
-
response, options = Api.send_request("/partner_channels", :post, params, options)
|
|
292
|
+
response, options = Api.send_request("/partner_channels", :post, params, options) { |reply| reply.require_object("PartnerChannel") }
|
|
291
293
|
PartnerChannel.new(response.data, options)
|
|
292
294
|
end
|
|
293
295
|
|
|
@@ -315,7 +317,7 @@ module Files
|
|
|
315
317
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
316
318
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
317
319
|
|
|
318
|
-
response, options = Api.send_request("/partner_channels/#{params[:id]}", :patch, params, options)
|
|
320
|
+
response, options = Api.send_request("/partner_channels/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("PartnerChannel") }
|
|
319
321
|
PartnerChannel.new(response.data, options)
|
|
320
322
|
end
|
|
321
323
|
|