Skip to content
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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
40 changes: 40 additions & 0 deletions src/main/java/com/plivo/api/models/profile/ProfileUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ public class ProfileUpdater extends MessagingProfileUpdater<Profile> {
private String altBusinessId;
private String altBusinessIdType;
private String doingBusinessAs;
private Boolean enableCallerReputation;
private java.util.List<String> callerReputationCarriers;
private String url;
private String method;

public ProfileUpdater(String id) {
super(id);
Expand Down Expand Up @@ -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<String> callerReputationCarriers) {
this.callerReputationCarriers = callerReputationCarriers;
return this;
}

public java.util.List<String> 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<Profile> obtainCall() {
return client().getApiService().profileUpdate(client().getAuthId(), id, this);
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.50.0
5.51.0
15 changes: 15 additions & 0 deletions src/test/java/com/plivo/api/ProfileTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Loading