diff --git a/CHANGELOG.md b/CHANGELOG.md index 46be12fa..cad0dc0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Change Log +## [4.17.1](https://github.com/plivo/plivo-node/releases/tag/v4.17.1)(2021-05-06) +- Added Fix for Adaptive Powerpack Create & Update functions + ## [4.17.0](https://github.com/plivo/plivo-node/releases/tag/v4.17.0)(2021-05-04) +- Update library: Axios - Add Exception Support - Updated README diff --git a/lib/resources/powerpacks.js b/lib/resources/powerpacks.js index c6352ac9..9e96fed4 100644 --- a/lib/resources/powerpacks.js +++ b/lib/resources/powerpacks.js @@ -51,6 +51,7 @@ export class UpdatePowerpackResponse { this.name = params.name; this.numberPool = params.numberPool; this.stickySender = params.stickySender; + this.numberPriority = params.numberPriority; this.uuid = params.uuid; } } @@ -455,7 +456,7 @@ export class Powerpack extends PlivoResource { * @param {string} [params.application_id] * @param {string} [params.sticky_sender] * @param {string} [params.local_connect] - * @param {list} [params.number_priority] + * @param {object} [params.number_priority] * @promise {object} return {@link Powerpack} object * @fail {Error} return Error @@ -465,7 +466,7 @@ export class Powerpack extends PlivoResource { //return super.customexecuteAction(path.toString().trim(), 'POST', params); let client = this[clientKey]; return new Promise((resolve, reject) => { - client('GET', path.toString().trim(), params) + client('POST', path.toString().trim(), params) .then(response => { resolve(new UpdatePowerpackResponse(response.body, idField)); }) @@ -707,6 +708,7 @@ export class PowerpackInterface extends PlivoResourceInterface { * @param {string} [params.local_connect] * @param {string} [params.application_type] * @param {string} [params.application_id] + * @param {object} [params.number_priority] * @promise {object} return {@link PlivoGenericResponse} object * @fail {Error} return Error */ @@ -746,6 +748,7 @@ export class PowerpackInterface extends PlivoResourceInterface { * @param {string} [params.local_connect] * @param {string} [params.application_type] * @param {string} [params.application_id] + * @param {object} [params.number_priority] * @promise {object} return {@link Powerpack} object * @fail {Error} return Error */ diff --git a/lib/rest/utils.js b/lib/rest/utils.js index 300fe5bf..9facdc54 100644 --- a/lib/rest/utils.js +++ b/lib/rest/utils.js @@ -50,6 +50,9 @@ export function camelCaseRequestWrapper(requestFunc) { .replace('_less_or_equal', '__lte') .replace('_equal', '') .replace('_equals', '') + .replace('priority_1', 'priority1') + .replace('priority_2', 'priority2') + .replace('priority_3', 'priority3') .replace('country_iso_2', 'country_iso2'); }); diff --git a/package.json b/package.json index 683199fc..88272d26 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plivo", - "version": "4.17.0", + "version": "4.17.1", "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": [