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
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.46.4](https://github.com/plivo/plivo-java/tree/v5.46.4) (2026-01-13)
**Feature - Profile API business_contact_email support**
- Added `businessContactEmail` parameter support to Profile `create` and `update` methods for PUBLIC entity types

## [5.46.3](https://github.com/plivo/plivo-java/tree/v5.46.3) (2025-10-17)
**Feature - Compliance Application rejection_reason field**
- Add `rejection_reason` to Compliance Application GET/LIST/CREATE responses.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/plivo/api/models/profile/Profile.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public class Profile extends BaseResource {
private ProfileResponse profile;


public static ProfileAdder creator(String profileAlias,String customerType,String entityType,String companyName,String ein,String einIssuingCountry,ProfileAddress address,String stockSymbol,String stockExchange,String website,String vertical,String altBusinessID,String altBusinessIdType,String plivoSubaccount,ProfileAuthorizedContact authorizedContact) {
return new ProfileAdder(profileAlias,customerType,entityType,companyName,ein,einIssuingCountry,address,stockSymbol,stockExchange,website,vertical,altBusinessID,altBusinessIdType,plivoSubaccount,authorizedContact);
public static ProfileAdder creator(String profileAlias,String customerType,String entityType,String companyName,String ein,String einIssuingCountry,ProfileAddress address,String stockSymbol,String stockExchange,String website,String vertical,String altBusinessID,String altBusinessIdType,String plivoSubaccount,ProfileAuthorizedContact authorizedContact,String businessContactEmail) {
return new ProfileAdder(profileAlias,customerType,entityType,companyName,ein,einIssuingCountry,address,stockSymbol,stockExchange,website,vertical,altBusinessID,altBusinessIdType,plivoSubaccount,authorizedContact,businessContactEmail);
}

public static ProfileGetter getter(String id) {
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/com/plivo/api/models/profile/ProfileAdder.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ public class ProfileAdder extends Creator<ProfileAddResponse> {
private String altBusinessIdType;
private String plivoSubaccount;
private ProfileAuthorizedContact authorizedContact;
private String businessContactEmail;

ProfileAdder(String profileAlias,String customerType,String entityType,String companyName,String ein,String einIssuingCountry,ProfileAddress address,String stockSymbol,String stockExchange,String website,String vertical,String altBusinessID,String altBusinessIdType,String plivoSubaccount,ProfileAuthorizedContact authorizedContact) {
ProfileAdder(String profileAlias,String customerType,String entityType,String companyName,String ein,String einIssuingCountry,ProfileAddress address,String stockSymbol,String stockExchange,String website,String vertical,String altBusinessID,String altBusinessIdType,String plivoSubaccount,ProfileAuthorizedContact authorizedContact,String businessContactEmail) {
this.profileAlias = profileAlias;
this.customerType = customerType;
this.entityType = entityType;
Expand All @@ -38,6 +39,7 @@ public class ProfileAdder extends Creator<ProfileAddResponse> {
this.altBusinessIdType = altBusinessIdType;
this.plivoSubaccount = plivoSubaccount;
this.authorizedContact = authorizedContact;
this.businessContactEmail = businessContactEmail;
}
public String profileAlias(){
return this.profileAlias;
Expand Down Expand Up @@ -84,6 +86,9 @@ public String plivoSubaccount(){
public ProfileAuthorizedContact authorizedContact(){
return this.authorizedContact;
}
public String businessContactEmail(){
return this.businessContactEmail;
}

@Override
protected Call<ProfileAddResponse> obtainCall() {
Expand Down
10 changes: 10 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 @@ -12,6 +12,7 @@ public class ProfileUpdater extends MessagingProfileUpdater<Profile> {
private String website;
private String vertical;
private ProfileAuthorizedContact authorizedContact;
private String businessContactEmail;

public ProfileUpdater(String id) {
super(id);
Expand Down Expand Up @@ -66,6 +67,15 @@ public ProfileUpdater authorizedContact (ProfileAuthorizedContact authorizedCont
return this;
}

public ProfileUpdater businessContactEmail (String businessContactEmail) {
this.businessContactEmail = businessContactEmail;
return this;
}

public String getBusinessContactEmail(){
return businessContactEmail;
}

@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.46.3
5.46.4
12 changes: 6 additions & 6 deletions src/test/java/com/plivo/api/ProfileTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public void profileCreateShouldSucceed() throws Exception {
String fixtureName = "profileCreateResponse.json";

expectResponse(fixtureName, 202);
ProfileAddress address = new ProfileAddress("1234", "New York", "NY", "12345", "US");
ProfileAuthorizedContact authContact = new ProfileAuthorizedContact("john", "Deo", "12345467987", "123j@plivo.com", "MTR", "admin");
ProfileAddResponse response = Profile.creator("java profile", "DIRECT", "PRIVATE", "Plivo", "12345678", "IN", address, "ABC", "NSE", "google.com", "ENERGY", "", "", "", authContact).create();
ProfileAddress address = new ProfileAddress("123 Main Street", "San Francisco", "CA", "94105", "US");
ProfileAuthorizedContact authContact = new ProfileAuthorizedContact("John", "Doe", "+14155551234", "test@example.com", "CEO", "C_LEVEL");
ProfileAddResponse response = Profile.creator("Test Profile", "DIRECT", "PUBLIC", "Test Company Inc", "12-3456789", "US", address, "TEST", "NASDAQ", "https://testcompany.com", "TECHNOLOGY", "", "NONE", "", authContact, "employee@company.com").create();

assertRequest("POST", "Profile/");
}
Expand Down Expand Up @@ -59,9 +59,9 @@ public void profileUpdateShouldSucceed() throws Exception {
String fixtureName = "profileUpdateResponse.json";

expectResponse(fixtureName, 202);
ProfileAddress address = new ProfileAddress("12345", "New York", "NJ", "12345", "US");
ProfileAuthorizedContact authContact = new ProfileAuthorizedContact("john", "Deo", "12345467987", "123j@plivo.com", "MTR1", "admin");
Profile response = Profile.update("8abd0935-fd17-4876-9b40-5855488ac5b5").entityType("PRIVATE").address(address).authorizedContact(authContact).update();
ProfileAddress address = new ProfileAddress("123 Main Street", "San Francisco", "CA", "94105", "US");
ProfileAuthorizedContact authContact = new ProfileAuthorizedContact("John", "Doe", "+14155551234", "test@example.com", "CEO", "C_LEVEL");
Profile response = Profile.update("8abd0935-fd17-4876-9b40-5855488ac5b5").entityType("PUBLIC").address(address).authorizedContact(authContact).businessContactEmail("employee@company.com").update();

assertRequest("POST", "Profile/8abd0935-fd17-4876-9b40-5855488ac5b5/");
}
Expand Down
Loading