Merge pull request #261 from plivo/campaign_creation_addition_param

adding more attributes to campaign creation request
This commit is contained in:
Narayana Shanbhog 2022-09-28 20:11:20 +05:30 committed by GitHub
commit 21f7ac8345
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 3 deletions

View file

@ -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.

View file

@ -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;
@ -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)

View file

@ -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": [

View file

@ -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')
})