From 289c1af8e6955e2ac60c1b3016ba18009c256ede Mon Sep 17 00:00:00 2001 From: narayana Date: Mon, 5 Dec 2022 15:58:11 +0530 Subject: [PATCH 1/4] message expiry --- lib/resources/messages.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/resources/messages.js b/lib/resources/messages.js index 4e353bff..b36ab8e9 100644 --- a/lib/resources/messages.js +++ b/lib/resources/messages.js @@ -44,7 +44,8 @@ export class MessageGetResponse { this.totalAmount = params.totalAmount; this.totalRate = params.totalRate; this.units = params.units; - this.powerpackID = params.powerpackId + this.powerpackID = params.powerpackId; + this.messageExpiry = params.messageExpiry; } } @@ -64,6 +65,7 @@ export class MessageListResponse { this.totalRate = params.totalRate; this.units = params.units; this.powerpackID = params.powerpackId; + this.messageExpiry = params.messageExpiry; } } @@ -155,6 +157,7 @@ export class MessageInterface extends PlivoResourceInterface { * @param {string} [optionalParams.url] The URL to which with the status of the message is sent. * @param {string} [optionalParams.method] The method used to call the url. Defaults to POST. * @param {list} [optionalParams.media_urls] For sending mms, specify the media urls in list of string + * @param {int} [optionalParams.message_expiry] The method used to expiry the message specified time. * @param {boolean} [optionalParams.log] If set to false, the content of this message will not be logged on the Plivo infrastructure and the dst value will be masked (e.g., 141XXXXX528). Default is set to true. * @promise {object} return {@link PlivoGenericMessage} object if success * @fail {Error} return Error @@ -193,6 +196,7 @@ export class MessageInterface extends PlivoResourceInterface { var log = src.log; var trackable = src.trackable; var src = src.src; + var messageExpiry = src.messageExpiry } let errors = validate([{ @@ -249,6 +253,9 @@ export class MessageInterface extends PlivoResourceInterface { if (trackable) { params.trackable = trackable; } + if (messageExpiry){ + params.message_expiry = messageExpiry; + } } if (src) { From bda09d4c84c5925f5503e6766fcdbeefc883ef2a Mon Sep 17 00:00:00 2001 From: narayana Date: Fri, 13 Jan 2023 14:35:49 +0530 Subject: [PATCH 2/4] removed expiry on get and list --- lib/resources/messages.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/resources/messages.js b/lib/resources/messages.js index b36ab8e9..a6f2c0d1 100644 --- a/lib/resources/messages.js +++ b/lib/resources/messages.js @@ -45,7 +45,6 @@ export class MessageGetResponse { this.totalRate = params.totalRate; this.units = params.units; this.powerpackID = params.powerpackId; - this.messageExpiry = params.messageExpiry; } } @@ -65,7 +64,6 @@ export class MessageListResponse { this.totalRate = params.totalRate; this.units = params.units; this.powerpackID = params.powerpackId; - this.messageExpiry = params.messageExpiry; } } From 69953fac2b38c653ff8f25b033ddbcb5e0adbea7 Mon Sep 17 00:00:00 2001 From: kanishka2104 <88705700+kanishka2104@users.noreply.github.com> Date: Wed, 18 Jan 2023 13:27:53 +0530 Subject: [PATCH 3/4] version change --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d57e926..3e9f0605 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,15 @@ # Change Log +## [v4.38.0](https://github.com/plivo/plivo-node/tree/v4.38.0) (2023-01-18) +**Feature - Added New Param(Message Expiry) in Send Message API** +- Added new param(Message Expiry) in Send Message API + +## [v4.37.0](https://github.com/plivo/plivo-node/tree/v4.37.0) (2022-12-16) +**Update Campaign Request** +- Update Campaign Request endpoint added + +## [v4.36.0](https://github.com/plivo/plivo-node/tree/v4.36.0) (2022-12-06) +**Delete Brand and Campaign Request** +- Delete Brand and Campaign Request endpoint added ## [v4.35.0](https://github.com/plivo/plivo-node/tree/v4.35.0) (2022-11-04) **Brand Usecase Request** From d9f6819edd3b2bf0380ce91fe5ff494ecd9be0db Mon Sep 17 00:00:00 2001 From: kanishka2104 <88705700+kanishka2104@users.noreply.github.com> Date: Wed, 18 Jan 2023 13:28:20 +0530 Subject: [PATCH 4/4] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 620a55c5..fefebc85 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plivo", - "version": "4.35.0", + "version": "4.38.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": [