From 2be62b08e88e8b6f5408843b865e2a7e11318902 Mon Sep 17 00:00:00 2001 From: "revanth.p" Date: Thu, 6 Aug 2026 00:51:52 +0530 Subject: [PATCH 1/4] feat(caller-reputation): support profile-first Caller Reputation API Adds four optional fluent-builder params to ProfileUpdater matching the new profile-first Caller Reputation wire shape: enable_caller_reputation (Boolean) vetting_provider (List: "at&t", "t-mobile") callback_url (String) callback_method (String: "GET" | "POST") All four are optional and backward compatible; existing callers are unaffected. Setter names match the wire keys verbatim so the SDK is symmetric with the API surface across languages. Co-Authored-By: Claude Opus 4.7 --- .../api/models/profile/ProfileUpdater.java | 40 +++++++++++++++++++ src/test/java/com/plivo/api/ProfileTest.java | 15 +++++++ 2 files changed, 55 insertions(+) diff --git a/src/main/java/com/plivo/api/models/profile/ProfileUpdater.java b/src/main/java/com/plivo/api/models/profile/ProfileUpdater.java index e0a7a620..40b230bf 100644 --- a/src/main/java/com/plivo/api/models/profile/ProfileUpdater.java +++ b/src/main/java/com/plivo/api/models/profile/ProfileUpdater.java @@ -18,6 +18,10 @@ public class ProfileUpdater extends MessagingProfileUpdater { private String altBusinessId; private String altBusinessIdType; private String doingBusinessAs; + private Boolean enableCallerReputation; + private java.util.List vettingProvider; + private String callbackUrl; + private String callbackMethod; public ProfileUpdater(String id) { super(id); @@ -126,6 +130,42 @@ public String getDoingBusinessAs(){ return doingBusinessAs; } + public ProfileUpdater enable_caller_reputation (Boolean enableCallerReputation) { + this.enableCallerReputation = enableCallerReputation; + return this; + } + + public Boolean getEnableCallerReputation(){ + return enableCallerReputation; + } + + public ProfileUpdater vetting_provider (java.util.List vettingProvider) { + this.vettingProvider = vettingProvider; + return this; + } + + public java.util.List getVettingProvider(){ + return vettingProvider; + } + + public ProfileUpdater callback_url (String callbackUrl) { + this.callbackUrl = callbackUrl; + return this; + } + + public String getCallbackUrl(){ + return callbackUrl; + } + + public ProfileUpdater callback_method (String callbackMethod) { + this.callbackMethod = callbackMethod; + return this; + } + + public String getCallbackMethod(){ + return callbackMethod; + } + @Override protected Call obtainCall() { return client().getApiService().profileUpdate(client().getAuthId(), id, this); diff --git a/src/test/java/com/plivo/api/ProfileTest.java b/src/test/java/com/plivo/api/ProfileTest.java index 83883561..cc950e04 100644 --- a/src/test/java/com/plivo/api/ProfileTest.java +++ b/src/test/java/com/plivo/api/ProfileTest.java @@ -67,6 +67,21 @@ public void profileUpdateShouldSucceed() throws Exception { assertRequest("POST", "Profile/8abd0935-fd17-4876-9b40-5855488ac5b5/"); } + @Test + public void profileUpdateWithCallerReputationShouldSucceed() throws Exception { + String fixtureName = "profileUpdateResponse.json"; + + expectResponse(fixtureName, 202); + Profile response = Profile.update("8abd0935-fd17-4876-9b40-5855488ac5b5") + .enable_caller_reputation(true) + .vetting_provider(java.util.Arrays.asList("at&t", "t-mobile")) + .callback_url("https://example.com/cr/webhook") + .callback_method("POST") + .update(); + + assertRequest("POST", "Profile/8abd0935-fd17-4876-9b40-5855488ac5b5/"); + } + @Test public void profileDeleteShouldSucceed() throws Exception { String fixtureName = "profileDeleteResponse.json"; From 7c03badf3d373d99860db33edf81dbf51570fd1b Mon Sep 17 00:00:00 2001 From: "revanth.p" Date: Thu, 6 Aug 2026 00:52:25 +0530 Subject: [PATCH 2/4] chore: bump version to 5.51.0 and update changelog Co-Authored-By: Claude Opus 4.7 --- CHANGELOG.md | 7 +++++++ src/main/resources/com/plivo/api/version.txt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ab543dc..3f56fe24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## [5.51.0](https://github.com/plivo/plivo-java/tree/v5.51.0) (2026-08-06) +**Feature - Caller Reputation profile-first API** +- Added optional `enable_caller_reputation`, `vetting_provider`, `callback_url` and `callback_method` fluent-builder params to `ProfileUpdater`, serialized to the matching wire keys on Profile update +- `vetting_provider` accepts the customer-facing carrier keys `"at&t"` and `"t-mobile"` (case-insensitive on the API side) +- Single profile-level callback URL replaces the earlier per-carrier `callbacks` map; Update Number is now attach-only for CR and never registers a new business +- Backward-compatible additive builder methods + ## [5.50.0](https://github.com/plivo/plivo-java/tree/v5.50.0) (2026-07-28) **Feature - Toll-free verification terms, privacy, opt-in and help fields** - Added optional `termsAndConditionsLink`, `privacyPolicyLink`, `optinMessage` and `helpMessage` parameters to the toll-free verification create and update methods diff --git a/src/main/resources/com/plivo/api/version.txt b/src/main/resources/com/plivo/api/version.txt index 24091d30..885f9fed 100644 --- a/src/main/resources/com/plivo/api/version.txt +++ b/src/main/resources/com/plivo/api/version.txt @@ -1 +1 @@ -5.50.0 +5.51.0 From 0eb792e32d018bd7a70dc9e1c867ad5bc7ed7560 Mon Sep 17 00:00:00 2001 From: "revanth.p" Date: Wed, 12 Aug 2026 10:18:36 +0530 Subject: [PATCH 3/4] fix(caller-reputation): rename callback setters to url / method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses Narayana's PR #325 review — the fluent setters on ProfileUpdater are shorter and read as a natural pair now: .url("https://...") .method("POST") JSON wire is unchanged (Jackson serializes by field name; private callbackUrl / callbackMethod fields still produce callback_url / callback_method on the wire via the SNAKE_CASE naming strategy). Co-Authored-By: Claude Opus 4.7 --- .../java/com/plivo/api/models/profile/ProfileUpdater.java | 8 ++++---- src/test/java/com/plivo/api/ProfileTest.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/plivo/api/models/profile/ProfileUpdater.java b/src/main/java/com/plivo/api/models/profile/ProfileUpdater.java index 40b230bf..d0c5b8fc 100644 --- a/src/main/java/com/plivo/api/models/profile/ProfileUpdater.java +++ b/src/main/java/com/plivo/api/models/profile/ProfileUpdater.java @@ -148,8 +148,8 @@ public java.util.List getVettingProvider(){ return vettingProvider; } - public ProfileUpdater callback_url (String callbackUrl) { - this.callbackUrl = callbackUrl; + public ProfileUpdater url (String url) { + this.callbackUrl = url; return this; } @@ -157,8 +157,8 @@ public String getCallbackUrl(){ return callbackUrl; } - public ProfileUpdater callback_method (String callbackMethod) { - this.callbackMethod = callbackMethod; + public ProfileUpdater method (String method) { + this.callbackMethod = method; return this; } diff --git a/src/test/java/com/plivo/api/ProfileTest.java b/src/test/java/com/plivo/api/ProfileTest.java index cc950e04..86f3c512 100644 --- a/src/test/java/com/plivo/api/ProfileTest.java +++ b/src/test/java/com/plivo/api/ProfileTest.java @@ -75,8 +75,8 @@ public void profileUpdateWithCallerReputationShouldSucceed() throws Exception { Profile response = Profile.update("8abd0935-fd17-4876-9b40-5855488ac5b5") .enable_caller_reputation(true) .vetting_provider(java.util.Arrays.asList("at&t", "t-mobile")) - .callback_url("https://example.com/cr/webhook") - .callback_method("POST") + .url("https://example.com/cr/webhook") + .method("POST") .update(); assertRequest("POST", "Profile/8abd0935-fd17-4876-9b40-5855488ac5b5/"); From b40cf5ec06e922de8569f07b38936feceb327d3e Mon Sep 17 00:00:00 2001 From: "revanth.p" Date: Wed, 19 Aug 2026 11:40:28 +0530 Subject: [PATCH 4/4] =?UTF-8?q?refactor(caller-reputation):=20align=20wire?= =?UTF-8?q?=20keys=20with=20server=20(caller=5Freputation=5Fcarriers=20?= =?UTF-8?q?=C2=B7=20url=20=C2=B7=20method)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Server now accepts `caller_reputation_carriers` (spec v5 rename from `vetting_provider`) and plain `url` / `method` scalars (drop the "callback_" prefix). Update the SDK to match: - Rename field vettingProvider → callerReputationCarriers, fluent method vetting_provider(...) → caller_reputation_carriers(...) - Rename field callbackUrl → url, keep the .url(...) fluent method - Rename field callbackMethod → method, keep the .method(...) fluent method - Update CHANGELOG + ProfileTest fixture accordingly - Advertise the "verizon" carrier key alongside "at&t" / "t-mobile" Backwards-incompatible for anyone who was already calling .vetting_provider(...) — the method rename is deliberate to match the new server contract; there is no shipped version with the old name. Co-Authored-By: Claude Opus 4.7 --- CHANGELOG.md | 6 ++--- .../api/models/profile/ProfileUpdater.java | 26 +++++++++---------- src/test/java/com/plivo/api/ProfileTest.java | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f56fe24..aa6209b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,9 @@ # Change Log -## [5.51.0](https://github.com/plivo/plivo-java/tree/v5.51.0) (2026-08-06) +## [5.51.0](https://github.com/plivo/plivo-java/tree/v5.51.0) (2026-08-19) **Feature - Caller Reputation profile-first API** -- Added optional `enable_caller_reputation`, `vetting_provider`, `callback_url` and `callback_method` fluent-builder params to `ProfileUpdater`, serialized to the matching wire keys on Profile update -- `vetting_provider` accepts the customer-facing carrier keys `"at&t"` and `"t-mobile"` (case-insensitive on the API side) +- Added optional `enable_caller_reputation`, `caller_reputation_carriers`, `url` and `method` fluent-builder params to `ProfileUpdater`, serialized to the matching wire keys on Profile update +- `caller_reputation_carriers` accepts the customer-facing carrier keys `"at&t"`, `"t-mobile"` and `"verizon"` (case-insensitive on the API side) - Single profile-level callback URL replaces the earlier per-carrier `callbacks` map; Update Number is now attach-only for CR and never registers a new business - Backward-compatible additive builder methods diff --git a/src/main/java/com/plivo/api/models/profile/ProfileUpdater.java b/src/main/java/com/plivo/api/models/profile/ProfileUpdater.java index d0c5b8fc..1573b404 100644 --- a/src/main/java/com/plivo/api/models/profile/ProfileUpdater.java +++ b/src/main/java/com/plivo/api/models/profile/ProfileUpdater.java @@ -19,9 +19,9 @@ public class ProfileUpdater extends MessagingProfileUpdater { private String altBusinessIdType; private String doingBusinessAs; private Boolean enableCallerReputation; - private java.util.List vettingProvider; - private String callbackUrl; - private String callbackMethod; + private java.util.List callerReputationCarriers; + private String url; + private String method; public ProfileUpdater(String id) { super(id); @@ -139,31 +139,31 @@ public Boolean getEnableCallerReputation(){ return enableCallerReputation; } - public ProfileUpdater vetting_provider (java.util.List vettingProvider) { - this.vettingProvider = vettingProvider; + public ProfileUpdater caller_reputation_carriers (java.util.List callerReputationCarriers) { + this.callerReputationCarriers = callerReputationCarriers; return this; } - public java.util.List getVettingProvider(){ - return vettingProvider; + public java.util.List getCallerReputationCarriers(){ + return callerReputationCarriers; } public ProfileUpdater url (String url) { - this.callbackUrl = url; + this.url = url; return this; } - public String getCallbackUrl(){ - return callbackUrl; + public String getUrl(){ + return url; } public ProfileUpdater method (String method) { - this.callbackMethod = method; + this.method = method; return this; } - public String getCallbackMethod(){ - return callbackMethod; + public String getMethod(){ + return method; } @Override diff --git a/src/test/java/com/plivo/api/ProfileTest.java b/src/test/java/com/plivo/api/ProfileTest.java index 86f3c512..2ba1e38b 100644 --- a/src/test/java/com/plivo/api/ProfileTest.java +++ b/src/test/java/com/plivo/api/ProfileTest.java @@ -74,7 +74,7 @@ public void profileUpdateWithCallerReputationShouldSucceed() throws Exception { expectResponse(fixtureName, 202); Profile response = Profile.update("8abd0935-fd17-4876-9b40-5855488ac5b5") .enable_caller_reputation(true) - .vetting_provider(java.util.Arrays.asList("at&t", "t-mobile")) + .caller_reputation_carriers(java.util.Arrays.asList("at&t", "t-mobile")) .url("https://example.com/cr/webhook") .method("POST") .update();