files.com 1.1.768 → 1.1.770
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +47 -7
- data/_VERSION +1 -1
- data/docs/file.md +37 -0
- data/lib/files.com/api.rb +9 -4
- data/lib/files.com/api_client.rb +181 -55
- data/lib/files.com/list.rb +98 -66
- data/lib/files.com/models/action_log.rb +7 -2
- data/lib/files.com/models/action_notification_export.rb +13 -3
- data/lib/files.com/models/action_notification_export_result.rb +7 -2
- data/lib/files.com/models/ai_assistant_personality.rb +34 -8
- data/lib/files.com/models/ai_task.rb +39 -8
- data/lib/files.com/models/api_key.rb +49 -10
- data/lib/files.com/models/api_request_log.rb +7 -2
- data/lib/files.com/models/app.rb +7 -2
- data/lib/files.com/models/as2_incoming_message.rb +7 -2
- data/lib/files.com/models/as2_outgoing_message.rb +7 -2
- data/lib/files.com/models/as2_partner.rb +34 -8
- data/lib/files.com/models/as2_station.rb +34 -8
- data/lib/files.com/models/automation.rb +50 -10
- data/lib/files.com/models/automation_log.rb +7 -2
- data/lib/files.com/models/automation_run.rb +31 -6
- data/lib/files.com/models/bandwidth_snapshot.rb +7 -2
- data/lib/files.com/models/behavior.rb +46 -10
- data/lib/files.com/models/bundle.rb +39 -8
- data/lib/files.com/models/bundle_action.rb +7 -2
- data/lib/files.com/models/bundle_download.rb +7 -2
- data/lib/files.com/models/bundle_notification.rb +34 -8
- data/lib/files.com/models/bundle_recipient.rb +14 -4
- data/lib/files.com/models/bundle_registration.rb +7 -2
- data/lib/files.com/models/chat_session.rb +13 -3
- data/lib/files.com/models/child_site_management_policy.rb +34 -8
- data/lib/files.com/models/clickwrap.rb +34 -8
- data/lib/files.com/models/custom_domain.rb +40 -9
- data/lib/files.com/models/desktop_configuration_profile.rb +34 -8
- data/lib/files.com/models/dns_record.rb +7 -2
- data/lib/files.com/models/email_incoming_message.rb +7 -2
- data/lib/files.com/models/email_log.rb +7 -2
- data/lib/files.com/models/event_channel.rb +34 -8
- data/lib/files.com/models/event_delivery_attempt.rb +13 -3
- data/lib/files.com/models/event_record.rb +13 -3
- data/lib/files.com/models/event_subscription.rb +34 -8
- data/lib/files.com/models/event_target.rb +34 -8
- data/lib/files.com/models/exavault_api_request_log.rb +7 -2
- data/lib/files.com/models/expectation.rb +40 -9
- data/lib/files.com/models/expectation_evaluation.rb +13 -3
- data/lib/files.com/models/expectation_incident.rb +31 -6
- data/lib/files.com/models/external_event.rb +20 -5
- data/lib/files.com/models/file.rb +93 -15
- data/lib/files.com/models/file_comment.rb +28 -7
- data/lib/files.com/models/file_comment_reaction.rb +11 -2
- data/lib/files.com/models/file_migration.rb +6 -1
- data/lib/files.com/models/file_migration_log.rb +7 -2
- data/lib/files.com/models/folder.rb +13 -3
- data/lib/files.com/models/form_field_set.rb +34 -8
- data/lib/files.com/models/ftp_action_log.rb +7 -2
- data/lib/files.com/models/gpg_key.rb +34 -8
- data/lib/files.com/models/group.rb +34 -8
- data/lib/files.com/models/group_user.rb +29 -7
- data/lib/files.com/models/history.rb +35 -10
- data/lib/files.com/models/history_export.rb +13 -3
- data/lib/files.com/models/history_export_result.rb +7 -2
- data/lib/files.com/models/holiday_calendar.rb +34 -8
- data/lib/files.com/models/holiday_region.rb +7 -2
- data/lib/files.com/models/inbound_s3_log.rb +7 -2
- data/lib/files.com/models/inbox_recipient.rb +14 -4
- data/lib/files.com/models/inbox_registration.rb +7 -2
- data/lib/files.com/models/inbox_upload.rb +7 -2
- data/lib/files.com/models/integration_centric_profile.rb +34 -8
- data/lib/files.com/models/invoice.rb +13 -3
- data/lib/files.com/models/ip_address.rb +28 -8
- data/lib/files.com/models/key_lifecycle_rule.rb +34 -8
- data/lib/files.com/models/lock.rb +18 -3
- data/lib/files.com/models/metadata_category.rb +41 -10
- data/lib/files.com/models/notification.rb +34 -8
- data/lib/files.com/models/outbound_connection_log.rb +7 -2
- data/lib/files.com/models/partner.rb +34 -8
- data/lib/files.com/models/partner_channel.rb +34 -8
- data/lib/files.com/models/partner_channel_template.rb +34 -8
- data/lib/files.com/models/partner_site.rb +4 -0
- data/lib/files.com/models/partner_site_request.rb +33 -4
- data/lib/files.com/models/payment.rb +13 -3
- data/lib/files.com/models/pending_work_event.rb +13 -3
- data/lib/files.com/models/permission.rb +18 -4
- data/lib/files.com/models/public_hosting_request_log.rb +7 -2
- data/lib/files.com/models/public_key.rb +34 -8
- data/lib/files.com/models/remote_bandwidth_snapshot.rb +7 -2
- data/lib/files.com/models/remote_mount_backend.rb +39 -8
- data/lib/files.com/models/remote_server.rb +52 -11
- data/lib/files.com/models/remote_server_credential.rb +34 -8
- data/lib/files.com/models/request.rb +25 -6
- data/lib/files.com/models/restore.rb +14 -4
- data/lib/files.com/models/schedule.rb +34 -8
- data/lib/files.com/models/scheduled_export.rb +34 -8
- data/lib/files.com/models/scim_log.rb +13 -3
- data/lib/files.com/models/secret.rb +34 -8
- data/lib/files.com/models/session.rb +11 -2
- data/lib/files.com/models/settings_change.rb +7 -2
- data/lib/files.com/models/sftp_action_log.rb +7 -2
- data/lib/files.com/models/sftp_host_key.rb +34 -8
- data/lib/files.com/models/share_group.rb +34 -8
- data/lib/files.com/models/siem_http_destination.rb +39 -8
- data/lib/files.com/models/siem_http_destination_event.rb +13 -3
- data/lib/files.com/models/site.rb +16 -3
- data/lib/files.com/models/site_subdomain_redirect.rb +17 -3
- data/lib/files.com/models/snapshot.rb +39 -8
- data/lib/files.com/models/sso_event.rb +13 -3
- data/lib/files.com/models/sso_strategy.rb +18 -3
- data/lib/files.com/models/style.rb +20 -5
- data/lib/files.com/models/sync.rb +44 -8
- data/lib/files.com/models/sync_log.rb +7 -2
- data/lib/files.com/models/sync_run.rb +13 -3
- data/lib/files.com/models/usage_daily_snapshot.rb +7 -2
- data/lib/files.com/models/usage_snapshot.rb +7 -2
- data/lib/files.com/models/user.rb +50 -8
- data/lib/files.com/models/user_additional_email_recipient.rb +34 -8
- data/lib/files.com/models/user_cipher_use.rb +7 -2
- data/lib/files.com/models/user_lifecycle_rule.rb +34 -8
- data/lib/files.com/models/user_request.rb +24 -5
- data/lib/files.com/models/user_security_event.rb +13 -3
- data/lib/files.com/models/user_sftp_client_use.rb +7 -2
- data/lib/files.com/models/web_dav_action_log.rb +7 -2
- data/lib/files.com/models/webhook_test.rb +7 -2
- data/lib/files.com/models/workspace.rb +34 -8
- data/lib/files.com/response.rb +24 -0
- data/lib/files.com/sizable_io.rb +65 -4
- data/lib/files.com/version.rb +1 -1
- data/lib/files.com.rb +23 -1
- data/spec/language_spec.rb +20 -10
- data/spec/lib/api_client_spec.rb +173 -18
- data/spec/list_spec.rb +203 -187
- data/spec/models/file_transfer_spec.rb +346 -0
- data/spec/models/persistence_spec.rb +167 -0
- data/spec/spec_helper.rb +122 -6
- data/spec/support/stubbed_api.rb +14 -0
- data/spec/support/transfer_server.rb +60 -0
- metadata +6 -2
|
@@ -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
|
|
|
@@ -103,14 +105,19 @@ module Files
|
|
|
103
105
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
104
106
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id` and `name`.
|
|
105
107
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `workspace_id`.
|
|
108
|
+
#
|
|
109
|
+
# params:: Hash of API operation parameter values.
|
|
110
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
111
|
+
#
|
|
112
|
+
# Returns a Files::List of Files::IntegrationCentricProfile objects.
|
|
106
113
|
def self.list(params = {}, options = {})
|
|
107
114
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
108
115
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
109
116
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
110
117
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
111
118
|
|
|
112
|
-
List.new(IntegrationCentricProfile, params) do
|
|
113
|
-
Api.send_request("/integration_centric_profiles", :get,
|
|
119
|
+
List.new(IntegrationCentricProfile, params) do |page_params, &check_page|
|
|
120
|
+
Api.send_request("/integration_centric_profiles", :get, page_params, options, &check_page)
|
|
114
121
|
end
|
|
115
122
|
end
|
|
116
123
|
|
|
@@ -120,13 +127,18 @@ module Files
|
|
|
120
127
|
|
|
121
128
|
# Parameters:
|
|
122
129
|
# id (required) - int64 - Integration Centric Profile ID.
|
|
130
|
+
#
|
|
131
|
+
# params:: Hash of API operation parameter values.
|
|
132
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
133
|
+
#
|
|
134
|
+
# Returns a Files::IntegrationCentricProfile.
|
|
123
135
|
def self.find(id, params = {}, options = {})
|
|
124
136
|
params ||= {}
|
|
125
137
|
params[:id] = id
|
|
126
138
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
127
139
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
128
140
|
|
|
129
|
-
response, options = Api.send_request("/integration_centric_profiles/#{params[:id]}", :get, params, options)
|
|
141
|
+
response, options = Api.send_request("/integration_centric_profiles/#{params[:id]}", :get, params, options) { |reply| reply.require_object("IntegrationCentricProfile") }
|
|
130
142
|
IntegrationCentricProfile.new(response.data, options)
|
|
131
143
|
end
|
|
132
144
|
|
|
@@ -139,6 +151,11 @@ module Files
|
|
|
139
151
|
# expected_remote_servers (required) - array(object) - Remote Server integrations the user is expected to add and connect. Each entry requires `server_type` and may include a display `name`.
|
|
140
152
|
# workspace_id - int64 - Workspace ID
|
|
141
153
|
# use_for_all_users - boolean - Whether this profile applies to all users in the Workspace by default
|
|
154
|
+
#
|
|
155
|
+
# params:: Hash of API operation parameter values.
|
|
156
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
157
|
+
#
|
|
158
|
+
# Returns a Files::IntegrationCentricProfile.
|
|
142
159
|
def self.create(params = {}, options = {})
|
|
143
160
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
|
144
161
|
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)
|
|
@@ -146,7 +163,7 @@ module Files
|
|
|
146
163
|
raise MissingParameterError.new("Parameter missing: name") unless params[:name]
|
|
147
164
|
raise MissingParameterError.new("Parameter missing: expected_remote_servers") unless params[:expected_remote_servers]
|
|
148
165
|
|
|
149
|
-
response, options = Api.send_request("/integration_centric_profiles", :post, params, options)
|
|
166
|
+
response, options = Api.send_request("/integration_centric_profiles", :post, params, options) { |reply| reply.require_object("IntegrationCentricProfile") }
|
|
150
167
|
IntegrationCentricProfile.new(response.data, options)
|
|
151
168
|
end
|
|
152
169
|
|
|
@@ -155,6 +172,11 @@ module Files
|
|
|
155
172
|
# workspace_id - int64 - Workspace ID
|
|
156
173
|
# expected_remote_servers - array(object) - Remote Server integrations the user is expected to add and connect. Each entry requires `server_type` and may include a display `name`.
|
|
157
174
|
# use_for_all_users - boolean - Whether this profile applies to all users in the Workspace by default
|
|
175
|
+
#
|
|
176
|
+
# params:: Hash of API operation parameter values.
|
|
177
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
178
|
+
#
|
|
179
|
+
# Returns a Files::IntegrationCentricProfile.
|
|
158
180
|
def self.update(id, params = {}, options = {})
|
|
159
181
|
params ||= {}
|
|
160
182
|
params[:id] = id
|
|
@@ -164,10 +186,14 @@ module Files
|
|
|
164
186
|
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
187
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
166
188
|
|
|
167
|
-
response, options = Api.send_request("/integration_centric_profiles/#{params[:id]}", :patch, params, options)
|
|
189
|
+
response, options = Api.send_request("/integration_centric_profiles/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("IntegrationCentricProfile") }
|
|
168
190
|
IntegrationCentricProfile.new(response.data, options)
|
|
169
191
|
end
|
|
170
192
|
|
|
193
|
+
# params:: Hash of API operation parameter values.
|
|
194
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
195
|
+
#
|
|
196
|
+
# Returns nil.
|
|
171
197
|
def self.delete(id, params = {}, options = {})
|
|
172
198
|
params ||= {}
|
|
173
199
|
params[:id] = id
|
|
@@ -85,12 +85,17 @@ module Files
|
|
|
85
85
|
# Parameters:
|
|
86
86
|
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
87
87
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
88
|
+
#
|
|
89
|
+
# params:: Hash of API operation parameter values.
|
|
90
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
91
|
+
#
|
|
92
|
+
# Returns a Files::List of Files::AccountLineItem objects.
|
|
88
93
|
def self.list(params = {}, options = {})
|
|
89
94
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
90
95
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
91
96
|
|
|
92
|
-
List.new(AccountLineItem, params) do
|
|
93
|
-
Api.send_request("/invoices", :get,
|
|
97
|
+
List.new(AccountLineItem, params) do |page_params, &check_page|
|
|
98
|
+
Api.send_request("/invoices", :get, page_params, options, &check_page)
|
|
94
99
|
end
|
|
95
100
|
end
|
|
96
101
|
|
|
@@ -100,13 +105,18 @@ module Files
|
|
|
100
105
|
|
|
101
106
|
# Parameters:
|
|
102
107
|
# id (required) - int64 - Invoice ID.
|
|
108
|
+
#
|
|
109
|
+
# params:: Hash of API operation parameter values.
|
|
110
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
111
|
+
#
|
|
112
|
+
# Returns a Files::AccountLineItem.
|
|
103
113
|
def self.find(id, params = {}, options = {})
|
|
104
114
|
params ||= {}
|
|
105
115
|
params[:id] = id
|
|
106
116
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
107
117
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
108
118
|
|
|
109
|
-
response, options = Api.send_request("/invoices/#{params[:id]}", :get, params, options)
|
|
119
|
+
response, options = Api.send_request("/invoices/#{params[:id]}", :get, params, options) { |reply| reply.require_object("AccountLineItem") }
|
|
110
120
|
AccountLineItem.new(response.data, options)
|
|
111
121
|
end
|
|
112
122
|
|
|
@@ -32,12 +32,17 @@ module Files
|
|
|
32
32
|
# Parameters:
|
|
33
33
|
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
34
34
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
35
|
+
#
|
|
36
|
+
# params:: Hash of API operation parameter values.
|
|
37
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
38
|
+
#
|
|
39
|
+
# Returns a Files::List of Files::IpAddress objects.
|
|
35
40
|
def self.list(params = {}, options = {})
|
|
36
41
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
37
42
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
38
43
|
|
|
39
|
-
List.new(IpAddress, params) do
|
|
40
|
-
Api.send_request("/ip_addresses", :get,
|
|
44
|
+
List.new(IpAddress, params) do |page_params, &check_page|
|
|
45
|
+
Api.send_request("/ip_addresses", :get, page_params, options, &check_page)
|
|
41
46
|
end
|
|
42
47
|
end
|
|
43
48
|
|
|
@@ -48,36 +53,51 @@ module Files
|
|
|
48
53
|
# Parameters:
|
|
49
54
|
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
50
55
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
56
|
+
#
|
|
57
|
+
# params:: Hash of API operation parameter values.
|
|
58
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
59
|
+
#
|
|
60
|
+
# Returns a Files::List of Files::PublicIpAddress objects.
|
|
51
61
|
def self.get_smartfile_reserved(params = {}, options = {})
|
|
52
62
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
53
63
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
54
64
|
|
|
55
|
-
List.new(PublicIpAddress, params) do
|
|
56
|
-
Api.send_request("/ip_addresses/smartfile-reserved", :get,
|
|
65
|
+
List.new(PublicIpAddress, params) do |page_params, &check_page|
|
|
66
|
+
Api.send_request("/ip_addresses/smartfile-reserved", :get, page_params, options, &check_page)
|
|
57
67
|
end
|
|
58
68
|
end
|
|
59
69
|
|
|
60
70
|
# Parameters:
|
|
61
71
|
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
62
72
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
73
|
+
#
|
|
74
|
+
# params:: Hash of API operation parameter values.
|
|
75
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
76
|
+
#
|
|
77
|
+
# Returns a Files::List of Files::PublicIpAddress objects.
|
|
63
78
|
def self.get_exavault_reserved(params = {}, options = {})
|
|
64
79
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
65
80
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
66
81
|
|
|
67
|
-
List.new(PublicIpAddress, params) do
|
|
68
|
-
Api.send_request("/ip_addresses/exavault-reserved", :get,
|
|
82
|
+
List.new(PublicIpAddress, params) do |page_params, &check_page|
|
|
83
|
+
Api.send_request("/ip_addresses/exavault-reserved", :get, page_params, options, &check_page)
|
|
69
84
|
end
|
|
70
85
|
end
|
|
71
86
|
|
|
72
87
|
# Parameters:
|
|
73
88
|
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
74
89
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
90
|
+
#
|
|
91
|
+
# params:: Hash of API operation parameter values.
|
|
92
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
93
|
+
#
|
|
94
|
+
# Returns a Files::List of Files::PublicIpAddress objects.
|
|
75
95
|
def self.get_reserved(params = {}, options = {})
|
|
76
96
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
77
97
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
78
98
|
|
|
79
|
-
List.new(PublicIpAddress, params) do
|
|
80
|
-
Api.send_request("/ip_addresses/reserved", :get,
|
|
99
|
+
List.new(PublicIpAddress, params) do |page_params, &check_page|
|
|
100
|
+
Api.send_request("/ip_addresses/reserved", :get, page_params, options, &check_page)
|
|
81
101
|
end
|
|
82
102
|
end
|
|
83
103
|
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
|
|
|
@@ -125,14 +127,19 @@ module Files
|
|
|
125
127
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
126
128
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id` and `key_type`.
|
|
127
129
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `key_type` and `workspace_id`. Valid field combinations are `[ workspace_id, key_type ]`.
|
|
130
|
+
#
|
|
131
|
+
# params:: Hash of API operation parameter values.
|
|
132
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
133
|
+
#
|
|
134
|
+
# Returns a Files::List of Files::KeyLifecycleRule objects.
|
|
128
135
|
def self.list(params = {}, options = {})
|
|
129
136
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
130
137
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
131
138
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
132
139
|
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
133
140
|
|
|
134
|
-
List.new(KeyLifecycleRule, params) do
|
|
135
|
-
Api.send_request("/key_lifecycle_rules", :get,
|
|
141
|
+
List.new(KeyLifecycleRule, params) do |page_params, &check_page|
|
|
142
|
+
Api.send_request("/key_lifecycle_rules", :get, page_params, options, &check_page)
|
|
136
143
|
end
|
|
137
144
|
end
|
|
138
145
|
|
|
@@ -142,13 +149,18 @@ module Files
|
|
|
142
149
|
|
|
143
150
|
# Parameters:
|
|
144
151
|
# id (required) - int64 - Key Lifecycle Rule ID.
|
|
152
|
+
#
|
|
153
|
+
# params:: Hash of API operation parameter values.
|
|
154
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
155
|
+
#
|
|
156
|
+
# Returns a Files::KeyLifecycleRule.
|
|
145
157
|
def self.find(id, params = {}, options = {})
|
|
146
158
|
params ||= {}
|
|
147
159
|
params[:id] = id
|
|
148
160
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
149
161
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
150
162
|
|
|
151
|
-
response, options = Api.send_request("/key_lifecycle_rules/#{params[:id]}", :get, params, options)
|
|
163
|
+
response, options = Api.send_request("/key_lifecycle_rules/#{params[:id]}", :get, params, options) { |reply| reply.require_object("KeyLifecycleRule") }
|
|
152
164
|
KeyLifecycleRule.new(response.data, options)
|
|
153
165
|
end
|
|
154
166
|
|
|
@@ -163,6 +175,11 @@ module Files
|
|
|
163
175
|
# inactivity_days - int64 - Number of days of inactivity before the rule applies.
|
|
164
176
|
# name - string - Key Lifecycle Rule name
|
|
165
177
|
# workspace_id - int64 - Workspace ID. `0` means the default workspace.
|
|
178
|
+
#
|
|
179
|
+
# params:: Hash of API operation parameter values.
|
|
180
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
181
|
+
#
|
|
182
|
+
# Returns a Files::KeyLifecycleRule.
|
|
166
183
|
def self.create(params = {}, options = {})
|
|
167
184
|
raise InvalidParameterError.new("Bad parameter: expiration_days must be an Integer") if params[:expiration_days] and !params[:expiration_days].is_a?(Integer)
|
|
168
185
|
raise InvalidParameterError.new("Bad parameter: key_type must be an String") if params[:key_type] and !params[:key_type].is_a?(String)
|
|
@@ -170,7 +187,7 @@ module Files
|
|
|
170
187
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
|
171
188
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
172
189
|
|
|
173
|
-
response, options = Api.send_request("/key_lifecycle_rules", :post, params, options)
|
|
190
|
+
response, options = Api.send_request("/key_lifecycle_rules", :post, params, options) { |reply| reply.require_object("KeyLifecycleRule") }
|
|
174
191
|
KeyLifecycleRule.new(response.data, options)
|
|
175
192
|
end
|
|
176
193
|
|
|
@@ -181,6 +198,11 @@ module Files
|
|
|
181
198
|
# inactivity_days - int64 - Number of days of inactivity before the rule applies.
|
|
182
199
|
# name - string - Key Lifecycle Rule name
|
|
183
200
|
# workspace_id - int64 - Workspace ID. `0` means the default workspace.
|
|
201
|
+
#
|
|
202
|
+
# params:: Hash of API operation parameter values.
|
|
203
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
204
|
+
#
|
|
205
|
+
# Returns a Files::KeyLifecycleRule.
|
|
184
206
|
def self.update(id, params = {}, options = {})
|
|
185
207
|
params ||= {}
|
|
186
208
|
params[:id] = id
|
|
@@ -192,10 +214,14 @@ module Files
|
|
|
192
214
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
193
215
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
194
216
|
|
|
195
|
-
response, options = Api.send_request("/key_lifecycle_rules/#{params[:id]}", :patch, params, options)
|
|
217
|
+
response, options = Api.send_request("/key_lifecycle_rules/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("KeyLifecycleRule") }
|
|
196
218
|
KeyLifecycleRule.new(response.data, options)
|
|
197
219
|
end
|
|
198
220
|
|
|
221
|
+
# params:: Hash of API operation parameter values.
|
|
222
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
223
|
+
#
|
|
224
|
+
# Returns nil.
|
|
199
225
|
def self.delete(id, params = {}, options = {})
|
|
200
226
|
params ||= {}
|
|
201
227
|
params[:id] = id
|
|
@@ -156,6 +156,11 @@ module Files
|
|
|
156
156
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
157
157
|
# path (required) - string - Path to operate on.
|
|
158
158
|
# include_children - boolean - Include locks from children objects?
|
|
159
|
+
#
|
|
160
|
+
# params:: Hash of API operation parameter values.
|
|
161
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
162
|
+
#
|
|
163
|
+
# Returns a Files::List of Files::Lock objects.
|
|
159
164
|
def self.list_for(path, params = {}, options = {})
|
|
160
165
|
params ||= {}
|
|
161
166
|
params[:path] = path
|
|
@@ -164,8 +169,8 @@ module Files
|
|
|
164
169
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
165
170
|
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
166
171
|
|
|
167
|
-
List.new(Lock, params) do
|
|
168
|
-
Api.send_request("/locks/#{
|
|
172
|
+
List.new(Lock, params) do |page_params, &check_page|
|
|
173
|
+
Api.send_request("/locks/#{page_params[:path]}", :get, page_params, options, &check_page)
|
|
169
174
|
end
|
|
170
175
|
end
|
|
171
176
|
|
|
@@ -178,6 +183,11 @@ module Files
|
|
|
178
183
|
# recursive - boolean - Does lock apply to subfolders?
|
|
179
184
|
# owner - string - Arbitrary descriptive label for the lock. Does not change the lock creator or permissions.
|
|
180
185
|
# timeout - int64 - Lock timeout in seconds
|
|
186
|
+
#
|
|
187
|
+
# params:: Hash of API operation parameter values.
|
|
188
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
189
|
+
#
|
|
190
|
+
# Returns a Files::Lock.
|
|
181
191
|
def self.create(path, params = {}, options = {})
|
|
182
192
|
params ||= {}
|
|
183
193
|
params[:path] = path
|
|
@@ -188,12 +198,17 @@ module Files
|
|
|
188
198
|
raise InvalidParameterError.new("Bad parameter: timeout must be an Integer") if params[:timeout] and !params[:timeout].is_a?(Integer)
|
|
189
199
|
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
190
200
|
|
|
191
|
-
response, options = Api.send_request("/locks/#{params[:path]}", :post, params, options)
|
|
201
|
+
response, options = Api.send_request("/locks/#{params[:path]}", :post, params, options) { |reply| reply.require_object("Lock") }
|
|
192
202
|
Lock.new(response.data, options)
|
|
193
203
|
end
|
|
194
204
|
|
|
195
205
|
# Parameters:
|
|
196
206
|
# token (required) - string - Lock token
|
|
207
|
+
#
|
|
208
|
+
# params:: Hash of API operation parameter values.
|
|
209
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
210
|
+
#
|
|
211
|
+
# Returns nil.
|
|
197
212
|
def self.delete(path, params = {}, options = {})
|
|
198
213
|
params ||= {}
|
|
199
214
|
params[:path] = path
|
|
@@ -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
|
|
|
@@ -90,13 +92,18 @@ module Files
|
|
|
90
92
|
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
91
93
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
92
94
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
|
|
95
|
+
#
|
|
96
|
+
# params:: Hash of API operation parameter values.
|
|
97
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
98
|
+
#
|
|
99
|
+
# Returns a Files::List of Files::MetadataCategory objects.
|
|
93
100
|
def self.list(params = {}, options = {})
|
|
94
101
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
95
102
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
96
103
|
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
97
104
|
|
|
98
|
-
List.new(MetadataCategory, params) do
|
|
99
|
-
Api.send_request("/metadata_categories", :get,
|
|
105
|
+
List.new(MetadataCategory, params) do |page_params, &check_page|
|
|
106
|
+
Api.send_request("/metadata_categories", :get, page_params, options, &check_page)
|
|
100
107
|
end
|
|
101
108
|
end
|
|
102
109
|
|
|
@@ -106,13 +113,18 @@ module Files
|
|
|
106
113
|
|
|
107
114
|
# Parameters:
|
|
108
115
|
# id (required) - int64 - Metadata Category ID.
|
|
116
|
+
#
|
|
117
|
+
# params:: Hash of API operation parameter values.
|
|
118
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
119
|
+
#
|
|
120
|
+
# Returns a Files::MetadataCategory.
|
|
109
121
|
def self.find(id, params = {}, options = {})
|
|
110
122
|
params ||= {}
|
|
111
123
|
params[:id] = id
|
|
112
124
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
113
125
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
114
126
|
|
|
115
|
-
response, options = Api.send_request("/metadata_categories/#{params[:id]}", :get, params, options)
|
|
127
|
+
response, options = Api.send_request("/metadata_categories/#{params[:id]}", :get, params, options) { |reply| reply.require_object("MetadataCategory") }
|
|
116
128
|
MetadataCategory.new(response.data, options)
|
|
117
129
|
end
|
|
118
130
|
|
|
@@ -124,6 +136,11 @@ module Files
|
|
|
124
136
|
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
125
137
|
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
126
138
|
# path (required) - string - Path to operate on.
|
|
139
|
+
#
|
|
140
|
+
# params:: Hash of API operation parameter values.
|
|
141
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
142
|
+
#
|
|
143
|
+
# Returns a Files::List of Files::MetadataCategory objects.
|
|
127
144
|
def self.list_for(path, params = {}, options = {})
|
|
128
145
|
params ||= {}
|
|
129
146
|
params[:path] = path
|
|
@@ -132,26 +149,36 @@ module Files
|
|
|
132
149
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
133
150
|
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
|
134
151
|
|
|
135
|
-
List.new(MetadataCategory, params) do
|
|
136
|
-
Api.send_request("/metadata_categories/list_by_path/#{
|
|
152
|
+
List.new(MetadataCategory, params) do |page_params, &check_page|
|
|
153
|
+
Api.send_request("/metadata_categories/list_by_path/#{page_params[:path]}", :get, page_params, options, &check_page)
|
|
137
154
|
end
|
|
138
155
|
end
|
|
139
156
|
|
|
140
157
|
# Parameters:
|
|
141
158
|
# name (required) - string - Name of the metadata category.
|
|
142
159
|
# default_columns - array(string) - Metadata keys that should appear as columns in the UI by default.
|
|
160
|
+
#
|
|
161
|
+
# params:: Hash of API operation parameter values.
|
|
162
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
163
|
+
#
|
|
164
|
+
# Returns a Files::MetadataCategory.
|
|
143
165
|
def self.create(params = {}, options = {})
|
|
144
166
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
|
145
167
|
raise InvalidParameterError.new("Bad parameter: default_columns must be an Array") if params[:default_columns] and !params[:default_columns].is_a?(Array)
|
|
146
168
|
raise MissingParameterError.new("Parameter missing: name") unless params[:name]
|
|
147
169
|
|
|
148
|
-
response, options = Api.send_request("/metadata_categories", :post, params, options)
|
|
170
|
+
response, options = Api.send_request("/metadata_categories", :post, params, options) { |reply| reply.require_object("MetadataCategory") }
|
|
149
171
|
MetadataCategory.new(response.data, options)
|
|
150
172
|
end
|
|
151
173
|
|
|
152
174
|
# Parameters:
|
|
153
175
|
# name - string - Name of the metadata category.
|
|
154
176
|
# default_columns - array(string) - Metadata keys that should appear as columns in the UI by default.
|
|
177
|
+
#
|
|
178
|
+
# params:: Hash of API operation parameter values.
|
|
179
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
180
|
+
#
|
|
181
|
+
# Returns a Files::MetadataCategory.
|
|
155
182
|
def self.update(id, params = {}, options = {})
|
|
156
183
|
params ||= {}
|
|
157
184
|
params[:id] = id
|
|
@@ -160,10 +187,14 @@ module Files
|
|
|
160
187
|
raise InvalidParameterError.new("Bad parameter: default_columns must be an Array") if params[:default_columns] and !params[:default_columns].is_a?(Array)
|
|
161
188
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
162
189
|
|
|
163
|
-
response, options = Api.send_request("/metadata_categories/#{params[:id]}", :patch, params, options)
|
|
190
|
+
response, options = Api.send_request("/metadata_categories/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("MetadataCategory") }
|
|
164
191
|
MetadataCategory.new(response.data, options)
|
|
165
192
|
end
|
|
166
193
|
|
|
194
|
+
# params:: Hash of API operation parameter values.
|
|
195
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
196
|
+
#
|
|
197
|
+
# Returns nil.
|
|
167
198
|
def self.delete(id, params = {}, options = {})
|
|
168
199
|
params ||= {}
|
|
169
200
|
params[:id] = id
|
|
@@ -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
|
|
|
@@ -311,6 +313,11 @@ module Files
|
|
|
311
313
|
# path - string - Show notifications for this Path.
|
|
312
314
|
# include_ancestors - boolean - If `include_ancestors` is `true` and `path` is specified, include notifications for any parent paths. Ignored if `path` is not specified.
|
|
313
315
|
# group_id - string
|
|
316
|
+
#
|
|
317
|
+
# params:: Hash of API operation parameter values.
|
|
318
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
319
|
+
#
|
|
320
|
+
# Returns a Files::List of Files::Notification objects.
|
|
314
321
|
def self.list(params = {}, options = {})
|
|
315
322
|
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
316
323
|
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
@@ -320,8 +327,8 @@ module Files
|
|
|
320
327
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
321
328
|
raise InvalidParameterError.new("Bad parameter: group_id must be an String") if params[:group_id] and !params[:group_id].is_a?(String)
|
|
322
329
|
|
|
323
|
-
List.new(Notification, params) do
|
|
324
|
-
Api.send_request("/notifications", :get,
|
|
330
|
+
List.new(Notification, params) do |page_params, &check_page|
|
|
331
|
+
Api.send_request("/notifications", :get, page_params, options, &check_page)
|
|
325
332
|
end
|
|
326
333
|
end
|
|
327
334
|
|
|
@@ -331,13 +338,18 @@ module Files
|
|
|
331
338
|
|
|
332
339
|
# Parameters:
|
|
333
340
|
# id (required) - int64 - Notification ID.
|
|
341
|
+
#
|
|
342
|
+
# params:: Hash of API operation parameter values.
|
|
343
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
344
|
+
#
|
|
345
|
+
# Returns a Files::Notification.
|
|
334
346
|
def self.find(id, params = {}, options = {})
|
|
335
347
|
params ||= {}
|
|
336
348
|
params[:id] = id
|
|
337
349
|
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
338
350
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
339
351
|
|
|
340
|
-
response, options = Api.send_request("/notifications/#{params[:id]}", :get, params, options)
|
|
352
|
+
response, options = Api.send_request("/notifications/#{params[:id]}", :get, params, options) { |reply| reply.require_object("Notification") }
|
|
341
353
|
Notification.new(response.data, options)
|
|
342
354
|
end
|
|
343
355
|
|
|
@@ -366,6 +378,11 @@ module Files
|
|
|
366
378
|
# group_ids - string - Group IDs when the notification requires multiple groups. If sent as a string, it should be comma-delimited.
|
|
367
379
|
# path - string - Path
|
|
368
380
|
# username - string - The username of the user to notify. Provide `user_id`, `username` or `group_id`.
|
|
381
|
+
#
|
|
382
|
+
# params:: Hash of API operation parameter values.
|
|
383
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
384
|
+
#
|
|
385
|
+
# Returns a Files::Notification.
|
|
369
386
|
def self.create(params = {}, options = {})
|
|
370
387
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
371
388
|
raise InvalidParameterError.new("Bad parameter: send_interval must be an String") if params[:send_interval] and !params[:send_interval].is_a?(String)
|
|
@@ -380,7 +397,7 @@ module Files
|
|
|
380
397
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
|
381
398
|
raise InvalidParameterError.new("Bad parameter: username must be an String") if params[:username] and !params[:username].is_a?(String)
|
|
382
399
|
|
|
383
|
-
response, options = Api.send_request("/notifications", :post, params, options)
|
|
400
|
+
response, options = Api.send_request("/notifications", :post, params, options) { |reply| reply.require_object("Notification") }
|
|
384
401
|
Notification.new(response.data, options)
|
|
385
402
|
end
|
|
386
403
|
|
|
@@ -400,6 +417,11 @@ module Files
|
|
|
400
417
|
# triggering_user_ids - array(int64) - If set, will only notify on actions made one of the specified users
|
|
401
418
|
# trigger_by_share_recipients - boolean - Notify when actions are performed by a share recipient?
|
|
402
419
|
# workspace_id - int64 - Workspace ID. `0` means the default workspace.
|
|
420
|
+
#
|
|
421
|
+
# params:: Hash of API operation parameter values.
|
|
422
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
423
|
+
#
|
|
424
|
+
# Returns a Files::Notification.
|
|
403
425
|
def self.update(id, params = {}, options = {})
|
|
404
426
|
params ||= {}
|
|
405
427
|
params[:id] = id
|
|
@@ -413,10 +435,14 @@ module Files
|
|
|
413
435
|
raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
|
|
414
436
|
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
415
437
|
|
|
416
|
-
response, options = Api.send_request("/notifications/#{params[:id]}", :patch, params, options)
|
|
438
|
+
response, options = Api.send_request("/notifications/#{params[:id]}", :patch, params, options) { |reply| reply.require_object("Notification") }
|
|
417
439
|
Notification.new(response.data, options)
|
|
418
440
|
end
|
|
419
441
|
|
|
442
|
+
# params:: Hash of API operation parameter values.
|
|
443
|
+
# options:: Hash of optional request configuration passed to Files::Api.send_request.
|
|
444
|
+
#
|
|
445
|
+
# Returns nil.
|
|
420
446
|
def self.delete(id, params = {}, options = {})
|
|
421
447
|
params ||= {}
|
|
422
448
|
params[:id] = id
|