plivo 4.26.0 → 4.27.0

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
  SHA1:
3
- metadata.gz: 28692b913ed5944eadc3dc9cb233f821ac357681
4
- data.tar.gz: 6f4ae15fc412b3eef3c09fe9588e5b65d4e0ccc1
3
+ metadata.gz: 1ac7974dc26d379831ecc8637397c0cbf43156b5
4
+ data.tar.gz: 65b7a24f1cba9542117edefd8c19a48fc89e39bd
5
5
  SHA512:
6
- metadata.gz: a63734b4798e92b7cd8805783fd696d884fed366c15707f182da49562f192f600740f11997aa16132aaa5cbc115476cfb995532e310f480834e8e4f078f05722
7
- data.tar.gz: 8c0564708aceb0ce7d2658fa39075b4c53c2549e3d8f21d3141b66091326551883042c7138eb8c39a0aeb15eb1c28ee93039ddb89011a14c73d2f5a1cc6acf0a
6
+ metadata.gz: 6b897b48d2cc18aeccbf0d5a9795fafe5f025d8d7375aad700bcdc05ea9c94a7786db3f667ed37af56df127749f66b3a6039deb90700582b8a536538e34c6278
7
+ data.tar.gz: 9dcc97d2cb1fe1d6473daf99652a5ec7fec9aaea5c8681b67e7acf4aff56f4261e9496cf096835ae64b79a0bea574e2e51a7c91169797fadbe4a856c6e4cbd20
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
1
  # Change Log
