files.com 1.0.150 → 1.0.155

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 940c377b195416e86507580f31199480f7c5c6584376b98aeefc79db3b3701fb
4
- data.tar.gz: 11dd4c65a619afa1f88117aa742a5485fd458f296d735efd3566c225d757ce2d
3
+ metadata.gz: '0955c88244f369e9f4270c079fcd151db97804e8c4f09982a35f46f51297b934'
4
+ data.tar.gz: 6d3a990d55c77ad0ec68c0211dcb12935543c2b28c4901b6d3b731e3d5b50f7d
5
5
  SHA512:
6
- metadata.gz: 2194b7f45aeed071a28b319fc48180a38d232d6423f9d9c57af01627049e8559aa0a8ee0c0e0f4a36e7e947236bbc9e93b72329c0a3c57c1ddab1be21132c93b
7
- data.tar.gz: a349c39f0d7c92cee235ebd0a3843e72c970017b4bdcf5d585d0d85160335f5b0cbcf08c932a4d96d607df30e129f85697e867234ff11025a62e3600577acade
6
+ metadata.gz: a6bbf3b1e8e7f66c47293bc6c5b3302463b90d52003702e2195233ecc4d0a0ffc942cec2b3d25312a1a73b4a5a5f371980260fccd08b25b5285142fb13793a7a
7
+ data.tar.gz: 52a48d8beac38d91e6b7af48f3281ad8812b44872235eef60f227faad4927faf609f6d94fae3702b61af42c4dcc5eb866faf605f64e6e571db20e79b7df0d8d8
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.150
1
+ 1.0.155
data/docs/api_key.md CHANGED
@@ -61,17 +61,9 @@ Files::ApiKey.list(
61
61
  ## Show information about current API key. (Requires current API connection to be using an API key.)
62
62
 
63
63
  ```
64
- Files::ApiKey.find_current(
65
- format: "",
66
- api_key: ""
67
- )
64
+ Files::ApiKey.find_current
68
65
  ```
69
66
 
70
- ### Parameters
71
-
72
- * `format` (string):
73
- * `api_key` (object):
74
-
75
67
 
76
68
  ---
77
69
 
@@ -153,17 +145,9 @@ Files::ApiKey.update(id,
153
145
  ## Delete current API key. (Requires current API connection to be using an API key.)
154
146
 
155
147
  ```
156
- Files::ApiKey.delete_current(
157
- format: "",
158
- api_key: ""
159
- )
148
+ Files::ApiKey.delete_current
160
149
  ```
161
150
 
162
- ### Parameters
163
-
164
- * `format` (string):
165
- * `api_key` (object):
166
-
167
151
 
168
152
  ---
169
153
 
data/docs/bundle.md CHANGED
@@ -35,7 +35,10 @@
35
35
  "default_option": "red",
36
36
  "form_field_set_id": 1
37
37
  }
38
- ]
38
+ ],
39
+ "skip_name": true,
40
+ "skip_email": true,
41
+ "skip_company": true
39
42
  },
40
43
  "id": 1,
41
44
  "created_at": "2000-01-01T01:00:00Z",
@@ -168,9 +171,9 @@ Files::Bundle.share(id,
168
171
  ### Parameters
169
172
 
170
173
  * `id` (int64): Required - Bundle ID.
171
- * `to` (array(string)): Required - A list of email addresses to share this bundle with.
174
+ * `to` (array(string)): A list of email addresses to share this bundle with. Required unless `recipients` is used.
172
175
  * `note` (string): Note to include in email.
173
- * `recipients` (array(object)): A list of recipients to share this bundle with.
176
+ * `recipients` (array(object)): A list of recipients to share this bundle with. Required unless `to` is used.
174
177
 
175
178
 
176
179
  ---
@@ -241,9 +244,9 @@ bundle.share(
241
244
  ### Parameters
242
245
 
243
246
  * `id` (int64): Required - Bundle ID.
244
- * `to` (array(string)): Required - A list of email addresses to share this bundle with.
247
+ * `to` (array(string)): A list of email addresses to share this bundle with. Required unless `recipients` is used.
245
248
  * `note` (string): Note to include in email.
246
- * `recipients` (array(object)): A list of recipients to share this bundle with.
249
+ * `recipients` (array(object)): A list of recipients to share this bundle with. Required unless `to` is used.
247
250
 
248
251
 
249
252
  ---
@@ -27,7 +27,10 @@
27
27
  "default_option": "red",
28
28
  "form_field_set_id": 1
29
29
  }
30
- ]
30
+ ],
31
+ "skip_name": true,
32
+ "skip_email": true,
33
+ "skip_company": true
31
34
  }
