diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b391807..a033a112 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # Change Log +## [4.48.0](https://github.com/plivo/plivo-ruby/tree/v4.48.0) (2023-08-25) +**Feature - Added New Param 'carrier_fees', 'carrier_fees_rate', 'destination_network' in Get Message and List Message APIs** +- Added new params on message get and list response ## [4.47.0](https://github.com/plivo/plivo-ruby/tree/v4.47.0) (2023-08-03) **Feature - DLT parameters** diff --git a/README.md b/README.md index 36271fb2..0cc76503 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.47.0' +gem 'plivo', '>= 4.48.0' ``` And then execute: diff --git a/lib/plivo/resources/messages.rb b/lib/plivo/resources/messages.rb index 86df5c43..5ac1acb1 100644 --- a/lib/plivo/resources/messages.rb +++ b/lib/plivo/resources/messages.rb @@ -39,7 +39,10 @@ def to_s replaced_sender: @replaced_sender, dlt_entity_id: @dlt_entity_id, dlt_template_id: @dlt_template_id, - dlt_template_category: @dlt_template_category + dlt_template_category: @dlt_template_category, + destination_network: @destination_network, + carrier_fees_rate: @carrier_fees_rate, + carrier_fees: @carrier_fees }.to_s end end diff --git a/lib/plivo/version.rb b/lib/plivo/version.rb index 4a68d5cc..3d183c33 100644 --- a/lib/plivo/version.rb +++ b/lib/plivo/version.rb @@ -1,3 +1,3 @@ module Plivo - VERSION = "4.47.0".freeze + VERSION = "4.48.0".freeze end diff --git a/spec/mocks/messageGetResponse.json b/spec/mocks/messageGetResponse.json index 1c158326..551a8639 100644 --- a/spec/mocks/messageGetResponse.json +++ b/spec/mocks/messageGetResponse.json @@ -16,5 +16,8 @@ "is_domestic": false, "dlt_entity_id": "1234", "dlt_template_id": "5678", - "dlt_template_category": "service_implicit" + "dlt_template_category": "service_implicit", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" } \ No newline at end of file diff --git a/spec/mocks/messageListResponse.json b/spec/mocks/messageListResponse.json index 5bf2ddeb..03f0ae21 100644 --- a/spec/mocks/messageListResponse.json +++ b/spec/mocks/messageListResponse.json @@ -24,7 +24,10 @@ "is_domestic": false, "dlt_entity_id": "1245", "dlt_template_id": "9585", - "dlt_template_category": "promotional" + "dlt_template_category": "promotional", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -43,7 +46,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -62,7 +68,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -81,7 +90,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -100,7 +112,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -119,7 +134,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -138,7 +156,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -157,7 +178,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": "000", @@ -176,7 +200,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -195,7 +222,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": "000", @@ -214,7 +244,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -233,7 +266,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": "000", @@ -252,7 +288,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -271,7 +310,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": "000", @@ -290,7 +332,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -309,7 +354,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": "000", @@ -328,7 +376,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": "000", @@ -347,7 +398,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": "000", @@ -366,7 +420,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": "000", @@ -385,7 +442,10 @@ "is_domestic": false, "dlt_entity_id": "", "dlt_template_id": "", - "dlt_template_category": "" + "dlt_template_category": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" } ] } \ No newline at end of file diff --git a/spec/resource_messages_spec.rb b/spec/resource_messages_spec.rb index 1cb5b3cf..809f80e8 100644 --- a/spec/resource_messages_spec.rb +++ b/spec/resource_messages_spec.rb @@ -20,7 +20,10 @@ def to_json(message) is_domestic: message.is_domestic, dlt_entity_id: message.dlt_entity_id, dlt_template_id: message.dlt_template_id, - dlt_template_category: message.dlt_template_category + dlt_template_category: message.dlt_template_category, + destination_network: message.destination_network, + carrier_fees_rate: message.carrier_fees_rate, + carrier_fees: message.carrier_fees }.to_json end @@ -81,6 +84,7 @@ def to_json_list(list_object) expect(response.requester_ip).to eql("192.168.1.1") expect(response.dlt_entity_id).to eql("1234") expect(response.dlt_template_id).to eql("5678") + expect(response.destination_network).to eql("Verizon") expect(response.dlt_template_category).to eql("service_implicit") end