From 9d3ad463a25b2da3a78091ce0c13d87cffce359a Mon Sep 17 00:00:00 2001 From: narayana-plivo Date: Wed, 9 Oct 2024 07:39:40 +0530 Subject: [PATCH] dtmf changes for verify --- CHANGELOG.md | 5 +++++ README.md | 6 +++--- pom.properties | 2 +- pom.xml | 2 +- .../plivo/api/models/verify_session/AttemptDetail.java | 7 ++++++- .../plivo/api/models/verify_session/SessionCreator.java | 8 +++++++- .../plivo/api/models/verify_session/VerifySession.java | 4 ++-- src/main/resources/com/plivo/api/version.txt | 2 +- 8 files changed, 26 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ed44cb9..83efe1ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # Change Log +## [5.45.1](https://github.com/plivo/plivo-java/tree/v5.45.1) (2024-10-10) +**Feature - Dtmf param in Create, Get and List Session** +- Support for the `dtmf` parameter in voice verify session request +- Added support for `dtmf` in GET and LIST verify session +- ## [5.45.0](https://github.com/plivo/plivo-java/tree/v5.45.0) (2024-09-30) **Feature - Adding new param support for Number Masking session with single party ** - Added `create_session_with_single_party`, `virtual_number_cooloff_period` and `force_pin_authentication` attributes in Masking Session diff --git a/README.md b/README.md index ce0a93da..74976adc 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The Plivo Java SDK makes it simpler to integrate communications into your Java a ### To Install Stable release -You can use this SDK by adding it as a dependency in your dependency management tool. Alternatively, you can use the [JAR file](https://search.maven.org/remotecontent?filepath=com/plivo/plivo-java/5.45.0/plivo-java-5.45.0.jar). +You can use this SDK by adding it as a dependency in your dependency management tool. Alternatively, you can use the [JAR file](https://search.maven.org/remotecontent?filepath=com/plivo/plivo-java/5.45.1/plivo-java-5.45.1.jar). If you are using Maven, use the following XML to include the Plivo SDK as a dependency. @@ -19,13 +19,13 @@ If you are using Maven, use the following XML to include the Plivo SDK as a depe com.plivo plivo-java - 5.45.0 + 5.45.1 ``` If you are using Gradle, use the following line in your dependencies. ``` -compile 'com.plivo:plivo-java:5.45.0' +compile 'com.plivo:plivo-java:5.45.1' ``` ### To Install Beta release diff --git a/pom.properties b/pom.properties index b67e3858..2795cc05 100644 --- a/pom.properties +++ b/pom.properties @@ -1,6 +1,6 @@ # Written manually. -version=5.45.0 +version=5.45.1 groupId=com.plivo artifactId=plivo-java diff --git a/pom.xml b/pom.xml index 4f7bc323..deb56acc 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.plivo plivo-java - 5.45.0 + 5.45.1 plivo-java A Java SDK to make voice calls & send SMS using Plivo and to generate Plivo XML diff --git a/src/main/java/com/plivo/api/models/verify_session/AttemptDetail.java b/src/main/java/com/plivo/api/models/verify_session/AttemptDetail.java index 4bd73812..456ee6dc 100644 --- a/src/main/java/com/plivo/api/models/verify_session/AttemptDetail.java +++ b/src/main/java/com/plivo/api/models/verify_session/AttemptDetail.java @@ -8,8 +8,9 @@ public class AttemptDetail { private String brandName; private String appHash; private Integer codeLength; + private Integer dtmf; - public AttemptDetail(String channel, String attemptUuid, String status, String time, String brandName, String appHash, Integer codeLength) { + public AttemptDetail(String channel, String attemptUuid, String status, String time, String brandName, String appHash, Integer codeLength, Integer dtmf) { this.channel = channel; this.attemptUuid = attemptUuid; this.status = status; @@ -17,6 +18,7 @@ public AttemptDetail(String channel, String attemptUuid, String status, String t this.brandName = brandName; this.appHash = appHash; this.codeLength = codeLength; + this.dtmf = dtmf; } public AttemptDetail(){} @@ -42,4 +44,7 @@ public String getAppHash() { public Integer getCodeLength(){ return codeLength; } + public Integer getDtmf(){ + return dtmf; + } } diff --git a/src/main/java/com/plivo/api/models/verify_session/SessionCreator.java b/src/main/java/com/plivo/api/models/verify_session/SessionCreator.java index 472834cc..a992a457 100644 --- a/src/main/java/com/plivo/api/models/verify_session/SessionCreator.java +++ b/src/main/java/com/plivo/api/models/verify_session/SessionCreator.java @@ -25,8 +25,10 @@ public class SessionCreator extends Creator < SessionCreateResponse > { @JsonProperty("url") private String url; private String method = "POST"; + @JsonProperty("dtmf") + private Integer dtmf; - SessionCreator(String appUUID,String recipient, String channel, String url, String method, String locale, String brand_name, String app_hash, Integer code_length) { + SessionCreator(String appUUID,String recipient, String channel, String url, String method, String locale, String brand_name, String app_hash, Integer code_length, Integer dtmf) { if (!Utils.allNotNull(recipient)) { throw new IllegalArgumentException("recipient should not be null"); } @@ -39,6 +41,7 @@ public class SessionCreator extends Creator < SessionCreateResponse > { this.brand_name = brand_name; this.app_hash = app_hash; this.code_length = code_length; + this.dtmf = dtmf; } public String appUUID() { @@ -68,6 +71,9 @@ public String app_hash() { public Integer code_length(){ return this.code_length; } + public Integer dtmf(){ + return this.dtmf; + } @Override protected Call obtainCall() { diff --git a/src/main/java/com/plivo/api/models/verify_session/VerifySession.java b/src/main/java/com/plivo/api/models/verify_session/VerifySession.java index d3db2c0c..149cd875 100644 --- a/src/main/java/com/plivo/api/models/verify_session/VerifySession.java +++ b/src/main/java/com/plivo/api/models/verify_session/VerifySession.java @@ -26,8 +26,8 @@ public class VerifySession extends BaseResource { private Charges charges; private String createdAt; private String updatedAt; - public static SessionCreator creator(String appUUID, String recipient, String channel, String url, String method, String locale, String brand_name, String app_hash, Integer code_length) { - return new SessionCreator(appUUID, recipient, channel, url, method, locale, brand_name, app_hash, code_length); + public static SessionCreator creator(String appUUID, String recipient, String channel, String url, String method, String locale, String brand_name, String app_hash, Integer code_length, Integer dtmf) { + return new SessionCreator(appUUID, recipient, channel, url, method, locale, brand_name, app_hash, code_length, dtmf); } public static ValidateSession validation(String sessionUUID, String otp) { return new ValidateSession(sessionUUID, otp); diff --git a/src/main/resources/com/plivo/api/version.txt b/src/main/resources/com/plivo/api/version.txt index 5a053acd..8f04f20f 100644 --- a/src/main/resources/com/plivo/api/version.txt +++ b/src/main/resources/com/plivo/api/version.txt @@ -1 +1 @@ -5.45.0 +5.45.1