Skip to content

Commit

Permalink
Merge pull request #266 from plivo/SMS-5858
Browse files Browse the repository at this point in the history
Added new params to GET and LIST Campaign APIs
  • Loading branch information
renoldthomas-plivo authored Dec 14, 2023
2 parents 1462a4f + f83d4b0 commit d9356f3
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [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

## [5.37.0](https://github.com/plivo/plivo-java/tree/v5.37.0) (2023-11-29)
**Feature - add new response fields for LIST and GET campaign**
- Added new response params `error_code`, `error_reason` for LIST / GET Campaign APIs
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.37.0/plivo-java-5.37.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.38.0/plivo-java-5.38.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.37.0</version>
<version>5.38.0</version>
</dependency>
```

If you are using Gradle, use the following line in your dependencies.
```
compile 'com.plivo:plivo-java:5.37.0'
compile 'com.plivo:plivo-java:5.38.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.37.0
version=5.38.0
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.37.0</version>
<version>5.38.0</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
10 changes: 10 additions & 0 deletions src/main/java/com/plivo/api/models/campaign/Campaign.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public class Campaign extends BaseResource {
private String campaignSource;
private String errorReason;
private String errorCode;
private String vertical;
private String campaignAlias;



Expand Down Expand Up @@ -172,6 +174,14 @@ public String getCreatedAt() {
return createdAt;
}

public String getVertical() {
return vertical;
}

public String getCampaignAlias() {
return campaignAlias;
}

@Override
public String getId() {
return this.campaignID;
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/com/plivo/api/models/campaign/CampaignResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public class CampaignResponse extends BaseResource{
private String errorReason;
private String errorCode;
private CampaignAttributes campaignAttributes;
private String vertical;
private String campaignAlias;



/**
Expand Down Expand Up @@ -147,6 +150,21 @@ public String getCampaignSource() {
return campaignSource;
}

/**
* @return vertical return the vertical
*/
public String getVertical() {
return vertical;
}

/**
* @return campaignAlias return the camp
aignAlias
*/
public String getCampaignAlias() {
return campaignAlias;
}

/**
* @return errorCode return the errorCode
*/
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.37.0
5.38.0
4 changes: 3 additions & 1 deletion src/test/resources/com/plivo/api/campaignGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
"created_at": "2023-03-07T11:25:28.262701Z",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
}
}
40 changes: 30 additions & 10 deletions src/test/resources/com/plivo/api/campaignListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
"created_at": "2023-03-07T11:25:28.262701Z",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
},
{
"brand_id": "BNOOLMO",
Expand All @@ -51,7 +53,9 @@
"created_at": "2023-03-07T11:25:28.262701Z",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
},
{
"brand_id": "BWDWMAC",
Expand All @@ -77,7 +81,9 @@
"created_at": "2023-03-07T11:25:28.262701Z",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
},
{
"brand_id": "BCKWPKX",
Expand All @@ -103,7 +109,9 @@
"created_at": "2023-03-07T11:25:28.262701Z",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
},
{
"brand_id": "B2IYFNC",
Expand All @@ -129,7 +137,9 @@
"created_at": "2023-03-07T11:25:28.262701Z",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
},
{
"brand_id": "BK98MJL",
Expand All @@ -153,7 +163,9 @@
"created_at": "2023-03-07T11:25:28.262701Z",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
},
{
"brand_id": "B3WKVGC",
Expand All @@ -179,7 +191,9 @@
"created_at": "2023-03-07T11:25:28.262701Z",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
},
{
"brand_id": "BBYQU0Z",
Expand All @@ -204,7 +218,9 @@
"created_at": "2023-03-07T11:25:28.262701Z",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
},
{
"brand_id": "BBYQU0Z",
Expand All @@ -229,7 +245,9 @@
"created_at": "2023-03-07T11:25:28.262701Z",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
},
{
"brand_id": "BBYQU0Z",
Expand All @@ -254,7 +272,9 @@
"created_at": "2023-03-07T11:25:28.262701Z",
"campaign_source": "plivo",
"error_code": "1001",
"error_reason": "The campaign content falls under a prohibited content category."
"error_reason": "The campaign content falls under a prohibited content category.",
"vertical":"ENTERTAINMENT",
"campaign_alias":"testing"
}
],
"meta": {
Expand Down

0 comments on commit d9356f3

Please sign in to comment.