files.com 1.0.54 → 1.0.59

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/_VERSION +1 -1
  3. data/docs/bundle.md +54 -5
  4. data/docs/remote_server.md +8 -0
  5. data/docs/site.md +2 -2
  6. data/docs/sso_strategy.md +4 -0
  7. data/lib/files.com/models/api_key.rb +5 -5
  8. data/lib/files.com/models/as2_key.rb +5 -5
  9. data/lib/files.com/models/automation.rb +3 -3
  10. data/lib/files.com/models/behavior.rb +5 -5
  11. data/lib/files.com/models/bundle.rb +54 -12
  12. data/lib/files.com/models/dns_record.rb +2 -2
  13. data/lib/files.com/models/file.rb +9 -9
  14. data/lib/files.com/models/file_action.rb +6 -6
  15. data/lib/files.com/models/file_comment.rb +2 -2
  16. data/lib/files.com/models/file_comment_reaction.rb +2 -2
  17. data/lib/files.com/models/folder.rb +2 -2
  18. data/lib/files.com/models/group.rb +3 -3
  19. data/lib/files.com/models/group_user.rb +8 -8
  20. data/lib/files.com/models/history.rb +11 -11
  21. data/lib/files.com/models/history_export.rb +10 -10
  22. data/lib/files.com/models/invoice.rb +3 -3
  23. data/lib/files.com/models/ip_address.rb +2 -2
  24. data/lib/files.com/models/lock.rb +3 -3
  25. data/lib/files.com/models/message.rb +9 -9
  26. data/lib/files.com/models/message_comment.rb +6 -6
  27. data/lib/files.com/models/message_comment_reaction.rb +6 -6
  28. data/lib/files.com/models/message_reaction.rb +6 -6
  29. data/lib/files.com/models/notification.rb +7 -7
  30. data/lib/files.com/models/payment.rb +3 -3
  31. data/lib/files.com/models/permission.rb +5 -5
  32. data/lib/files.com/models/project.rb +3 -3
  33. data/lib/files.com/models/public_key.rb +5 -5
  34. data/lib/files.com/models/remote_server.rb +24 -9
  35. data/lib/files.com/models/request.rb +7 -7
  36. data/lib/files.com/models/site.rb +13 -13
  37. data/lib/files.com/models/sso_strategy.rb +13 -3
  38. data/lib/files.com/models/usage_daily_snapshot.rb +2 -2
  39. data/lib/files.com/models/usage_snapshot.rb +2 -2
  40. data/lib/files.com/models/user.rb +15 -15
  41. data/lib/files.com/models/user_cipher_use.rb +3 -3
  42. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64936e0a59491caee7612a381f60ec80fa668fd0521f5128c9399968c5f61a68
4
- data.tar.gz: 46feb771395fe8493fa2b9899dd1d30efac1e764186d2300ffe256dd74b0c6d3
3
+ metadata.gz: c09bc8021adb4407a4e021795500c97bf535041760612308aacfaa0ff708975d
4
+ data.tar.gz: af4beceec1c7ffdf320aa36be097ee9c46a54752a6deeb785646885cf55914fd
5
5
  SHA512:
6
- metadata.gz: e538fff261ea6b9b2352577d193800bf2f29178307bf5fbabd9b5f3f96df339ad86e0d1aaa7dfd3f40d75056dd050836bd6e3ba26b0e0e88b8eb18dcb77b4b61
7
- data.tar.gz: 4c2df44929c18b57ab43e0d30df5fdc6045251a4bc6366859943f57cae522b69d5f3d5516347b7675b637ee80573067ab0a424f39ecd9b60039621389303948b
6
+ metadata.gz: 18cc2d35f9e043ac4435c386412f2858dc19d3dd8632869a103ec3a018896786e39eeabb85e9efcc957813d7eea7246f871fb52d1332d0579b3baf5e9a6dddb0
7
+ data.tar.gz: dda980081bfec7c386cd762619c536a08c27b7ea5966f16e390b467ba2b951c38be5cc38f9df485c5b74faaa230c8033aef8c81964a5d3661243c524cd83c252
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.54
1
+ 1.0.59
@@ -77,8 +77,8 @@ Files::Bundle.create(
77
77
  paths: ["file.txt"],
78
78
  password: "Password",
79
79
  expires_at: "2000-01-01T01:00:00Z",
80
- description: "Public description",
81
- note: "Internal Note",
80
+ description: "The public description of the bundle.",
81
+ note: "The internal note on the bundle.",
82
82
  code: "abc123"
83
83
  )
