diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dcd885..a591cdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,21 @@ # Change Log -## [4.60.4](https://github.com/plivo/plivo-ruby/tree/v4.60.4) (2024-09-12) +## [4.62.0](https://github.com/plivo/plivo-ruby/tree/v4.62.0) (2024-11-06) **Feature - Adding few optional parameters to the existing machine detection params** - Added six new optional machine detection params `machine_detection_maximum_speech_length`,`machine_detection_initial_silence`,`machine_detection_maximum_words`,`machine_detection_initial_greeting`,`machine_detection_silence`,`machine_detection_answer_time` +## [4.61.2](https://github.com/plivo/plivo-ruby/tree/v4.61.2)(2024-10-23) +**Feature - FraudCheck param in Create, Get and List Session** +- Support for the `fraud_check` parameter in sms verify session request +- Added support for `fraud_check` paramter in GET and LIST veriyf session + +## [4.61.1](https://github.com/plivo/plivo-ruby/tree/v4.61.1) (2024-10-10) +**Feature - Dtmf param in Create, Get and List Session** +- Support for the `dtmf` parameter in voice verify session request +- Added support for `dtmf` in GET and LIST verify session + +## [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 ## [4.60.3](https://github.com/plivo/plivo-ruby/tree/v4.60.3) (2024-09-06) **Feature - Adding more attribute on mdr object** diff --git a/Makefile b/Makefile index c3464bf..13c6393 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,11 @@ build: start: docker-compose up --build --remove-orphans --detach - docker attach $(shell docker-compose ps -q rubySDK) + # Wait for the container to be running before attaching + @while [ -z "$$(docker-compose ps -q rubySDK)" ]; do \ + sleep 1; \ + done + docker attach $$(docker-compose ps -q rubySDK) test: @[ "${CONTAINER}" ] && \ diff --git a/README.md b/README.md index 5244a94..b5f237b 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.4' +gem 'plivo', '>= 4.62.0' ``` And then execute: diff --git a/lib/plivo/resources/maskingsession.rb b/lib/plivo/resources/maskingsession.rb index a8646ba..da9efb2 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 @@ -109,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? @@ -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/resources/verify_session.rb b/lib/plivo/resources/verify_session.rb index f2a90a5..c0237ac 100644 --- a/lib/plivo/resources/verify_session.rb +++ b/lib/plivo/resources/verify_session.rb @@ -42,7 +42,7 @@ def get(session_uuid) perform_get(session_uuid) end - def create(app_uuid = nil, recipient = nil,channel = nil, url = nil, method = nil, locale=nil, brand_name=nil, app_hash=nil, code_length=nil) + def create(app_uuid = nil, recipient = nil,channel = nil, url = nil, method = nil, locale=nil, brand_name=nil, app_hash=nil, code_length=nil, dtmf=nil, fraud_check=nil) valid_param?(:app_uuid, app_uuid, [String, Symbol], false) valid_param?(:recipient, recipient, [Integer, String, Symbol], true) valid_param?(:channel, channel, [String, Symbol], false) @@ -52,6 +52,8 @@ def create(app_uuid = nil, recipient = nil,channel = nil, url = nil, method = ni valid_param?(:brand_name, brand_name, [String, Symbol], false) valid_param?(:app_hash, app_hash, [String, Symbol], false) valid_param?(:code_length, code_length,[Integer,Symbol], false) + valid_param?(:dtmf, dtmf,[Integer,Symbol], false) + valid_param?(:fraud_check, fraud_check, [String, Symbol], false) params = { app_uuid: app_uuid, @@ -62,7 +64,9 @@ def create(app_uuid = nil, recipient = nil,channel = nil, url = nil, method = ni locale: locale, brand_name: brand_name, app_hash: app_hash, - code_length: code_length + code_length: code_length, + dtmf:dtmf, + fraud_check:fraud_check } perform_create(params) end diff --git a/lib/plivo/version.rb b/lib/plivo/version.rb index f9b69ad..135abb8 100644 --- a/lib/plivo/version.rb +++ b/lib/plivo/version.rb @@ -1,3 +1,3 @@ module Plivo - VERSION = "4.60.4".freeze + VERSION = "4.62.0".freeze end 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 diff --git a/spec/resource_messages_spec.rb b/spec/resource_messages_spec.rb index 56a3990..aa88e10 100644 --- a/spec/resource_messages_spec.rb +++ b/spec/resource_messages_spec.rb @@ -26,7 +26,10 @@ def to_json(message) carrier_fees: message.carrier_fees, conversation_id: message.conversation_id, conversation_origin: message.conversation_origin, - conversation_expiration_timestamp: message.conversation_expiration_timestamp + conversation_expiration_timestamp: message.conversation_expiration_timestamp, + error_message: message.error_message, + message_sent_time: message.message_sent_time, + message_updated_time: message.message_updated_time }.to_json end diff --git a/spec/resource_verify_spec.rb b/spec/resource_verify_spec.rb index bb9a2df..ddfaa07 100644 --- a/spec/resource_verify_spec.rb +++ b/spec/resource_verify_spec.rb @@ -112,7 +112,13 @@ def to_json_list(list_object) recipient: '1234567890', channel: nil, url: nil, - method: nil + method: nil, + locale:nil, + brand_name:nil, + app_hash:nil, + code_length:nil, + dtmf:nil, + fraud_check:nil }) end