From e2d949425b0466389853e514300e6f64802e3f62 Mon Sep 17 00:00:00 2001 From: avinashp-plivo Date: Fri, 9 Jan 2026 16:51:27 +0530 Subject: [PATCH 1/3] feat: add business_contact_email support to Profile API --- .../java/com/plivo/api/models/profile/Profile.java | 4 ++-- .../com/plivo/api/models/profile/ProfileAdder.java | 7 ++++++- .../com/plivo/api/models/profile/ProfileUpdater.java | 10 ++++++++++ src/test/java/com/plivo/api/ProfileTest.java | 12 ++++++------ 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/plivo/api/models/profile/Profile.java b/src/main/java/com/plivo/api/models/profile/Profile.java index 44310f8c0..b1c571498 100644 --- a/src/main/java/com/plivo/api/models/profile/Profile.java +++ b/src/main/java/com/plivo/api/models/profile/Profile.java @@ -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) { diff --git a/src/main/java/com/plivo/api/models/profile/ProfileAdder.java b/src/main/java/com/plivo/api/models/profile/ProfileAdder.java index c8f5c7d68..b0a3833df 100644 --- a/src/main/java/com/plivo/api/models/profile/ProfileAdder.java +++ b/src/main/java/com/plivo/api/models/profile/ProfileAdder.java @@ -21,8 +21,9 @@ public class ProfileAdder extends Creator { 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; @@ -38,6 +39,7 @@ public class ProfileAdder extends Creator { this.altBusinessIdType = altBusinessIdType; this.plivoSubaccount = plivoSubaccount; this.authorizedContact = authorizedContact; + this.businessContactEmail = businessContactEmail; } public String profileAlias(){ return this.profileAlias; @@ -84,6 +86,9 @@ public String plivoSubaccount(){ public ProfileAuthorizedContact authorizedContact(){ return this.authorizedContact; } + public String businessContactEmail(){ + return this.businessContactEmail; + } @Override protected Call obtainCall() { 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 51067fe4b..ad79989c4 100644 --- a/src/main/java/com/plivo/api/models/profile/ProfileUpdater.java +++ b/src/main/java/com/plivo/api/models/profile/ProfileUpdater.java @@ -12,6 +12,7 @@ public class ProfileUpdater extends MessagingProfileUpdater { private String website; private String vertical; private ProfileAuthorizedContact authorizedContact; + private String businessContactEmail; public ProfileUpdater(String id) { super(id); @@ -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 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 cc4a01120..6c1da12a7 100644 --- a/src/test/java/com/plivo/api/ProfileTest.java +++ b/src/test/java/com/plivo/api/ProfileTest.java @@ -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/"); } @@ -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/"); } From 3df64790b54d88a9664b569d6bbf8d272a0e4ac3 Mon Sep 17 00:00:00 2001 From: avinashp-plivo Date: Fri, 9 Jan 2026 16:51:48 +0530 Subject: [PATCH 2/3] chore: bump version to 5.46.4 and update changelog --- CHANGELOG.md | 4 ++++ src/main/resources/com/plivo/api/version.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07a119d1b..fc1815166 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [5.46.4](https://github.com/plivo/plivo-java/tree/v5.46.4) (2026-01-09) +**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. diff --git a/src/main/resources/com/plivo/api/version.txt b/src/main/resources/com/plivo/api/version.txt index 71cdfbf1e..8e276a0c8 100644 --- a/src/main/resources/com/plivo/api/version.txt +++ b/src/main/resources/com/plivo/api/version.txt @@ -1 +1 @@ -5.46.3 \ No newline at end of file +5.46.4 \ No newline at end of file From 807993cee29a98fc49e96beab0803c3e8269c4aa Mon Sep 17 00:00:00 2001 From: avinashp-plivo Date: Tue, 13 Jan 2026 15:07:32 +0530 Subject: [PATCH 3/3] chore: update release date to 2026-01-13 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc1815166..ce72a41ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## [5.46.4](https://github.com/plivo/plivo-java/tree/v5.46.4) (2026-01-09) +## [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