Skip to content

Commit

Permalink
Merge pull request #317 from plivo/fix-unrent-ppk
Browse files Browse the repository at this point in the history
MPT-3652 - unrent fix
  • Loading branch information
renoldthomas-plivo authored Sep 1, 2023
2 parents f453d1a + 1164049 commit c65472d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## [v4.56.1](https://github.com/plivo/plivo-node/tree/v4.56.1) (2023-09-01)
**Bug Fix - unrent powerpack number**
- Fix for Error: invalid powerpack number delete request (400) - Unrent Powerpack Number


## [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
Expand Down
8 changes: 3 additions & 5 deletions lib/resources/powerpacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export class Powerpack extends PlivoResource {

remove_number(number, unrent = false) {
var params = {};
params['unrent'] = unrent.toString();
params['unrent'] = unrent;
let path = 'NumberPool/' + this.number_pool_id + '/Number/' + number + '/';
let client = this[clientKey];
return new Promise((resolve, reject) => {
Expand All @@ -328,7 +328,7 @@ export class Powerpack extends PlivoResource {
}
remove_tollfree(tollfree, unrent = false) {
var params = {};
params['unrent'] = unrent.toString();
params['unrent'] = unrent;
let path = 'NumberPool/' + this.number_pool_id + '/Tollfree/' + tollfree + '/';
let client = this[clientKey];
return new Promise((resolve, reject) => {
Expand Down Expand Up @@ -483,9 +483,7 @@ export class Powerpack extends PlivoResource {
*/
delete(unrent_numbers = false) {
let params = {};
if (typeof unrent_numbers === 'boolean') {
params.unrent_numbers = unrent_numbers.toString();
}
params.unrent_numbers = unrent_numbers;
let path = 'Powerpack/' + this.uuid + '/';
return super.customexecuteAction(path.toString().trim(), 'DELETE', params);
}
Expand Down
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.56.0",
"version": "4.56.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": [
Expand Down

0 comments on commit c65472d

Please sign in to comment.