Skip to content

Commit

Permalink
Merge pull request #261 from plivo/campaign_creation_addition_param
Browse files Browse the repository at this point in the history
adding more attributes to campaign creation request
  • Loading branch information
narayana-plivo authored Sep 28, 2022
2 parents 6f0ac1c + 50185d6 commit 21f7ac8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 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.34.1](https://github.com/plivo/plivo-go/tree/v4.34.1) (2022-09-28)
**10DLC campaign creation**
- Adding more attributes to campaign creation request.

## [v4.34.0](https://github.com/plivo/plivo-go/tree/v4.34.0) (2022-08-07)
**Feature - Token Creation**
- `JWT Token Creation API` added API to create a new JWT token.
Expand Down
8 changes: 7 additions & 1 deletion lib/resources/campaign.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,13 @@ export class LinkUnlinkNumberResponse {
* @param {boolean} affiliate_marketing
* @param {string} sample1
* @param {string} sample2
* @param {message_flow} message_flow
* @param {help_message} help_message
* @param {optout_message} optout_message
* @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,affiliate_marketing,sample1,sample2, 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,affiliate_marketing,sample1,sample2, message_flow,help_message,optout_message,params = {}) {
params.brand_id=brand_id;
params.campaign_alias=campaign_alias;
params.vertical=vertical;
Expand All @@ -138,6 +141,9 @@ export class LinkUnlinkNumberResponse {
params.affiliate_marketing=affiliate_marketing;
params.sample1=sample1;
params.sample2=sample2;
params.message_flow=message_flow;
params.help_message=help_message;
params.optout_message=optout_message;
let client = this[clientKey];
return new Promise((resolve, reject) => {
client('POST', action, 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.34.0",
"version": "4.34.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
2 changes: 1 addition & 1 deletion test/campaign.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
return client.campaign.create("B8OD95Z","campaign name sssample","INSURANCE","MIXED",[
"CUSTOMER_CARE",
"2FA"
],"sample description text",false,false,false,false,true,true,true,"sample1","sample2")
],"sample description text should 40 character",false,false,false,false,true,true,true,"sample1 should be 20 minimum character","sample2 should be 20 minimum character", "message_flow should be 40 minimum character", "help_message should be 20 minimum character", "optout_message should be 20 minimum character")
.then(function (campaign) {
assert.equal(campaign.campaignId, 'CFSOBZQ')
})
Expand Down

0 comments on commit 21f7ac8

Please sign in to comment.