diff --git a/CHANGELOG.md b/CHANGELOG.md index 9853b632..4a7a0f3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Change Log +## [4.59.4](https://github.com/plivo/plivo-python/tree/v4.59.4) (2026-01-13) +**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. diff --git a/plivo/resources/profile.py b/plivo/resources/profile.py index a3fbe342..74988316 100644 --- a/plivo/resources/profile.py +++ b/plivo/resources/profile.py @@ -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, @@ -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( diff --git a/setup.py b/setup.py index eed8d66c..49df99c4 100644 --- a/setup.py +++ b/setup.py @@ -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', diff --git a/tests/resources/test_profile.py b/tests/resources/test_profile.py index 4b8ff91f..54611281 100644 --- a/tests/resources/test_profile.py +++ b/tests/resources/test_profile.py @@ -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": "xyz@plivo.com", - "title": "con", - "seniority": "admin" - } + "first_name": "John", + "last_name": "Doe", + "phone": "+14155551234", + "email": "test@example.com", + "title": "CEO", + "seniority": "C_LEVEL" + }, + business_contact_email="employee@company.com" ) self.assertEqual('POST', self.client.current_request.method) self.assertUrlEqual(