Skip to content

Commit 501b34e

Browse files
Merge pull request #306 from avinashp-plivo/add-business-contact-email
Add business contact email
2 parents 77274c6 + 807993c commit 501b34e

6 files changed

Lines changed: 29 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## [5.46.4](https://github.com/plivo/plivo-java/tree/v5.46.4) (2026-01-13)
4+
**Feature - Profile API business_contact_email support**
5+
- Added `businessContactEmail` parameter support to Profile `create` and `update` methods for PUBLIC entity types
6+
37
## [5.46.3](https://github.com/plivo/plivo-java/tree/v5.46.3) (2025-10-17)
48
**Feature - Compliance Application rejection_reason field**
59
- Add `rejection_reason` to Compliance Application GET/LIST/CREATE responses.

src/main/java/com/plivo/api/models/profile/Profile.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public class Profile extends BaseResource {
2828
private ProfileResponse profile;
2929

3030

31-
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) {
32-
return new ProfileAdder(profileAlias,customerType,entityType,companyName,ein,einIssuingCountry,address,stockSymbol,stockExchange,website,vertical,altBusinessID,altBusinessIdType,plivoSubaccount,authorizedContact);
31+
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) {
32+
return new ProfileAdder(profileAlias,customerType,entityType,companyName,ein,einIssuingCountry,address,stockSymbol,stockExchange,website,vertical,altBusinessID,altBusinessIdType,plivoSubaccount,authorizedContact,businessContactEmail);
3333
}
3434

3535
public static ProfileGetter getter(String id) {

src/main/java/com/plivo/api/models/profile/ProfileAdder.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ public class ProfileAdder extends Creator<ProfileAddResponse> {
2121
private String altBusinessIdType;
2222
private String plivoSubaccount;
2323
private ProfileAuthorizedContact authorizedContact;
24+
private String businessContactEmail;
2425

25-
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) {
26+
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) {
2627
this.profileAlias = profileAlias;
2728
this.customerType = customerType;
2829
this.entityType = entityType;
@@ -38,6 +39,7 @@ public class ProfileAdder extends Creator<ProfileAddResponse> {
3839
this.altBusinessIdType = altBusinessIdType;
3940
this.plivoSubaccount = plivoSubaccount;
4041
this.authorizedContact = authorizedContact;
42+
this.businessContactEmail = businessContactEmail;
4143
}
4244
public String profileAlias(){
4345
return this.profileAlias;
@@ -84,6 +86,9 @@ public String plivoSubaccount(){
8486
public ProfileAuthorizedContact authorizedContact(){
8587
return this.authorizedContact;
8688
}
89+
public String businessContactEmail(){
90+
return this.businessContactEmail;
91+
}
8792

8893
@Override
8994
protected Call<ProfileAddResponse> obtainCall() {

src/main/java/com/plivo/api/models/profile/ProfileUpdater.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class ProfileUpdater extends MessagingProfileUpdater<Profile> {
1212
private String website;
1313
private String vertical;
1414
private ProfileAuthorizedContact authorizedContact;
15+
private String businessContactEmail;
1516

1617
public ProfileUpdater(String id) {
1718
super(id);
@@ -66,6 +67,15 @@ public ProfileUpdater authorizedContact (ProfileAuthorizedContact authorizedCont
6667
return this;
6768
}
6869

70+
public ProfileUpdater businessContactEmail (String businessContactEmail) {
71+
this.businessContactEmail = businessContactEmail;
72+
return this;
73+
}
74+
75+
public String getBusinessContactEmail(){
76+
return businessContactEmail;
77+
}
78+
6979
@Override
7080
protected Call<Profile> obtainCall() {
7181
return client().getApiService().profileUpdate(client().getAuthId(), id, this);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.46.3
1+
5.46.4

src/test/java/com/plivo/api/ProfileTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public void profileCreateShouldSucceed() throws Exception {
2525
String fixtureName = "profileCreateResponse.json";
2626

2727
expectResponse(fixtureName, 202);
28-
ProfileAddress address = new ProfileAddress("1234", "New York", "NY", "12345", "US");
29-
ProfileAuthorizedContact authContact = new ProfileAuthorizedContact("john", "Deo", "12345467987", "123j@plivo.com", "MTR", "admin");
30-
ProfileAddResponse response = Profile.creator("java profile", "DIRECT", "PRIVATE", "Plivo", "12345678", "IN", address, "ABC", "NSE", "google.com", "ENERGY", "", "", "", authContact).create();
28+
ProfileAddress address = new ProfileAddress("123 Main Street", "San Francisco", "CA", "94105", "US");
29+
ProfileAuthorizedContact authContact = new ProfileAuthorizedContact("John", "Doe", "+14155551234", "test@example.com", "CEO", "C_LEVEL");
30+
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();
3131

3232
assertRequest("POST", "Profile/");
3333
}
@@ -59,9 +59,9 @@ public void profileUpdateShouldSucceed() throws Exception {
5959
String fixtureName = "profileUpdateResponse.json";
6060

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

6666
assertRequest("POST", "Profile/8abd0935-fd17-4876-9b40-5855488ac5b5/");
6767
}

0 commit comments

Comments
 (0)