diff --git a/CHANGELOG.md b/CHANGELOG.md index 53007640..b96e3a2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log + +## [v4.57.0](https://github.com/plivo/plivo-node/tree/v4.57.0) (2023-09-21) +**Support starter brand** +- OTP validation +- starter brand creation + ## [v4.56.2](https://github.com/plivo/plivo-node/tree/v4.56.2) (2023-09-01) **Bug fix - Unable to build TypeScript on Version 4.56.0** - Fix TypeScript build error @@ -12,6 +18,7 @@ **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 + ## [v4.55.0](https://github.com/plivo/plivo-node/tree/v4.55.0) (2023-08-10) **Verify Service API's** - Create Session API - To initiate a session diff --git a/lib/resources/brand.js b/lib/resources/brand.js index f814af2a..698042a1 100644 --- a/lib/resources/brand.js +++ b/lib/resources/brand.js @@ -105,6 +105,18 @@ export class BrandCreationResponse { } + /** + * Trigger OTP for Starter brand + * @method + * @param {object} brandID + * @promise {object} return {@link PlivoGenericResponse} object + * @fail {Error} return Error + */ + trigger_otp(brandId) { + let params = {} + return super.customexecuteAction(action+brandId+'/OTP/', 'POST', params); + } + /** * get BrandUsecases by given id * @method diff --git a/lib/rest/request-test.js b/lib/rest/request-test.js index c23cad18..e9b26bcd 100644 --- a/lib/rest/request-test.js +++ b/lib/rest/request-test.js @@ -1563,6 +1563,16 @@ export function Request(config) { } }); } + else if (action == '10dlc/Brand/BRPXS6E/OTP/' && method == 'POST'){ + resolve({ + response: {}, + body: { + "api_id": "dbc70630-3296-11ed-9b52-0242ac110004", + "brand_id": "BRPXS6E", + "message": "Message sent to XXXXXXXX1234, reply YES to confirm registration." + } + }); + } else if(action == 'Profile/' && method == 'GET'){ resolve({ response: {}, diff --git a/package.json b/package.json index f79c43f5..b8429138 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plivo", - "version": "4.56.2", + "version": "4.57.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": [ diff --git a/test/brand.js b/test/brand.js index 7664bf6a..b7802588 100644 --- a/test/brand.js +++ b/test/brand.js @@ -45,5 +45,12 @@ import { }) }); + it('trigger brand otp', function() { + return client.brand.trigger_otp('BRPXS6E') + .then(function(brand) { + assert.equal(brand.message, 'Message sent to XXXXXXXX1234, reply YES to confirm registration.') + }) + }); + });