diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ab543dc..aa6209b7 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-19) +**Feature - Caller Reputation profile-first API** +- 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 + ## [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/java/com/plivo/api/models/profile/ProfileUpdater.java b/src/main/java/com/plivo/api/models/profile/ProfileUpdater.java index e0a7a620..1573b404 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 callerReputationCarriers; + private String url; + private String method; 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 caller_reputation_carriers (java.util.List callerReputationCarriers) { + this.callerReputationCarriers = callerReputationCarriers; + return this; + } + + public java.util.List getCallerReputationCarriers(){ + return callerReputationCarriers; + } + + public ProfileUpdater url (String url) { + this.url = url; + return this; + } + + public String getUrl(){ + return url; + } + + public ProfileUpdater method (String method) { + this.method = method; + return this; + } + + public String getMethod(){ + return method; + } + @Override protected Call obtainCall() { return client().getApiService().profileUpdate(client().getAuthId(), id, this); 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 diff --git a/src/test/java/com/plivo/api/ProfileTest.java b/src/test/java/com/plivo/api/ProfileTest.java index 83883561..2ba1e38b 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) + .caller_reputation_carriers(java.util.Arrays.asList("at&t", "t-mobile")) + .url("https://example.com/cr/webhook") + .method("POST") + .update(); + + assertRequest("POST", "Profile/8abd0935-fd17-4876-9b40-5855488ac5b5/"); + } + @Test public void profileDeleteShouldSucceed() throws Exception { String fixtureName = "profileDeleteResponse.json";