Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add locale param for create session #336

Merged
merged 4 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading