From f4578a1c17d52496d18c150acad53a2910bb2740 Mon Sep 17 00:00:00 2001 From: Sajal Singhal Date: Thu, 11 Jan 2024 20:30:26 +0530 Subject: [PATCH 1/3] SMS-6047 made meta object consistent for P2 APIs --- CHANGELOG.md | 4 ++++ README.md | 2 +- pom.properties | 2 +- pom.xml | 2 +- src/main/java/com/plivo/api/models/base/Meta.java | 1 - src/main/resources/com/plivo/api/version.txt | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bbee7d5..f272c845 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [5.38.2](https://github.com/plivo/plivo-java/tree/v5.38.2) (2024-01-15) +**Feature - Made meta object consistent for List Powerpacks, List Media, List Numbers, List Shortcodes, List Tollfree API** +- Made meta object consistent in API response + ## [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 diff --git a/README.md b/README.md index 9003b71c..92f8b748 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.1 + 5.38.2 ``` diff --git a/pom.properties b/pom.properties index eaa4abb0..ef234359 100644 --- a/pom.properties +++ b/pom.properties @@ -1,6 +1,6 @@ # Written manually. -version=5.38.1 +version=5.38.2 groupId=com.plivo artifactId=plivo-java diff --git a/pom.xml b/pom.xml index 6e29d472..a7a48a76 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.plivo plivo-java - 5.38.1 + 5.38.2 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/base/Meta.java b/src/main/java/com/plivo/api/models/base/Meta.java index 19510535..7de787b3 100644 --- a/src/main/java/com/plivo/api/models/base/Meta.java +++ b/src/main/java/com/plivo/api/models/base/Meta.java @@ -3,7 +3,6 @@ import java.lang.NoSuchMethodException; -@JsonInclude(JsonInclude.Include.NON_NULL) public class Meta { protected Long limit; diff --git a/src/main/resources/com/plivo/api/version.txt b/src/main/resources/com/plivo/api/version.txt index bd4c0e53..377c661f 100644 --- a/src/main/resources/com/plivo/api/version.txt +++ b/src/main/resources/com/plivo/api/version.txt @@ -1 +1 @@ -5.38.1 \ No newline at end of file +5.38.2 \ No newline at end of file From b17d5fa7acfac566d38fd814944ef7362d7c36e5 Mon Sep 17 00:00:00 2001 From: Sajal Singhal Date: Wed, 17 Jan 2024 17:29:46 +0530 Subject: [PATCH 2/3] Fixing java.lang.ArrayIndexOutOfBoundsException error in Powerpack class in existing code --- src/main/java/com/plivo/api/models/powerpack/Powerpack.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/plivo/api/models/powerpack/Powerpack.java b/src/main/java/com/plivo/api/models/powerpack/Powerpack.java index 1e4af3c1..551eac1f 100644 --- a/src/main/java/com/plivo/api/models/powerpack/Powerpack.java +++ b/src/main/java/com/plivo/api/models/powerpack/Powerpack.java @@ -132,7 +132,7 @@ public String getId() { public String getNumberPoolId() { String[] numberpool_uuid = getNumber_pool().split("/"); - return numberpool_uuid[5]; + return (numberpool_uuid.length > 5) ? numberpool_uuid[5] : null; } } From ab25018d434b47de728fda0b65f31e6385b2a4e9 Mon Sep 17 00:00:00 2001 From: Sajal Singhal Date: Fri, 19 Jan 2024 17:39:39 +0530 Subject: [PATCH 3/3] adding default constructor in Shortcode class --- src/main/java/com/plivo/api/models/powerpack/Shortcode.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/plivo/api/models/powerpack/Shortcode.java b/src/main/java/com/plivo/api/models/powerpack/Shortcode.java index 713e050b..408b2d60 100644 --- a/src/main/java/com/plivo/api/models/powerpack/Shortcode.java +++ b/src/main/java/com/plivo/api/models/powerpack/Shortcode.java @@ -16,6 +16,10 @@ public class Shortcode extends BaseResource { public Shortcode(String uuid) { this.uuid = uuid; } + + public Shortcode() { + //Introducing the dummy constructor + } @JsonIgnore public Shortcode getter() {