Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMS- 6066: adding new param into mdr object #328

Merged
merged 2 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Change Log
## [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

## [4.55.0](https://github.com/plivo/plivo-php/tree/v4.55.0) (2023-08-10)
**Feature - Verify**
- Added Create Session API
Expand Down
11 changes: 11 additions & 0 deletions src/Plivo/Resources/Message/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion src/Plivo/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion tests/Mocks/messageGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
100 changes: 80 additions & 20 deletions tests/Mocks/messageListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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",
Expand All @@ -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,
Expand All @@ -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",
Expand All @@ -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,
Expand All @@ -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",
Expand All @@ -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,
Expand All @@ -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",
Expand All @@ -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,
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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"
}
]
}
Loading