Skip to content

Commit

Permalink
Merge pull request #249 from plivo/tendlc-callback
Browse files Browse the repository at this point in the history
callback support for brand, campaign and link number api
  • Loading branch information
huzaif-plivo authored Apr 27, 2022
2 parents b4b1761 + 6d37677 commit 09f2cf7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 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.31.0](https://github.com/plivo/plivo-node/tree/v4.30.1) (2022-04-27)
**Feature - 10DLC API callback**
- Added callback support for campaign, brand, link number request.

## [v4.30.0](https://github.com/plivo/plivo-node/tree/v4.30.0) (2022-04-14)
**Features - Profile Api**
- Profile api added for 10dlc support
Expand Down
3 changes: 1 addition & 2 deletions lib/resources/brand.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ export class BrandCreationResponse {
* @promise {object} return {@link PlivoGenericResponse} object
* @fail {Error} return Error
*/
create(brand_alias,profile_uuid,brand_type,secondary_vetting) {
let params = {};
create(brand_alias,profile_uuid,brand_type,secondary_vetting, params = {}) {
params.brand_alias=brand_alias;
params.profile_uuid=profile_uuid;
params.brand_type=brand_type;
Expand Down
9 changes: 3 additions & 6 deletions lib/resources/campaign.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ export class LinkUnlinkNumberResponse {
* @promise {object} return {@link PlivoGenericResponse} object
* @fail {Error} return Error
*/
create(brand_id,campaign_alias,vertical,usecase,sub_usecases,description,embedded_link,embedded_phone,age_gated,direct_lending,subscriber_optin,subscriber_optout,subscriber_help,sample1,sample2) {
let params = {}
create(brand_id,campaign_alias,vertical,usecase,sub_usecases,description,embedded_link,embedded_phone,age_gated,direct_lending,subscriber_optin,subscriber_optout,subscriber_help,sample1,sample2, params = {}) {
params.brand_id=brand_id;
params.campaign_alias=campaign_alias;
params.vertical=vertical;
Expand Down Expand Up @@ -182,8 +181,7 @@ export class LinkUnlinkNumberResponse {
* @promise {object} return {@link Campaign} object
* @fail {Error} return Error
*/
linkNumber(campaignID, numbers) {
let params = {}
linkNumber(campaignID, numbers, params = {}) {
params.numbers=numbers;
let client = this[clientKey];
return new Promise((resolve, reject) => {
Expand All @@ -205,8 +203,7 @@ export class LinkUnlinkNumberResponse {
* @promise {object} return {@link Campaign} object
* @fail {Error} return Error
*/
unlinkNumber(campaignID, number) {
let params = {}
unlinkNumber(campaignID, number, params = {}) {
let client = this[clientKey];
return new Promise((resolve, reject) => {
client('DELETE', action+campaignID+'/Number/'+number+'/', 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.30.0",
"version": "4.31.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

0 comments on commit 09f2cf7

Please sign in to comment.