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

SMS-6627 adding decline_reasons field in get and list brand APIs #272

Merged
merged 5 commits into from
Apr 18, 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
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Change Log


## [5.39.1](https://github.com/plivo/plivo-java/tree/v5.39.1) (2024-04-04)
**Feature - add new response fields for LIST and GET brand**
- Added new response params `declined_reasons` for LIST / GET Brand APIs

## [5.39.0](https://github.com/plivo/plivo-java/tree/v5.39.0) (2024-03-13)
**Feature - Import Campaign API**
- Import Campaign API


## [5.38.3](https://github.com/plivo/plivo-java/tree/v5.38.3) (2024-02-28)
**Feature - Log Redaction Enhancement**
- Added log attribute in GET and List MDR response
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ 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.39.0/plivo-java-5.39.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.39.1/plivo-java-5.39.1.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.39.0</version>
<version>5.39.1</version>
</dependency>
```

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.39.0
version=5.39.1
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.39.0</version>
<version>5.39.1</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
8 changes: 8 additions & 0 deletions src/main/java/com/plivo/api/models/brand/Brand.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class Brand extends BaseResource {
private AuthorizedContact authorizedContact;
private BrandResponse brand;
private String createdAt;
private List<TCRErrorDetail> declinedReasons;

public static BrandCreator creator(String brandAlias,String profileUUID,String brandType,Boolean secondaryVetting,String url,String method) {
return new BrandCreator(brandAlias,profileUUID,brandType,secondaryVetting,url,method);
Expand Down Expand Up @@ -119,6 +120,13 @@ public String getCreatedAt() {
return createdAt;
}

/**
* @return TCRErrorDetail[] return the getDeclinedReasons
*/
public List<TCRErrorDetail> getDeclinedReasons() {
return declinedReasons;
}

public BrandResponse getBrand() {
return brand;
}
Expand Down
28 changes: 18 additions & 10 deletions src/main/java/com/plivo/api/models/brand/BrandResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@
@JsonInclude(JsonInclude.Include.NON_NULL)
public class BrandResponse extends BaseResource {

private String brandID;
private String brandType;
private String einIssuingCountry;
private String entityType;
private String profileUUID;
private String registrationStatus;
private String vertical;
private Address address;
private String createdAt;
private AuthorizedContact authorizedContact;
private String brandID;
private String brandType;
private String einIssuingCountry;
private String entityType;
private String profileUUID;
private String registrationStatus;
private String vertical;
private Address address;
private String createdAt;
private AuthorizedContact authorizedContact;
private List<TCRErrorDetail> declinedReasons;

/**
* @return String return the getBrandID
Expand Down Expand Up @@ -91,6 +92,13 @@ public AuthorizedContact getAuthorizedContact() {
return authorizedContact;
}

/**
* @return TCRErrorDetail[] return the getDeclinedReasons
*/
public List<TCRErrorDetail> getDeclinedReasons() {
return declinedReasons;
}

@Override
public String getId() {
return this.brandID;
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/com/plivo/api/models/brand/TCRErrorDetail.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.plivo.api.models.brand;

public class TCRErrorDetail {
private String code;
private String message;

public TCRErrorDetail(String code, String message) {
this.code = code;
this.message = message;
}

public TCRErrorDetail() {
}

public String getCode() {
return code;
}
public String getMessage(){
return message;
}
}
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.39.0
5.39.1
Loading