Skip to content
Draft
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.48.2](https://github.com/plivo/plivo-java/tree/v5.48.2) (2026-06-10)
**Feature - Profile API number of employees field support**
- Added Number of Employees field support to Profile API

## [5.48.1](https://github.com/plivo/plivo-java/tree/v5.48.1) (2026-05-26)
**Feature - Profile API DBA field support**
- Added Doing Business As (DBA) field support to Profile API
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.plivo</groupId>
<artifactId>plivo-java</artifactId>
<version>5.48.1</version>
<version>5.48.2</version>
<name>plivo-java</name>
<description>A Java SDK to make voice calls &amp; send SMS using Plivo and to generate Plivo XML</description>
<licenses>
Expand Down
8 changes: 6 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 @@ -29,11 +29,15 @@ public class Profile extends BaseResource {


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

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

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

public static ProfileGetter getter(String id) {
Expand Down
10 changes: 9 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 @@ -23,8 +23,12 @@ public class ProfileAdder extends Creator<ProfileAddResponse> {
private ProfileAuthorizedContact authorizedContact;
private String businessContactEmail;
private String doingBusinessAs;
// numberOfEmployees is an optional field. Allowed values (validated server-side):
// BETWEEN_1_AND_10, BETWEEN_11_AND_50, BETWEEN_51_AND_200, BETWEEN_201_AND_500,
// BETWEEN_501_AND_2000, BETWEEN_2001_AND_10000, MORE_THAN_10001
private String numberOfEmployees;

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,String doingBusinessAs) {
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,String doingBusinessAs,String numberOfEmployees) {
this.profileAlias = profileAlias;
this.customerType = customerType;
this.entityType = entityType;
Expand All @@ -42,6 +46,7 @@ public class ProfileAdder extends Creator<ProfileAddResponse> {
this.authorizedContact = authorizedContact;
this.businessContactEmail = businessContactEmail;
this.doingBusinessAs = doingBusinessAs;
this.numberOfEmployees = numberOfEmployees;
}
public String profileAlias(){
return this.profileAlias;
Expand Down Expand Up @@ -94,6 +99,9 @@ public String businessContactEmail(){
public String doingBusinessAs(){
return this.doingBusinessAs;
}
public String numberOfEmployees(){
return this.numberOfEmployees;
}

@Override
protected Call<ProfileAddResponse> obtainCall() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public class ProfileResponse extends BaseResource{
private String profileUUID;
private String createdAt;
private String doingBusinessAs;
// numberOfEmployees is an optional field. Allowed values (validated server-side):
// BETWEEN_1_AND_10, BETWEEN_11_AND_50, BETWEEN_51_AND_200, BETWEEN_201_AND_500,
// BETWEEN_501_AND_2000, BETWEEN_2001_AND_10000, MORE_THAN_10001
private String numberOfEmployees;

public String getProfileAlias(){
return profileAlias;
Expand Down Expand Up @@ -100,6 +104,10 @@ public String getDoingBusinessAs(){
return doingBusinessAs;
}

public String getNumberOfEmployees(){
return numberOfEmployees;
}

@Override
public String getId() {
return this.profileUUID;
Expand Down
13 changes: 13 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;
// numberOfEmployees is an optional field. Allowed values (validated server-side):
// BETWEEN_1_AND_10, BETWEEN_11_AND_50, BETWEEN_51_AND_200, BETWEEN_201_AND_500,
// BETWEEN_501_AND_2000, BETWEEN_2001_AND_10000, MORE_THAN_10001
private String numberOfEmployees;

public ProfileUpdater(String id) {
super(id);
Expand Down Expand Up @@ -126,6 +130,15 @@ public String getDoingBusinessAs(){
return doingBusinessAs;
}

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

public String getNumberOfEmployees(){
return numberOfEmployees;
}

@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.48.1
5.48.2
5 changes: 3 additions & 2 deletions src/test/java/com/plivo/api/ProfileTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void profileCreateShouldSucceed() throws Exception {
expectResponse(fixtureName, 202);
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", "Test DBA").create();
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", "Test DBA", "BETWEEN_11_AND_50").create();

assertRequest("POST", "Profile/");
}
Expand All @@ -43,6 +43,7 @@ public void profileGetShouldSucceed() throws Exception {
assertRequest("GET", "Profile/%s/", profileUUID);
assertEquals(profileUUID, response.getProfile().getProfileUUID());
assertEquals("ABC DBA", response.getProfile().getDoingBusinessAs());
assertEquals("BETWEEN_11_AND_50", response.getProfile().getNumberOfEmployees());
}

@Test
Expand All @@ -62,7 +63,7 @@ public void profileUpdateShouldSucceed() throws Exception {
expectResponse(fixtureName, 202);
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").doingBusinessAs("Updated DBA").update();
Profile response = Profile.update("8abd0935-fd17-4876-9b40-5855488ac5b5").entityType("PUBLIC").address(address).authorizedContact(authContact).businessContactEmail("employee@company.com").doingBusinessAs("Updated DBA").numberOfEmployees("BETWEEN_11_AND_50").update();

assertRequest("POST", "Profile/8abd0935-fd17-4876-9b40-5855488ac5b5/");
}
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/com/plivo/api/profileGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"company_name": "ABC Inc.",
"customer_type": "RESELLER",
"doing_business_as": "ABC DBA",
"number_of_employees": "BETWEEN_11_AND_50",
"ein": "111111111",
"ein_issuing_country": "US",
"entity_type": "PUBLIC_PROFIT",
Expand Down
Loading