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,4 +1,8 @@
# Change Log
## [4.60.3](https://github.com/plivo/plivo-python/tree/v4.60.3) (2026-06-10)
**Feature - Profile API number of employees field support**
- Added Number of Employees field support to Profile API

## [4.60.2](https://github.com/plivo/plivo-python/tree/v4.60.2) (2026-05-26)
**Feature - Profile API DBA field support**
- Added Doing Business As (DBA) field support to Profile API
Expand Down
11 changes: 8 additions & 3 deletions plivo/resources/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ def delete(self, profile_uuid):
address=[optional(of_type_exact(dict))],
authorized_contact=[optional(of_type_exact(dict))],
business_contact_email=[optional(of_type(six.text_type))],
doing_business_as=[optional(of_type(six.text_type))])
doing_business_as=[optional(of_type(six.text_type))],
# Optional string. Server validates allowed values; no client-side enum check.
# Allowed values: 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
number_of_employees=[optional(of_type(six.text_type))])
def create(self,
profile_alias,
customer_type,
Expand All @@ -79,13 +83,14 @@ def create(self,
address={},
authorized_contact={},
business_contact_email='',
doing_business_as=''):
doing_business_as='',
number_of_employees=''):
return self.client.request('POST', ('Profile', ),
to_param_dict(self.create, locals()))


# params values should be dictionary like
# {'address': {}, 'authorized_contact': {}, 'entity_type':'', 'vertical': '', 'company_name': '', 'website':'', 'business_contact_email':'', 'doing_business_as':''}
# {'address': {}, 'authorized_contact': {}, 'entity_type':'', 'vertical': '', 'company_name': '', 'website':'', 'business_contact_email':'', 'doing_business_as':'', 'number_of_employees':''}
def update(self,profile_uuid, params=None):
if params == None:
raise ValidationError(
Expand Down
2 changes: 1 addition & 1 deletion plivo/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
__version__ = '4.60.2'
__version__ = '4.60.3'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='plivo',
version='4.60.2',
version='4.60.3',
description='A Python SDK to make voice calls & send SMS using Plivo and to generate Plivo XML',
long_description=long_description,
url='https://github.com/plivo/plivo-python',
Expand Down
1 change: 1 addition & 0 deletions tests/resources/fixtures/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_1_AND_10",
"ein": "111111111",
"ein_issuing_country": "US",
"entity_type": "PUBLIC_PROFIT",
Expand Down
5 changes: 3 additions & 2 deletions tests/resources/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def test_create(self):
"seniority": "C_LEVEL"
},
business_contact_email="employee@company.com",
doing_business_as="Test DBA"
doing_business_as="Test DBA",
number_of_employees="BETWEEN_1_AND_10"
)
self.assertEqual('POST', self.client.current_request.method)
self.assertUrlEqual(
Expand Down Expand Up @@ -74,7 +75,7 @@ def test_delete(self):

@with_response(200)
def test_update(self):
param = {'company_name': 'google', 'doing_business_as': 'Updated DBA'}
param = {'company_name': 'google', 'doing_business_as': 'Updated DBA', 'number_of_employees': 'BETWEEN_11_AND_50'}
response = self.client.profile.update(profile_uuid='09322f43-fe16-4525-b8e4-4229c867795d', params=param)
# Verifying the endpoint hit
print(self.client.current_request.url)
Expand Down
Loading