Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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.59.4](https://github.com/plivo/plivo-python/tree/v4.59.4) (2026-01-09)
**Feature - Profile API business_contact_email support**
- Added `business_contact_email` parameter support to Profile `create` and `update` methods for PUBLIC entity types

## [4.59.3](https://github.com/plivo/plivo-python/tree/v4.59.3) (2025-10-08)
**Feature - New Param added for Start Recording API.**
- Support `transcription_report_type` in Start Recording API and `transcriptionReportType` in Record XML.
Expand Down
8 changes: 5 additions & 3 deletions plivo/resources/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def delete(self, profile_uuid):
alt_business_id_type=[optional(of_type(six.text_type))],
plivo_subaccount=[optional(of_type(six.text_type))],
address=[optional(of_type_exact(dict))],
authorized_contact=[optional(of_type_exact(dict))])
authorized_contact=[optional(of_type_exact(dict))],
business_contact_email=[optional(of_type(six.text_type))])
def create(self,
profile_alias,
customer_type,
Expand All @@ -75,13 +76,14 @@ def create(self,
stock_exchange='',
website='',
address={},
authorized_contact={}):
authorized_contact={},
business_contact_email=''):
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':''}
# {'address': {}, 'authorized_contact': {}, 'entity_type':'', 'vertical': '', 'company_name': '', 'website':'', 'business_contact_email':''}
def update(self,profile_uuid, params=None):
if params == None:
raise ValidationError(
Expand Down
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.59.3',
version='4.59.4',
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
41 changes: 21 additions & 20 deletions tests/resources/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,35 @@ class ProfileTest(PlivoResourceTestCase):
@with_response(200)
def test_create(self):
response = self.client.profile.create(
profile_alias="profile name sample",
profile_alias="Test Profile",
customer_type="DIRECT",
entity_type="PRIVATE",
company_name="ABC Inc.",
ein="123456789",
entity_type="PUBLIC",
company_name="Test Company Inc",
ein="12-3456789",
ein_issuing_country="US",
stock_symbol="ABC",
stock_exchange="NSE",
website="www.example.com",
vertical="REAL_ESTATE",
stock_symbol="TEST",
stock_exchange="NASDAQ",
website="https://testcompany.com",
vertical="TECHNOLOGY",
alt_business_id="",
alt_business_id_type="NONE",
plivo_subaccount="123433566",
plivo_subaccount="",
address={
"street": "123",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"street": "123 Main Street",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
authorized_contact={
"first_name": "john",
"last_name": "con",
"phone": "1876865565",
"email": "[email protected]",
"title": "con",
"seniority": "admin"
}
"first_name": "John",
"last_name": "Doe",
"phone": "+14155551234",
"email": "[email protected]",
"title": "CEO",
"seniority": "C_LEVEL"
},
business_contact_email="[email protected]"
)
self.assertEqual('POST', self.client.current_request.method)
self.assertUrlEqual(
Expand Down
Loading