32
35
  ```
33
36
 
@@ -35,6 +38,9 @@
35
38
  * `title` (string): Title to be displayed
36
39
  * `form_layout` (int64): Layout of the form
37
40
  * `form_fields` (array): Associated form fields
41
+ * `skip_name` (boolean): Any associated InboxRegistrations or BundleRegistrations can be saved without providing name
42
+ * `skip_email` (boolean): Any associated InboxRegistrations or BundleRegistrations can be saved without providing email
43
+ * `skip_company` (boolean): Any associated InboxRegistrations or BundleRegistrations can be saved without providing company
38
44
  * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
39
45
 
40
46
 
@@ -77,6 +83,9 @@ Files::FormFieldSet.find(id)
77
83
  Files::FormFieldSet.create(
78
84
  user_id: 1,
79
85
  title: "Sample Form Title",
86
+ skip_email: true,
87
+ skip_name: true,
88
+ skip_company: true,
80
89
  form_fields: [{"label":"Sample Label","required":true,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}]
81
90
  )
82
91
  ```
@@ -85,6 +94,9 @@ Files::FormFieldSet.create(
85
94
 
86
95
  * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
87
96
  * `title` (string): Title to be displayed
97
+ * `skip_email` (boolean): Skip validating form email
98
+ * `skip_name` (boolean): Skip validating form name
99
+ * `skip_company` (boolean): Skip validating company
88
100
  * `form_fields` (array(object)):
89
101
 
90
102
 
@@ -95,6 +107,9 @@ Files::FormFieldSet.create(
95
107
  ```
96
108
  Files::FormFieldSet.update(id,
97
109
  title: "Sample Form Title",
110
+ skip_email: true,
111
+ skip_name: true,
112
+ skip_company: true,
98
113
  form_fields: [{"id":1,"label":"Sample Label","required":true,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}]
99
114
  )
100
115
  ```
@@ -103,6 +118,9 @@ Files::FormFieldSet.update(id,
103
118
 
104
119
  * `id` (int64): Required - Form Field Set ID.
105
120
  * `title` (string): Title to be displayed
121
+ * `skip_email` (boolean): Skip validating form email
122
+ * `skip_name` (boolean): Skip validating form name
123
+ * `skip_company` (boolean): Skip validating company
106
124
  * `form_fields` (array(object)):
107
125
 
108
126
 
@@ -128,6 +146,9 @@ form_field_set = Files::FormFieldSet.list_for(path).first
128
146
 
129
147
  form_field_set.update(
130
148
  title: "Sample Form Title",
149
+ skip_email: true,
150
+ skip_name: true,
151
+ skip_company: true,
131
152
  form_fields: [{"id":1,"label":"Sample Label","required":true,"help_text":"Help Text","field_type":"text","options_for_select":["red","green","blue"],"default_option":"red","form_field_set_id":1}]
132
153
  )
133
154
  ```
@@ -136,6 +157,9 @@ form_field_set.update(
136
157
 
137
158
  * `id` (int64): Required - Form Field Set ID.
138
159
  * `title` (string): Title to be displayed
160
+ * `skip_email` (boolean): Skip validating form email
161
+ * `skip_name` (boolean): Skip validating form name
162
+ * `skip_company` (boolean): Skip validating company
139
163
  * `form_fields` (array(object)):
140
164
 
141
165
 
data/docs/group_user.md CHANGED
@@ -42,6 +42,25 @@ Files::GroupUser.list(
42
42
  * `group_id` (int64): Group ID. If provided, will return group_users of this group.
43
43
 
44
44
 
45
+ ---
46
+
47
+ ## Create Group User
48
+
49
+ ```
50
+ Files::GroupUser.create(
51
+ group_id: 1,
52
+ user_id: 1,
53
+ admin: true
54
+ )
55
+ ```
56
+
57
+ ### Parameters
58
+
59
+ * `group_id` (int64): Required - Group ID to add user to.
60
+ * `user_id` (int64): Required - User ID to add to group.
61
+ * `admin` (boolean): Is the user a group administrator?
62
+
63
+
45
64
  ---
46
65
 
47
66
  ## Update Group User
data/docs/session.md CHANGED
@@ -74,13 +74,5 @@ Files::Session.create(
74
74
  ## Delete user session (log out)
75
75
 
76
76
  ```
77
- Files::Session.delete(
78
- format: "",
79
- session: ""
80
- )
77
+ Files::Session.delete
81
78
  ```
82
-
83
- ### Parameters
84
-
85
- * `format` (string):
86
- * `session` (object):
data/docs/site.md CHANGED
@@ -324,34 +324,18 @@
324
324
  ## Show site settings
325
325
 
326
326
  ```
327
- Files::Site.get(
328
- format: "",
329
- site: ""
330
- )
327
+ Files::Site.get
331
328
  ```
332
329
 
333
- ### Parameters
334
-
335
- * `format` (string):
336
- * `site` (object):
337
-
338
330
 
339
331
  ---
340
332
 
341
333
  ## Get the most recent usage snapshot (usage data for billing purposes) for a Site
342
334
 
343
335
  ```
344
- Files::Site.get_usage(
345
- format: "",
346
- site: ""
347
- )
336
+ Files::Site.get_usage
348
337
  ```
349
338
 
350
- ### Parameters
351
-
352
- * `format` (string):
353
- * `site` (object):
354
-
355
339
 
356
340
  ---
357
341
 
@@ -175,6 +175,7 @@ module Files
175
175
  class ModelSaveErrorError < ProcessingFailureError; end
176
176
  class MultipartUploadsRequiredForRemotesError < ProcessingFailureError; end
177
177
  class MultipleProcessingErrorsError < ProcessingFailureError; end
178
+ class RecipientAlreadySharedError < ProcessingFailureError; end
178
179
  class RemoteServerErrorError < ProcessingFailureError; end
179
180
  class ResourceLockedError < ProcessingFailureError; end
180
181
  class SubfolderLockedError < ProcessingFailureError; end
@@ -176,13 +176,7 @@ module Files
176
176
  list(params, options)
177
177
  end
178
178
 
179
- # Parameters:
180
- # format - string
181
- # api_key - object
182
179
  def self.find_current(params = {}, options = {})
183
- raise InvalidParameterError.new("Bad parameter: format must be an String") if params.dig(:format) and !params.dig(:format).is_a?(String)
184
- raise InvalidParameterError.new("Bad parameter: api_key must be an Hash") if params.dig(:api_key) and !params.dig(:api_key).is_a?(Hash)
185
-
186
180
  response, options = Api.send_request("/api_key", :get, params, options)
187
181
  ApiKey.new(response.data, options)
188
182
  end
@@ -250,13 +244,7 @@ module Files
250
244
  ApiKey.new(response.data, options)
251
245
  end
252
246
 
253
- # Parameters:
254
- # format - string
255
- # api_key - object
256
247
  def self.delete_current(params = {}, options = {})
257
- raise InvalidParameterError.new("Bad parameter: format must be an String") if params.dig(:format) and !params.dig(:format).is_a?(String)
258
- raise InvalidParameterError.new("Bad parameter: api_key must be an Hash") if params.dig(:api_key) and !params.dig(:api_key).is_a?(Hash)
259
-
260
248
  response, _options = Api.send_request("/api_key", :delete, params, options)
261
249
  response.data
262
250
  end
@@ -197,9 +197,9 @@ module Files
197
197
  # Send email(s) with a link to bundle
198
198
  #
199
199
  # Parameters:
200
- # to (required) - array(string) - A list of email addresses to share this bundle with.
200
+ # to - array(string) - A list of email addresses to share this bundle with. Required unless `recipients` is used.
201
201
  # note - string - Note to include in email.
202
- # recipients - array(object) - A list of recipients to share this bundle with.
202
+ # recipients - array(object) - A list of recipients to share this bundle with. Required unless `to` is used.
203
203
  def share(params = {})
204
204
  params ||= {}
205
205
  params[:id] = @attributes[:id]
@@ -209,7 +209,6 @@ module Files
209
209
  raise InvalidParameterError.new("Bad parameter: note must be an String") if params.dig(:note) and !params.dig(:note).is_a?(String)
210
210
  raise InvalidParameterError.new("Bad parameter: recipients must be an Array") if params.dig(:recipients) and !params.dig(:recipients).is_a?(Array)
211
211
  raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
212
- raise MissingParameterError.new("Parameter missing: to") unless params.dig(:to)
213
212
 
214
213
  Api.send_request("/bundles/#{@attributes[:id]}/share", :post, params, @options)
215
214
  end
@@ -353,9 +352,9 @@ module Files
353
352
  # Send email(s) with a link to bundle
354
353
  #
355
354
  # Parameters:
356
- # to (required) - array(string) - A list of email addresses to share this bundle with.
355
+ # to - array(string) - A list of email addresses to share this bundle with. Required unless `recipients` is used.
357
356
  # note - string - Note to include in email.
358
- # recipients - array(object) - A list of recipients to share this bundle with.
357
+ # recipients - array(object) - A list of recipients to share this bundle with. Required unless `to` is used.
359
358
  def self.share(id, params = {}, options = {})
360
359
  params ||= {}
361
360
  params[:id] = id
@@ -364,7 +363,6 @@ module Files
364
363
  raise InvalidParameterError.new("Bad parameter: note must be an String") if params.dig(:note) and !params.dig(:note).is_a?(String)
365
364
  raise InvalidParameterError.new("Bad parameter: recipients must be an Array") if params.dig(:recipients) and !params.dig(:recipients).is_a?(Array)
366
365
  raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
367
- raise MissingParameterError.new("Parameter missing: to") unless params.dig(:to)
368
366
 
369
367
  response, _options = Api.send_request("/bundles/#{params[:id]}/share", :post, params, options)
370
368
  response.data
@@ -45,6 +45,33 @@ module Files
45
45
  @attributes[:form_fields] = value
46
46
  end
47
47
 
48
+ # boolean - Any associated InboxRegistrations or BundleRegistrations can be saved without providing name
49
+ def skip_name
50
+ @attributes[:skip_name]
51
+ end
52
+
53
+ def skip_name=(value)
54
+ @attributes[:skip_name] = value
55
+ end
56
+
57
+ # boolean - Any associated InboxRegistrations or BundleRegistrations can be saved without providing email
58
+ def skip_email
59
+ @attributes[:skip_email]
60
+ end
61
+
62
+ def skip_email=(value)
63
+ @attributes[:skip_email] = value
64
+ end
65
+
66
+ # boolean - Any associated InboxRegistrations or BundleRegistrations can be saved without providing company
67
+ def skip_company
68
+ @attributes[:skip_company]
69
+ end
70
+
71
+ def skip_company=(value)
72
+ @attributes[:skip_company] = value
73
+ end
74
+
48
75
  # int64 - User ID. Provide a value of `0` to operate the current session's user.
49
76
  def user_id
50
77
  @attributes[:user_id]
@@ -56,6 +83,9 @@ module Files
56
83
 
57
84
  # Parameters:
58
85
  # title - string - Title to be displayed
86
+ # skip_email - boolean - Skip validating form email
87
+ # skip_name - boolean - Skip validating form name
88
+ # skip_company - boolean - Skip validating company
59
89
  # form_fields - array(object)
60
90
  def update(params = {})
61
91
  params ||= {}
@@ -129,6 +159,9 @@ module Files
129
159
  # Parameters:
130
160
  # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
131
161
  # title - string - Title to be displayed
162
+ # skip_email - boolean - Skip validating form email
163
+ # skip_name - boolean - Skip validating form name
164
+ # skip_company - boolean - Skip validating company
132
165
  # form_fields - array(object)
133
166
  def self.create(params = {}, options = {})
134
167
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
@@ -141,6 +174,9 @@ module Files
141
174
 
142
175
  # Parameters:
143
176
  # title - string - Title to be displayed
177
+ # skip_email - boolean - Skip validating form email
178
+ # skip_name - boolean - Skip validating form name
179
+ # skip_company - boolean - Skip validating company
144
180
  # form_fields - array(object)
145
181
  def self.update(id, params = {}, options = {})
146
182
  params ||= {}
@@ -103,7 +103,12 @@ module Files
103
103
  end
104
104
 
105
105
  def save
106
- update(@attributes)
106
+ if @attributes[:id]
107
+ update(@attributes)
108
+ else
109
+ new_obj = GroupUser.create(@attributes, @options)
110
+ @attributes = new_obj.attributes
111
+ end
107
112
  end
108
113
 
109
114
  # Parameters:
@@ -126,6 +131,20 @@ module Files
126
131
  list(params, options)
127
132
  end
128
133
 
134
+ # Parameters:
135
+ # group_id (required) - int64 - Group ID to add user to.
136
+ # user_id (required) - int64 - User ID to add to group.
137
+ # admin - boolean - Is the user a group administrator?
138
+ def self.create(params = {}, options = {})
139
+ raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params.dig(:group_id) and !params.dig(:group_id).is_a?(Integer)
140
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
141
+ raise MissingParameterError.new("Parameter missing: group_id") unless params.dig(:group_id)
142
+ raise MissingParameterError.new("Parameter missing: user_id") unless params.dig(:user_id)
143
+
144
+ response, options = Api.send_request("/group_users", :post, params, options)
145
+ GroupUser.new(response.data, options)
146
+ end
147
+
129
148
  # Parameters:
130
149
  # group_id (required) - int64 - Group ID to add user to.
131
150
  # user_id (required) - int64 - User ID to add to group.
@@ -235,13 +235,7 @@ module Files
235
235
  Session.new(response.data, options)
236
236
  end
237
237
 
238
- # Parameters:
239
- # format - string
240
- # session - object
241
238
  def self.delete(params = {}, options = {})
242
- raise InvalidParameterError.new("Bad parameter: format must be an String") if params.dig(:format) and !params.dig(:format).is_a?(String)
243
- raise InvalidParameterError.new("Bad parameter: session must be an Hash") if params.dig(:session) and !params.dig(:session).is_a?(Hash)
244
-
245
239
  response, _options = Api.send_request("/sessions", :delete, params, options)
246
240
  response.data
247
241
  end
@@ -574,24 +574,12 @@ module Files
574
574
  @attributes[:disable_users_from_inactivity_period_days]
575
575
  end
576
576
 
577
- # Parameters:
578
- # format - string
579
- # site - object
580
577
  def self.get(params = {}, options = {})
581
- raise InvalidParameterError.new("Bad parameter: format must be an String") if params.dig(:format) and !params.dig(:format).is_a?(String)
582
- raise InvalidParameterError.new("Bad parameter: site must be an Hash") if params.dig(:site) and !params.dig(:site).is_a?(Hash)
583
-
584
578
  response, options = Api.send_request("/site", :get, params, options)
585
579
  Site.new(response.data, options)
586
580
  end
587
581
 
588
- # Parameters:
589
- # format - string
590
- # site - object
591
582
  def self.get_usage(params = {}, options = {})
592
- raise InvalidParameterError.new("Bad parameter: format must be an String") if params.dig(:format) and !params.dig(:format).is_a?(String)
593
- raise InvalidParameterError.new("Bad parameter: site must be an Hash") if params.dig(:site) and !params.dig(:site).is_a?(Hash)
594
-
595
583
  response, options = Api.send_request("/site/usage", :get, params, options)
596
584
  UsageSnapshot.new(response.data, options)
597
585
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.150
4
+ version: 1.0.155
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-25 00:00:00.000000000 Z
11
+ date: 2021-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable