From 18e190f1a895bb8b5c46f71ef447a7c540d78770 Mon Sep 17 00:00:00 2001 From: narayana Date: Tue, 17 Jan 2023 23:15:39 +0530 Subject: [PATCH 01/22] extending messgaing filter --- lib/plivo/resources/messages.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/plivo/resources/messages.rb b/lib/plivo/resources/messages.rb index 57e2b759..db455aa2 100644 --- a/lib/plivo/resources/messages.rb +++ b/lib/plivo/resources/messages.rb @@ -30,7 +30,10 @@ def to_s total_amount: @total_amount, total_rate: @total_rate, powerpack_id: @powerpack_id, - units: @units + units: @units, + tendlc_campaign_id: @tendlc_campaign_id, + destination_country_iso2: @destination_country_iso2, + tendlc_registration_status: @tendlc_registration_status }.to_s end end @@ -244,6 +247,9 @@ def create(src = nil, dst = nil, text = nil, options = nil, powerpack_uuid = nil # @option options[List]: media_urls Minimum one media url should be present in Media urls list to send mms. Maximum allowd 10 media urls inside the list (e.g, media_urls : ['https//example.com/test.jpg', 'https://example.com/abcd.gif']) # @option options[List]: media_ids Minimum one media ids should be present in Media ids list to send mms. Maximum allowd 10 media ids inside the list (e.g, media_ids : ['1fs211ba-355b-11ea-bbc9-02121c1190q7']) # @option options [String] :powerpack_id Filter the results by powerpack id + # @option options [string]: tendlc_campaign_id - exact tendlc campaign id search + # @option options [string]:destination_country_iso2 - valid 2 character country_iso2 + # @option options [string] : tendlc_registration_status - registered or unregistered enum allowed def list(options = nil) return perform_list if options.nil? valid_param?(:options, options, Hash, true) @@ -251,7 +257,7 @@ def list(options = nil) params = {} params_expected = %i[ subaccount message_time message_time__gt message_time__gte - message_time__lt message_time__lte error_code powerpack_id + message_time__lt message_time__lte error_code powerpack_id tendlc_campaign_id tendlc_registration_status destination_country_iso2 ] params_expected.each do |param| if options.key?(param) && From 8af947e9d18b3948dbaf5280a081c49e6f464a6b Mon Sep 17 00:00:00 2001 From: narayana Date: Wed, 22 Feb 2023 21:10:00 +0530 Subject: [PATCH 02/22] version upgrade --- CHANGELOG.md | 4 ++++ README.md | 2 +- lib/plivo/version.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aef830ff..31636fe4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Change Log +## [4.37.0](https://github.com/plivo/plivo-ruby/tree/v4.37.0) (2023-02-23) +**Feature - Enhance MDR filtering capabilities ** +- Added new fields on MDR object response + ## [4.34.0](https://github.com/plivo/plivo-ruby/tree/v4.34.0) (2022-12-16) **10DLC: Update Campaign API** - Added Update Campaign API diff --git a/README.md b/README.md index f8546ccf..93d4327d 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.34.0' +gem 'plivo', '>= 4.37.0' ``` And then execute: diff --git a/lib/plivo/version.rb b/lib/plivo/version.rb index 2ebed25f..eabae551 100644 --- a/lib/plivo/version.rb +++ b/lib/plivo/version.rb @@ -1,3 +1,3 @@ module Plivo - VERSION = "4.34.0".freeze + VERSION = "4.37.0".freeze end From 5b0ba9f96bc5677787f3978645e77349e06fc28d Mon Sep 17 00:00:00 2001 From: "anindya.mahajan" Date: Fri, 24 Feb 2023 11:16:58 +0530 Subject: [PATCH 03/22] Added new params --- lib/plivo/resources/recordings.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/plivo/resources/recordings.rb b/lib/plivo/resources/recordings.rb index 15ff76e3..90167b06 100644 --- a/lib/plivo/resources/recordings.rb +++ b/lib/plivo/resources/recordings.rb @@ -19,6 +19,8 @@ def to_s api_id: @api_id, call_uuid: @call_uuid, conference_name: @conference_name, + cost: @cost, + days_of_storage: @days_of_storage, recording_duration_ms: @recording_duration_ms, recording_end_ms: @recording_end_ms, recording_format: @recording_format, @@ -27,6 +29,7 @@ def to_s recording_type: @recording_type, recording_url: @recording_url, resource_uri: @resource_uri, + rounded_duration: @rounded_duration, from_number: @from_number, to_number: @to_number, mpc_name: @mpc_name, @@ -72,6 +75,7 @@ def list(options = nil) add_time__lt add_time__lte from_number to_number conference_uuid conference_name mpc_name mpc_uuid + rounded_duration ] params_expected.each do |param| From 57566faa7c71843eb144bf3db7c3eeca24c5c725 Mon Sep 17 00:00:00 2001 From: "anindya.mahajan" Date: Fri, 24 Feb 2023 11:21:37 +0530 Subject: [PATCH 04/22] changed UT --- spec/resource_recordings_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/resource_recordings_spec.rb b/spec/resource_recordings_spec.rb index 53bc51e3..145dd999 100644 --- a/spec/resource_recordings_spec.rb +++ b/spec/resource_recordings_spec.rb @@ -7,6 +7,8 @@ def to_json(recording) api_id: recording.api_id, call_uuid: recording.call_uuid, conference_name: recording.conference_name, + cost: recording.cost, + days_of_storage: recording.days_of_storage, recording_duration_ms: recording.recording_duration_ms, recording_end_ms: recording.recording_end_ms, recording_format: recording.recording_format, @@ -14,7 +16,8 @@ def to_json(recording) recording_start_ms: recording.recording_start_ms, recording_type: recording.recording_type, recording_url: recording.recording_url, - resource_uri: recording.resource_uri + resource_uri: recording.resource_uri, + rounded_duration: recording.rounded_duration }.to_json end From d370b813662b71851c2d08a31a627627468d9c17 Mon Sep 17 00:00:00 2001 From: "anindya.mahajan" Date: Fri, 24 Feb 2023 19:13:47 +0530 Subject: [PATCH 05/22] changed UT --- spec/mocks/recordingGetResponse.json | 5 ++++- spec/mocks/recordingListResponse.json | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/spec/mocks/recordingGetResponse.json b/spec/mocks/recordingGetResponse.json index 49f728d1..3826d21a 100644 --- a/spec/mocks/recordingGetResponse.json +++ b/spec/mocks/recordingGetResponse.json @@ -10,5 +10,8 @@ "recording_start_ms": "1407235163907.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-11e4-a664-0026b945b52x.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/", + "cost": "0.0024", + "rounded_duration": "360", + "days_of_storage": "2800" } \ No newline at end of file diff --git a/spec/mocks/recordingListResponse.json b/spec/mocks/recordingListResponse.json index 8f843c33..5bae7ae4 100644 --- a/spec/mocks/recordingListResponse.json +++ b/spec/mocks/recordingListResponse.json @@ -19,7 +19,10 @@ "recording_start_ms": "1407235163907.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-1124-a664-0026b945b522.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-1124-a664-0026b945b522/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-1124-a664-0026b945b522/", + "cost": "0.0024", + "rounded_duration": "360", + "days_of_storage": "2800" }, { "add_time": "2014-08-05 16:05:21.993853+05:30", @@ -32,7 +35,10 @@ "recording_start_ms": "1407234829553.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/fc2716b0-1c8b-11e4-bwad-842b2b17453e.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/fc2716b0-1c8b-11e4-bwad-842b2b17453e/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/fc2716b0-1c8b-11e4-bwad-842b2b17453e/", + "cost": "0.0024", + "rounded_duration": "360", + "days_of_storage": "2800" }, { "add_time": "2014-08-05 15:51:56.582492+05:30", @@ -45,7 +51,10 @@ "recording_start_ms": "1407234081443.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/3e701c9e-1c8a-11e4-bwad-842b2b17453e.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/3e701c9e-1c8a-11e4-bwad-842b2b17453e/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/3e701c9e-1c8a-11e4-bwad-842b2b17453e/", + "cost": "0.0024", + "rounded_duration": "360", + "days_of_storage": "2800" } ] } \ No newline at end of file From 0905f3cd2c375d46ec50b2eb5a957cda50730dba Mon Sep 17 00:00:00 2001 From: narayana Date: Tue, 28 Feb 2023 13:13:13 +0530 Subject: [PATCH 06/22] bug fix --- CHANGELOG.md | 3 +++ README.md | 2 +- lib/plivo/resources/messages.rb | 2 +- lib/plivo/version.rb | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f05fdf7c..16b878cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # Change Log +## [4.37.1](https://github.com/plivo/plivo-ruby/tree/v4.37.1) (2023-02-23) +**Bug fix on Messaging object ** +- ## [4.37.0](https://github.com/plivo/plivo-ruby/tree/v4.37.0) (2023-02-23) **Feature - Enhance MDR filtering capabilities ** - Added new fields on MDR object response diff --git a/README.md b/README.md index b57c3113..9e9a3c36 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.37.0' +gem 'plivo', '>= 4.37.1' ``` And then execute: diff --git a/lib/plivo/resources/messages.rb b/lib/plivo/resources/messages.rb index 35863a98..a4b8ab7a 100644 --- a/lib/plivo/resources/messages.rb +++ b/lib/plivo/resources/messages.rb @@ -33,7 +33,7 @@ def to_s units: @units, tendlc_campaign_id: @tendlc_campaign_id, destination_country_iso2: @destination_country_iso2, - tendlc_registration_status: @tendlc_registration_status + tendlc_registration_status: @tendlc_registration_status, requester_ip: @requester_ip }.to_s end diff --git a/lib/plivo/version.rb b/lib/plivo/version.rb index eabae551..accc4b5f 100644 --- a/lib/plivo/version.rb +++ b/lib/plivo/version.rb @@ -1,3 +1,3 @@ module Plivo - VERSION = "4.37.0".freeze + VERSION = "4.37.1".freeze end From c59913c0eb3c5993ca23ee6269bb023575f1fc43 Mon Sep 17 00:00:00 2001 From: Saurabh Newatiya Date: Wed, 22 Feb 2023 21:47:40 +0530 Subject: [PATCH 07/22] SMS-4946/SMS-4848: adding new param 'is_domestic' in Get Message and List Message API --- CHANGELOG.md | 4 ++ README.md | 2 +- lib/plivo/resources/messages.rb | 3 +- lib/plivo/version.rb | 2 +- spec/mocks/messageGetResponse.json | 3 +- spec/mocks/messageListResponse.json | 60 +++++++++++++++++++---------- spec/resource_messages_spec.rb | 3 +- 7 files changed, 52 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16b878cf..2ea7b7e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Change Log +## [4.38.0](https://github.com/plivo/plivo-ruby/tree/v4.38.0) (2023-03-03) +**Adding new attribute - 'is_domestic' in Get Message and List Message APIs** +- Add `is_domestic` to the response for the [list all messages API](https://www.plivo.com/docs/sms/api/message/list-all-messages/) and the [get message details API](https://www.plivo.com/docs/sms/api/message#retrieve-a-message) + ## [4.37.1](https://github.com/plivo/plivo-ruby/tree/v4.37.1) (2023-02-23) **Bug fix on Messaging object ** - diff --git a/README.md b/README.md index 9e9a3c36..adab6d05 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.37.1' +gem 'plivo', '>= 4.38.0' ``` And then execute: diff --git a/lib/plivo/resources/messages.rb b/lib/plivo/resources/messages.rb index a4b8ab7a..e20fcbba 100644 --- a/lib/plivo/resources/messages.rb +++ b/lib/plivo/resources/messages.rb @@ -34,7 +34,8 @@ def to_s tendlc_campaign_id: @tendlc_campaign_id, destination_country_iso2: @destination_country_iso2, tendlc_registration_status: @tendlc_registration_status, - requester_ip: @requester_ip + requester_ip: @requester_ip, + is_domestic: @is_domestic }.to_s end end diff --git a/lib/plivo/version.rb b/lib/plivo/version.rb index accc4b5f..939bb2b3 100644 --- a/lib/plivo/version.rb +++ b/lib/plivo/version.rb @@ -1,3 +1,3 @@ module Plivo - VERSION = "4.37.1".freeze + VERSION = "4.38.0".freeze end diff --git a/spec/mocks/messageGetResponse.json b/spec/mocks/messageGetResponse.json index ba8c2414..a1a83461 100644 --- a/spec/mocks/messageGetResponse.json +++ b/spec/mocks/messageGetResponse.json @@ -12,5 +12,6 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.1" + "requester_ip": "192.168.1.1", + "is_domestic": false } \ No newline at end of file diff --git a/spec/mocks/messageListResponse.json b/spec/mocks/messageListResponse.json index cd0814bf..b0edf244 100644 --- a/spec/mocks/messageListResponse.json +++ b/spec/mocks/messageListResponse.json @@ -20,7 +20,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.1" + "requester_ip": "192.168.1.1", + "is_domestic": false }, { "error_code": null, @@ -35,7 +36,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.2" + "requester_ip": "192.168.1.2", + "is_domestic": false }, { "error_code": null, @@ -50,7 +52,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.3" + "requester_ip": "192.168.1.3", + "is_domestic": false }, { "error_code": null, @@ -65,7 +68,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.4" + "requester_ip": "192.168.1.4", + "is_domestic": false }, { "error_code": null, @@ -80,7 +84,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.5" + "requester_ip": "192.168.1.5", + "is_domestic": false }, { "error_code": null, @@ -95,7 +100,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.6" + "requester_ip": "192.168.1.6", + "is_domestic": false }, { "error_code": null, @@ -110,7 +116,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.7" + "requester_ip": "192.168.1.7", + "is_domestic": false }, { "error_code": null, @@ -125,7 +132,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.8" + "requester_ip": "192.168.1.8", + "is_domestic": false }, { "error_code": "000", @@ -140,7 +148,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.9" + "requester_ip": "192.168.1.9", + "is_domestic": false }, { "error_code": null, @@ -155,7 +164,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.10" + "requester_ip": "192.168.1.10", + "is_domestic": false }, { "error_code": "000", @@ -170,7 +180,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.11" + "requester_ip": "192.168.1.11", + "is_domestic": false }, { "error_code": null, @@ -185,7 +196,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.12" + "requester_ip": "192.168.1.12", + "is_domestic": false }, { "error_code": "000", @@ -200,7 +212,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.13" + "requester_ip": "192.168.1.13", + "is_domestic": false }, { "error_code": null, @@ -215,7 +228,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.14" + "requester_ip": "192.168.1.14", + "is_domestic": false }, { "error_code": "000", @@ -230,7 +244,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.15" + "requester_ip": "192.168.1.15", + "is_domestic": false }, { "error_code": null, @@ -245,7 +260,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.16" + "requester_ip": "192.168.1.16", + "is_domestic": false }, { "error_code": "000", @@ -260,7 +276,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.17" + "requester_ip": "192.168.1.17", + "is_domestic": false }, { "error_code": "000", @@ -275,7 +292,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.18" + "requester_ip": "192.168.1.18", + "is_domestic": false }, { "error_code": "000", @@ -290,7 +308,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.19" + "requester_ip": "192.168.1.19", + "is_domestic": false }, { "error_code": "000", @@ -305,7 +324,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.20" + "requester_ip": "192.168.1.20", + "is_domestic": false } ] } \ No newline at end of file diff --git a/spec/resource_messages_spec.rb b/spec/resource_messages_spec.rb index 388a551f..d3324e15 100644 --- a/spec/resource_messages_spec.rb +++ b/spec/resource_messages_spec.rb @@ -16,7 +16,8 @@ def to_json(message) total_amount: message.total_amount, total_rate: message.total_rate, units: message.units, - requester_ip: message.requester_ip + requester_ip: message.requester_ip, + is_domestic: message.is_domestic }.to_json end From 950836e82960d9ffc1cd54b89e80a7b393f9c05d Mon Sep 17 00:00:00 2001 From: narayana Date: Mon, 6 Mar 2023 15:16:12 +0530 Subject: [PATCH 08/22] bulk message fix --- CHANGELOG.md | 4 ++++ README.md | 2 +- lib/plivo/resources/messages.rb | 9 ++++++++- lib/plivo/version.rb | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ea7b7e6..20478171 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Change Log +## [4.38.1](https://github.com/plivo/plivo-ruby/tree/v4.38.1) (2023-03-06) +**Bug fix on create message** +- Bulk send message fix + ## [4.38.0](https://github.com/plivo/plivo-ruby/tree/v4.38.0) (2023-03-03) **Adding new attribute - 'is_domestic' in Get Message and List Message APIs** - Add `is_domestic` to the response for the [list all messages API](https://www.plivo.com/docs/sms/api/message/list-all-messages/) and the [get message details API](https://www.plivo.com/docs/sms/api/message#retrieve-a-message) diff --git a/README.md b/README.md index adab6d05..e5748a63 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.38.0' +gem 'plivo', '>= 4.38.1' ``` And then execute: diff --git a/lib/plivo/resources/messages.rb b/lib/plivo/resources/messages.rb index e20fcbba..5955e55f 100644 --- a/lib/plivo/resources/messages.rb +++ b/lib/plivo/resources/messages.rb @@ -105,10 +105,17 @@ def create(src = nil, dst = nil, text = nil, options = nil, powerpack_uuid = nil params = { src: value[:src], - dst: value[:dst], text: value[:text], powerpack_uuid: value[:powerpack_uuid] } + if (value[:dst].is_a?(Array)) + value[:dst].each do |dst_num| + valid_param?(:dst_num, dst_num, [Integer, String, Symbol], true) + params[:dst] = value[:dst].join('<') + end + else + params[:dst] = value[:dst] + end #Handling optional params in One HASH if value.key?(:type) && valid_param?(:type, value[:type],String, true, %w[sms mms]) diff --git a/lib/plivo/version.rb b/lib/plivo/version.rb index 939bb2b3..3edc1ff6 100644 --- a/lib/plivo/version.rb +++ b/lib/plivo/version.rb @@ -1,3 +1,3 @@ module Plivo - VERSION = "4.38.0".freeze + VERSION = "4.38.1".freeze end From d896ff0ea421808de71b758c7f62ecd9894b9ad8 Mon Sep 17 00:00:00 2001 From: "anindya.mahajan" Date: Fri, 24 Feb 2023 11:16:58 +0530 Subject: [PATCH 09/22] Added new params --- lib/plivo/resources/recordings.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/plivo/resources/recordings.rb b/lib/plivo/resources/recordings.rb index 15ff76e3..90167b06 100644 --- a/lib/plivo/resources/recordings.rb +++ b/lib/plivo/resources/recordings.rb @@ -19,6 +19,8 @@ def to_s api_id: @api_id, call_uuid: @call_uuid, conference_name: @conference_name, + cost: @cost, + days_of_storage: @days_of_storage, recording_duration_ms: @recording_duration_ms, recording_end_ms: @recording_end_ms, recording_format: @recording_format, @@ -27,6 +29,7 @@ def to_s recording_type: @recording_type, recording_url: @recording_url, resource_uri: @resource_uri, + rounded_duration: @rounded_duration, from_number: @from_number, to_number: @to_number, mpc_name: @mpc_name, @@ -72,6 +75,7 @@ def list(options = nil) add_time__lt add_time__lte from_number to_number conference_uuid conference_name mpc_name mpc_uuid + rounded_duration ] params_expected.each do |param| From 9634314f247c2310c49d36b4097450017f1c8d15 Mon Sep 17 00:00:00 2001 From: "anindya.mahajan" Date: Fri, 24 Feb 2023 11:21:37 +0530 Subject: [PATCH 10/22] changed UT --- spec/resource_recordings_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/resource_recordings_spec.rb b/spec/resource_recordings_spec.rb index 53bc51e3..145dd999 100644 --- a/spec/resource_recordings_spec.rb +++ b/spec/resource_recordings_spec.rb @@ -7,6 +7,8 @@ def to_json(recording) api_id: recording.api_id, call_uuid: recording.call_uuid, conference_name: recording.conference_name, + cost: recording.cost, + days_of_storage: recording.days_of_storage, recording_duration_ms: recording.recording_duration_ms, recording_end_ms: recording.recording_end_ms, recording_format: recording.recording_format, @@ -14,7 +16,8 @@ def to_json(recording) recording_start_ms: recording.recording_start_ms, recording_type: recording.recording_type, recording_url: recording.recording_url, - resource_uri: recording.resource_uri + resource_uri: recording.resource_uri, + rounded_duration: recording.rounded_duration }.to_json end From 88e01b0005b4bb473c089202b3ca3837cf8a55d5 Mon Sep 17 00:00:00 2001 From: "anindya.mahajan" Date: Fri, 24 Feb 2023 19:13:47 +0530 Subject: [PATCH 11/22] changed UT --- spec/mocks/recordingGetResponse.json | 5 ++++- spec/mocks/recordingListResponse.json | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/spec/mocks/recordingGetResponse.json b/spec/mocks/recordingGetResponse.json index 49f728d1..3826d21a 100644 --- a/spec/mocks/recordingGetResponse.json +++ b/spec/mocks/recordingGetResponse.json @@ -10,5 +10,8 @@ "recording_start_ms": "1407235163907.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-11e4-a664-0026b945b52x.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/", + "cost": "0.0024", + "rounded_duration": "360", + "days_of_storage": "2800" } \ No newline at end of file diff --git a/spec/mocks/recordingListResponse.json b/spec/mocks/recordingListResponse.json index 8f843c33..5bae7ae4 100644 --- a/spec/mocks/recordingListResponse.json +++ b/spec/mocks/recordingListResponse.json @@ -19,7 +19,10 @@ "recording_start_ms": "1407235163907.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-1124-a664-0026b945b522.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-1124-a664-0026b945b522/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-1124-a664-0026b945b522/", + "cost": "0.0024", + "rounded_duration": "360", + "days_of_storage": "2800" }, { "add_time": "2014-08-05 16:05:21.993853+05:30", @@ -32,7 +35,10 @@ "recording_start_ms": "1407234829553.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/fc2716b0-1c8b-11e4-bwad-842b2b17453e.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/fc2716b0-1c8b-11e4-bwad-842b2b17453e/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/fc2716b0-1c8b-11e4-bwad-842b2b17453e/", + "cost": "0.0024", + "rounded_duration": "360", + "days_of_storage": "2800" }, { "add_time": "2014-08-05 15:51:56.582492+05:30", @@ -45,7 +51,10 @@ "recording_start_ms": "1407234081443.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/3e701c9e-1c8a-11e4-bwad-842b2b17453e.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/3e701c9e-1c8a-11e4-bwad-842b2b17453e/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/3e701c9e-1c8a-11e4-bwad-842b2b17453e/", + "cost": "0.0024", + "rounded_duration": "360", + "days_of_storage": "2800" } ] } \ No newline at end of file From f95437f0883a07a3d68c88eb7d82790a8635522b Mon Sep 17 00:00:00 2001 From: "anindya.mahajan" Date: Wed, 8 Mar 2023 15:17:46 +0530 Subject: [PATCH 12/22] changed version --- CHANGELOG.md | 4 ++++ README.md | 2 +- lib/plivo/version.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20478171..c2e685f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Change Log +## [4.38.2](https://github.com/plivo/plivo-java/tree/v4.38.2) (2023-03-08) +- Added `cost`, `rounded_duration`, and `days_of_storage` parameters to the response for [get single recording API](https://www.plivo.com/docs/voice/api/recording#retrieve-a-recording) and [get all recordings API](https://www.plivo.com/docs/voice/api/recording#list-all-recordings) +- Added `rounded_duration` parameter as a filter option for [get all recordings API](https://www.plivo.com/docs/voice/api/recording#list-all-recordings) + ## [4.38.1](https://github.com/plivo/plivo-ruby/tree/v4.38.1) (2023-03-06) **Bug fix on create message** - Bulk send message fix diff --git a/README.md b/README.md index e5748a63..d6d01fd0 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.38.1' +gem 'plivo', '>= 4.38.2' ``` And then execute: diff --git a/lib/plivo/version.rb b/lib/plivo/version.rb index 3edc1ff6..f6e00127 100644 --- a/lib/plivo/version.rb +++ b/lib/plivo/version.rb @@ -1,3 +1,3 @@ module Plivo - VERSION = "4.38.1".freeze + VERSION = "4.38.2".freeze end From e37d230c5b4bea1a6e3c4f47987c95d8afec523f Mon Sep 17 00:00:00 2001 From: mohsin-plivo Date: Thu, 9 Mar 2023 14:02:52 +0530 Subject: [PATCH 13/22] local docker enhancement --- Makefile | 9 ++++++++- README.md | 9 +++++++-- setup_sdk.sh | 20 +++++++++++--------- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 66d0759f..e31e4f09 100644 --- a/Makefile +++ b/Makefile @@ -4,4 +4,11 @@ build: docker-compose up --build --remove-orphans test: - docker exec -it $$CONTAINER /bin/bash -c "bundle exec rake" \ No newline at end of file + @[ "${CONTAINER}" ] && \ + docker exec -it $$CONTAINER /bin/bash -c "bundle exec rake" || \ + bundle exec rake + +run: + @[ "${CONTAINER}" ] && \ + (docker exec -it $$CONTAINER /bin/bash -c 'cd /usr/src/app/ruby-sdk-test/ && ruby test.rb') || \ + (cd /usr/src/app/ruby-sdk-test/ && ruby test.rb) \ No newline at end of file diff --git a/README.md b/README.md index e5748a63..e8ce6641 100644 --- a/README.md +++ b/README.md @@ -191,5 +191,10 @@ export PLIVO_API_PROD_HOST= 5. The sdk directory will be mounted as a volume in the container. So any changes in the sdk code will also be reflected inside the container. > To use the local code in the test file, import the sdk in test file using: `require "/usr/src/app/lib/plivo.rb"` -6. To run unit tests, run `make test CONTAINER=` in host, where `` is the docker container id created in 2. -(The docker container should be running) \ No newline at end of file +6. To run test code, run `make run CONTAINER=` in host. +7. To run unit tests, run `make test CONTAINER=` in host. +> `` is the docker container id created in 2. +(The docker container should be running) + +> Test code and unit tests can also be run within the container using +`make run` and `make test` respectively. (`CONTAINER` argument should be omitted when running from the container) \ No newline at end of file diff --git a/setup_sdk.sh b/setup_sdk.sh index 045ef9cd..9094d81a 100755 --- a/setup_sdk.sh +++ b/setup_sdk.sh @@ -32,14 +32,16 @@ if [ ! -f $testDir/test.rb ]; then cd - fi -echo -e "\n\nSDK setup complete!" -echo "To test your changes:" -echo -e "\t1. Add your test code in /$testDir/test.rb on host (or /usr/src/app/$testDir/test.rb in the container)" -echo -e "\t\tNote: To use sdk in test file, import using $GREEN require \"/usr/src/app/lib/plivo.rb\"$NC" -echo -e "\t2. Run a terminal in the container using: $GREEN docker exec -it $HOSTNAME /bin/bash$NC" -echo -e "\t3. Navigate to the test directory: $GREEN cd /usr/src/app/$testDir$NC" -echo -e "\t4. Run your test file: $GREEN ruby test.rb$NC" -echo -e "\t5. For running unit tests, run on host: $GREEN make test CONTAINER=$HOSTNAME$NC" - +echo -e "\n\nSDK setup complete! You can test changes either on host or inside the docker container:" +echo -e "\ta. To test your changes ON HOST:" +echo -e "\t\t1. Add your test code in /$testDir/test.rb" +echo -e "\t\t2. Run your test file using: $GREEN make run CONTAINER=$HOSTNAME$NC" +echo -e "\t\t3. Run unit tests using: $GREEN make test CONTAINER=$HOSTNAME$NC" +echo +echo -e "\tb. To test your changes INSIDE CONTAINER:" +echo -e "\t\t1. Run a terminal in the container using: $GREEN docker exec -it $HOSTNAME /bin/bash$NC" +echo -e "\t\t2. Add your test code in /usr/src/app/$testDir/test.rb" +echo -e "\t\t3. Run your test file using: $GREEN make run$NC" +echo -e "\t\t4. Run unit tests using: $GREEN make test$NC" # To keep the container running post setup /bin/bash \ No newline at end of file From 0dc474c85b5d1b70179047de9e1536873e19fb42 Mon Sep 17 00:00:00 2001 From: Sajal Singhal Date: Tue, 14 Mar 2023 11:54:23 +0530 Subject: [PATCH 14/22] Adding CreatedAt field in get and list brand/profile api --- spec/mocks/brandGetResponse.json | 3 ++- spec/mocks/brandListResponse.json | 27 ++++++++++++++++++--------- spec/mocks/profileGetResponse.json | 3 ++- spec/mocks/profileListResponse.json | 6 ++++-- spec/resource_brand_spec.rb | 3 ++- spec/resource_profile_spec.rb | 3 ++- 6 files changed, 30 insertions(+), 15 deletions(-) diff --git a/spec/mocks/brandGetResponse.json b/spec/mocks/brandGetResponse.json index e4901079..8804a20d 100644 --- a/spec/mocks/brandGetResponse.json +++ b/spec/mocks/brandGetResponse.json @@ -12,6 +12,7 @@ "brand_id": "BPL3KN9", "brand_type": "STARTER", "ein_issuing_country": "US", - "registration_status": "COMPLETED" + "registration_status": "COMPLETED", + "created_at": "2023-01-16T06:22:35.195487Z" } } \ No newline at end of file diff --git a/spec/mocks/brandListResponse.json b/spec/mocks/brandListResponse.json index 3fe8a5a2..07b37385 100644 --- a/spec/mocks/brandListResponse.json +++ b/spec/mocks/brandListResponse.json @@ -14,7 +14,8 @@ "brand_id": "BPL3KN9", "brand_type": "STARTER", "ein_issuing_country": "US", - "registration_status": "COMPLETED" + "registration_status": "COMPLETED", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -39,7 +40,8 @@ "entity_type": "INDIVIDUAL", "profile_uuid": "55515d72-2852-4016-9ed9-c64bd1c0c055", "registration_status": "COMPLETED", - "vertical": "ENERGY" + "vertical": "ENERGY", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -64,7 +66,8 @@ "entity_type": "INDIVIDUAL", "profile_uuid": "71a18795-77fa-4623-9735-44bbd08d86c4", "registration_status": "COMPLETED", - "vertical": "ENTERTAINMENT" + "vertical": "ENTERTAINMENT", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -81,7 +84,8 @@ "ein_issuing_country": "IN", "profile_uuid": "d3d85b2d-a4c2-4f7b-a66f-83002a5fd5e8", "registration_status": "COMPLETED", - "vertical": "ENTERTAINMENT" + "vertical": "ENTERTAINMENT", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -100,7 +104,8 @@ "ein_issuing_country": "US", "profile_uuid": "709a4b1c-bbde-40e6-be36-164b1dc8f718", "registration_status": "COMPLETED", - "vertical": "ENTERTAINMENT" + "vertical": "ENTERTAINMENT", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -127,7 +132,8 @@ "entity_type": "PRIVATE", "profile_uuid": "a28b5892-4d8b-4098-9fe7-6f786fb0be1f", "registration_status": "COMPLETED", - "vertical": "ENTERTAINMENT" + "vertical": "ENTERTAINMENT", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -152,7 +158,8 @@ "entity_type": "GOVERNMENT", "profile_uuid": "ca01734d-a86a-4ed4-aa5a-8723cbb595b3", "registration_status": "COMPLETED", - "vertical": "ENERGY" + "vertical": "ENERGY", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -178,7 +185,8 @@ "profile_uuid": "c1a1c66a-2bc4-4150-a3f3-033ec41efc5d", "registration_status": "COMPLETED", "vertical": "ENTERTAINMENT", - "website": "hibye.com" + "website": "hibye.com", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -207,7 +215,8 @@ "registration_status": "COMPLETED", "vertical": "PROFESSIONAL", "vetting_score": 80, - "vetting_status": "ACTIVE" + "vetting_status": "ACTIVE", + "created_at": "2023-01-16T06:22:35.195487Z" } ] } \ No newline at end of file diff --git a/spec/mocks/profileGetResponse.json b/spec/mocks/profileGetResponse.json index a67d9417..a72a3b2d 100644 --- a/spec/mocks/profileGetResponse.json +++ b/spec/mocks/profileGetResponse.json @@ -29,6 +29,7 @@ "stock_exchange": "NASDAQ", "stock_symbol": "ABC", "vertical": "PROFESSIONAL", - "website": "google.com" + "website": "google.com", + "created_at": "2023-01-16T06:22:35.195487Z" } } \ No newline at end of file diff --git a/spec/mocks/profileListResponse.json b/spec/mocks/profileListResponse.json index ada8d2f8..4154d0b4 100644 --- a/spec/mocks/profileListResponse.json +++ b/spec/mocks/profileListResponse.json @@ -31,7 +31,8 @@ "stock_exchange": "NYSE", "stock_symbol": "TESLA", "vertical": "ENTERTAINMENT", - "website": "hibye.com" + "website": "hibye.com", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -62,7 +63,8 @@ "stock_exchange": "NYSE", "stock_symbol": "TESLA", "vertical": "ENTERTAINMENT", - "website": "hibye.com" + "website": "hibye.com", + "created_at": "2023-01-16T06:22:35.195487Z" } ] } \ No newline at end of file diff --git a/spec/resource_brand_spec.rb b/spec/resource_brand_spec.rb index 7e554216..638dd794 100644 --- a/spec/resource_brand_spec.rb +++ b/spec/resource_brand_spec.rb @@ -24,7 +24,8 @@ def to_json_brand(obj) entity_type: obj['entity_type'], ein: obj['ein'], website: obj['website'], - company_name: obj['company_name'] + company_name: obj['company_name'], + created_at: obj['created_at'] }.reject { |_, v| v.nil? }.to_json end diff --git a/spec/resource_profile_spec.rb b/spec/resource_profile_spec.rb index 23137061..f211a800 100644 --- a/spec/resource_profile_spec.rb +++ b/spec/resource_profile_spec.rb @@ -27,7 +27,8 @@ def to_json_profile(obj) alt_business_id_type: obj['alt_business_id_type'], alt_business_id: obj['alt_business_id'], address: obj['address'], - authorized_contact: obj['authorized_contact'] + authorized_contact: obj['authorized_contact'], + created_at: obj['created_at'] }.reject { |_, v| v.nil? }.to_json end def to_json_list(list_object) From 77cec4802515dede95c193fdfdfc2a46a86d946e Mon Sep 17 00:00:00 2001 From: Sajal Singhal Date: Thu, 16 Mar 2023 15:54:02 +0530 Subject: [PATCH 15/22] Adding created_at field in list and get campaign details api response --- spec/mocks/campaignGetResponse.json | 3 ++- spec/mocks/campaignListResponse.json | 30 +++++++++++++++++--------- spec/mocks/campaignUpdateResponse.json | 3 ++- spec/mocks/profileUpdateResponse.json | 3 ++- spec/resource_campaign_spec.rb | 3 ++- 5 files changed, 28 insertions(+), 14 deletions(-) diff --git a/spec/mocks/campaignGetResponse.json b/spec/mocks/campaignGetResponse.json index e19478bb..9ee3e283 100644 --- a/spec/mocks/campaignGetResponse.json +++ b/spec/mocks/campaignGetResponse.json @@ -20,6 +20,7 @@ "registration_status": "ACTIVE", "reseller_id": "", "sub_usecase": "2FA,MARKETING", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-01-16T06:22:35.195487Z" } } \ No newline at end of file diff --git a/spec/mocks/campaignListResponse.json b/spec/mocks/campaignListResponse.json index d0c68101..f4d79370 100644 --- a/spec/mocks/campaignListResponse.json +++ b/spec/mocks/campaignListResponse.json @@ -21,7 +21,8 @@ "registration_status": "ACTIVE", "reseller_id": "RFWG6CB", "sub_usecase": "CUSTOMER_CARE", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "BNOOLMO", @@ -43,7 +44,8 @@ "registration_status": "FAILED", "reseller_id": "", "sub_usecase": "2FA,MARKETING", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "BWDWMAC", @@ -65,7 +67,8 @@ "registration_status": "ACTIVE", "reseller_id": "", "sub_usecase": "2FA,MARKETING", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "BCKWPKX", @@ -87,7 +90,8 @@ "registration_status": "PROCESSING", "reseller_id": "", "sub_usecase": "2FA,MARKETING", - "usecase": "MIXED" + "usecase": "MIXED", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "B2IYFNC", @@ -109,7 +113,8 @@ "registration_status": "PROCESSING", "reseller_id": "", "sub_usecase": "2FA", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "BK98MJL", @@ -129,7 +134,8 @@ } }, "registration_status": "ACTIVE", - "reseller_id": "" + "reseller_id": "", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "B3WKVGC", @@ -151,7 +157,8 @@ "registration_status": "PROCESSING", "reseller_id": "RFWG6CB", "sub_usecase": "CUSTOMER_CARE", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "BBYQU0Z", @@ -172,7 +179,8 @@ }, "registration_status": "PROCESSING", "reseller_id": "", - "usecase": "2FA" + "usecase": "2FA", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "BBYQU0Z", @@ -193,7 +201,8 @@ }, "registration_status": "ACTIVE", "reseller_id": "", - "usecase": "2FA" + "usecase": "2FA", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "BBYQU0Z", @@ -214,7 +223,8 @@ }, "registration_status": "ACTIVE", "reseller_id": "", - "usecase": "2FA" + "usecase": "2FA", + "created_at": "2023-01-16T06:22:35.195487Z" } ] } \ No newline at end of file diff --git a/spec/mocks/campaignUpdateResponse.json b/spec/mocks/campaignUpdateResponse.json index 6763b5d2..2156403e 100644 --- a/spec/mocks/campaignUpdateResponse.json +++ b/spec/mocks/campaignUpdateResponse.json @@ -20,6 +20,7 @@ "registration_status": "ACTIVE", "reseller_id": "", "sub_usecase": "2FA,MARKETING", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-01-16T06:22:35.195487Z" } } \ No newline at end of file diff --git a/spec/mocks/profileUpdateResponse.json b/spec/mocks/profileUpdateResponse.json index 0fff2ca4..980cdf73 100644 --- a/spec/mocks/profileUpdateResponse.json +++ b/spec/mocks/profileUpdateResponse.json @@ -27,6 +27,7 @@ "profile_type": "SECONDARY", "profile_uuid": "09322f43-fe16-4525-b8e4-4229c867795d", "vertical": "ENERGY", - "website": "www.google.com" + "website": "www.google.com", + "created_at": "2023-01-16T06:22:35.195487Z" } } \ No newline at end of file diff --git a/spec/resource_campaign_spec.rb b/spec/resource_campaign_spec.rb index d675eb04..ed1adc6d 100644 --- a/spec/resource_campaign_spec.rb +++ b/spec/resource_campaign_spec.rb @@ -16,7 +16,8 @@ def to_json_campaign(obj) reseller_id: obj['reseller_id'], usecase: obj['usecase'], registration_status: obj['registration_status'], - sub_usecase: obj['sub_usecase'] + sub_usecase: obj['sub_usecase'], + created_at: obj['created_at'] }.reject { |_, v| v.nil? }.to_json end def to_json_list(list_object) From b60f97e5f0dfe9f081fefc7e6935dbb4a947023d Mon Sep 17 00:00:00 2001 From: Sajal Singhal Date: Fri, 17 Mar 2023 12:55:13 +0530 Subject: [PATCH 16/22] version update --- CHANGELOG.md | 4 ++++ README.md | 2 +- lib/plivo/version.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20478171..58cbb289 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Change Log +## [4.38.2](https://github.com/plivo/plivo-ruby/tree/v4.38.2) (2023-03-16) +**Adding new attribute - 'created_at' in List Profiles, Get Profile, List Brands, Get Brand, List Campaigns and Get Campaign APIs** +- dding new attribute - 'created_at' in List Profiles, Get Profile, List Brands, Get Brand, List Campaigns and Get Campaign APIs + ## [4.38.1](https://github.com/plivo/plivo-ruby/tree/v4.38.1) (2023-03-06) **Bug fix on create message** - Bulk send message fix diff --git a/README.md b/README.md index e5748a63..d6d01fd0 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.38.1' +gem 'plivo', '>= 4.38.2' ``` And then execute: diff --git a/lib/plivo/version.rb b/lib/plivo/version.rb index 3edc1ff6..f6e00127 100644 --- a/lib/plivo/version.rb +++ b/lib/plivo/version.rb @@ -1,3 +1,3 @@ module Plivo - VERSION = "4.38.1".freeze + VERSION = "4.38.2".freeze end From 973ef799125815fe9a18ca8ade66f99fa1758eff Mon Sep 17 00:00:00 2001 From: Sajal Singhal Date: Fri, 17 Mar 2023 13:10:52 +0530 Subject: [PATCH 17/22] date change --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58cbb289..68676e7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Change Log -## [4.38.2](https://github.com/plivo/plivo-ruby/tree/v4.38.2) (2023-03-16) +## [4.38.2](https://github.com/plivo/plivo-ruby/tree/v4.38.2) (2023-03-17) **Adding new attribute - 'created_at' in List Profiles, Get Profile, List Brands, Get Brand, List Campaigns and Get Campaign APIs** - dding new attribute - 'created_at' in List Profiles, Get Profile, List Brands, Get Brand, List Campaigns and Get Campaign APIs From 5a166a1ff4c26dfe9bf77e74ab135404e8734722 Mon Sep 17 00:00:00 2001 From: Sajal Singhal Date: Fri, 17 Mar 2023 13:29:24 +0530 Subject: [PATCH 18/22] version update --- CHANGELOG.md | 2 +- README.md | 2 +- lib/plivo/version.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68676e7b..c59391dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Change Log -## [4.38.2](https://github.com/plivo/plivo-ruby/tree/v4.38.2) (2023-03-17) +## [4.39.0](https://github.com/plivo/plivo-ruby/tree/v4.39.0) (2023-03-17) **Adding new attribute - 'created_at' in List Profiles, Get Profile, List Brands, Get Brand, List Campaigns and Get Campaign APIs** - dding new attribute - 'created_at' in List Profiles, Get Profile, List Brands, Get Brand, List Campaigns and Get Campaign APIs diff --git a/README.md b/README.md index d6d01fd0..85f9ac35 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.38.2' +gem 'plivo', '>= 4.39.0' ``` And then execute: diff --git a/lib/plivo/version.rb b/lib/plivo/version.rb index f6e00127..e3ad5a3b 100644 --- a/lib/plivo/version.rb +++ b/lib/plivo/version.rb @@ -1,3 +1,3 @@ module Plivo - VERSION = "4.38.2".freeze + VERSION = "4.39.0".freeze end From b0535fd170bb206bf451a307d04548fb23ae28e4 Mon Sep 17 00:00:00 2001 From: "anindya.mahajan" Date: Fri, 24 Feb 2023 11:16:58 +0530 Subject: [PATCH 19/22] Added new params --- lib/plivo/resources/recordings.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/plivo/resources/recordings.rb b/lib/plivo/resources/recordings.rb index 15ff76e3..90167b06 100644 --- a/lib/plivo/resources/recordings.rb +++ b/lib/plivo/resources/recordings.rb @@ -19,6 +19,8 @@ def to_s api_id: @api_id, call_uuid: @call_uuid, conference_name: @conference_name, + cost: @cost, + days_of_storage: @days_of_storage, recording_duration_ms: @recording_duration_ms, recording_end_ms: @recording_end_ms, recording_format: @recording_format, @@ -27,6 +29,7 @@ def to_s recording_type: @recording_type, recording_url: @recording_url, resource_uri: @resource_uri, + rounded_duration: @rounded_duration, from_number: @from_number, to_number: @to_number, mpc_name: @mpc_name, @@ -72,6 +75,7 @@ def list(options = nil) add_time__lt add_time__lte from_number to_number conference_uuid conference_name mpc_name mpc_uuid + rounded_duration ] params_expected.each do |param| From 99112d8b02f40f878a4c206bb33c499e0d048e09 Mon Sep 17 00:00:00 2001 From: "anindya.mahajan" Date: Fri, 24 Feb 2023 11:21:37 +0530 Subject: [PATCH 20/22] changed UT --- spec/resource_recordings_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/resource_recordings_spec.rb b/spec/resource_recordings_spec.rb index 53bc51e3..145dd999 100644 --- a/spec/resource_recordings_spec.rb +++ b/spec/resource_recordings_spec.rb @@ -7,6 +7,8 @@ def to_json(recording) api_id: recording.api_id, call_uuid: recording.call_uuid, conference_name: recording.conference_name, + cost: recording.cost, + days_of_storage: recording.days_of_storage, recording_duration_ms: recording.recording_duration_ms, recording_end_ms: recording.recording_end_ms, recording_format: recording.recording_format, @@ -14,7 +16,8 @@ def to_json(recording) recording_start_ms: recording.recording_start_ms, recording_type: recording.recording_type, recording_url: recording.recording_url, - resource_uri: recording.resource_uri + resource_uri: recording.resource_uri, + rounded_duration: recording.rounded_duration }.to_json end From 4e857b76d6cb610c431d5ec1f74721986fb6f439 Mon Sep 17 00:00:00 2001 From: "anindya.mahajan" Date: Fri, 24 Feb 2023 19:13:47 +0530 Subject: [PATCH 21/22] changed UT --- spec/mocks/recordingGetResponse.json | 5 ++++- spec/mocks/recordingListResponse.json | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/spec/mocks/recordingGetResponse.json b/spec/mocks/recordingGetResponse.json index 49f728d1..3826d21a 100644 --- a/spec/mocks/recordingGetResponse.json +++ b/spec/mocks/recordingGetResponse.json @@ -10,5 +10,8 @@ "recording_start_ms": "1407235163907.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-11e4-a664-0026b945b52x.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/", + "cost": "0.0024", + "rounded_duration": "360", + "days_of_storage": "2800" } \ No newline at end of file diff --git a/spec/mocks/recordingListResponse.json b/spec/mocks/recordingListResponse.json index 8f843c33..5bae7ae4 100644 --- a/spec/mocks/recordingListResponse.json +++ b/spec/mocks/recordingListResponse.json @@ -19,7 +19,10 @@ "recording_start_ms": "1407235163907.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-1124-a664-0026b945b522.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-1124-a664-0026b945b522/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-1124-a664-0026b945b522/", + "cost": "0.0024", + "rounded_duration": "360", + "days_of_storage": "2800" }, { "add_time": "2014-08-05 16:05:21.993853+05:30", @@ -32,7 +35,10 @@ "recording_start_ms": "1407234829553.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/fc2716b0-1c8b-11e4-bwad-842b2b17453e.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/fc2716b0-1c8b-11e4-bwad-842b2b17453e/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/fc2716b0-1c8b-11e4-bwad-842b2b17453e/", + "cost": "0.0024", + "rounded_duration": "360", + "days_of_storage": "2800" }, { "add_time": "2014-08-05 15:51:56.582492+05:30", @@ -45,7 +51,10 @@ "recording_start_ms": "1407234081443.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/3e701c9e-1c8a-11e4-bwad-842b2b17453e.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/3e701c9e-1c8a-11e4-bwad-842b2b17453e/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/3e701c9e-1c8a-11e4-bwad-842b2b17453e/", + "cost": "0.0024", + "rounded_duration": "360", + "days_of_storage": "2800" } ] } \ No newline at end of file From 70789a14c29fbc44ccec1d18399fefed05141db4 Mon Sep 17 00:00:00 2001 From: "anindya.mahajan" Date: Wed, 8 Mar 2023 15:17:46 +0530 Subject: [PATCH 22/22] changed version merged from master --- CHANGELOG.md | 5 +++++ README.md | 2 +- lib/plivo/version.rb | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c59391dd..4b8f93ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # Change Log +## [4.39.1](https://github.com/plivo/plivo-ruby/tree/v4.39.1) (2023-04-04) +**Feature - Recording API changes** +- Added `monthly_recording_storage_amount`, `recording_storage_rate`, `rounded_recording_duration`, and `recording_storage_duration` parameters to the response for [get single recording API](https://www.plivo.com/docs/voice/api/recording#retrieve-a-recording) and [get all recordings API](https://www.plivo.com/docs/voice/api/recording#list-all-recordings) +- Added `recording_storage_duration` parameter as a filter option for [get all recordings API](https://www.plivo.com/docs/voice/api/recording#list-all-recordings) + ## [4.39.0](https://github.com/plivo/plivo-ruby/tree/v4.39.0) (2023-03-17) **Adding new attribute - 'created_at' in List Profiles, Get Profile, List Brands, Get Brand, List Campaigns and Get Campaign APIs** - dding new attribute - 'created_at' in List Profiles, Get Profile, List Brands, Get Brand, List Campaigns and Get Campaign APIs diff --git a/README.md b/README.md index 5c6d3e90..7bee4ba9 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.39.0' +gem 'plivo', '>= 4.39.1' ``` And then execute: diff --git a/lib/plivo/version.rb b/lib/plivo/version.rb index e3ad5a3b..ce37ecc1 100644 --- a/lib/plivo/version.rb +++ b/lib/plivo/version.rb @@ -1,3 +1,3 @@ module Plivo - VERSION = "4.39.0".freeze + VERSION = "4.39.1".freeze end