84
84
  ```
@@ -88,10 +88,10 @@ Files::Bundle.create(
88
88
  * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
89
89
  * `paths` (array(string)): Required - A list of paths to include in this bundle.
90
90
  * `password` (string): Password for this bundle.
91
- * `expires_at` (string): Bundle expiration date/time.
92
- * `description` (string): Bundle public description
91
+ * `expires_at` (string): Bundle expiration date/time
92
+ * `description` (string): Public description
93
93
  * `note` (string): Bundle internal note
94
- * `code` (string): Bundle name
94
+ * `code` (string): Bundle code. This code forms the end part of the Public URL.
95
95
 
96
96
 
97
97
  ---
@@ -112,6 +112,30 @@ Files::Bundle.share(id,
112
112
  * `note` (string): Note to include in email.
113
113
 
114
114
 
115
+ ---
116
+
117
+ ## Update Bundle
118
+
119
+ ```
120
+ Files::Bundle.update(id,
121
+ password: "Password",
122
+ expires_at: "2000-01-01T01:00:00Z",
123
+ description: "The public description of the bundle.",
124
+ note: "The internal note on the bundle.",
125
+ code: "abc123"
126
+ )
127
+ ```
128
+
129
+ ### Parameters
130
+
131
+ * `id` (int64): Required - Bundle ID.
132
+ * `password` (string): Password for this bundle.
133
+ * `expires_at` (string): Bundle expiration date/time
134
+ * `description` (string): Public description
135
+ * `note` (string): Bundle internal note
136
+ * `code` (string): Bundle code. This code forms the end part of the Public URL.
137
+
138
+
115
139
  ---
116
140
 
117
141
  ## Delete Bundle
@@ -144,6 +168,31 @@ bundle.share(
144
168
  * `note` (string): Note to include in email.
145
169
 
146
170
 
171
+ ---
172
+
173
+ ## Update Bundle
174
+
175
+ ```
176
+ bundle = Files::Bundle.find(1)
177
+ bundle.update(
178
+ password: "Password",
179
+ expires_at: "2000-01-01T01:00:00Z",
180
+ description: "The public description of the bundle.",
181
+ note: "The internal note on the bundle.",
182
+ code: "abc123"
183
+ )
184
+ ```
185
+
186
+ ### Parameters
187
+
188
+ * `id` (int64): Required - Bundle ID.
189
+ * `password` (string): Password for this bundle.
190
+ * `expires_at` (string): Bundle expiration date/time
191
+ * `description` (string): Public description
192
+ * `note` (string): Bundle internal note
193
+ * `code` (string): Bundle code. This code forms the end part of the Public URL.
194
+
195
+
147
196
  ---
148
197
 
149
198
  ## Delete Bundle
@@ -13,6 +13,7 @@
13
13
  "s3_bucket": "my-bucket",
14
14
  "s3_region": "us-east-1",
15
15
  "server_certificate": "[certificate]",
16
+ "server_host_key": "[public key]",
16
17
  "server_type": "s3",
17
18
  "ssl": "always",
18
19
  "username": "user",
@@ -34,6 +35,7 @@
34
35
  * `s3_bucket` (string): S3 bucket name
35
36
  * `s3_region` (string): S3 region
36
37
  * `server_certificate` (string): Remote server certificate
38
+ * `server_host_key` (string): Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
37
39
  * `server_type` (string): Remote server type.
38
40
  * `ssl` (string): Should we require SSL?
39
41
  * `username` (string): Remote server username. Not needed for S3 buckets.
@@ -98,6 +100,7 @@ Files::RemoteServer.create(
98
100
  s3_bucket: "my-bucket",
99
101
  s3_region: "us-east-1",
100
102
  server_certificate: "[certificate]",
103
+ server_host_key: "[public key]",
101
104
  server_type: "s3",
102
105
  ssl: "always",
103
106
  username: "user",
@@ -128,6 +131,7 @@ Files::RemoteServer.create(
128
131
  * `s3_bucket` (string): S3 bucket name
129
132
  * `s3_region` (string): S3 region
130
133
  * `server_certificate` (string): Remote server certificate
134
+ * `server_host_key` (string): Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
131
135
  * `server_type` (string): Remote server type.
132
136
  * `ssl` (string): Should we require SSL?
133
137
  * `username` (string): Remote server username. Not needed for S3 buckets.
@@ -152,6 +156,7 @@ Files::RemoteServer.update(id,
152
156
  s3_bucket: "my-bucket",
153
157
  s3_region: "us-east-1",
154
158
  server_certificate: "[certificate]",
159
+ server_host_key: "[public key]",
155
160
  server_type: "s3",
156
161
  ssl: "always",
157
162
  username: "user",
@@ -183,6 +188,7 @@ Files::RemoteServer.update(id,
183
188
  * `s3_bucket` (string): S3 bucket name
184
189
  * `s3_region` (string): S3 region
185
190
  * `server_certificate` (string): Remote server certificate
191
+ * `server_host_key` (string): Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
186
192
  * `server_type` (string): Remote server type.
187
193
  * `ssl` (string): Should we require SSL?
188
194
  * `username` (string): Remote server username. Not needed for S3 buckets.
@@ -221,6 +227,7 @@ remote_server.update(
221
227
  s3_bucket: "my-bucket",
222
228
  s3_region: "us-east-1",
223
229
  server_certificate: "[certificate]",
230
+ server_host_key: "[public key]",
224
231
  server_type: "s3",
225
232
  ssl: "always",
226
233
  username: "user",
@@ -252,6 +259,7 @@ remote_server.update(
252
259
  * `s3_bucket` (string): S3 bucket name
253
260
  * `s3_region` (string): S3 region
254
261
  * `server_certificate` (string): Remote server certificate
262
+ * `server_host_key` (string): Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
255
263
  * `server_type` (string): Remote server type.
256
264
  * `ssl` (string): Should we require SSL?
257
265
  * `username` (string): Remote server username. Not needed for S3 buckets.
@@ -262,7 +262,7 @@ Files::Site.update(
262
262
  desktop_app_session_lifetime: 1,
263
263
  folder_permissions_groups_only: true,
264
264
  welcome_screen: "user_controlled",
265
- session_expiry: 6.0,
265
+ session_expiry: 1.0,
266
266
  ssl_required: true,
267
267
  tls_disabled: true,
268
268
  user_lockout: true,
@@ -349,7 +349,7 @@ Files::Site.update(
349
349
  * `desktop_app_session_lifetime` (int64): Desktop app session lifetime (in hours)
350
350
  * `folder_permissions_groups_only` (boolean): If true, permissions for this site must be bound to a group (not a user). Otherwise, permissions must be bound to a user.
351
351
  * `welcome_screen` (string): Does the welcome screen appear?
352
- * `session_expiry` (number): Session expiry in hours
352
+ * `session_expiry` (double): Session expiry in hours
353
353
  * `ssl_required` (boolean): Is SSL required? Disabling this is insecure.
354
354
  * `tls_disabled` (boolean): Is TLS disabled(site setting)?
355
355
  * `user_lockout` (boolean): Will users be locked out after incorrect login attempts?
@@ -6,6 +6,8 @@
6
6
  {
7
7
  "protocol": "okta",
8
8
  "provider": "okta",
9
+ "label": "My Corporate SSO Provider",
10
+ "logo_url": "https://mysite.files.com/.../logo.png",
9
11
  "id": 1,
10
12
  "saml_provider_cert_fingerprint": "",
11
13
  "saml_provider_issuer_url": "",
@@ -31,6 +33,8 @@
31
33
 
32
34
  * `protocol` (string): SSO Protocol
33
35
  * `provider` (string): Provider name
36
+ * `label` (string): Custom label for the SSO provider on the login page.
37
+ * `logo_url` (string): URL holding a custom logo for the SSO provider on the login page.
34
38
  * `id` (int64): ID
35
39
  * `saml_provider_cert_fingerprint` (string): Identity provider sha256 cert fingerprint if saml_provider_metadata_url is not available.
36
40
  * `saml_provider_issuer_url` (string): Identity provider issuer url
@@ -136,9 +136,9 @@ module Files
136
136
  end
137
137
 
138
138
  # Parameters:
139
- # user_id - integer - User ID. Provide a value of `0` to operate the current session's user.
140
- # page - integer - Current page number.
141
- # per_page - integer - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
139
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
140
+ # page - int64 - Current page number.
141
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
142
142
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
143
143
  def self.list(params = {}, options = {})
144
144
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
@@ -159,7 +159,7 @@ module Files
159
159
  end
160
160
 
161
161
  # Parameters:
162
- # id (required) - integer - Api Key ID.
162
+ # id (required) - int64 - Api Key ID.
163
163
  def self.find(id, params = {}, options = {})
164
164
  params ||= {}
165
165
  params[:id] = id
@@ -175,7 +175,7 @@ module Files
175
175
  end
176
176
 
177
177
  # Parameters:
178
- # user_id - integer - User ID. Provide a value of `0` to operate the current session's user.
178
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
179
179
  # name - string - Internal name for key. For your reference only.
180
180
  # permission_set - string - Leave blank, or set to 'desktop_app' to restrict the key to only desktop app functions.
181
181
  # expires_at - string - Have the key expire at this date/time.
@@ -97,9 +97,9 @@ module Files
97
97
  end
98
98
 
99
99
  # Parameters:
100
- # user_id - integer - User ID. Provide a value of `0` to operate the current session's user.
101
- # page - integer - Current page number.
102
- # per_page - integer - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
100
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
101
+ # page - int64 - Current page number.
102
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
103
103
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
104
104
  def self.list(params = {}, options = {})
105
105
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
@@ -115,7 +115,7 @@ module Files
115
115
  end
116
116
 
117
117
  # Parameters:
118
- # id (required) - integer - As2 Key ID.
118
+ # id (required) - int64 - As2 Key ID.
119
119
  def self.find(id, params = {}, options = {})
120
120
  params ||= {}
121
121
  params[:id] = id
@@ -131,7 +131,7 @@ module Files
131
131
  end
132
132
 
133
133
  # Parameters:
134
- # user_id - integer - User ID. Provide a value of `0` to operate the current session's user.
134
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
135
135
  # as2_partnership_name (required) - string - AS2 Partnership Name
136
136
  # public_key (required) - string - Actual contents of Public key.
137
137
  def self.create(params = {}, options = {})
@@ -180,8 +180,8 @@ module Files
180
180
  end
181
181
 
182
182
  # Parameters:
183
- # page - integer - Current page number.
184
- # per_page - integer - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
183
+ # page - int64 - Current page number.
184
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
185
185
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
186
186
  # automation - string - Type of automation to filter by.
187
187
  def self.list(params = {}, options = {})
@@ -198,7 +198,7 @@ module Files
198
198
  end
199
199
 
200
200
  # Parameters:
201
- # id (required) - integer - Automation ID.
201
+ # id (required) - int64 - Automation ID.
202
202
  def self.find(id, params = {}, options = {})
203
203
  params ||= {}
204
204
  params[:id] = id
@@ -101,8 +101,8 @@ module Files
101
101
  end
102
102
 
103
103
  # Parameters:
104
- # page - integer - Current page number.
105
- # per_page - integer - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
104
+ # page - int64 - Current page number.
105
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
106
106
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
107
107
  # behavior - string - If set, only shows folder behaviors matching this behavior type.
108
108
  def self.list(params = {}, options = {})
@@ -119,8 +119,8 @@ module Files
119
119
  end
120
120
 
121
121
  # Parameters:
122
- # page - integer - Current page number.
123
- # per_page - integer - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
122
+ # page - int64 - Current page number.
123
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
124
124
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
125
125
  # path (required) - string - Path to operate on.
126
126
  # recursive - string - Show behaviors below this path?
@@ -140,7 +140,7 @@ module Files
140
140
  end
141
141
 
142
142
  # Parameters:
143
- # id (required) - integer - Behavior ID.
143
+ # id (required) - int64 - Behavior ID.
144
144
  def self.find(id, params = {}, options = {})
145
145
  params ||= {}
146
146
  params[:id] = id
@@ -116,7 +116,7 @@ module Files
116
116
  # Send email(s) with a link to bundle
117
117
  #
118
118
  # Parameters:
119
- # to (required) - array - A list of email addresses to share this bundle with.
119
+ # to (required) - array(string) - A list of email addresses to share this bundle with.
120
120
  # note - string - Note to include in email.
121
121
  def share(params = {})
122
122
  params ||= {}
@@ -131,6 +131,27 @@ module Files
131
131
  Api.send_request("/bundles/#{@attributes[:id]}/share", :post, params, @options)
132
132
  end
133
133
 
134
+ # Parameters:
135
+ # password - string - Password for this bundle.
136
+ # expires_at - string - Bundle expiration date/time
137
+ # description - string - Public description
138
+ # note - string - Bundle internal note
139
+ # code - string - Bundle code. This code forms the end part of the Public URL.
140
+ def update(params = {})
141
+ params ||= {}
142
+ params[:id] = @attributes[:id]
143
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
144
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
145
+ raise InvalidParameterError.new("Bad parameter: password must be an String") if params.dig(:password) and !params.dig(:password).is_a?(String)
146
+ raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params.dig(:expires_at) and !params.dig(:expires_at).is_a?(String)
147
+ raise InvalidParameterError.new("Bad parameter: description must be an String") if params.dig(:description) and !params.dig(:description).is_a?(String)
148
+ raise InvalidParameterError.new("Bad parameter: note must be an String") if params.dig(:note) and !params.dig(:note).is_a?(String)
149
+ raise InvalidParameterError.new("Bad parameter: code must be an String") if params.dig(:code) and !params.dig(:code).is_a?(String)
150
+ raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
151
+
152
+ Api.send_request("/bundles/#{@attributes[:id]}", :patch, params, @options)
153
+ end
154
+
134
155
  def delete(params = {})
135
156
  params ||= {}
136
157
  params[:id] = @attributes[:id]
@@ -147,7 +168,7 @@ module Files
147
168
 
148
169
  def save
149
170
  if @attributes[:id]
150
- raise NotImplementedError.new("The Bundle object doesn't support updates.")
171
+ update(@attributes)
151
172
  else
152
173
  new_obj = Bundle.create(@attributes, @options)
153
174
  @attributes = new_obj.attributes
@@ -155,9 +176,9 @@ module Files
155
176
  end
156
177
 
157
178
  # Parameters:
158
- # user_id - integer - User ID. Provide a value of `0` to operate the current session's user.
159
- # page - integer - Current page number.
160
- # per_page - integer - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
179
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
180
+ # page - int64 - Current page number.
181
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
161
182
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
162
183
  def self.list(params = {}, options = {})
163
184
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
@@ -173,7 +194,7 @@ module Files
173
194
  end
174
195
 
175
196
  # Parameters:
176
- # id (required) - integer - Bundle ID.
197
+ # id (required) - int64 - Bundle ID.
177
198
  def self.find(id, params = {}, options = {})
178
199
  params ||= {}
179
200
  params[:id] = id
@@ -189,13 +210,13 @@ module Files
189
210
  end
190
211
 
191
212
  # Parameters:
192
- # user_id - integer - User ID. Provide a value of `0` to operate the current session's user.
193
- # paths (required) - array - A list of paths to include in this bundle.
213
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
214
+ # paths (required) - array(string) - A list of paths to include in this bundle.
194
215
  # password - string - Password for this bundle.
195
- # expires_at - string - Bundle expiration date/time.
196
- # description - string - Bundle public description
216
+ # expires_at - string - Bundle expiration date/time
217
+ # description - string - Public description
197
218
  # note - string - Bundle internal note
198
- # code - string - Bundle name
219
+ # code - string - Bundle code. This code forms the end part of the Public URL.
199
220
  def self.create(params = {}, options = {})
200
221
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
201
222
  raise InvalidParameterError.new("Bad parameter: paths must be an Array") if params.dig(:paths) and !params.dig(:paths).is_a?(Array)
@@ -213,7 +234,7 @@ module Files
213
234
  # Send email(s) with a link to bundle
214
235
  #
215
236
  # Parameters:
216
- # to (required) - array - A list of email addresses to share this bundle with.
237
+ # to (required) - array(string) - A list of email addresses to share this bundle with.
217
238
  # note - string - Note to include in email.
218
239
  def self.share(id, params = {}, options = {})
219
240
  params ||= {}
@@ -228,6 +249,27 @@ module Files
228
249
  response.data
229
250
  end
230
251
 
252
+ # Parameters:
253
+ # password - string - Password for this bundle.
254
+ # expires_at - string - Bundle expiration date/time
255
+ # description - string - Public description
256
+ # note - string - Bundle internal note
257
+ # code - string - Bundle code. This code forms the end part of the Public URL.
258
+ def self.update(id, params = {}, options = {})
259
+ params ||= {}
260
+ params[:id] = id
261
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
262
+ raise InvalidParameterError.new("Bad parameter: password must be an String") if params.dig(:password) and !params.dig(:password).is_a?(String)
263
+ raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params.dig(:expires_at) and !params.dig(:expires_at).is_a?(String)
264
+ raise InvalidParameterError.new("Bad parameter: description must be an String") if params.dig(:description) and !params.dig(:description).is_a?(String)
265
+ raise InvalidParameterError.new("Bad parameter: note must be an String") if params.dig(:note) and !params.dig(:note).is_a?(String)
266
+ raise InvalidParameterError.new("Bad parameter: code must be an String") if params.dig(:code) and !params.dig(:code).is_a?(String)
267
+ raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
268
+
269
+ response, options = Api.send_request("/bundles/#{params[:id]}", :patch, params, options)
270
+ Bundle.new(response.data, options)
271
+ end
272
+
231
273
  def self.delete(id, params = {}, options = {})
232
274
  params ||= {}
233
275
  params[:id] = id
@@ -30,8 +30,8 @@ module Files
30
30
  end
31
31
 
32
32
  # Parameters:
33
- # page - integer - Current page number.
34
- # per_page - integer - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
33
+ # page - int64 - Current page number.
34
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
35
35
  # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
36
36
  def self.list(params = {}, options = {})
37
37
  raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
@@ -825,7 +825,7 @@ module Files
825
825
  #
826
826
  # Parameters:
827
827
  # action - string - Can be blank, `redirect` or `stat`. If set to `stat`, we will return file information but without a download URL, and without logging a download. If set to `redirect` we will serve a 302 redirect directly to the file. This is used for integrations with Zapier, and is not recommended for most integrations.
828
- # id - integer - If provided, lookup the file by id instead of path.
828
+ # id - int64 - If provided, lookup the file by id instead of path.
829
829
  # with_previews - boolean - Include file preview information?
830
830
  # with_priority_color - boolean - Include file priority color information?
831
831
  def download(params = {})
@@ -884,7 +884,7 @@ module Files
884
884
  #
885
885
  # Parameters:
886
886
  # action - string - Can be blank, `redirect` or `stat`. If set to `stat`, we will return file information but without a download URL, and without logging a download. If set to `redirect` we will serve a 302 redirect directly to the file. This is used for integrations with Zapier, and is not recommended for most integrations.
887
- # id - integer - If provided, lookup the file by id instead of path.
887
+ # id - int64 - If provided, lookup the file by id instead of path.
888
888
  # with_previews - boolean - Include file preview information?
889
889
  # with_priority_color - boolean - Include file priority color information?
890
890
  def self.download(path, params = {}, options = {})
@@ -902,16 +902,16 @@ module Files
902
902
  # Parameters:
903
903
  # path (required) - string - Path to operate on.
904
904
  # action - string - The action to perform. Can be `append`, `attachment`, `end`, `upload`, `put`, or may not exist
905
- # etags[etag] (required) - array - etag identifier.
906
- # etags[part] (required) - array - Part number.
907
- # length - integer - Length of file.
905
+ # etags[etag] (required) - array(string) - etag identifier.
906
+ # etags[part] (required) - array(int64) - Part number.
907
+ # length - int64 - Length of file.
908
908
  # mkdir_parents - boolean - Create parent directories if they do not exist?
909
- # part - integer - Part if uploading a part.
910
- # parts - integer - How many parts to fetch?
909
+ # part - int64 - Part if uploading a part.
910
+ # parts - int64 - How many parts to fetch?
911
911
  # provided_mtime - string - User provided modification time.
912
912
  # ref - string -
913
- # restart - integer - File byte offset to restart from.
914
- # size - integer - Size of file.
913
+ # restart - int64 - File byte offset to restart from.
914
+ # size - int64 - Size of file.
915
915
  # structure - string - If copying folder, copy just the structure?
916
916
  # with_rename - boolean - Allow file rename instead of overwrite?
917
917
  def self.create(path, params = {}, options = {})