2
+
3
+ ## [4.27.0](https://github.com/plivo/plivo-ruby/tree/v4.27.0) (2022-05-05)
4
+ **Feature - List all recordings**
5
+ - `from_number` and `to_number` added to filter param [List all recordings](https://www.plivo.com/docs/voice/api/recording#list-all-recordings)
6
+ - `record_min_member_count` param added to [Add a participant to a multiparty call using API](https://www.plivo.com/docs/voice/api/multiparty-call/participants#add-a-participant)
7
+
2
8
  ## [4.26.0](https://github.com/plivo/plivo-ruby/tree/v4.26.0) (2022-03-24)
3
9
  **Feature - DialElement**
4
10
  - `confirmTimeout` parameter added to [The Dial element](https://www.plivo.com/docs/voice/xml/dial/)
data/README.md CHANGED
@@ -9,7 +9,7 @@ The Plivo Ruby SDK makes it simpler to integrate communications into your Ruby a
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'plivo', '>= 4.26.0'
12
+ gem 'plivo', '>= 4.27.0'
13
13
  ```
14
14
 
15
15
  And then execute:
@@ -35,6 +35,7 @@ module Plivo
35
35
  delay_dial=0,
36
36
  max_duration=14400,
37
37
  max_participants=10,
38
+ record_min_member_count=1,
38
39
  wait_music_url=nil,
39
40
  wait_music_method='GET',
40
41
  agent_hold_music_url=nil,
@@ -95,6 +96,7 @@ module Plivo
95
96
  valid_multiple_destination_integers?(:delay_dial, delay_dial)
96
97
  valid_range?(:max_duration, max_duration, false, 300, 28800)
97
98
  valid_range?(:max_participants, max_participants, false, 2, 10)
99
+ valid_range?(:record_min_member_count, record_min_member_count, false, 1, 2)
98
100
  valid_url?(:wait_music_url, wait_music_url, false ) unless wait_music_url.nil?
99
101
  valid_param?(:wait_music_method, wait_music_method.upcase, String, false , %w[GET POST])
100
102
  valid_url?(:agent_hold_music_url, agent_hold_music_url, false) unless agent_hold_music_url.nil?
@@ -128,7 +130,7 @@ module Plivo
128
130
  if (to!=nil) && (ring_timeout.is_a?(String)) && (to.split('<').size < ring_timeout.split('<').size)
129
131
  raise_invalid_request("RingTimeout:number of ring_timout(s) should be same as number of destination(s)")
130
132
  end
131
-
133
+
132
134
  if (to!=nil) && (delay_dial.is_a?(String)) && (to.split('<').size < delay_dial.split('<').size)
133
135
  raise_invalid_request("Delaydial : number of delay_dial(s) should be same as number of destination(s)")
134
136
  end
@@ -150,6 +152,7 @@ module Plivo
150
152
  params[:delay_dial] = delay_dial unless delay_dial.nil?
151
153
  params[:max_duration] = max_duration unless max_duration.nil?
152
154
  params[:max_participants] = max_participants unless max_participants.nil?
155
+ params[:record_min_member_count] = record_min_member_count unless record_min_member_count.nil?
153
156
  params[:wait_music_url] = wait_music_url unless wait_music_url.nil?
154
157
  params[:wait_music_method] = wait_music_method.upcase unless wait_music_method.nil?
155
158
  params[:agent_hold_music_url] = agent_hold_music_url unless agent_hold_music_url.nil?
@@ -235,7 +238,7 @@ module Plivo
235
238
  valid_param?(:member_id, member_id, [String, Integer], true)
236
239
  MultiPartyCallParticipant.new(@_client, resource_id: mpc_id[1], member_id: member_id).resume_participant_recording
237
240
  end
238
-
241
+
239
242
  def list_participants(call_uuid = nil )
240
243
  valid_param?(:call_uuid, call_uuid, String, false) unless call_uuid.nil?
241
244
  params = {}
@@ -405,7 +408,7 @@ module Plivo
405
408
  valid_range?(:offset, options[:offset], false, 0)
406
409
  perform_action(nil ,'GET', options ,true )
407
410
  end
408
-
411
+
409
412
  def get(options = {})
410
413
  valid_param?(:options, options, Hash, false)
411
414
  valid_param?(:uuid, options[:uuid], String, false) unless options[:uuid].nil?
@@ -422,10 +425,11 @@ module Plivo
422
425
  options[:call_status_callback_method] = 'POST' unless options.key?(:call_status_callback_method)
423
426
  options[:confirm_key_sound_method] = 'GET' unless options.key?(:confirm_key_sound_method)
424
427
  options[:dial_music] = 'Real' unless options.key?(:dial_music)
425
- options[:ring_timeout] = 45 unless options.key?(:ring_timeout)
428
+ options[:ring_timeout] = 45 unless options.key?(:ring_timeout)
426
429
  options[:delay_dial] = 0 unless options.key?(:delay_dial)
427
430
  options[:max_duration] = 14400 unless options.key?(:max_duration)
428
431
  options[:max_participants] = 10 unless options.key?(:max_participants)
432
+ options[:record_min_member_count] = 1 unless options.key?(:record_min_member_count)
429
433
  options[:wait_music_method] = 'GET' unless options.key?(:wait_music_method)
430
434
  options[:agent_hold_music_method] = 'GET' unless options.key?(:agent_hold_music_method)
431
435
  options[:customer_hold_music_method] = 'GET' unless options.key?(:customer_hold_music_method)
@@ -453,11 +457,11 @@ module Plivo
453
457
  mpc_id = make_mpc_id(options[:uuid], options[:friendly_name])
454
458
 
455
459
  MultiPartyCall.new(@_client, resource_id: mpc_id[1], multi_party_prefix: mpc_id[0]).add_participant(options[:role],options[:from],options[:to],options[:call_uuid],options[:caller_name],options[:call_status_callback_url],options[:call_status_callback_method],options[:sip_headers],options[:confirm_key],
456
- options[:confirm_key_sound_url],options[:confirm_key_sound_method],options[:dial_music],options[:ring_timeout],options[:delay_dial],options[:max_duration], options[:max_participants],options[:wait_music_url],
457
- options[:wait_music_method],options[:agent_hold_music_url],options[:agent_hold_music_method],options[:customer_hold_music_url],options[:customer_hold_music_method],
458
- options[:recording_callback_url],options[:recording_callback_method],options[:status_callback_url],options[:status_callback_method],options[:on_exit_action_url], options[:on_exit_action_method],
459
- options[:record],options[:record_file_format],options[:status_callback_events],options[:stay_alone], options[:coach_mode],options[:mute],options[:hold],options[:start_mpc_on_enter],options[:end_mpc_on_exit],
460
- options[:relay_dtmf_inputs],options[:enter_sound],options[:enter_sound_method],options[:exit_sound],options[:exit_sound_method], options[:start_recording_audio], options[:start_recording_audio_method],
460
+ options[:confirm_key_sound_url],options[:confirm_key_sound_method],options[:dial_music],options[:ring_timeout],options[:delay_dial],options[:max_duration], options[:max_participants],options[:record_min_member_count],options[:wait_music_url],
461
+ options[:wait_music_method],options[:agent_hold_music_url],options[:agent_hold_music_method],options[:customer_hold_music_url],options[:customer_hold_music_method],
462
+ options[:recording_callback_url],options[:recording_callback_method],options[:status_callback_url],options[:status_callback_method],options[:on_exit_action_url], options[:on_exit_action_method],
463
+ options[:record],options[:record_file_format],options[:status_callback_events],options[:stay_alone], options[:coach_mode],options[:mute],options[:hold],options[:start_mpc_on_enter],options[:end_mpc_on_exit],
464
+ options[:relay_dtmf_inputs],options[:enter_sound],options[:enter_sound_method],options[:exit_sound],options[:exit_sound_method], options[:start_recording_audio], options[:start_recording_audio_method],
461
465
  options[:stop_recording_audio], options[:stop_recording_audio_method])
462
466
  end
463
467
 
@@ -560,7 +564,7 @@ module Plivo
560
564
  mpc_id = make_mpc_id(options[:uuid], options[:friendly_name])
561
565
  MultiPartyCallParticipant.new(@_client, resource_id: mpc_id[1], multi_party_prefix: mpc_id[0], member_id: options[:member_id]).resume_participant_recording
562
566
  end
563
-
567
+
564
568
  def list_participants(options = {})
565
569
  valid_param?(:options, options, Hash, false)
566
570
  valid_param?(:uuid, options[:uuid], String, false) unless options[:uuid].nil?
@@ -26,7 +26,12 @@ module Plivo
26
26
  recording_start_ms: @recording_start_ms,
27
27
  recording_type: @recording_type,
28
28
  recording_url: @recording_url,
29
- resource_uri: @resource_uri
29
+ resource_uri: @resource_uri,
30
+ from_number: @from_number,
31
+ to_number: @to_number,
32
+ mpc_name: @mpc_name,
33
+ conference_uuid: @conference_uuid,
34
+ mpc_uuid: @mpc_uuid
30
35
  }.to_s
31
36
  end
32
37
  end
@@ -43,6 +48,12 @@ module Plivo
43
48
  # @param [Hash] options
44
49
  # @option options [String] :subaccount auth_id of the subaccount. Lists only those recordings of the main accounts which are tied to the specified subaccount.
45
50
  # @option options [String] :call_uuid Used to filter recordings for a specific call.
51
+ # @option options [String] :from_number Used to filter recordings for a specific from_number.
52
+ # @option options [String] :to_number Used to filter recordings for a specific to_number.
53
+ # @option options [String] :conference_name Used to filter recordings for a specific conference_name.
54
+ # @option options [String] :mpc_name Used to filter recordings for a specific mpc_name.
55
+ # @option options [String] :conference_uuid Used to filter recordings for a specific conference_uuid.
56
+ # @option options [String] :mpc_uuid Used to filter recordings for a specific mpc_uuid.
46
57
  # @option options [String] :add_time Used to filter out recordings according to the time they were added.The add_time filter is a comparative filter that can be used in the following four forms:
47
58
  # - add_time\__gt: gt stands for greater than. The format expected is YYYY-MM-DD HH:MM[:ss[.uuuuuu]]. Eg:- To get all recordings that started after 2012-03-21 11:47, use add_time\__gt=2012-03-21 11:47
48
59
  # - add_time\__gte: gte stands for greater than or equal. The format expected is YYYY-MM-DD HH:MM[:ss[.uuuuuu]]. Eg:- To get all recordings that started after or exactly at 2012-03-21 11:47[:30], use add_time\__gte=2012-03-21 11:47[:30]
@@ -59,6 +70,8 @@ module Plivo
59
70
  params_expected = %i[
60
71
  call_uuid add_time__gt add_time__gte
61
72
  add_time__lt add_time__lte
73
+ from_number to_number conference_uuid
74
+ conference_name mpc_name mpc_uuid
62
75
  ]
63
76
 
64
77
  params_expected.each do |param|
data/lib/plivo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Plivo
2
- VERSION = "4.26.0".freeze
2
+ VERSION = "4.27.0".freeze
3
3
  end
@@ -11,7 +11,7 @@ module Plivo
11
11
  enterSound enterSoundMethod exitSound exitSoundMethod
12
12
  onExitActionUrl onExitActionMethod relayDTMFInputs
13
13
  startRecordingAudio startRecordingAudioMethod
14
- stopRecordingAudio stopRecordingAudioMethod]
14
+ stopRecordingAudio stopRecordingAudioMethod recordMinMemberCount]
15
15
 
16
16
  VALID_ROLE_VALUES = %w[agent supervisor customer]
17
17
  VALID_METHOD_VALUES = %w[GET POST]
@@ -37,6 +37,12 @@ module Plivo
37
37
  attributes[:maxParticipants] = 10
38
38
  end
39
39
 
40
+ if attributes[:recordMinMemberCount] && (attributes[:recordMinMemberCount]<1 || attributes[:recordMinMemberCount]>2)
41
+ raise PlivoXMLError, "invalid attribute value #{attributes[:recordMinMemberCount]} for recordMinMemberCount"
42
+ elsif !attributes[:recordMinMemberCount]
43
+ attributes[:recordMinMemberCount] = 1
44
+ end
45
+
40
46
  if attributes[:waitMusicMethod] && !VALID_METHOD_VALUES.include?(attributes[:waitMusicMethod].upcase)
41
47
  raise PlivoXMLError, "invalid attribute value #{attributes[:waitMusicMethod]} for waitMusicMethod"
42
48
  elsif !attributes[:waitMusicMethod]
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.26.0
4
+ version: 4.27.0
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: 2022-03-24 00:00:00.000000000 Z
11
+ date: 2022-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday