diff --git a/lib/resources/powerpacks.js b/lib/resources/powerpacks.js index a09f022..ff69586 100644 --- a/lib/resources/powerpacks.js +++ b/lib/resources/powerpacks.js @@ -40,22 +40,6 @@ export class CreatePowerpackResponse { } } -export class RetrievePowerpack { - constructor(params) { - params = params || {}; - this.apiId = params.apiId; - this.applicationId = params.applicationId; - this.applicationType = params.applicationType; - this.createdOn = params.createdOn; - this.localConnect = params.localConnect; - this.name = params.name; - this.numberPool = params.numberPool; - this.numberPriority = params.numberPriority; - this.stickySender = params.stickySender; - this.uuid = params.uuid; - } -} - export class UpdatePowerpackResponse { constructor(params) { params = params || {}; @@ -711,32 +695,9 @@ export class PowerpackInterface extends PlivoResourceInterface { * @promise {object} return {@link Powerpack} object * @fail {Error} return Error */ - get(uuid) { - let errors = validate([{ - field: 'uuid', - value: uuid, - validators: ['isRequired'] - }]); - - if (errors) { - return errors; - } - - let client = this[clientKey]; - return new Promise((resolve, reject) => { - if (action !== '' && !uuid) { - reject(new Error(this[idKey] + ' must be set')); - } - client('GET', action + (uuid ? uuid + '/' : '')) - .then(response => { - resolve(new PlivoGenericResponse(response.body, client)); - }) - .catch(error => { - reject(error); - }); - }); + get(uuid) { + return super.get(uuid); } - /** * create Powerpack * @method