plivo 4.1.3 → 4.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee7359896562ac1098adeebdb64c7b8f842041268382ed4850aff4b7d88109aa
4
- data.tar.gz: fc0e6738d5304e5b6e915e3dc847725f0ec258a75b112da141bae418037af287
3
+ metadata.gz: b88c26bf2b750e7abb11ffb4bd7e74309680e385b0ac73b815333e18b4fa3e82
4
+ data.tar.gz: 7d73e9e25d6e04f1431f01b1ab8819df4b9d16eda3829c71a0401db460a9dbcd
5
5
  SHA512:
6
- metadata.gz: c3f696dca6ab0d779c39565bc0900b37743f218ccef5d35ee8e4f30893f8839aba91b13072bf4e96c355d7579fcf953ffc632fb52543f07bb5472e32cf8172ce
7
- data.tar.gz: 0c5ca2e54100bef4e84112f550a06d6900e5c4e8ff291a8456864126fdc82751b71b161e30c386d294ba4e1775968143a93a4a46e39bcd7d7c753ecef093f7c7
6
+ metadata.gz: 9dfcf4b498c3a4bcf472b7a62ecfb1c5e5e83d642e55a81572134be4e193a714de12e31058244e456a4f6e7af7ad57982c65037fd311cf4fcd82d079099eb40c
7
+ data.tar.gz: 785367b213909182d445931fadb70385f0e68f42ff2f86fabd31bc27aad0a7d41e033b533167d6c1899694e89cde46cf23fcb345aceb2b2c72831f853148c2aa
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Change Log
2
2
 
3
+ ## [4.1.4](https://github.com/plivo/plivo-ruby/releases/tag/v4.1.4) (2018-10-29)
4
+ - Add live calls filtering by from, to numbers and call_direction.
5
+
3
6
  ## [4.1.3](https://github.com/plivo/plivo-ruby/releases/tag/v4.1.3) (2018-10-01)
4
7
  - Added Trackable parameter in messages.
5
8
 
data/README.md CHANGED
@@ -8,7 +8,7 @@ The Plivo Ruby SDK makes it simpler to integrate communications into your Ruby a
8
8
  Add this line to your application's Gemfile:
9
9
 
10
10
  ```ruby
11
- gem 'plivo', '>= 4.1.3'
11
+ gem 'plivo', '>= 4.1.4'
12
12
  ```
13
13
 
14
14
  And then execute:
@@ -382,8 +382,41 @@ module Plivo
382
382
  end
383
383
  end
384
384
 
385
- def list_live
386
- perform_list_without_object(status: 'live')
385
+ # @param [Hash] options
386
+ # @option options [String] :call_direction - Filter the results by call direction. The valid inputs are inbound and outbound.
387
+ # @option options [String] :from_number - Filter the results by the number from where the call originated. For example:
388
+ # - To filter out those numbers that contain a particular number sequence, use from_number={ sequence}
389
+ # - To filter out a number that matches an exact number, use from_number={ exact_number}
390
+ # @option options [String] :to_number - Filter the results by the number to which the call was made. Tips to use this filter are:
391
+ # - To filter out those numbers that contain a particular number sequence, use to_number={ sequence}
392
+ # - To filter out a number that matches an exact number, use to_number={ exact_number}
393
+ def list_live(options = nil)
394
+
395
+ if options.nil?
396
+ options = {}
397
+ else
398
+ valid_param?(:options, options, Hash, true)
399
+ end
400
+
401
+ params = {}
402
+ params[:status] = 'live'
403
+ params_expected = %i[
404
+ from_number to_number
405
+ ]
406
+ params_expected.each do |param|
407
+ if options.key?(param) &&
408
+ valid_param?(param, options[param], [String, Symbol], true)
409
+ params[param] = options[param]
410
+ end
411
+ end
412
+
413
+ if options.key?(:call_direction) &&
414
+ valid_param?(:call_direction, options[:call_direction],
415
+ [String, Symbol], true, %w[inbound outbound])
416
+ params[:call_direction] = options[:call_direction]
417
+ end
418
+
419
+ perform_list_without_object(params)
387
420
  {
388
421
  api_id: @api_id,
389
422
  calls: @calls
data/lib/plivo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Plivo
2
- VERSION = '4.1.3'.freeze
2
+ VERSION = '4.1.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plivo
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.3
4
+ version: 4.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Plivo SDKs Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-01 00:00:00.000000000 Z
11
+ date: 2018-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday