files.com 1.0.154 → 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: '0967792b1162066ca96166b1997a60b73a734adf6bb2ef293434e39e2f8db5b3'
4
- data.tar.gz: a355b8559f43c3df7df9b4a9dec34580c2f82354b74acf408d9b456ae0058d0d
3
+ metadata.gz: '0955c88244f369e9f4270c079fcd151db97804e8c4f09982a35f46f51297b934'
4
+ data.tar.gz: 6d3a990d55c77ad0ec68c0211dcb12935543c2b28c4901b6d3b731e3d5b50f7d
5
5
  SHA512:
6
- metadata.gz: bf29c59200ad503bf470b7a39491ab111c50d0ac52368d4425b4427b9e69fbd0449ac6c77d6ac484bc6bd6b06910e0c8c4e986e6398faffe4fba74b6731620c6
7
- data.tar.gz: b9484b649c9cdfabb7924bae1421faaeabf867e5a5c4b0503a942d280c8ae400256d40e12d09d0bb9c20df6a3790481ddb7ee2b5d17eac3ca8651e710a252c9a
6
+ metadata.gz: a6bbf3b1e8e7f66c47293bc6c5b3302463b90d52003702e2195233ecc4d0a0ffc942cec2b3d25312a1a73b4a5a5f371980260fccd08b25b5285142fb13793a7a
7
+ data.tar.gz: 52a48d8beac38d91e6b7af48f3281ad8812b44872235eef60f227faad4927faf609f6d94fae3702b61af42c4dcc5eb866faf605f64e6e571db20e79b7df0d8d8
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.154
1
+ 1.0.155
data/docs/bundle.md CHANGED
@@ -171,9 +171,9 @@ Files::Bundle.share(id,
171
171
  ### Parameters
172
172
 
173
173
  * `id` (int64): Required - Bundle ID.
174
- * `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.
175
175
  * `note` (string): Note to include in email.
176
- * `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.
177
177
 
178
178
 
179
179
  ---
@@ -244,9 +244,9 @@ bundle.share(
244
244
  ### Parameters
245
245
 
246
246
  * `id` (int64): Required - Bundle ID.
247
- * `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.
248
248
  * `note` (string): Note to include in email.
249
- * `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.
250
250
 
251
251
 
252
252
  ---
@@ -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
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.154
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-29 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