Skip to content

Commit

Permalink
Merge pull request #313 from plivo/ns-add-new-param-mdr
Browse files Browse the repository at this point in the history
SMS-6066: adding new param on mdr object
  • Loading branch information
renoldthomas-plivo authored Aug 25, 2023
2 parents 826785e + 49f4428 commit f453d1a
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [v4.56.0](https://github.com/plivo/plivo-node/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

## [v4.55.0](https://github.com/plivo/plivo-node/tree/v4.55.0) (2023-08-10)
**Verify Service API's**
- Create Session API - To initiate a session
Expand Down
7 changes: 6 additions & 1 deletion lib/resources/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ export class MessageGetResponse {
this.dltEntityID = params.dltEntityId;
this.dltTemplateID = params.dltTemplateId;
this.dltTemplateCategory = params.dltTemplateCategory;

this.destinationNetwork = params.destinationNetwork;
this.carrierFees = params.carrierFees;
this.carrierFeesRate = params.carrierFeesRate;
}
}

Expand Down Expand Up @@ -91,6 +93,9 @@ export class MessageListResponse {
this.dltEntityID = params.dltEntityId;
this.dltTemplateID = params.dltTemplateId;
this.dltTemplateCategory = params.dltTemplateCategory;
this.destinationNetwork = params.destinationNetwork;
this.carrierFees = params.carrierFees;
this.carrierFeesRate = params.carrierFeesRate;
}
}

Expand Down
15 changes: 12 additions & 3 deletions lib/rest/request-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2170,7 +2170,10 @@ export function Request(config) {
dlt_template_category: "transactional",
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"
}
});
}
Expand Down Expand Up @@ -2206,7 +2209,10 @@ export function Request(config) {
dlt_template_category: "service_implicit",
conversation_id: "9876",
conversation_origin: "marketing",
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"

},
{
Expand All @@ -2229,7 +2235,10 @@ export function Request(config) {
dlt_template_category: null,
conversation_id: null,
conversation_origin: null,
conversation_expiration_timestamp: null
conversation_expiration_timestamp: null,
destination_network: "Verizon",
carrier_fees_rate: "0.420",
carrier_fees: "0.001"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plivo",
"version": "4.55.0",
"version": "4.56.0",
"description": "A Node.js SDK to make voice calls and send SMS using Plivo and to generate Plivo XML",
"homepage": "https://github.com/plivo/plivo-node",
"files": [
Expand Down
6 changes: 6 additions & 0 deletions test/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ describe('message', function () {
assert.equal(message.conversationExpirationTimestamp, "2023-08-03 23:02:00+05:30");
})
});
it('should have destination network parameter in get message', function () {
return client.messages.get(1)
.then(function (message) {
assert.equal(message.destinationNetwork, "Verizon");
})
});
it('list messages', function () {
return client.messages.list()
.then(function (messages) {
Expand Down

0 comments on commit f453d1a

Please sign in to comment.