Skip to content

Commit

Permalink
SMS-6997: add brand_name and app_hash in create and list api (#282)
Browse files Browse the repository at this point in the history
* SMS-6997: add brand_name and app_hash in create and list api

* adding code length param

* version update

* fix

---------

Co-authored-by: narayana-plivo <narayana@plivo.com>
  • Loading branch information
ashutoshkumar-plivo and narayana-plivo authored Sep 6, 2024
1 parent 7184bb6 commit 827fecd
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Change Log
## [5.44.2](https://github.com/plivo/plivo-java/tree/v5.44.2) (2024-09-06)
**Feature - Adding support for brand_name and app_hash in Create,Get and List Session**
- Added new request param `brand_name`, `code_length` and `app_hash` in create Session API
- Added support for `brand_name`, `code_length` and `app_hash` param in get and list Session response

## [5.44.1](https://github.com/plivo/plivo-java/tree/v5.44.1) (2024-09-03)
**Feature - Adding new element for Audio Stream XML**
- Added `keepCallAlive` element in Audio Stream XML


## [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
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,22 @@ 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.44.1/plivo-java-5.44.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.44.2/plivo-java-5.44.2.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.44.1</version>
<version>5.44.2</version>
</dependency>
```

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

### 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.44.1
version=5.44.2
groupId=com.plivo
artifactId=plivo-java

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.plivo</groupId>
<artifactId>plivo-java</artifactId>
<version>5.44.1</version>
<version>5.44.2</version>
<name>plivo-java</name>
<description>A Java SDK to make voice calls &amp; send SMS using Plivo and to generate Plivo XML</description>
<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ public class AttemptDetail {
private String attemptUuid;
private String status;
private String time;
private String brandName;
private String appHash;
private Integer codeLength;

public AttemptDetail(String channel, String attemptUuid, String status, String time) {
public AttemptDetail(String channel, String attemptUuid, String status, String time, String brandName, String appHash, Integer codeLength) {
this.channel = channel;
this.attemptUuid = attemptUuid;
this.status = status;
this.time = time;
this.brandName = brandName;
this.appHash = appHash;
this.codeLength = codeLength;
}

public AttemptDetail(){}
Expand All @@ -27,4 +33,13 @@ public String getStatus(){
public String getTime(){
return time;
}
public String getBrandName() {
return brandName;
}
public String getAppHash() {
return appHash;
}
public Integer getCodeLength(){
return codeLength;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ public class SessionCreator extends Creator < SessionCreateResponse > {
private String channel;
@JsonProperty("locale")
private String locale;
@JsonProperty("brand_name")
private String brand_name;
@JsonProperty("app_hash")
private String app_hash;
@JsonProperty("code_length")
private Integer code_length;
@JsonProperty("url")
private String url;
private String method = "POST";

SessionCreator(String appUUID,String recipient, String channel, String url, String method, String locale) {
SessionCreator(String appUUID,String recipient, String channel, String url, String method, String locale, String brand_name, String app_hash, Integer code_length) {
if (!Utils.allNotNull(recipient)) {
throw new IllegalArgumentException("recipient should not be null");
}
Expand All @@ -30,6 +36,9 @@ public class SessionCreator extends Creator < SessionCreateResponse > {
this.locale = locale;
this.url = url;
this.method = method;
this.brand_name = brand_name;
this.app_hash = app_hash;
this.code_length = code_length;
}

public String appUUID() {
Expand All @@ -50,6 +59,15 @@ public String url() {
public String method() {
return this.method;
}
public String brand_name() {
return this.brand_name;
}
public String app_hash() {
return this.app_hash;
}
public Integer code_length(){
return this.code_length;
}

@Override
protected Call<SessionCreateResponse> obtainCall() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
return new SessionCreator(appUUID, recipient, channel, url, method, locale);
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 ValidateSession validation(String sessionUUID, String otp) {
return new ValidateSession(sessionUUID, otp);
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.44.1
5.44.2

0 comments on commit 827fecd

Please sign in to comment.