Skip to content

Commit 4307537

Browse files
Merge pull request #301 from avinashp-plivo/add-business-contact-email
Add business contact email
2 parents d0588c0 + 84eb043 commit 4307537

4 files changed

Lines changed: 31 additions & 24 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Change Log
2+
## [4.59.4](https://github.com/plivo/plivo-python/tree/v4.59.4) (2026-01-13)
3+
**Feature - Profile API business_contact_email support**
4+
- Added `business_contact_email` parameter support to Profile `create` and `update` methods for PUBLIC entity types
5+
26
## [4.59.3](https://github.com/plivo/plivo-python/tree/v4.59.3) (2025-10-08)
37
**Feature - New Param added for Start Recording API.**
48
- Support `transcription_report_type` in Start Recording API and `transcriptionReportType` in Record XML.

plivo/resources/profile.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ def delete(self, profile_uuid):
5959
alt_business_id_type=[optional(of_type(six.text_type))],
6060
plivo_subaccount=[optional(of_type(six.text_type))],
6161
address=[optional(of_type_exact(dict))],
62-
authorized_contact=[optional(of_type_exact(dict))])
62+
authorized_contact=[optional(of_type_exact(dict))],
63+
business_contact_email=[optional(of_type(six.text_type))])
6364
def create(self,
6465
profile_alias,
6566
customer_type,
@@ -75,13 +76,14 @@ def create(self,
7576
stock_exchange='',
7677
website='',
7778
address={},
78-
authorized_contact={}):
79+
authorized_contact={},
80+
business_contact_email=''):
7981
return self.client.request('POST', ('Profile', ),
8082
to_param_dict(self.create, locals()))
8183

8284

8385
# params values should be dictionary like
84-
# {'address': {}, 'authorized_contact': {}, 'entity_type':'', 'vertical': '', 'company_name': '', 'website':''}
86+
# {'address': {}, 'authorized_contact': {}, 'entity_type':'', 'vertical': '', 'company_name': '', 'website':'', 'business_contact_email':''}
8587
def update(self,profile_uuid, params=None):
8688
if params == None:
8789
raise ValidationError(

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name='plivo',
13-
version='4.59.3',
13+
version='4.59.4',
1414
description='A Python SDK to make voice calls & send SMS using Plivo and to generate Plivo XML',
1515
long_description=long_description,
1616
url='https://github.com/plivo/plivo-python',

tests/resources/test_profile.py

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,35 @@ class ProfileTest(PlivoResourceTestCase):
66
@with_response(200)
77
def test_create(self):
88
response = self.client.profile.create(
9-
profile_alias="profile name sample",
9+
profile_alias="Test Profile",
1010
customer_type="DIRECT",
11-
entity_type="PRIVATE",
12-
company_name="ABC Inc.",
13-
ein="123456789",
11+
entity_type="PUBLIC",
12+
company_name="Test Company Inc",
13+
ein="12-3456789",
1414
ein_issuing_country="US",
15-
stock_symbol="ABC",
16-
stock_exchange="NSE",
17-
website="www.example.com",
18-
vertical="REAL_ESTATE",
15+
stock_symbol="TEST",
16+
stock_exchange="NASDAQ",
17+
website="https://testcompany.com",
18+
vertical="TECHNOLOGY",
1919
alt_business_id="",
2020
alt_business_id_type="NONE",
21-
plivo_subaccount="123433566",
21+
plivo_subaccount="",
2222
address={
23-
"street": "123",
24-
"city": "New York",
25-
"state": "NY",
26-
"postal_code": "10001",
23+
"street": "123 Main Street",
24+
"city": "San Francisco",
25+
"state": "CA",
26+
"postal_code": "94105",
2727
"country": "US"
2828
},
2929
authorized_contact={
30-
"first_name": "john",
31-
"last_name": "con",
32-
"phone": "1876865565",
33-
"email": "xyz@plivo.com",
34-
"title": "con",
35-
"seniority": "admin"
36-
}
30+
"first_name": "John",
31+
"last_name": "Doe",
32+
"phone": "+14155551234",
33+
"email": "test@example.com",
34+
"title": "CEO",
35+
"seniority": "C_LEVEL"
36+
},
37+
business_contact_email="employee@company.com"
3738
)
3839
self.assertEqual('POST', self.client.current_request.method)
3940
self.assertUrlEqual(

0 commit comments

Comments
 (0)