Skip to content

Commit

Permalink
Merge pull request #336 from plivo/SMS-6930
Browse files Browse the repository at this point in the history
Add locale param for create session
  • Loading branch information
rachana-plivo authored Jul 11, 2024
2 parents 03c3cdc + 72fbe6f commit ca5817b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## [v4.68.0](https://github.com/plivo/plivo-node/tree/v4.68.0) (2024-07-11)
**Feature - Locale param supported for Create, Get and List Verify Session API's**
- Added new request param `locale` in create Session API
- Added support for `locale` param in get and list Session response

## [v4.67.0](https://github.com/plivo/plivo-node/tree/v4.67.0) (2024-05-22)
**Feature - Adding support for participant level recording**
- Added new param `recordParticipantTrack` to [add participant API](https://www.plivo.com/docs/voice/api/multiparty-call/participants#add-a-participant) to support `participant` level recording
Expand Down
8 changes: 7 additions & 1 deletion lib/resources/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export class SessionGetResponse {
this.alias = params.alias;
this.recipient = params.recipient;
this.channel = params.channel;
this.locale = params.locale;
this.status = params.status;
this.count = params.count;
this.requestor_ip = params.requestorIp;
Expand All @@ -74,6 +75,7 @@ export class SessionListResponse {
this.recipient = params.recipient;
this.alias = params.alias;
this.channel = params.channel;
this.locale = params.locale;
this.status = params.status;
this.count = params.count;
this.requestor_ip = params.requestorIp;
Expand Down Expand Up @@ -138,14 +140,15 @@ export class SessionInterface extends PlivoResourceInterface {
create(sessionReq){

var isObject = arguments.length;
var app_uuid, recipient, url, method, channel
var app_uuid, recipient, url, method, channel, locale

if (isObject === 1) {
app_uuid = sessionReq.app_uuid
recipient = sessionReq.recipient
url = sessionReq.url
method = sessionReq.method
channel = sessionReq.channel
locale = sessionReq.locale
}

let errors = validate([{
Expand All @@ -170,6 +173,9 @@ export class SessionInterface extends PlivoResourceInterface {
if(channel) {
params.channel = channel
}
if(locale) {
params.locale = locale
}
if(url) {
params.url = url
}
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.67.0",
"version": "4.68.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 ca5817b

Please sign in to comment.