From 70162fd538c016db4b7a14e6683fda97db429f11 Mon Sep 17 00:00:00 2001 From: JayaBharat-plivo Date: Mon, 16 Sep 2024 16:34:26 +0530 Subject: [PATCH 1/5] Added changes for single party session --- CHANGELOG.md | 4 ++++ lib/plivo/resources/maskingsession.rb | 11 ++++++++--- lib/plivo/version.rb | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e20d753..1907097 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Change Log +## [4.61.0](https://github.com/plivo/plivo-ruby/tree/v4.61.0) (2024-09-10) +**Feature - Adding new param support for Number Masking session with single party ** +- Added `create_session_with_single_party`, `virtual_number_cooloff_period` and `force_pin_authentication` attributes in Masking Session + ## [4.60.3](https://github.com/plivo/plivo-ruby/tree/v4.60.3) (2024-09-06) **Feature - Adding more attribute on mdr object** - Added `message_sent_time`, `message_updated_time` and `error-message` on get and list Message API diff --git a/lib/plivo/resources/maskingsession.rb b/lib/plivo/resources/maskingsession.rb index a8646ba..f9be6f3 100644 --- a/lib/plivo/resources/maskingsession.rb +++ b/lib/plivo/resources/maskingsession.rb @@ -14,7 +14,7 @@ def update(options = nil) valid_param?(:options, options, Hash, true) params = {} - params_expected = %i[session_expiry call_time_limit record record_file_format recording_callback_url + params_expected = %i[first_party second_party session_expiry call_time_limit record record_file_format recording_callback_url callback_url callback_method ring_timeout first_party_play_url second_party_play_url recording_callback_method subaccount geomatch] params_expected.each do |param| @@ -90,7 +90,10 @@ def to_s pin_retry: @pin_retry, pin_retry_wait: @pin_retry_wait, incorrect_pin_play: @incorrect_pin_play, - unknown_caller_play: @unknown_caller_play + unknown_caller_play: @unknown_caller_play, + force_pin_authentication: @force_pin_authentication, + virtual_number_cooloff_period: @virtual_number_cooloff_period, + create_session_with_single_party: @create_session_with_single_party }.to_s end end @@ -145,7 +148,9 @@ def create(first_party:, second_party:, session_expiry: nil, call_time_limit: ni params[:unknown_caller_play] = unknown_caller_play unless unknown_caller_play.nil? params[:subaccount] = subaccount unless subaccount.nil? params[:geomatch] = geomatch unless geomatch.nil? - + params[:force_pin_authentication] = force_pin_authentication unless force_pin_authentication.nil? + params[:virtual_number_cooloff_period] = virtual_number_cooloff_period unless virtual_number_cooloff_period.nil? + params[:create_session_with_single_party] = create_session_with_single_party unless create_session_with_single_party.nil? perform_create(params) end diff --git a/lib/plivo/version.rb b/lib/plivo/version.rb index e48e8fb..f59f51e 100644 --- a/lib/plivo/version.rb +++ b/lib/plivo/version.rb @@ -1,3 +1,3 @@ module Plivo - VERSION = "4.60.3".freeze + VERSION = "4.61.0".freeze end From b6578d3202047c7c6d7c07ea943a46547795135c Mon Sep 17 00:00:00 2001 From: JayaBharat-plivo Date: Fri, 20 Sep 2024 16:32:10 +0530 Subject: [PATCH 2/5] Made first party and second party params optional. --- lib/plivo/resources/maskingsession.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/plivo/resources/maskingsession.rb b/lib/plivo/resources/maskingsession.rb index f9be6f3..da9efb2 100644 --- a/lib/plivo/resources/maskingsession.rb +++ b/lib/plivo/resources/maskingsession.rb @@ -112,18 +112,18 @@ def get(session_uuid) perform_get_with_response(session_uuid) end - def create(first_party:, second_party:, session_expiry: nil, call_time_limit: nil, record: nil, record_file_format: nil, + def create(first_party: nil, second_party: nil, session_expiry: nil, call_time_limit: nil, record: nil, record_file_format: nil, recording_callback_url: nil, initiate_call_to_first_party: nil, callback_url: nil, callback_method: nil, ring_timeout: nil, first_party_play_url: nil, second_party_play_url: nil, recording_callback_method: nil, is_pin_authentication_required: nil, generate_pin: nil, generate_pin_length: nil, first_party_pin: nil, second_party_pin: nil, pin_prompt_play: nil, pin_retry: nil, - pin_retry_wait: nil, incorrect_pin_play: nil, unknown_caller_play: nil, subaccount: nil, geomatch: nil) + pin_retry_wait: nil, incorrect_pin_play: nil, unknown_caller_play: nil, subaccount: nil, geomatch: nil, force_pin_authentication: nil, virtual_number_cooloff_period: nil, create_session_with_single_party: nil) - valid_param?(:first_party, first_party, [String, Symbol], true) - valid_param?(:second_party, second_party, [String, Symbol], true) + valid_param?(:first_party, first_party, [String, Symbol], false) + valid_param?(:second_party, second_party, [String, Symbol], false) params = {} - params[:first_party] = first_party - params[:second_party] = second_party + params[:first_party] = first_party unless first_party.nil? + params[:second_party] = second_party unless second_party.nil? params[:session_expiry] = session_expiry unless session_expiry.nil? params[:call_time_limit] = call_time_limit unless call_time_limit.nil? params[:record] = record unless record.nil? From 78a77897026b5a42dcbf66fa11c160f3b3e0d698 Mon Sep 17 00:00:00 2001 From: JayaBharat-plivo Date: Fri, 20 Sep 2024 16:53:24 +0530 Subject: [PATCH 3/5] Updating the UTs. --- spec/resource_maskingsession_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/resource_maskingsession_spec.rb b/spec/resource_maskingsession_spec.rb index db88d52..dd39441 100644 --- a/spec/resource_maskingsession_spec.rb +++ b/spec/resource_maskingsession_spec.rb @@ -38,7 +38,10 @@ def to_json(masking_session) pin_retry: masking_session.pin_retry, pin_retry_wait: masking_session.pin_retry_wait, incorrect_pin_play: masking_session.incorrect_pin_play, - unknown_caller_play: masking_session.unknown_caller_play + unknown_caller_play: masking_session.unknown_caller_play, + force_pin_authentication: masking_session.force_pin_authentication, + virtual_number_cooloff_period: masking_session.virtual_number_cooloff_period, + create_session_with_single_party: masking_session.create_session_with_single_party, }.reject { |_, v| v.nil? }.to_json end From 5559c5f6a17acc83d079183c672b3066f26c6ea9 Mon Sep 17 00:00:00 2001 From: JayaBharat-plivo Date: Fri, 20 Sep 2024 17:02:44 +0530 Subject: [PATCH 4/5] Updated the Readme file. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 01f02fd..1da17d7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Plivo Ruby SDK makes it simpler to integrate communications into your Ruby a Add this line to your application's Gemfile: ```ruby -gem 'plivo', '>= 4.60.3' +gem 'plivo', '>= 4.61.0' ``` And then execute: From 273f0f0fb48d409c28c18555979b1bb93999713d Mon Sep 17 00:00:00 2001 From: Manjunath Shanbhog Plivo <85923934+manjunath-plivo@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:58:01 +0530 Subject: [PATCH 5/5] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1907097..8e9ae32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Change Log -## [4.61.0](https://github.com/plivo/plivo-ruby/tree/v4.61.0) (2024-09-10) +## [4.61.0](https://github.com/plivo/plivo-ruby/tree/v4.61.0) (2024-09-30) **Feature - Adding new param support for Number Masking session with single party ** - Added `create_session_with_single_party`, `virtual_number_cooloff_period` and `force_pin_authentication` attributes in Masking Session