From 435032d1f187a14dae2773d9d1aa5bc14d5d3ed4 Mon Sep 17 00:00:00 2001 From: narayana Date: Wed, 16 Aug 2023 14:50:56 +0530 Subject: [PATCH 1/2] adding new param into mdr object --- CHANGELOG.md | 4 + src/Plivo/Resources/Message/Message.php | 11 +++ src/Plivo/Version.php | 2 +- tests/Mocks/messageGetResponse.json | 5 +- tests/Mocks/messageListResponse.json | 100 +++++++++++++++++++----- 5 files changed, 100 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87754e09..a0c13f4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Change Log +## [4.56.0](https://github.com/plivo/plivo-go/tree/v4.56.0) (2023-08-16) +**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.55.0](https://github.com/plivo/plivo-php/tree/v4.55.0) (2023-08-10) **Feature - Verify** - Added Create Session API diff --git a/src/Plivo/Resources/Message/Message.php b/src/Plivo/Resources/Message/Message.php index 6df88dc8..54329388 100644 --- a/src/Plivo/Resources/Message/Message.php +++ b/src/Plivo/Resources/Message/Message.php @@ -107,6 +107,17 @@ public function __construct( $this->properties['isDomestic'] = $response['is_domestic']; } + if (!empty($response['destination_network'])) { + $this->properties['destination_network'] = $response['destination_network']; + } + + if (!empty($response['carrier_fees_rate'])) { + $this->properties['carrier_fees_rate'] = $response['carrier_fees_rate']; + } + if (!empty($response['carrier_fees'])) { + $this->properties['carrier_fees'] = $response['carrier_fees']; + } + $this->pathParams = [ 'authId' => $authId, 'messageUuid' => $response['message_uuid'] diff --git a/src/Plivo/Version.php b/src/Plivo/Version.php index be1636d3..37d63815 100644 --- a/src/Plivo/Version.php +++ b/src/Plivo/Version.php @@ -20,7 +20,7 @@ class Version /** * @const int PHP helper library minor version number */ - const MINOR = 55; + const MINOR = 56; /** * @const int PHP helper library patch number diff --git a/tests/Mocks/messageGetResponse.json b/tests/Mocks/messageGetResponse.json index 616c245d..b6e31eaa 100644 --- a/tests/Mocks/messageGetResponse.json +++ b/tests/Mocks/messageGetResponse.json @@ -22,5 +22,8 @@ "dlt_template_category": "service_implicit", "conversation_id": "9876", "conversation_origin": "utility", - "conversation_expiration_timestamp": "2023-08-03 23:02:00+05:30" + "conversation_expiration_timestamp": "2023-08-03 23:02:00+05:30", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" } \ No newline at end of file diff --git a/tests/Mocks/messageListResponse.json b/tests/Mocks/messageListResponse.json index 219060f7..a79e8e22 100644 --- a/tests/Mocks/messageListResponse.json +++ b/tests/Mocks/messageListResponse.json @@ -29,7 +29,10 @@ "dlt_template_category": "promotional", "conversation_id": "1234", "conversation_origin": "service", - "conversation_expiration_timestamp": "2023-08-03 23:02:00+05:30" + "conversation_expiration_timestamp": "2023-08-03 23:02:00+05:30", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -53,7 +56,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -77,7 +83,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -101,7 +110,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -125,7 +137,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -149,7 +164,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -173,7 +191,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -197,7 +218,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": "000", @@ -221,7 +245,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -245,7 +272,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": "000", @@ -269,7 +299,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -293,7 +326,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": "000", @@ -317,7 +353,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -341,7 +380,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": "000", @@ -365,7 +407,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": null, @@ -389,7 +434,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": "000", @@ -413,7 +461,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": "000", @@ -437,7 +488,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": "000", @@ -461,7 +515,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" }, { "error_code": "000", @@ -485,7 +542,10 @@ "dlt_template_category": "", "conversation_id": "", "conversation_origin": "", - "conversation_expiration_timestamp": "" + "conversation_expiration_timestamp": "", + "destination_network": "Verizon", + "carrier_fees_rate": "0.420", + "carrier_fees": "0.001" } ] } \ No newline at end of file From 751f11163522016a8823850486f4d96fc43ea504 Mon Sep 17 00:00:00 2001 From: renoldthomas-plivo Date: Thu, 24 Aug 2023 21:45:06 +0530 Subject: [PATCH 2/2] updated changelog.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0c13f4f..7775e77c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Change Log -## [4.56.0](https://github.com/plivo/plivo-go/tree/v4.56.0) (2023-08-16) +## [4.56.0](https://github.com/plivo/plivo-php/tree/v4.56.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