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

Locale param added for Java SDK #279

Merged
merged 6 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

## [5.44.0](https://github.com/plivo/plivo-java/tree/v5.44.0) (2024-07-11)
**Feature - Adding locale support for Create, Get and List Session API**
- Added new request param `locale` in create Session API
- Added support for `locale` param in get and list Session response

## [5.43.1](https://github.com/plivo/plivo-java/tree/v5.42.1) (2024-05-31)
**Feature - Adding filtering support for List Application API**
- Added new filter param `appName` for list application api
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ 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.43.0/plivo-java-5.43.1.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.43.0/plivo-java-5.44.0.jar).

If you are using Maven, use the following XML to include the Plivo SDK as a dependency.

```xml
<dependency>
<groupId>com.plivo</groupId>
<artifactId>plivo-java</artifactId>
<version>5.43.1</version>
<version>5.44.0</version>
</dependency>
```

If you are using Gradle, use the following line in your dependencies.
```
compile 'com.plivo:plivo-java:5.43.1'
compile 'com.plivo:plivo-java:5.44.0'
```

### To Install Beta release
Expand Down
2 changes: 1 addition & 1 deletion pom.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Written manually.

version=5.43.1
version=5.44.0
groupId=com.plivo
artifactId=plivo-java

Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@ public class SessionCreator extends Creator < SessionCreateResponse > {
private String recipient;
@JsonProperty("channel")
private String channel;
@JsonProperty("locale")
private String locale;
@JsonProperty("url")
private String url;
private String method = "POST";

SessionCreator(String appUUID,String recipient, String channel, String url, String method) {
SessionCreator(String appUUID,String recipient, String channel, String url, String method, String locale) {
if (!Utils.allNotNull(recipient)) {
throw new IllegalArgumentException("recipient should not be null");
}
this.appUUID = appUUID;
this.recipient = recipient;
this.channel = channel;
this.locale = locale;
this.url = url;
this.method = method;
}
Expand All @@ -38,6 +41,9 @@ public String recipient() {
public String channel() {
return this.channel;
}
public String locale() {
return this.locale;
}
public String url() {
return this.url;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class VerifySession extends BaseResource {
private String alias;
private String recipient;
private String channel;
private String locale;
private String status;
private String count;
private String requestorIP;
Expand All @@ -25,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) {
return new SessionCreator(appUUID, recipient, channel, url, method);
public static SessionCreator creator(String appUUID, String recipient, String channel, String url, String method, String locale) {
return new SessionCreator(appUUID, recipient, channel, url, method, locale);
}
public static ValidateSession validation(String sessionUUID, String otp) {
return new ValidateSession(sessionUUID, otp);
Expand All @@ -51,6 +52,9 @@ public String getRecipient() {
public String getChannel() {
return channel;
}
public String getLocale() {
return locale;
}
public String getStatus() {
return status;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/com/plivo/api/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.43.1
5.44.0
4 changes: 2 additions & 2 deletions src/test/java/com/plivo/api/VerifySessionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ public void setUp() throws Exception {
public void invalidSessionCreated() throws Exception {
expectResponse("createSession.json", 202);

VerifySession.creator(null,null, null, null, null)
VerifySession.creator(null,null, null, null, null,null)
.create();
}

@Test
public void sessionCreated() throws Exception {
expectResponse("createSession.json", 202);

VerifySession.creator(null,"+1234567890", null, null, null)
VerifySession.creator(null,"+1234567890", null, null, null, null)
.create();
}

Expand Down
Loading