From fa2348bc07f86a1de3b6d8bec056fc5457ee5953 Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Tue, 19 Dec 2023 17:24:59 +0530 Subject: [PATCH 1/3] newParamAddedInSpeakApi --- CHANGELOG.md | 4 ++++ README.md | 2 +- pom.properties | 2 +- pom.xml | 2 +- src/main/java/com/plivo/api/models/call/Call.java | 8 ++++---- .../plivo/api/models/call/actions/CallSpeakCreator.java | 4 +++- src/test/java/com/plivo/api/CallTest.java | 4 ++-- 7 files changed, 16 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 765844e7..5bbee7d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [5.38.1](https://github.com/plivo/plivo-java/tree/v5.38.1) (2023-12-19) +**Feature - Added params for Speak API** +- Added params 'type' for Speak APIs + ## [5.38.0](https://github.com/plivo/plivo-java/tree/v5.38.0) (2023-11-30) **Feature - Added params for GET and LIST Campaign API** - Added params 'vertical', 'campaign_alias' for GET and LIST Campaign APIs diff --git a/README.md b/README.md index 07675b5c..9003b71c 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you are using Maven, use the following XML to include the Plivo SDK as a depe com.plivo plivo-java - 5.38.0 + 5.38.1 ``` diff --git a/pom.properties b/pom.properties index ab666f1e..eaa4abb0 100644 --- a/pom.properties +++ b/pom.properties @@ -1,6 +1,6 @@ # Written manually. -version=5.38.0 +version=5.38.1 groupId=com.plivo artifactId=plivo-java diff --git a/pom.xml b/pom.xml index 2c7159de..6e29d472 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.plivo plivo-java - 5.38.0 + 5.38.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/call/Call.java b/src/main/java/com/plivo/api/models/call/Call.java index 98a132d9..ea0cf19f 100644 --- a/src/main/java/com/plivo/api/models/call/Call.java +++ b/src/main/java/com/plivo/api/models/call/Call.java @@ -85,8 +85,8 @@ public static CallPlayDeleter playStopper(String callUuid) { return new CallPlayDeleter(callUuid); } - public static CallSpeakCreator speaker(String callUuid, String text) { - return new CallSpeakCreator(callUuid, text); + public static CallSpeakCreator speaker(String callUuid, String text, String type) { + return new CallSpeakCreator(callUuid, text, type); } public static CallSpeakDeleter speakStopper(String callUuid) { @@ -212,8 +212,8 @@ public CallPlayDeleter playStopper() { return new CallPlayDeleter(callUuid); } - public CallSpeakCreator speaker(String text) { - return new CallSpeakCreator(callUuid, text); + public CallSpeakCreator speaker(String text, String type) { + return new CallSpeakCreator(callUuid, text, type); } public RequestDeleter canceller() { diff --git a/src/main/java/com/plivo/api/models/call/actions/CallSpeakCreator.java b/src/main/java/com/plivo/api/models/call/actions/CallSpeakCreator.java index 587159dc..94d14bbe 100644 --- a/src/main/java/com/plivo/api/models/call/actions/CallSpeakCreator.java +++ b/src/main/java/com/plivo/api/models/call/actions/CallSpeakCreator.java @@ -11,15 +11,17 @@ public class CallSpeakCreator extends VoiceCreator { private final String id; private final String text; + private final String type; private String voice; private String language; private LegSpecifier legs; private Boolean loop; private Boolean mix; - public CallSpeakCreator(String id, String text) { + public CallSpeakCreator(String id, String text, String type) { this.id = id; this.text = text; + this.type = type; } @Override diff --git a/src/test/java/com/plivo/api/CallTest.java b/src/test/java/com/plivo/api/CallTest.java index 175d631c..c3e261ae 100644 --- a/src/test/java/com/plivo/api/CallTest.java +++ b/src/test/java/com/plivo/api/CallTest.java @@ -345,7 +345,7 @@ public void callSpeakCreateShouldWork() throws Exception { expectResponse("liveCallSpeakCreateResponse.json", 202); final String callId = "callId"; - Call.speaker(callId, "test") + Call.speaker(callId, "test", "text") .speak(); assertRequest("POST", "Call/%s/Speak/", callId); @@ -356,7 +356,7 @@ public void callSpeakCreateWithClientShouldWork() throws Exception { expectResponse("liveCallSpeakCreateResponse.json", 202); final String callId = "callId"; - Call.speaker(callId, "test") + Call.speaker(callId, "test", "text") .client(client) .speak(); From 4bd45ffa0dc345e56793b29386f7b283791fc9f9 Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Mon, 8 Jan 2024 11:38:30 +0530 Subject: [PATCH 2/3] speakApiParam --- src/main/java/com/plivo/api/models/call/Call.java | 8 ++++++-- .../plivo/api/models/call/actions/CallSpeakCreator.java | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/plivo/api/models/call/Call.java b/src/main/java/com/plivo/api/models/call/Call.java index ea0cf19f..ef19c05e 100644 --- a/src/main/java/com/plivo/api/models/call/Call.java +++ b/src/main/java/com/plivo/api/models/call/Call.java @@ -85,6 +85,10 @@ public static CallPlayDeleter playStopper(String callUuid) { return new CallPlayDeleter(callUuid); } + public static CallSpeakCreator speaker(String callUuid, String text) { + return new CallSpeakCreator(callUuid, text); + } + public static CallSpeakCreator speaker(String callUuid, String text, String type) { return new CallSpeakCreator(callUuid, text, type); } @@ -212,8 +216,8 @@ public CallPlayDeleter playStopper() { return new CallPlayDeleter(callUuid); } - public CallSpeakCreator speaker(String text, String type) { - return new CallSpeakCreator(callUuid, text, type); + public CallSpeakCreator speaker(String text) { + return new CallSpeakCreator(callUuid, text); } public RequestDeleter canceller() { diff --git a/src/main/java/com/plivo/api/models/call/actions/CallSpeakCreator.java b/src/main/java/com/plivo/api/models/call/actions/CallSpeakCreator.java index 94d14bbe..9315178b 100644 --- a/src/main/java/com/plivo/api/models/call/actions/CallSpeakCreator.java +++ b/src/main/java/com/plivo/api/models/call/actions/CallSpeakCreator.java @@ -18,6 +18,12 @@ public class CallSpeakCreator extends VoiceCreator { private Boolean loop; private Boolean mix; + public CallSpeakCreator(String id, String text) { + this.id = id; + this.text = text; + this.type = "text"; + } + public CallSpeakCreator(String id, String text, String type) { this.id = id; this.text = text; From cc1228911f25b239263728079e0f58cfcdbd8f43 Mon Sep 17 00:00:00 2001 From: ajay-plivo Date: Mon, 8 Jan 2024 15:06:48 +0530 Subject: [PATCH 3/3] versionUodate --- src/main/resources/com/plivo/api/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/com/plivo/api/version.txt b/src/main/resources/com/plivo/api/version.txt index a347392e..bd4c0e53 100644 --- a/src/main/resources/com/plivo/api/version.txt +++ b/src/main/resources/com/plivo/api/version.txt @@ -1 +1 @@ -5.38.0 +5.38.1 \ No newline at end of file